Repeat Through Actions
version 2 by Ron Newcomb
Documentation
This extension allows us to write repeat phrases that step through a game's actions. The most general runs through every action defined in the game. Incidentally, we can also ask if the action is out-of-world.
Instead of thinking:
say "The possibilities are practically endless.";
repeat with possibility running through every action begin;
say "[The possibility][if the possibility is out of world] (out of world)[end if].";
end repeat.
A second form steps through a kind of action.
Kissing is unmaidenly behavior.
Touching is unmaidenly behavior.
Drinking is unmaidenly behavior.
Accusing of is unmaidenly behavior.
Instead of asking someone about "etiquette/manners":
say "There are some things that a lady should never do. ";
repeat with taboo running through every kind of unmaidenly behavior begin;
say "[one of]Like[or]Or[stopping] [taboo]. ";
end repeat;
Remember that these deal with abstract actions, not with specific examples of actions. (Specific examples are called stored actions.) So, if we wish to insert these into a table, or pass them to To phrases, we use the action-name type.
A characteristic is a kind of value. Some characteristics are inquisitive, socialized.
Table of Traits & Moods
| reaction | trait | ||
| an action-name | a characteristic | ||
| the saying sorry action | socialized | ||
| the asking it about action | inquisitive |
We may ask if a kind of action "involves" an abstract action.
let taboo be the reaction entry;
if the taboo involves undoglike behavior, say "But if you do this, you'll tip them off that you're not really a dog.";
Finally, and least importantly, we may convert abstract actions to and from numbers.
say "The 5th action is [5 as an action-name]. The Removing It From action is action #[the removing it from action as a number].";
If we include the extension Editable Stored Actions, we can directly modify the action-name part of a stored action.
Include Repeat Through Actions by Ron Newcomb, Editable Stored Actions by Ron Newcomb.
Place is a room. A mysterious gizmo is a thing in place.
Examining is usual I-F.
Taking is usual I-F.
Dropping is usual I-F.
Waving is usual I-F.
Switching on is usual I-F.
Instead of examining:
let the suggested command be the action of examining the noun;
say "A few things to try with the [noun]: ";
repeat with possibility running through the usual I-F actions begin;
change the action-name part of the suggested command to the possibility;
say "[one of][or], [stopping][the suggested command]";
end repeat;
say ".";