Terminator — 2 of 33

Matt Weiner

Release 0

Section 0 - Every Turn Kludge

[In this version this is shipping with a bug where if the last multicommand results in a parser error the every turn rules won't run in the ordinary way. Hope to fix this in testing period with Daniel's help. In the meantime, here's a hack to make sure the every turn rules run before the command prompt prints.]

When play begins: now the command prompt is "[kick the every turn rules]>". [The first command prompt won't kick the every turn because the acting out of world flag hasn't been set to false yet.]

Acting out of world is initially true.

Looking is acting fast when the person asked is a robot.

Before a robot going or waiting or moving toward or taking or dropping (this is the make robot action take time rule): [There are so few permissible actions that it's easiest to list them by hand. MUST UPDATE THIS IF ANOTHER ACTION IS ADDED like moving away from]

now acting out of world is false. [Note that "taking inventory" wasn't on the list, so that's a free action. Also looking is free.]

Before waiting when the action is not silent (this is the explicit waiting takes time rule):

now acting out of world is false. [This is the only thing the player can do to take time. And this is important, since it gives us the initial report after the first look action. "The action is not silent" is needed to take care of the wait that happens at the end of mutlicommands (built into Multiple Actors); we don't want that to take time if the robots' action didn't take time (which i think applies only to inventory and failed actions). When we do want a silent wait to take time, to print the initial robot descriptions at the beginning of Tutorial and Rescue Mission, we need to set acting out of world to false before trying it.]

Kicking the every turn rules is initially false.

First every turn:

if kicking the every turn rules is false or the disambiguation status is about to ask for disambiguation or acting out of world is true:

if the disambiguation status is about to ask for disambiguation, now the disambiguation status is currently disambiguating; [after asking for a disambiguation response, the command prompt kicks the every turn rules, and we wind up here, so here's where we tell the game to treat the next command as a disambiguation response; this is defined in the chapter Commanding Robots, section Some Disambiguation Stuff]

rule succeeds;

otherwise if kicking the every turn rules is true:

now acting out of world is true.

Last every turn:

Now kicking the every turn rules is false.

To say kick the every turn rules:

debug say "Kicking.";

now kicking the every turn rules is true;

follow the every turn rulebook.