I just discovered a weird bug in my WIP and traced it to a rule with a preamble of the form:
“Every turn in the presence of X when the location is Y and the Z door is closed:”
I tried to make an example that included an “every turn in the presence of” rule, but to my surprise, I got a compiler error saying “in the presence of” can only be used in an action description! Why doesn’t my WIP get a compiler error? Has anyone else encountered this problem?
I’ll check that out sometime. I just looked at the one remaining instance of “in the presence,” from an actual action description, and I’m amazed how many trivial tests are performed:
if (((((action ==##A132_x) && (actor==player) && (((I149_y == I149_y) && (true))&& (TestScope(I149_y, actor))))))) { ! Runs only while condition holds
And then it runs TestScope - doesn’t that loop over the entire scope? Remind me not to use that in frequently consulted rules!