Unlisting rules

A discussion of a specific problem has led me to a question about unlisting rules.

Suppose I want to override the “block waking rule” in some specific case. What are the consequences of unlisting the block waking rule? (a quick check reveals that “wake [someone]” produces no output at all. Not good!) If I want to preserve its behavior in other cases, do I have to reimplement it in a more specific form?

You are correct.

Or, ensure all your new rules are listed before the block, and use “instead” or “rule succeeds” so they preempt the block.

How does this work exactly? “Rule succeeds” seems to get me farther than I was getting with “continue the action,” but now I get no output:


Bedroom is a room.

Rip Van Winkle is a man in the bedroom.

Check waking rip van winkle (this is the okay to wake rip van winkle rule): Rule succeeds.

Carry out waking rip van winkle:
Try jumping.[/code]

“Rule succeeds” in the check rule means the entire action ends in success, so is the same as “stop the action” except that the action is considered successful. My general advice is this:

  • If the default outcome of an action is success, use the check rules to close off exceptions and carry out/report rules to handle the general case. For example, if there’s a door that can’t be opened in some cases even though it’s not locked, use a check rule to prevent opening it.
  • If the default outcome is failure, use a check rule to block all actions by default (as most of the standard library actions do) and use instead rules to allow exceptions.

So I’d recommend that you use an instead rule to wake up van Winkle. If you want to use the check-carry out-report rules, you’ll have to remove the block waking rule (which is nothing more than printing the default message and stopping the action) and rewrite the check rules to suit your purposes.

Thanks for explaining that. I think I have a much better picture of how check rules work now.