Changing default response for multiple objects

That’s the one that breaks with multiple-examining, yeah. If you ever have “before/after reading a command” rules that are meant to be tied to one specific action, you should try:

  • YOUR ACTION THEN SOMETHING
  • SOMETHING THEN YOUR ACTION
  • YOUR ACTION THEN YOUR ACTION

The first one will usually work, the second one will break if you’re trying to do specific command parsing in an “after reading a command” rule, and the third one will break if you’re resetting variables in a “before/after reading a command” rule.

For another example, Counterfeit Monkey will choke if you WAVE X-REMOVER AT SOMETHING THEN WAVE Y-REMOVER AT SOMETHING, because it uses an “after reading a command” rule to check what letter the remover should be set to. In 99% of cases, “after reading a command” rules are a dangerous trap; they’ll work just barely well enough that you won’t realize all the hidden assumptions they break.

The easiest solution is to forbid THEN and periods, but I’m not fond of that; it’s just spackling over the problem and annoying players to hide the bug. The real solution would be to add a new activity that runs every time parsing starts on a new command—that is, at the beginning, and after finding a THEN or a period—but the way the guts of the parser work makes this also difficult.

(Hmm…though not too difficult any more, in Inform 10. Maybe I could make an extension to do it…)