I want a game to have a custom response to commands like “Destroy everything” and “Destroy the world” and “Obliterate all.”
Constructing it is pretty easy … I can add “obliterate” to the “attack” synonyms; I can make a “the world” scenery object to direct things toward, and so on.
But I keep running afoul of the built-in “multiple noun” restrictions on “everything” and “all.”
I don’t want the command to succeed; I just want to customize the response. Do I need to create a new action (to replace “attack”) or is there some rule that can be unlisted somewhere? Or somesuch?
Unlisting a rule won’t work. The problem is going to be that, when you have Inform set up to understand a command that applies to multiple objects, it figures out what each of those objects are and then applies the command to them one by one. For instance, “take all” gives you a separate “taken” for each object.
So if you want a single response to “obliterate all,” you might have to write a rule that catches that the player is obliterating multiple objects, runs once, and then doesn’t run again the rest of the turn. Check out the example “The Left Hand of Autumn” in the documentation.
If you just want to print a clever response to “obliterate all” and don’t much care about which particular collection of things is being obliterated, you can try this:
To decide what action-name is the action-to-be: (- action_to_be -).
Rule for printing a parser error when the latest parser error is the can't use multiple objects error and the action-to-be is the attacking action: say "One at a time!"
Note that it will give the same response to “attack jordan and taylor” as to “obliterate everything”.
If it doesn’t work to process it as a mistake, I’d probably set up an action like this:
[code]Annihilating is an action applying to one topic.
Understand “attack [text]” as annihilating.
Check annihilating: say “That’s not something you can destroy.”
Instead of annihilating “all/everything/world”: say “If only you could…”[/code]