I'm serious. Right now it uses JSON, a data format. And any moderately functional automizer profile quickly develops into a nightmare of deeply nested, branching potentialities. It winds up completely inscrutable.
But even a complex automizer profiler could be better expressed by switch statements, or even if-then-else statements. Much more expressive, much less verbose. And it's not like we have grave security concerns that discount Turing-complete languages.
e.g. right now my generic "destroy unenchanted equipment" rule looks like this
Code: Select all
[
  {
    "action": "destroy",
    "condition": {
      "conditions": [
        {
          "conditions": [
            {
              "symbol": ")",
              "type": "symbol"
            },
            {
              "symbol": "(",
              "type": "symbol"
            },
            {
              "symbol": "]",
              "type": "symbol"
            },
            {
              "symbol": "[",
              "type": "symbol"
            },
            {
              "symbol": "/",
              "type": "symbol"
            },
            {
              "symbol": "\\",
              "type": "symbol"
            },
            {
              "symbol": "|",
              "type": "symbol"
            }
          ],
          "type": "or"
        },
        {
          "conditions": [
            {
              "status": "average",
              "type": "status"
            },
            {
              "status": "bad",
              "type": "status"
            }
          ],
          "type": "or"
        }
      ],
      "type": "and"
    },
    "module": "ToME",
    "name": "Destroy Average Stuff"
  }
]Code: Select all
if object.symbol in [ "[", "]", "(", ")", "|", "/", "\" ]:
    if object.status in [ "average", "bad" ]:
        object.destroyCode: Select all
if object.symbol in [ "[", "]", "(", ")", "|", "/", "\" ]:
    if object.status in [ "average", "bad" ]:
        if not "Dark Sword" in object.name:
            object.destroy
What say you all?

