Skip to main content
removed bad answer
Source Link
Drew G
  • 890
  • 5
  • 14

You can't do nested but you can chain them:

foo:1[AND]bar:2[OR]bar:3

I'm pretty sure it'll do a left-to-right check so it'll check if foo:1 AND bar:2 then if bar:2 OR bar:3update

So you could simulate what you want by doing:(removed my incorrect answer)

bar:2[OR]bar:3[OR]foo:1[AND]foo:1

ieI was looking at the JS that parses these showons and it seems that using more than one AND/OR chain isn't going to produce correct results. Only the last pair's results will be used as the deciding factor.

alpha[OR]skoda[OR]car[AND]car

The logic here iseg:

   barfoo:1[AND]bar:2[OR]bar:3 => does your (alpha OR skoda) check

bar:3[OR]foo:1 => this is only needed so we can geteffectively shortened to foobar:1[AND]foo2[OR]bar:1 but it'll fail if both car and alpha3 fail, which is what you'd want anyway.

foo:1[AND]foo:1 => Makes sure car is true

I haven't confirmed/tested this, but I think my logic is correct.. Not what you want.

You can't do nested but you can chain them:

foo:1[AND]bar:2[OR]bar:3

I'm pretty sure it'll do a left-to-right check so it'll check if foo:1 AND bar:2 then if bar:2 OR bar:3

So you could simulate what you want by doing:

bar:2[OR]bar:3[OR]foo:1[AND]foo:1

ie

alpha[OR]skoda[OR]car[AND]car

The logic here is:

 bar:2[OR]bar:3 => does your (alpha OR skoda) check

bar:3[OR]foo:1 => this is only needed so we can get to foo:1[AND]foo:1 but it'll fail if both car and alpha fail, which is what you'd want anyway.

foo:1[AND]foo:1 => Makes sure car is true

I haven't confirmed/tested this, but I think my logic is correct...

update

(removed my incorrect answer)

I was looking at the JS that parses these showons and it seems that using more than one AND/OR chain isn't going to produce correct results. Only the last pair's results will be used as the deciding factor.

eg:  foo:1[AND]bar:2[OR]bar:3 is effectively shortened to bar:2[OR]bar:3.

Not what you want.

Source Link
Drew G
  • 890
  • 5
  • 14

You can't do nested but you can chain them:

foo:1[AND]bar:2[OR]bar:3

I'm pretty sure it'll do a left-to-right check so it'll check if foo:1 AND bar:2 then if bar:2 OR bar:3

So you could simulate what you want by doing:

bar:2[OR]bar:3[OR]foo:1[AND]foo:1

ie

alpha[OR]skoda[OR]car[AND]car

The logic here is:

bar:2[OR]bar:3 => does your (alpha OR skoda) check

bar:3[OR]foo:1 => this is only needed so we can get to foo:1[AND]foo:1 but it'll fail if both car and alpha fail, which is what you'd want anyway.

foo:1[AND]foo:1 => Makes sure car is true

I haven't confirmed/tested this, but I think my logic is correct...