While touching up an IFComp entry, I noticed a case where I was trying to squash report/after rules, but I couldn’t.
The problem is this: if I exit from a “carry out” rule, the report/after rules fire no matter how I try to quash said “carry out” rule.
r1 is a room. mycmding is an action applying to nothing. understand the command "mycmd" as something new. understand "mycmd" as mycmding. carry out mycmding: let Q be the remainder after dividing turn count by 5; say "[Q]."; if Q is 0, do nothing instead; if Q is 1, the rule fails; if Q is 2, stop the action; if Q is 3, the rule succeeds; if Q is 4, reject the player's command; report mycmding: say "Report MYCMDING fired."; continue the action; after mycmding: say "After MYCMDING fired."; continue the action;
If I try typing in MYCMD after building, the REPORT and AFTER rules always fire.
Is there any way to stop “after/report” rules from firing once a “carry out” has been executed? (Besides, say, using a boolean e.g. “after mycmding when cmd-successful is true”?
In my case, I found a check rule that gets around this. It requires scanning through a small table twice, but that’s not a big deal.
Still, I feel like I’m missing something here, that there should be a way to bail from a “carry out” rule without the after/report rules firing.
But if it’s no possible, that’s okay, too, and good to know. Thanks!