I have an evaluation rule that isn't working. The condition that should clear it doesn't. The thing that confuses me is that as far as I can tell, it's logically identical to another rule that works perfectly well.
Both scripts have been added as Eval Rules, and both scripts have had their timing set for Validation, 100.
Here's the non-working script:
Here's the working script:
Originally, the non-working script had a few "elseif" statements to check the existence of other stunts, but I took those out to simplify troubleshooting.
I copied and pasted the code from the working script stunt to the non-working stunt. I copied and pasted the name of the pwrInhuRec stunt, so there should not be any typos. I still checked, though, and I can't see any.
I tried changing the timing on the non-working script to Initialization:200, wondering if it had to run after its counterpart. That didn't help.
I removed the script from the other stunt to see if there was a recursion problem. That didn't help either.
Either I'm missing something simple and stupid, or there's a bug. I've learned from my other scripting experiences that when it comes down to those two options, it's most often the case that I'm missing something simple and stupid.
Both scripts have been added as Eval Rules, and both scripts have had their timing set for Validation, 100.
Here's the non-working script:
Code:
if (hero.findchild[Stunt].tagis[thingid.pwrInhuRec] <> 0) then
@valid = 1
done
endif
@valid = 0
linkvalid = 0
@message = "This ability requires a Toughness power."
Here's the working script:
Code:
if (hero.findchild[Stunt].tagis[thingid.pwrCatch] <> 0) then
@valid = 1
done
endif
@valid = 0
linkvalid = 0
@message = "This ability requires a Catch."
Originally, the non-working script had a few "elseif" statements to check the existence of other stunts, but I took those out to simplify troubleshooting.
I copied and pasted the code from the working script stunt to the non-working stunt. I copied and pasted the name of the pwrInhuRec stunt, so there should not be any typos. I still checked, though, and I can't see any.
I tried changing the timing on the non-working script to Initialization:200, wondering if it had to run after its counterpart. That didn't help.
I removed the script from the other stunt to see if there was a recursion problem. That didn't help either.
Either I'm missing something simple and stupid, or there's a bug. I've learned from my other scripting experiences that when it comes down to those two options, it's most often the case that I'm missing something simple and stupid.