"Terminator" by Matt Weiner The story headline is "A Robot Rescue". The release number is 0. Use American dialect and the serial comma. Include Multiple Actors by Daniel Stelzer. Release along with the source text and cover art ("Mercury in partial sunlight."). Release along with an interpreter. 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. Chapter 1 - Disallowing "Debug" (for release only) Understand "debug" as a mistake ("You can't use debug commands in the release build of this game.") Chapter 2 - The Player and the Spaceship [the player is in a room that doesn't matter at all; this should prevent the robots from interacting with the PC] This is the print the pre-banner rule: say "You're in your bunk when a buzz comes from the rest of the crew of the Tiptree. 'Why is the Russ landing so close to the terminator?'[paragraph break]'They're reversing thrust--they're gonna land hard!'[paragraph break]Then pandemonium, until the Tiptree has settled down somewhere to the west of the Russ's wreckage. It's a mess--the six astronauts from the Russ are scattered around, incapacitated. The terminator, the line between light and dark, is approaching from the east, and on this planet anything but a fully-shielded spaceship that gets caught in the sun will fry. The only thing that can rescue them is the Russ's robots. And you're the robot whisperer." Cabin of the Tiptree is a room. "[one of][run paragraph on][or]You barely notice the furious tumult of the crew in the cabin around you. You have to command the robots on the surface.[stopping]". The room description heading rule is not listed in any rulebook. [No need to print the room name, which is completely irrelevant. Could probably do without the room description.] Printing the banner for the first time is initially true. After printing the banner text when printing the banner for the first time is true: say "[line break]This is an emergency hack job. Robots like this are designed to be commanded from a central station that can synthesize their reports and coordinate their locations. That got smashed with the Russ. You've patched on to their frequency, but all you'll get from them is simple visual reports--they can't even recognize each other, let alone tell you where they are.[paragraph break]You trained for this, though. Your mind flashes back to that drill.[paragraph break][bracket]You can stop the tutorial by typing 'WAKE', but if you have never played Terminator you should play the tutorial. Even if you're used to interactive fiction, Terminator's method of interaction is non-standard. For more information on the game, type 'ABOUT.'[close bracket][conditional paragraph break]"; now printing the banner for the first time is false; now acting out of world is false; [so the silent try of waiting still triggers the every turn rules] try silently waiting. [This should get us an initial report from the robots--I hope.] Looking is acting fast. [It shouldn't take time. This doesn't seem to be working, though. Well, players shouldn't look.] Before doing anything other than looking or waiting or waking up or launching: say "You aren't down there on the surface yourself. You have to issue commands to the robots." instead. [We have to include waiting because Multiple Actors issues a silent "wait" to make time pass. Also, I guess the player can wait if that floats their boat. Waking up stops the tutorial.] Planet is a room. The spaceship exterior is a thing in the Planet. The printed name of the spaceship exterior is "spaceship". The indefinite article of the spaceship exterior is "your". The sight radius of the spaceship exterior is 3. After deciding the scope of the player: place the planet in scope. Chapter 3 - Robots and Their Stuff A robot is a kind of person. [A robot is usually privately-named.] [That would only work with the fancy parsing stuff that's been shelved.] A robot is usually neuter. A scout is a kind of robot. Alpha is a scout. Beta is a scout. Gamma is a scout. A hauler is a kind of robot. Delta is a hauler. Epsilon is a hauler. Zeta is a hauler. Understand "robot" or "bot" as the plural of robot when the multicommand flag is false. Understand "robot" or "bot" as a robot when the multicommand flag is true and the person asked surveys the item described. [This should mean that "robot, get robot" will be a command issued to every robot and understood about an individual robot. It would mess up for the player's own actions, I think, but those have all been blocked. The second clause ensures that "Beta, move toward robot" will only accept the robots that Beta can see.] Understand "robots" or "bots" as the plural of robot. Understand "scout" as the plural of scout when the multicommand flag is false. Understand "scout" as a scout when the multicommand flag is true and the person asked surveys the item described. Understand "scouts" as the plural of scout. A beacon is a kind of thing. Beacon One is a beacon. Beacon Two is a beacon. Beacon Three is a beacon. Understand "beacon 1" as Beacon One. Understand "beacon 2" as Beacon Two. Understand "beacon 3" as Beacon Three. Ownership relates one scout (called the owner) to one beacon. The verb to own means the ownership relation. Alpha owns Beacon One. Beta owns Beacon Two. Gamma owns Beacon Three. Understand "hauler" as the plural of hauler when the multicommand flag is false. Understand "hauler" as a hauler when the multicommand flag is true and the person asked surveys the item described. Understand "haulers" as the plural of hauler. A robot has a number called slowness. [Number of turns it takes to move a square.] The slowness of a scout is usually 1. The slowness of a hauler is usually 2. [Before reading a command: check the multicommand flag. After reading a command: check the multicommand flag. Before asking which do you mean: check the multicommand flag. Every turn: check the multicommand flag. To check the multicommand flag: debug say "Multicommand flag is [multicommand flag]."] A thing can be responsive or unresponsive. A thing is usually responsive. [This applies to everything that has been caught by the terminator.] Persuasion rule: if the person asked is responsive: persuasion succeeds; otherwise: say "[The person asked] has overheated in the brutal sunlight." Chapter 4 - Grid Mechanics and Miscellaneous Math The grid size is always 18. [Maybe make this a variable for difficulty settings?] A thing has a number called x-coordinate. A thing has a number called y-coordinate. The x-coordinate of a thing is usually -99. The y-coordinate of a thing is usually -99. [-99 means off the grid.] To decide whether (x - a number) by (y - a number) is on the grid: if x < 1, no; if y < 1, no; if x > grid size, no; if y > grid size, no; yes. To decide whether (x - a number) by (y - a number) is off the grid: if x by y is on the grid, no; yes. Table of Direction Increments direction x-increment y-increment north 0 1 west -1 0 south 0 -1 east 1 0 northwest -1 1 northeast 1 1 southwest -1 -1 southeast 1 -1 Definition: a direction is compass if it is a direction listed in the Table of Direction Increments. To decide what number is the squared distance from (x - number) by (y - number) to (z - number) by (w - number): decide on ((x - z) * (x - z)) + ((y - w) * (y - w)). To decide what number is the squared distance from (item - thing) to (x - number) by (y - number): decide on the squared distance from the x-coordinate of the item by the y-coordinate of the item to x by y. To decide what number is the squared distance from (item one - thing) to (item two - thing): decide on the squared distance from the x-coordinate of item one by the y-coordinate of item one to the x-coordinate of item two by the y-coordinate of item two. To decide what number is (m - a number) roundly divided by (n - a number): if m < 0: [This is m/n + 1/2 rounded down, which is the same as m/n rounded to the nearest whole number; except that when m is negative we need to make the 1/2 negative too. Don't risk this if n is negative.] decide on ((2 * m) - n) divided by (2 * n); otherwise: decide on ((2 * m) + n) divided by (2 * n). To decide which direction is the direction (item1 - thing) lies from (item2 - thing): let delta-x be the x-coordinate of item1 minus the x-coordinate of item2; let delta-y be the y-coordinate of item1 minus the y-coordinate of item2; if delta-x is greater than 0: [item1 is somewhere to the east] if (41 * delta-y) is greater than (100 * delta-x), decide on north; [the tangent of 22.5 degrees is about .41, so this basically checks to see if item1 is more north than northeast] if (100 * delta-y) is greater than (41 * delta-x), decide on northeast; if (delta-y * -41) is greater than (100 * delta-x), decide on south; if (delta-y * -100) is greater than (41 * delta-x), decide on southeast; [note that the order we do these in matters. If the item1 is almost due south, it'll pass this check too; but we've already decided on south. And if it fails all the checks it falls in between southeast and southwest, so we decide on east] decide on east; if delta-x is less than 0: [item1 is somewhere to the west] if (41 * delta-y) is greater than (delta-x * -100), decide on north; [the tangent of 22.5 degrees is about .41] if (100 * delta-y) is greater than (delta-x * -41), decide on northwest; if (delta-y * -41) is greater than (delta-x * -100), decide on south; if (delta-y * -100) is greater than (delta-x * -41), decide on southwest; decide on west; if delta-y is greater than 0, decide on north; [if no decision has been made, delta-x is 0, so item1 is directly north-south] if delta-y is less than 0, decide on south; decide on down. [item1 is at the same coordinates as item2] Chapter 5 - Robot Movement A robot has a number called the x-displacement. A robot has a number called the y-displacement. [position within a grid square] To decide what number is the maximum displacement of (bot - a robot): decide on the slowness of bot + 1. Check a robot going (this is the robots can move horizontally rule): unless the noun is a compass direction, stop. Unsuccessful attempt by a robot (called bot) going when the reason the action failed is the robots can move horizontally rule: say "[Bot] can only understand orders to move in compass directions." Check a robot (called bot) going (this is the can't move off the grid rule): choose a row with a direction of the noun in the Table of Direction Increments; let new x be the x-coordinate of the bot plus the x-increment entry; let new y be the y-coordinate of the bot plus the y-increment entry; if new x by new y is off the grid: stop the action. Unsuccessful attempt by a robot (called bot) going when the reason the action failed is the can't move off the grid rule: say "[Bot] has gone as far as it can from the wrecked ship's central transmitter." Check a robot going in the Hold of the Tiptree (this is the parked robots don't move rule): stop the action. Unsuccessful attempt by a robot (called bot) going when the reason the action failed is the parked robots don't move rule: say "[Bot] is in the hold of the Tiptree; to make it able to move again, tell it to 'EXIT'." The can't go that way rule is not listed in the check going rulebook. Carry out a robot (called the bot) going a direction (called the way) (this is the robot movement rule): debug say "Going [way] from [x-coordinate of the bot], [y-coordinate of the bot], [x-displacement of the bot], [y-displacement of the bot]."; choose a row with a direction of the way in the Table of Direction Increments; now the x-displacement of the bot is the x-displacement of the bot plus the x-increment entry; now the y-displacement of the bot is the y-displacement of the bot plus the y-increment entry; if the x-displacement of the bot is at most 0: now the x-coordinate of the bot is the x-coordinate of the bot minus 1; now the x-displacement of the bot is the x-displacement of the bot plus slowness of the bot; otherwise if the x-displacement of the bot is at least the maximum displacement of the bot: now the x-coordinate of the bot is the x-coordinate of the bot plus 1; now the x-displacement of the bot is the x-displacement of the bot minus the slowness of the bot; if the y-displacement of the bot is at most 0: now the y-coordinate of the bot is the y-coordinate of the bot minus 1; now the y-displacement of the bot is the y-displacement of the bot plus slowness of the bot; otherwise if the y-displacement of the bot is at least the maximum displacement of the bot: now the y-coordinate of the bot is the y-coordinate of the bot plus 1; now the y-displacement of the bot is the y-displacement of the bot minus the slowness of the bot. The move player and vehicle rule is not listed in the carry out going rulebook. The describe room gone into rule does nothing when the room gone to is nothing. Report a robot going: say "[The person asked]: traveling [noun]." Chapter 6 - Robot Vision Section 1 - Describing What Can Be Seen An object has some text called the seen name. The seen name of an object is usually "[printed name of the item described]". The seen name of a scout is usually "[if the disambiguation status is about to ask for disambiguation]the [otherwise if the asking which do you mean activity is not going on]a [end if]scout". The seen name of a hauler is usually "[if the disambiguation status is about to ask for disambiguation]the [otherwise if the asking which do you mean activity is not going on]a [end if]hauler". To say sun-caught status of (item - a thing): if the item is unresponsive, say " caught in the sunlight". A robot has a stored action called the current attempt. A robot can be successful or unsuccessful. First before a robot (called bot) doing something (this is the record robot action rule): now the bot is unsuccessful; now the current attempt of the bot is the current action. First after a robot (called the bot) doing something other than looking or taking inventory (this is the mark success rule): [We don't want the robots to be described by other robots as looking or taking inventory, so we don't mark those actions as successful] now the bot is successful; continue the action. To say action description of (bot - a robot): say seen name of bot; if the bot is successful: let the attempt in question be the current attempt of the bot; say ", [participle part of the attempt in question]"; if the noun part of the attempt in question is not nothing: if the noun part of the attempt in question is a thing: say " [a seen name of the noun part of the attempt in question]"; otherwise: say " [noun part of the attempt in question]"; if the preposition part of the attempt in question is not "": say " [the preposition part of the attempt in question]"; if the second noun part of the attempt in question is not nothing: if the second noun part of the attempt in question is a thing: say " [a seen name of the second noun part of the attempt in question]"; otherwise: say " [second noun part of the attempt in question]". To say action description of (item - a thing): say a seen name of item. A thing has a number called the sight radius. The sight radius of a hauler is 3. The sight radius of a scout is 2. [The sight radius of terrain features gets decided when we place them.] A robot has a number called the sight bonus. The sight bonus of a hauler is 0. The sight bonus of a scout is 1. To decide whether (item - a thing) is within sight of (bot - a robot): [originally had this as "can see," which led to a namespace clash] if bot is item, no; let delta-x be (x-coordinate of bot minus x-coordinate of item); let delta-y be (y-coordinate of bot minus y-coordinate of item); let z be the sight radius of the item plus the sight bonus of the bot; if z squared is at least delta-x squared plus delta-y squared, yes; no. To decide what number is the integer absolute value of (x - a number): if x < 0, decide on 0 - x; decide on x. ["Absolute value" is built in but casts the number to real numbers, and I figure it's better to avoid heavy real number calculations if possible; also in Inform version 6L02 comparing numbers to real numbers is buggy.] To decide what number is (n - a number) squared: decide on n * n. To decide what number is the greater of (n - a number) and (m - a number): if n is at least m, decide on n; decide on m. To decide what number is the lesser of (n - a number) and (m - a number): if n is at least m, decide on m; decide on n. Section 2 - Robot Vision Tables A robot has a table name called the current vision table. A robot has a table name called the previous vision table. [These will be switched back and forth as necessary.] To swap vision tables for (bot - a robot): let temp table be a table name; now temp table is the current vision table of bot; now the current vision table of bot is the previous vision table of bot; now the previous vision table of bot is temp table. The current vision table of Alpha is Table of Alpha Vision One. The previous vision table of Alpha is Table of Alpha Vision Two. Table of Alpha Vision One seen thing orientation partial obstructor a thing a direction a thing with 25 blank rows Table of Alpha Vision Two seen thing orientation partial obstructor a thing a direction a thing with 25 blank rows The current vision table of Beta is Table of Beta Vision One. The previous vision table of Beta is Table of Beta Vision Two. Table of Beta Vision One seen thing orientation partial obstructor a thing a direction a thing with 25 blank rows Table of Beta Vision Two seen thing orientation partial obstructor a thing a direction a thing with 25 blank rows The current vision table of Gamma is Table of Gamma Vision One. The previous vision table of Gamma is Table of Gamma Vision Two. Table of Gamma Vision One seen thing orientation partial obstructor a thing a direction a thing with 25 blank rows Table of Gamma Vision Two seen thing orientation partial obstructor a thing a direction a thing with 25 blank rows The current vision table of Delta is Table of Delta Vision One. The previous vision table of Delta is Table of Delta Vision Two. Table of Delta Vision One seen thing orientation partial obstructor a thing a direction a thing with 25 blank rows Table of Delta Vision Two seen thing orientation partial obstructor a thing a direction a thing with 25 blank rows The current vision table of Epsilon is Table of Epsilon Vision One. The previous vision table of Epsilon is Table of Epsilon Vision Two. Table of Epsilon Vision One seen thing orientation partial obstructor a thing a direction a thing with 25 blank rows Table of Epsilon Vision Two seen thing orientation partial obstructor a thing a direction a thing with 25 blank rows The current vision table of Zeta is Table of Zeta Vision One. The previous vision table of Zeta is Table of Zeta Vision Two. Table of Zeta Vision One seen thing orientation partial obstructor a thing a direction a thing with 25 blank rows Table of Zeta Vision Two seen thing orientation partial obstructor a thing a direction a thing with 25 blank rows Section 3 - Figuring out what the robots can see Every turn (this is the set robot vision rule): repeat with bot running through responsive robots in the Planet: [This will restrict things to robots that are in play during the tutorial] calculate the vision table for bot. Definition: a thing is movable if it is not a terrain feature. To calculate the vision table for (bot - a robot): blank out the whole of the current vision table of the bot; find movable things near the bot; find terrain features near the bot. To find movable things near (bot - a robot): repeat with item running through movable things in Planet: if the x-coordinate of item is the x-coordinate of bot and the y-coordinate of item is the y-coordinate of bot and the item is not the bot: [the item is right there; add it with a direction of down as a placeholder for right there] choose a blank row in the current vision table of the bot; now the seen thing entry is the item; now the orientation entry is down; otherwise if item is within sight of bot: [close enough but maybe obstructed; trace a ray] let obstructed be a truth state; now obstructed is false; [so far] let x-displacement be the integer absolute value of (the x-coordinate of the item minus the x-coordinate of the bot); let y-displacement be the integer absolute value of (the y-coordinate of the item minus the y-coordinate of the bot); let y-init be a number; let y-final be a number; let x-init be a number; let x-final be a number; let z-init be a number; let z-final be a number; if x-displacement < y-displacement: if the y-coordinate of the bot is less than the y-coordinate of the item: now y-init is the y-coordinate of the bot; now x-init is the x-coordinate of the bot; now z-init is the z-coordinate of the bot; now y-final is the y-coordinate of the item; now x-final is the x-coordinate of the item; now z-final is the z-coordinate of the item; otherwise: now y-init is the y-coordinate of the item; now x-init is the x-coordinate of the item; now z-init is the z-coordinate of the item; now y-final is the y-coordinate of the bot; now x-final is the x-coordinate of the bot; now z-final is the z-coordinate of the bot; repeat with y-mark running from y-init to y-final: let x-mark be x-init plus (((x-final minus x-init) times (y-mark minus y-init)) roundly divided by (y-displacement)); let z-mark be z-init plus (((z-final minus z-init) times (y-mark minus y-init)) roundly divided by (y-displacement)); [x-mark and z-mark are the x and z coordinates on the line from the initial xyz point to the final one, scaled by the fraction of the distance we moved on the y-axis] choose row x-mark graphed by y-mark in the Table of planetary surface; [so we need to look up that xy point] debug say "[bot], [item] y loop; checking [x-mark], [y-mark], [z-mark]; [x-coordinate entry], [y-coordinate entry], elevation [elevation entry][if there is a feature entry] [feature entry][end if]."; if the elevation entry is greater than z-mark: [and if the ground is higher than the z-mark, the view is obstructed] now obstructed is true; otherwise: [that is, if x-displacement < y-displacement] if the x-coordinate of the bot is less than the x-coordinate of the item: now y-init is the y-coordinate of the bot; now x-init is the x-coordinate of the bot; now z-init is the z-coordinate of the bot; now y-final is the y-coordinate of the item; now x-final is the x-coordinate of the item; now z-final is the z-coordinate of the item; otherwise: now y-init is the y-coordinate of the item; now x-init is the x-coordinate of the item; now z-init is the z-coordinate of the item; now y-final is the y-coordinate of the bot; now x-final is the x-coordinate of the bot; now z-final is the z-coordinate of the bot; repeat with x-mark running from x-init to x-final: let y-mark be y-init plus (((y-final minus y-init) times (x-mark minus x-init)) roundly divided by (x-displacement)); let z-mark be z-init plus (((z-final minus z-init) times (x-mark minus x-init)) roundly divided by (x-displacement)); [y-mark and z-mark are the y and z coordinates on the line from the initial xyz point to the final one, scaled by the fraction of the distance we moved on the x-axis] choose row x-mark graphed by y-mark in the Table of planetary surface; [so we need to look up that xy point] debug say "[bot], [item] x loop; checking [x-mark], [y-mark], [z-mark]; [x-coordinate entry], [y-coordinate entry], elevation [elevation entry][if there is a feature entry] [feature entry][end if]."; if the elevation entry is greater than z-mark: [and if the ground is higher than the z-mark, the view is obstructed] now obstructed is true; if obstructed is false: choose a blank row in the current vision table of the bot; now the seen thing entry is the item; now the orientation entry is the direction the item lies from the bot. To find terrain features near (bot - a robot): gather the features within sight of bot; [this loads the terrain features that are within sight into the Table of Nearby Features, closest first] repeat through Table of Nearby Features: let feature be the feature entry; if the squared distance entry is 0: [the item is right there; add it with a direction of down as a placeholder for right there] choose a blank row in the current vision table of the bot; now the seen thing entry is the feature; now the orientation entry is down; otherwise: [trace a line of sight again, but this time since we can have partial obstruction, keep track of any partial obstructors. Any visible partical obstructors will already be listed in the current vision table, since we're doing the nearest ones first] let obstructed be a truth state; now obstructed is false; [so far] let tracing from feature be a truth state; [keeps track of whether the ray is going from the feature to the bot or vice versa--we want to know this so we make sure the partial obstructor is the candidate that's closest to the feature] let partial obstructor be an object; [this will store anything that is partly in the way of the feature] let feature-x be the x-coordinate of the feature; let feature-y be the y-coordinate of the feature; [we have to adjust these for craters and ridges so they don't block their own centers from view] if feature is a crater: if feature-x is less than the x-coordinate of the bot: now feature-x is feature-x plus 1; otherwise if feature-x is greater than the x-coordinate of the bot: now feature-x is feature-x minus 1; if feature-y is less than the y-coordinate of the bot: now feature-y is feature-y plus 1; otherwise if feature-y is greater than the y-coordinate of the bot: now feature-y is feature-y minus 1; otherwise if feature is a north-south ridge: if feature-y is less than the y-coordinate of the bot: now feature-y is feature-y plus 1; otherwise if feature-y is greater than the y-coordinate of the bot: now feature-y is feature-y minus 1; otherwise if feature is an east-west ridge: if feature-x is less than the x-coordinate of the bot: now feature-x is feature-x plus 1; otherwise if feature-x is greater than the x-coordinate of the bot: now feature-x is feature-x minus 1; let x-displacement be the integer absolute value of (feature-x minus the x-coordinate of the bot); let y-displacement be the integer absolute value of (feature-y minus the y-coordinate of the bot); let y-init be a number; let y-final be a number; let x-init be a number; let x-final be a number; let z-init be a number; let z-final be a number; if x-displacement < y-displacement: if the y-coordinate of the bot is less than the feature-y: now y-init is the y-coordinate of the bot; now x-init is the x-coordinate of the bot; now z-init is the z-coordinate of the bot; now y-final is feature-y; now x-final is feature-x; now z-final is the z-coordinate of the feature; now tracing from feature is false; otherwise: now y-init is feature-y; now x-init is feature-x; now z-init is the z-coordinate of the feature; now y-final is the y-coordinate of the bot; now x-final is the x-coordinate of the bot; now z-final is the z-coordinate of the bot; now tracing from feature is true; repeat with y-mark running from y-init to y-final: let x-mark be x-init plus (((x-final minus x-init) times (y-mark minus y-init)) roundly divided by (y-displacement)); let z-mark be z-init plus (((z-final minus z-init) times (y-mark minus y-init)) roundly divided by (y-displacement)); [x-mark and z-mark are the x and z coordinates on the line from the initial xyz point to the final one, scaled by the fraction of the distance we moved on the y-axis] choose row x-mark graphed by y-mark in the Table of planetary surface; [so we need to look up that xy point] debug say "[bot], [feature] y loop; checking [x-mark], [y-mark], [z-mark]; [x-coordinate entry], [y-coordinate entry], elevation [elevation entry][if there is a feature entry] [feature entry][end if]."; if the elevation entry is greater than z-mark: [and if the ground is higher than the z-mark, the view is obstructed] now obstructed is true; otherwise if (tracing from feature is false or partial obstructor is nothing) and there is a feature entry: [if we're tracing from feature and we've already found a partial obstructor, don't bother checking] let new feature be the feature entry; if new feature is a feature listed in the current vision table of the bot: [if we can see the new feature, it'll already be loaded into the vision table, since we do nearest first] now the partial obstructor is new feature; otherwise [that is, if x-displacement >= y-displacement] if x-displacement > 0: [we have to check that x-displacement is not 0 because the shifts for craters and ridges could have pushed them both to 0; and if it is 0, then we can fall down to where obstructed is false and we succeed--without this check we might divide by zero] if the x-coordinate of the bot is less than the x-coordinate of the feature: now y-init is the y-coordinate of the bot; now x-init is the x-coordinate of the bot; now z-init is the z-coordinate of the bot; now y-final is feature-x; now x-final is feature-y; now z-final is the z-coordinate of the feature; now tracing from feature is false; otherwise: now y-init is feature-y; now x-init is feature-x; now z-init is the z-coordinate of the feature; now y-final is the y-coordinate of the bot; now x-final is the x-coordinate of the bot; now z-final is the z-coordinate of the bot; now tracing from feature is true; repeat with x-mark running from x-init to x-final: let y-mark be y-init plus (((y-final minus y-init) times (x-mark minus x-init)) roundly divided by (x-displacement)); let z-mark be z-init plus (((z-final minus z-init) times (x-mark minus x-init)) roundly divided by (x-displacement)); [y-mark and z-mark are the y and z coordinates on the line from the initial xyz point to the final one, scaled by the fraction of the distance we moved on the y-axis] choose row x-mark graphed by y-mark in the Table of planetary surface; [so we need to look up that xy point] debug say "[bot], [feature] x loop; checking [x-mark], [y-mark], [z-mark]; [x-coordinate entry], [y-coordinate entry], elevation [elevation entry][if there is a feature entry] [feature entry][end if]."; if the elevation entry is greater than z-mark: [and if the ground is higher than the z-mark, the view is obstructed] now obstructed is true; otherwise if (tracing from feature is false or partial obstructor is nothing) and there is a feature entry: [if we're tracing from feature and we've already found a partial obstructor, don't bother checking] let new feature be the feature entry; if new feature is a feature listed in the current vision table of the bot: [if we can see the new feature, it'll already be loaded into the vision table, since we do nearest first] now the partial obstructor is new feature; if obstructed is false: choose a blank row in the current vision table of the bot; now the seen thing entry is the feature; now the orientation entry is the direction the feature lies from the bot; if the partial obstructor is not nothing: now the partial obstructor entry is the partial obstructor. To gather the features within sight of (bot - a robot): blank out the whole of the Table of Nearby Features; repeat with feature running through terrain features in the Planet: if feature is within sight of bot: choose a blank row in the Table of Nearby Features; now the feature entry is feature; now the squared distance entry is the squared distance from feature to bot; sort the Table of Nearby Features in squared distance order. [This puts the nearest features first] Table of Nearby Features feature squared distance a terrain feature a number with 20 blank rows Robots looking for the first time is initially true. [This flag keeps us from printing "now" or "still" when the robots are looking for the first time.] Every turn (this is the report robot vision rule): repeat with bot running through responsive robots in the Planet: [again, during the tutorial this restricts it to robots in play] report vision for the bot; swap vision tables for the bot; now robots looking for the first time is false; now every robot is unsuccessful. To report vision for (bot - a robot): [start by figuring out which things bot could see previous turn] let previously seen list be a list of things; repeat through the previous vision table of the bot: if there is a seen thing entry, add the seen thing entry to the previously seen list; if the current vision table of the bot is empty: say "[if bot is a hauler]Hauler [otherwise if bot is a scout]Scout [end if][Bot] reports nothing notable visible in the vicinity."; otherwise: say "[if bot is a hauler]Hauler [otherwise if bot is a scout]Scout [end if][Bot] reports that:[line break]"; let x-by-y be the x-coordinate of the bot graphed by the y-coordinate of the bot; [we might need this later to look up a row in the Table of Planetary Surface] repeat through the current vision table of the bot: let the item in sight be the seen thing entry; if the orientation entry is down: if the item in sight is a crater: say "It is in [an item in sight]."; otherwise if the item in sight is a terrain feature: say "It is on [an item in sight]."; otherwise if the item in sight is the spaceship exterior: say "It has arrived at your spaceship and can prepare for takeoff when necessary."; otherwise: say "In its immediate vicinity it can see [action description of the item in sight]."; otherwise if the item in sight is a terrain feature and there is a feature in row x-by-y of the Table of Planetary Surface and the feature in row x-by-y of the Table of Planetary Surface is the item in sight: [that awful thing is looking up the coordinates of bot in the table and checking to see whether the item in sight is the feature there; we have to do this instead of choosing a row because choosing a row in a different table messes up our repeat through the current vision table] if the item in sight is a crater: let way be the opposite of the orientation entry; say "It is on the [way] wall of [an item in sight]."; otherwise: say "It is on [an item in sight]."; otherwise: say "To [the orientation entry] it can [if robots looking for the first time is true or the action name part of the current action is the looking action][otherwise if the item in sight is listed in the previously seen list]still [otherwise]now [end if]see [action description of the item in sight][sun-caught status of the item in sight][if there is a partial obstructor entry] behind [the partial obstructor entry][end if]."; [about that first clause; the first time we look, and any time we do a look action, we don't say "now" or "still"] remove the item in sight from the previously seen list, if present; remove the list of things held by the bot from the previously seen list; [this prevents the "no longer seen" message for something the bot has just picked up] if the previously seen list is not empty and robots looking for the first time is false: [after the tutorial robots looking for the first time is reset, but the previously seen list is not reset, so we use the looking for the first time flag to prevent this message from printing] say "It can no longer see "; write previously seen list as seen names, disjunctively; say "."; say conditional paragraph break; To write (L - list of things) as seen names, disjunctively: [currently I never use this non-disjunctively, but it's good to be prepared] let N be the number of entries in L; if N is 0: say "nothing"; otherwise if N is 1: say "[a seen name of entry 1 of L]"; otherwise if N is 2: say "[a seen name of entry 1 of L] [if disjunctively]or[otherwise]and[end if] [a seen name of entry 2 of L]"; otherwise: repeat with M running from 1 to N - 1: say "[a seen name of entry M of L], "; if disjunctively: say "or "; otherwise: say "and "; say "[a seen name of entry N of L]". Carry out a robot looking: now every robot is unsuccessful. [Just to make sure that "looking" doesn't describe what the robots are doing.] After a robot (called bot) looking in the hold of the Tiptree: say "[Bot] is in the hold of the Tiptree. (To allow it to move again, tell it to EXIT.)" After a robot (called bot) looking: ["After" so it cuts off the other people looking rule.] swap vision tables for the bot; report vision for the bot; swap vision tables for the bot. [After the most recent time the every turn rules run the vision tables will have been swapped in preparation for the next time. We swap them back to rerun the looking action and then swap them back again. I don't think swapping the vision tables before reporting vision in the report robot vision rule would work because the vision report counts on the current vision table being the one that just got filled. Probably there's a better way to do this; I guess by swapping the tables at the beginning for the set robot vision rule? But if this works I'll leave it as is.] Chapter 7 - The Planet's Surface Table of Planetary Surface x-coordinate y-coordinate elevation feature a number a number a number a thing with 364 [grid size squared] blank rows To decide what number is the z-coordinate of (item - a thing): let x be the x-coordinate of the item; let y be the y-coordinate of the item; if the x by the y is off the grid: decide on 0; otherwise: if the item is a crater, now x is x + 1; [calculate the height of the east wall rather than the bowl] choose row x graphed by y in the Table of Planetary Surface; decide on the elevation entry. To decide what number is the z-coordinate of (item - a crater): [for craters, we pick a graph point that's off by one so we get the height of the crater wall rather than the height of the crater center; when you have a crater overlapping with the side of a peak this will be off but I hope to get away with it] if the x-coordinate of the item + 1 by the y-coordinate of the item is off the grid: decide on 0; otherwise: choose row x-coordinate of item + 1 graphed by y-coordinate of item in the Table of Planetary Surface; decide on the elevation entry. A terrain feature is a kind of thing. A terrain feature is usually improper-named. A crater is a kind of terrain feature. A ridge is a kind of terrain feature. A ridge can be north-south or east-west. A peak is a kind of terrain feature. Texture is a kind of value. The textures are jagged, crumbling, flat-topped, rounded, and pointed. A texture can be used or unused. A texture is usually unused. [This helps us make sure we don't generate more than one of each feature with the same texture.] A terrain feature has a texture. Before printing the name of a terrain feature: say "[texture of the item described] ". The seen name of a terrain feature is usually "[item described]". [Because the seen name is usually set to the printed name, which won't capture the texture.] The indefinite article of a terrain feature is usually "a". There are four craters. There are five ridges. There are three peaks. To say a seen name of (item - a thing): say "[if item is improper-named][indefinite article of item] [end if][seen name of item]". When play begins: initialize the grid map. To dump the planet map: say fixed letter spacing; repeat with inverse y running from 0 to grid size - 1: if grid size - inverse y < 10, say " "; say grid size - inverse y; say " "; repeat with x running from 1 to grid size: choose row x graphed by (grid size - inverse y) in the Table of Planetary Surface; unless there is a feature entry: say ","; otherwise: if the feature entry is a crater, say "C"; if the feature entry is a ridge, say "R"; if the feature entry is a peak, say "P"; say line break; repeat with inverse y running from 0 to grid size - 1: if grid size - inverse y < 10, say " "; say grid size - inverse y; say " "; repeat with x running from 1 to grid size: choose row x graphed by (grid size - inverse y) in the Table of Planetary Surface; if the elevation entry < 0: say "x"; otherwise: say the elevation entry; say line break. To initialize the grid map: repeat with index running from 1 to (grid size * grid size): choose row index in the Table of Planetary Surface; now the x-coordinate entry is (index / grid size) + 1; now the y-coordinate entry is the remainder after dividing index by grid size; if the y-coordinate entry is 0: [change an entry like "2, 0" to "1, 18," if the grid size is 18] now the y-coordinate entry is grid size; now the x-coordinate entry is the x-coordinate entry minus 1; now the elevation entry is 0. To decide what number is (x - a number) graphed by (y - a number): decide on ((x - 1) * grid size) + y. [This is going to get used in looking up rows in the Table of Planetary Surface.] The texture to be used is a texture that varies. To randomly place the terrain features: now every texture is unused; repeat with feature running through craters: now the texture to be used is a random unused texture; deploy feature; now every texture is unused; repeat with feature running through ridges: now the texture to be used is a random unused texture; deploy feature; now every texture is unused; repeat with feature running through peaks: now the texture to be used is a random unused texture; deploy feature. To deploy (caldera - a crater): let placing succeeded be a truth state; repeat with placing attempt running from 1 to 10: [we try ten times and if we can't deploy it, we give up] now placing succeeded is true; [until we run into a problem] now x-coordinate of caldera is a random number between 2 and grid size - 1; now y-coordinate of caldera is a random number between 2 and grid size - 1; repeat with obstructor running through things in the Planet: if the squared distance from obstructor to caldera is less than 15: [I think this should prevent things from getting placed a knight's move apart or closer] now placing succeeded is false; break; [no need to continue with obstructor running through everything else] if placing succeeded is true: [it's placed; give it its properties and adjust the Table of Planetary Surface accordingly] now the texture of the caldera is the texture to be used; now the texture to be used is used; now the caldera is in Planet; let crater height be a random number between 1 and 3; [craters whose centers are higher than the surrounding surface are volcanic rather than meteoric, and you can't prove they aren't] now the sight radius of caldera is the greater of crater height + 1 and 3; [since we actually measure from crater center, we add one to make it easier to see the crater wall] repeat with x running from x-coordinate of caldera - 1 to x-coordinate of caldera + 1: repeat with y running from y-coordinate of caldera - 1 to y-coordinate of caldera + 1: [this is going to create a square crater] choose row x graphed by y in the Table of Planetary Surface; now the elevation entry is crater height; now the feature entry is caldera; if x is the x-coordinate of caldera and y is the y-coordinate of caldera: let depth be a random number between 1 and 2; now the elevation entry is crater height minus depth; break; [this breaks out of the placing attempt loop] if placing succeeded is false: [we couldn't place it, so we reset its coordinates] now x-coordinate of caldera is -99; now y-coordinate of caldera is -99. To deploy (spine - a ridge): let placing succeeded be a truth state; repeat with placing attempt running from 1 to 10: [we try ten times and if we can't deploy it, we give up] now placing succeeded is true; [until we run into a problem] now x-coordinate of spine is a random number between 2 and grid size - 1; now y-coordinate of spine is a random number between 2 and grid size - 1; repeat with obstructor running through things in the Planet: if the squared distance from obstructor to spine is less than 13: [ridges can be a bit closer than craters] now placing succeeded is false; break; [no need to continue with obstructor running through everything else] if placing succeeded is true: [it's placed; give it its properties and adjust the Table of Planetary Surface accordingly] now the texture of the spine is the texture to be used; now the texture to be used is used; now the spine is in Planet; let ridge height be a random number between 1 and 2; now the sight radius of spine is 2; if a random chance of 1 in 2 succeeds: [determines whether the ridge runs north-south or east-west] now spine is east-west; repeat with x running from x-coordinate of spine - 1 to x-coordinate of spine + 1: choose row x graphed by y-coordinate of spine in the Table of Planetary Surface; now the elevation entry is ridge height; now the feature entry is spine; otherwise: now spine is north-south; repeat with y running from y-coordinate of spine - 1 to y-coordinate of spine + 1: choose row x-coordinate of spine graphed by y in the Table of Planetary Surface; now the elevation entry is ridge height; now the feature entry is spine; break; [this breaks out of the placing attempt loop] if placing succeeded is false: [we couldn't place it, so we reset its coordinates] now x-coordinate of spine is -99; now y-coordinate of spine is -99. To deploy (mountain - a peak): let placing succeeded be a truth state; repeat with placing attempt running from 1 to 10: [we try ten times and if we can't deploy it, we give up] now placing succeeded is true; [until we run into a problem] now x-coordinate of mountain is a random number between 2 and grid size - 1; now y-coordinate of mountain is a random number between 2 and grid size - 1; repeat with obstructor running through things in the Planet: if the squared distance from obstructor to mountain is less than 15: [I think this should prevent things from getting placed a knight's move apart or closer] now placing succeeded is false; break; [no need to continue with obstructor running through everything else] if placing succeeded is true: [it's placed; give it its properties and adjust the Table of Planetary Surface accordingly] now the texture of the mountain is the texture to be used; now the texture to be used is used; now the mountain is in Planet; let mountain height be a random number between 2 and 4; now the sight radius of mountain is mountain height; repeat with x-increment running from 0 - mountain height to mountain height: [lower things gradually in a square from the peak] repeat with y-increment running from 0 - mountain height to mountain height: let new x be x-coordinate of mountain plus x-increment; let new y be y-coordinate of mountain plus y-increment; if new x by new y is on the grid: [peaks can go off the map so we sanity check] choose row new x graphed by new y in the Table of Planetary Surface; let z be mountain height minus (the greater of the integer absolute value of x-increment and the integer absolute value of y-increment); increase the elevation entry by z; if z >= mountain height - 1: [only the very top shows up as a peak on the feature map] now the feature entry is the mountain; break; [out of the placing attempt loop, since placing succeeded is true] if placing succeeded is false: [we couldn't place it, so we reset its coordinates] now x-coordinate of mountain is -99; now y-coordinate of mountain is -99. Chapter 8 - Astronauts [have to define this before the robot action rules because they refer to astronauts.] An astronaut is a kind of thing. An astronaut is usually privately-named. Understand "astronaut/person/man/woman/spaceman/spacewoman/spaceperson/astro" as an astronaut when the person asked surveys the item described. [Again, this is so robots can only understand commands referring to astronauts when they can see them.] The indefinite article of an astronaut is usually "an". The sight radius of an astronaut is usually 2. There are six astronauts. The wreckage of the Russ is a thing. The sight radius of the wreckage of the Russ is 3. The indefinite article of the wreckage of the Russ is "the". Chapter 9 - Commanding Robots Section 1 - Robot Descriptions [The following fancy attempts at parsing can send the game into an infinite loop when given an empty description (e.g. "robots who see the spaceship, go north" when no robot can see the spaceship), so they are being shelved. This will probably save lots of headaches for anyone concerned anyhow. The relations are going to be kept, though, because they help with the travel commands.] Surveying relates a robot (called bot) to a thing (called item) when item is a seen thing listed in the previous vision table of the bot. The verb to survey means the surveying relation. [Understand "that/who can see [something related by surveying]" as a robot. Understand "that/who sees [something related by surveying]" as a robot. Understand "something" as a thing. Understand "thing" as a thing. Proximity relates a robot (called bot) to a thing (called item) when bot surveys item and the squared distance from bot to item is less than 9. [within a two by two square] The verb to be near means the proximity relation. Understand "that/who is near [something related by proximity]" as a robot. Understand "near [something related by proximity]" as a robot.] Immediacy relates a robot (called bot) to a thing (called item) when the squared distance from bot to item is 0. The verb to be right next to means the immediacy relation. The verb to be right under means the reversed immediacy relation. [Understand "that/who is at/on/in/by [something related by immediacy]" as a robot. Understand "that/who is right/-- next to [something related by immediacy]" as a robot. Understand "at/on/in/by [something related by immediacy]" as a robot. Understand "right/-- next to [something related by immediacy]" as a robot.] Section 2 - Reconstructing the Grammar of "Go" [The block vaguely going rule sends Multiple Actors into an infinite loop, and defining a new action for "go" doesn't override the line that invokes the supplying a missing noun activity for the going action. So we have to rip up the grammar for "go" and try again without the line for understanding "go" as going.] Understand the command "go" as something new. Understand the command "walk" as something new. Understand the command "run" as something new. Understand the command "move" as something new. ["move" actually means "push" in the standard rules but we change it to "go" anyway.] Understand "go [direction]" as going. Understand "go [something]" as entering. Understand "go into/in/inside/through [something]" as entering. Understand the commands "walk" and "run" and "move" as "go". [And now let's put a new action in there for "go" on its own--this is especially necessary because the disambiguation for "go" on its own does weird things.] Going vaguely is an action applying to nothing. Understand "go" as going vaguely. Check an actor going vaguely (this is the block going vaguely without an infinite loop rule): stop the action. Unsuccessful attempt by an actor going vaguely when the reason the action failed is the block going vaguely without an infinite loop rule: say "[The person asked] is unsure where to go. (Try GOing a direction or GOing TOWARD something the robot can see.)" [It'd be nicer to be able to print this once a turn, but that's difficult--I could try setting a flag for whether this message has printed already, but the action doesn't run the Every Turn rules, so the only obvious place to reset the flag is when the command prompt is printed--and I don't want to pile anything more on that. So instead you get individualized messages of befuddlement from each robot.] Section 3 - Moving Toward Moving toward is an action applying to one thing. Understand "go toward/towards/to [something]" or "move toward/towards/to [something]" or "walk toward/towards/to [something]" or "run toward/towards/to [something]" as moving toward. A terrain feature is usually privately-named. Understand "ridge" as a ridge when the person asked surveys the item described. Understand "crater" as a crater when the person asked surveys the item described. Understand "peak" as a peak when the person asked surveys the item described. Understand the texture property as describing a terrain feature when the person asked surveys the item described. [This prevents the terrain feature's name from getting parsed unless that particular robot can see it. That prevents the commands from disambiguating all ridges, e.g.] Understand "go toward/towards/to [a beacon]" or "move toward/towards/to [a beacon]" or "walk toward/towards/to [a beacon]" or "run toward/towards/to [something]" as moving toward. Check an actor moving toward when the noun is not a beacon and person asked does not survey the noun (this is the robots can't move toward what they can't see rule): stop the action. Unsuccessful attempt by a robot doing something when the reason the action failed is the robots can't move toward what they can't see rule: say "[Person asked] is not able to locate [the noun] and cannot move toward it." [Though we shouldn't get there, since the various restrictions on Understand rules should prevent this action from even getting parsed.--Actually it does happen for the Russ, which is fine because that won't present disambiguation problems or spoil identities.] Check an actor moving toward an unresponsive beacon (this is the fried beacons don't work rule): stop the action. Unsuccessful attempt by a robot doing something when the reason the action failed is the fried beacons don't work rule: say "[The noun] has overheated and no longer functions as a beacon." Check an actor moving toward when the person asked is right next to the noun (this is the already reached the goal rule): stop the action. Unsuccessful attempt by a robot moving toward something when the reason the action failed is the already reached the goal rule: say "[The person asked] is already there." [Had to bop the message that referred to the noun, because it could spoil robot names--though that'd hardly be a spoiler since you can just cross-reference the descriptions] Carry out a robot (called bot) moving toward something (called the goal): let the way be the direction the goal lies from the bot; try the bot going the way. [and may as well let this stuff be understood for directions...] Understand "go toward/to [direction]" or "move toward/to [direction]" or "walk toward/to [direction]" or "run toward/to [direction]" as going. Section 4 - Permissible Robot Action Before a robot doing something other than going or waiting or moving toward or taking or dropping or looking or taking inventory or going vaguely or exiting (this is the robots can't do much rule): say "[The person asked]: The robots can only move around and pick up and drop things and take inventory and look and exit from the hold of the Tiptree." instead. Unsuccessful attempt by a robot doing something when the reason the action failed is the startup rulebook: do nothing. [This is the only way I can find to suppress the "unable to do that" message on a wide variety of rules--Unsuccessful attempt rules seem to be looking for check rules, but I can't write a check rule for not permissible robot action, I don't think.] Section 5 - Carried Items Every turn (this is the update the coordinates of carried items rule): update the coordinates of carried items. [and we'll also do this after setting the world up.] To update the coordinates of carried items: repeat with item running through things: [I think this may actually be faster than looping over things carried by a robot, or even portable things] if item is carried by a robot (called bot): now the x-coordinate of item is the x-coordinate of bot; now the y-coordinate of item is the y-coordinate of bot. [This means that when a robot drops something the coordinates of the dropped item are automagically the coordinates where it was dropped and stay that way. Oh, and all those "In the planet" calls for determining visibiility catch dropped items but not carried ones (because of what's directly in the room, which is nice because I did not plan that.] Section 6 - Some Disambiguation Stuff [I don't want disambiguation questions to spoil which robot is where by asking "Which do you mean, Beta or Zeta?", so let's see if we can take care of that.] Orientation relates a thing (called the item) to a direction (called the way) when the way is the direction the item lies from the person asked. Understand "[something related by orientation]" as a thing when the disambiguation status is currently disambiguating. [This seemed like it was slamming the performance, and it should be redundant when not disambiguating--instead of saying "go to northwest robot" you could say "go northwest"--so we do some trickery to make sure this only runs when we're processing a disambiguation response.] Disambiguation state is a kind of value. The disambiguation states are standard, about to ask for disambiguation, and currently disambiguating. The disambiguation status is initially standard. First after asking which do you mean: now the disambiguation status is about to ask for disambiguation. [This will get converted to "currently disambiguating" when printing the command prompt kicks the every turn rules.] Before reading a command: now the disambiguation status is standard. [This works because disambiguation prompts don't run the "before reading a command" rulebook... which is also why something so kludgy is necessary, I think.] For printing the name of a robot (called bot) while asking which do you mean: let the way be the direction the bot lies from the person asked; if the way is down: say "[seen name of the bot] by [printed name of the person asked]"; otherwise: say "[the way]ern [seen name of the bot]". Understand "northern" as north. Understand "southern" as south. Understand "eastern" as east. Understand "western" as west. Understand "northeastern" as northeast. Understand "northwestern" as northwest. Understand "southwestern" as southwest. Understand "southeastern" as southeast. [somewhere in here there's a terrible interaction with Multiple Actors where disambiguation may keep the person asked fixed on the robot asked, allowing it to be issued direct commands, giving run-time errors, and generally messing everyone up. Hopefully no one will encounter it!] Understand "by [something related by immediacy]" as a thing when the disambiguation status is currently disambiguating. [This should let "the hauler down by Gamma" through as a disambiguation response, not that it much matters, because that action will always fail due to having reached the noun.] [Maybe a simpler way to do that would be to just let a direction that's typed in be interpreted as a command. Except I can't do that right now without some I6 knowledge, because directions aren't treated as commands that interrupt disambiguation, and because the trick I know to adjust that is for letting words that could be verbs not interrupt disambiguation, not vice versa. Disambiguation, why you gotta be such a lint puppet?] Section 7 - Picking Up Portability relates various things to various robots. The verb to be portable by means the portability relation. The verb to be able to haul means the reversed portability relation. When play begins (this is the set portability rule): repeat with cosmo running through astronauts: now cosmo is portable by every hauler; repeat with beaker running through beacons: now beaker is portable by every hauler; now beaker is portable by every scout. Check a robot taking when noun is not portable by the person asked (this is the robots can only pick up certain things rule): stop the action. Unsuccessful attempt by a robot taking when the reason the action failed is the robots can only pick up certain things rule: say "[The person asked] would not be able to pick up [the noun][if the person asked is a robot and the noun is an astronaut]; only a hauler can do that[end if]." Check a robot taking when the person asked is not right next to the noun (this is the robots can only pick up nearby things rule): stop the action. Unsuccessful attempt by a robot taking when the reason the action failed is the robots can only pick up nearby things rule: say "[The person asked] needs to move to [the noun] before it can pick it up." Does the player mean taking a thing that is right under the person asked: it is very likely. [There was going to be something here preventing haulers from dropping astronauts, but I guess there can be a legitimate reason for it -- Gamma is in the center of the map and needs to go northeast to get another astronaut, Zeta is in the south of the map, Gamma can leave its astronaut for Zeta to come get.] Section 8 - Taking Inventory Carry out a robot taking inventory: now acting out of world is true; [it shouldn't take time... eh, I don't know why it doesn't work--actually now I think it's fixed, it was the silent wait that was messing it up] say "[The person asked] is carrying [a list of things carried by the person asked]." The report other people taking inventory rule is not listed in any rulebook. Section 9 - Autopickup and Autorescue of Astronauts Every turn (this is the autopickup astronauts rule): repeat with bot running through haulers: if the action name part of the current attempt of the bot is not the dropping action or the noun part of the current attempt of the bot is not an astronaut: [We don't want to force a hauler to rescue an astronaut when it's just been dropping astronauts--in fact this stays in effect until the bot gets a new order] let rescued count be 0; repeat with patient running through astronauts in the Planet: [that is, not carried by any other hauler, nor in the Cabin of the Tiptree] if the bot is right next to the patient: now the bot carries the patient; increment rescued count; if rescued count is greater than 0: say "[Bot] picks up [rescued count in words] astronaut[if rescued count > 1]s[end if]." Every turn (this is the autorescue astronauts rule): repeat with bot running through haulers: if bot carries an astronaut and bot is right next to the spaceship exterior: let rescued list be the list of astronauts carried by bot; let rescued count be the number of entries in rescued list; let rescued names be a list of texts; repeat with astro running through rescued list: add the personal name of astro to rescued names; say "[Bot] delivers [rescued count in words] astronaut[if rescued count > 1]s[end if] to the safety of your spaceship. The crew strips the astronaut[if rescued count > 1]s[end if] out of their spacesuit[if rescued count > 1]s[end if] and begins to provide emergency medical attention. [Rescued names] [have] been rescued."; now every astronaut carried by bot is in the Cabin of the Tiptree. The autopickup astronauts rule is listed before the set robot vision rule in the every turn rulebook. [It's a bit weird to have the robots report seeing an astronaut while they're being picked up. At least this way you can tell who nabbed the astronaut by having the robt that could see the astronaut report that they can no longer see it.] Section 10 - Parking Robots at the Tiptree The Hold of the Tiptree is a room. [If we put it in the room where the player is, then all generic commands get redirected to the robot in that room. That's bad! So we need another room to put them in.] A robot can be parkable or unparkable. A robot is usually parkable. [This prevents us from asking every turn whether we'd like to park the robot.] Every turn (this is the park robots rule): repeat with bot running through parkable robots in the Planet: if bot is right next to the spaceship exterior: say "Would you like [bot] to move into the cargo hold of the Tiptree?[first time](This will mean that it will stay at your spaceship, not moving away even when you issue commands to all robots. If you would like it to begin responding to movement commands again, you can give it a command to 'EXIT'; that will take no time.)[only]Please type yes or no. >[run paragraph on]"; if the player consents: say "[Bot] rolls into the cargo hold of the Tiptree."; now bot is in the Hold of the Tiptree; otherwise: now the bot is unparkable. Carry out an unparkable robot going: now the person asked is parkable. [A bot becomes parkable when it moves away from the spaceship.] After deciding the scope of the player: Place the Hold of the Tiptree in scope. [We do need these robots to be accessible to direct commands.] Check a robot exiting when the person asked is not in the hold of the Tiptree (this is the robots can only exit the Tiptree rule): stop the action. Unsuccessful attempt by a robot (called bot) exiting when the reason the action failed is the robots can only exit the Tiptree rule: say "[Bot] is not in the Tiptree." The convert exit into go out rule does nothing when the person asked is in the hold of the Tiptree. The can't exit when not inside anything rule does nothing when the person asked is in the hold of the Tiptree. [This zaps the checks that would convert it into a going out action, or say we aren't in anything, or like that.] The standard exiting rule is not listed in any rulebook. [And this zaps the normal behavior of exiting.] Carry out a robot (called bot) exiting: now bot is in the Planet. After a robot (called bot) exiting: say "[Bot] rolls out onto the surface and is ready to move again." Chapter 10 - The Terminator Section - Allowing the player to set the parameters The display banner rule is not listed in the startup rulebook. The initial room description rule is not listed in the startup rulebook. [Gonna do these after we ask for parameters. And the prebanner rule comes then too.] The time to terminator is initially 50. The terminator speed is initially 3. Stage is a kind of value. The stages are setting time, setting speed, and playing. The current stage is initially setting time. To start the game for real: now the current stage is playing; follow the print the pre-banner rule; follow the display banner rule; follow the initial room description rule. When play begins (this is the gather parameters rule): say "Would you like to set the game parameters? The default values are that it takes [time to terminator] turns for the terminator to appear in the east, and then it moves one unit across the grid every [terminator speed] turns.[line break](Please type yes or no.)>"; unless the player consents: start the game for real; otherwise: say "What would you like the time until the appearance of the terminator to be?". After reading a command when the current stage is setting time: let the inputted number be -1; if the player's command includes "[number]": now the inputted number is the number understood; if the inputted number is less than 0: say "Please input a number that is at least 0."; otherwise: now the time to terminator is the inputted number; now the current stage is setting speed; say "OK. How many turns should the terminator take to move one grid space?[line break]If you input a negative number, like -3, the terminator will move that many spaces every turn. If you input 0, the whole map will light up as soon as the terminator arrives."; reject the player's command. After reading a command when the current stage is setting speed: if the player's command includes "[number]": now the terminator speed is the number understood; say "OK."; start the game for real; otherwise: say "Please input a number."; reject the player's command. Section - Doing Terminator Stuff The terminator counter is initially 0. [The every turn kludge is currently playing havoc with the turn count, so we just keep count ourselves.] When Rescue Mission begins: now the left hand status line is "Time to Terminator: [time to terminator minus terminator counter]"; now the right hand status line is "Rescued: [number of astronauts in the cabin of the tiptree]/[number of astronauts]". The terminator rules are a rulebook. Last every turn during Rescue Mission (this is the update terminator rule): Follow the terminator rules. First terminator rule (this is the increment counter rule): increment the terminator counter; if the terminator counter is the time to terminator: now the left hand status line is "Time since Terminator: [terminator counter minus time to terminator]"; say "The deadly sun is beginning to appear to the east...." A terminator rule (this is the calculate sunlight rule): if the terminator counter is greater than the time to terminator: if the distance of the spaceship exterior from the terminator is 0: deactivate the spaceship exterior; [we need to check this first so we don't get spurious breakdown messages if anything comes before the spaceship exterior in the object loop, in particular robots right next to it] repeat with item running through responsive things in the Planet: [and now we shouldn't have to worry about this producing spurious messages when the spaceship has been deactivated, because every robot that was next to the spaceship exterior will have been moved into the spaceship] let D be the distance of the item from the terminator; if D is less than one and item is in Planet: [If the terminator hits the spaceship while robots are waiting by it, the robots will be in the spaceship even but they'll still be in the repeat through loop, so we need to make this check] deactivate the item; otherwise if D is one: if the item is a robot: say "The terminator is almost upon [Item]!"; otherwise if the item is the spaceship exterior: say "[first time]The terminator has almost reached your ship. The crew prepares for takeoff.[only]"; otherwise if D is two: if the item is a robot: say "[Item] reports that the terminator is close by to the east."; otherwise if the item is the spaceship exterior: say "[first time]The terminator approaches your ship to the east. The captain orders the crew to being preparing for takeoff.[only]". To deactivate (item - a robot): now item is unresponsive; say "Caught in the sun, [Item] overheats and breaks down."; now everything in item is unresponsive; if an astronaut is carried by the item: say "Inside [item], [number of astronauts carried by item in words] perish[if the number of astronauts carried by item is one]es[end if]." To deactivate (item - a thing): now item is unresponsive. To deactivate (item - the spaceship exterior): move to the endgame. To decide what number is the distance of (item - a thing) from the terminator: if the terminator speed is 0 and the terminator counter is at least the time to terminator, decide on 0; [speed 0 means everything gets lit up at once] let the terminator position be (grid size plus one) minus the advance of terminator; [this should be the x-coordinate east of which the sun is shining, modulo terrain features] let the effective distance east be the x-coordinate of the item plus the z-coordinate of the item; let the shadow length be zero; repeat with index running from 1 to (4 minus the z-coordinate of the item): [move east looking for something higher, to see if it casts a shadow on the item] if index plus x-coordinate of the item by y-coordinate of the item is on the grid: choose row (index plus x-coordinate of the item) graphed by y-coordinate of the item in the Table of Planetary Surface; let z be the elevation entry; now the shadow length is the greater of the shadow length and (z plus 1 minus (the z-coordinate of the item plus index)); [a feature that's n units higher than the z-coordinate of the item casts a shadow n units west] decide on (the terminator position minus the effective distance east) plus the shadow length. To decide what number is the advance of terminator: if terminator speed > 0: decide on (the terminator counter minus the time to terminator) divided by the terminator speed; otherwise: decide on (the time to terminator minus the terminator counter) times the terminator speed. [That's not awfully transparent, but since the speed is negative we want to multiply it by the negative of the time since the terminator arrived, so we just switch the two terms in the subtraction.] Chapter 11 - The End Section 1 - Carrying Out the Endgame [Featuring the mother of all kludges; because of the every turn rules the story doesn't always end until you type in another command, so there's something suggesting that you wait.] To move is a verb. Penultimate turn is initially false. To move to the endgame: if any robot that is right next to the spaceship exterior is in the Planet: say "As the sun begins to strike the Tiptree, [list of (robots in the Planet) right next to the spaceship exterior] [move] into its cargo bay."; repeat with bot running through robots: if bot is right next to the spaceship exterior: now bot is in the Cabin of the Tiptree; now every astronaut in bot is in the Cabin of the Tiptree; now penultimate turn is true; say "As the terminator reaches your spaceship, the captain declares, 'Nothing more to be done here. Countdown to takeoff.' Nothing for you to do but wait."; end the story finally. Last every turn when every astronaut is in the Cabin of the Tiptree and every responsive robot is right next to the spaceship exterior (this is the win when everything collected rule): say "Every astronaut has been rescued, and every remaining robot is ready to move into the cargo bay of the Tiptree. The captain orders the crew to prepare for takeoff. Nothing for you to do but wait."; now penultimate turn is true; end the story finally. Last every turn when no robot is responsive (this is the nothing to be done rule): say "The last robot has overheated, and there is nothing more you can do to rescue the astronauts. The captain orders the crew to prepare for takeoff. Nothing for you to do but wait."; now penultimate turn is true; end the story finally. [Because the turn sequence is so messed up, "end the story finally" might not actually end the story until after collecting another command. So we kill a turn. I have absolutely no idea what's going on here, though it is somehow possible that this is connected to my decision to tie the every turn rules to printing the command prompt.] Section 2 - Taking Off [We give the player a way to end the game themselves.] Launching is an action applying to nothing. Understand "take off" or "launch" as launching. Carry out launching during Rescue Mission: if any robot is right next to the spaceship exterior: say "As you prepare for takeoff, [list of robots right next to the spaceship exterior] [move] into the Tiptree's cargo bay."; repeat with bot running through robots: if bot is right next to the spaceship exterior: now bot is in the Cabin of the Tiptree; now penultimate turn is true; say "The captain orders the crew to prepare the Tiptree for takeoff. Nothing for you to do but wait."; end the story finally. Section 3 - Who was rescued? An astronaut has some text called the personal name. When play begins: repeat with astro running through astronauts: now the personal name of astro is "[one of]Liam[or]Sarah[or]Sophia[or]Ibrahim[or]Fatima[or]Yasmin[or]Guo[or]Chiang[or]Anil[or]Ananya[or]Michiko[or]Akira[or]Zhen[or]Althea[or]Tyrone[or]Desmond[or]Ethan[or]Teodross[or]Youssef[or]Santiago[or]Maria[or]Pierre[or]Annick[or]Mirlande[or]Jose[or]Pyotr[or]Sven[or]Valentina[in random order] [one of]Lee[or]Chen[or]Zhang[or]Jackson[or]Nguyen[or]Kim[or]Suzuki[or]Yamamoto[or]Rodriguez[or]Hernandez[or]Kelly[or]Valente[or]Krishnamurti[or]Patel[or]Stone[or]Rubin[or]Diercks[or]Abdullah[or]Hakim[or]Jensen[or]Ndiaye[or]Okoro[or]Buhari[or]Obi[or]Miller[or]Reilly[or]Franco[or]Jacquet[in random order]". Before printing the player's obituary: let rescued names be a list of texts; repeat with survivor running through the astronauts in the Cabin of the Tiptree: add the personal name of survivor to rescued names; let unrescued names be a list of texts; repeat with casualty running through astronauts in the Planet: add the personal name of casualty to unrescued names; say "[if an astronaut is in the Cabin of the Tiptree]You rescued [rescued names][end if][if an astronaut is in the Cabin of the Tiptree and an astronaut is in the planet], while [end if][if an astronaut is in the Planet][unrescued names] perished in the sunlight[end if]." Chapter 12 - Tutorial and Rescue Mission Tutorial is a scene. Tutorial begins when play begins. Tutorial ends when time to end the tutorial is true. Time to end the tutorial is initially false. Almost time to end the tutorial is initially false. The block waking up rule does nothing if Tutorial is happening. Carry out waking up: now time to end the tutorial is true. Carry out launching during Tutorial: now time to end the tutorial is true. Rescue Mission is a scene. Rescue Mission begins when Tutorial ends. When Tutorial begins: now the left hand status line is "Learning About Robots"; deploy the spaceship exterior; set Gamma down at the (x-coordinate of the spaceship exterior + 6) by the y-coordinate of the spaceship exterior; deploy Beacon One; deploy Beacon Three. When Rescue Mission begins: say "Your mind snaps back to the present. You quickly establish contact with the robots on the surface."; repeat with item running through things in Planet: reset item; repeat through the Table of Planetary Surface: now the elevation entry is 0; blank out the feature entry; now robots looking for the first time is true; generate the world; now acting out of world is false; [so the silent wait still triggers the every turn rules, and robot vision] try silently waiting. Last every turn during Tutorial: follow the tutorial rules. The expected action is a stored action variable. The tutorial rules are a rulebook. Awaiting action is initially false. A tutorial rule: if successfully followed instructions is true: now successfully followed instructions is false; repeat through the Table of Tutorial Instructions: if there is a text entry: say italic type; say the text entry; say roman type; say line break; if there is an action entry: now the expected action is the action entry; now awaiting action is true; otherwise: now the expected action is the action of launching; now awaiting action is false; if there is a next step entry: follow the next step entry; otherwise: say line break; [the next step rule prints a line break if it's there. if there isn't one, we print a line break anyway] otherwise: [shouldn't happen] now almost time to end the tutorial is true; blank out the whole row; if the Table of Tutorial Instructions is empty: now almost time to end the tutorial is true; break. [The repeat through the table, which means we just look at one row at a time.] Before an actor doing something when almost time to end the tutorial is true: if the current action is the expected action: now time to end the tutorial is true. Successfully followed instructions is initially false. Before an actor doing something when the current action is the expected action: now successfully followed instructions is true; now awaiting action is false. Every turn when awaiting action is true and successfully followed instructions is false during Tutorial: say "[italic type]You didn't accomplish the action I was expecting, which was [expected action]. The instructions for the tutorial won't necessarily line up with what's happening if you don't follow them exactly for now. You might want to UNDO and try again, or if you want to take your chances on the next part of the tutorial then [expected action] will advance you to it.[roman type][line break]"; now awaiting action is false. [Don't keep nagging.] Table of Tutorial Instructions text action next step (a rule) "You just got a report from Gamma, a robot on the surface. Try telling it to go west by saying 'GAMMA, WEST.'" gamma going west -- "Since the robots you're commanding are keyed to the wrecked ship, not yours, they can't tell you where they are relative to you on the grid. But they can tell you what they see around them. Try 'GAMMA, WEST' again." gamma going west -- "Now Gamma can see the exterior of your spaceship, which will always land at the western edge of the playable surface.[paragraph break]Now we'll introduce another robot, Alpha. Try telling Alpha to go north with 'ALPHA, NORTH.'" alpha going north deploy alpha rule "And you can tell both robots to go north at once. Try 'GAMMA AND ALPHA, NORTH.'" gamma going north -- "Now Alpha can see your spaceship. You can tell Alpha to move toward it. Try 'ALPHA, MOVE TOWARD SPACESHIP.'" Alpha going north "You can also command all the robots at once by saying something like 'ROBOTS, SOUTH.' (Since every command takes a turn, and you only have so much time before the sun burns everything up, it can be very useful to command multiple robots; when you're exploring new territory or dashing for the spaceship. [paragraph break]Anyway, try 'ROBOTS, SOUTH' and then we'll introduce a new robot to the scene." Gamma going south deploy Zeta rule "Notice that this new robot, Zeta, can't see anything, but Alpha sees a 'hauler' to the east? Alpha and Gamma (and Beta, in the main game) are scouts, which are smaller, faster, and see farther. Zeta (and Delta and Epsilon) are haulers, which are slower and bigger--and the only robots that can pick up and rescue astronauts.[paragraph break]You can refer to robots as 'scout' and 'hauler'; try 'SCOUTS, GO TOWARD HAULER' now." Alpha going southeast -- "Gamma couldn't go toward a hauler because it can't see one! Now the scouts have something up their sleeves. Try 'ROBOTS, INVENTORY' to see what each robot is carrying." Gamma taking inventory -- "The scouts carry beacons. The robots can detect these beacons from anywhere on the map. Try 'GAMMA, DROP BEACON THREE.'" Gamma dropping Beacon Three -- "And now try 'ROBOTS, GO TOWARD BEACON THREE.'" Alpha going northeast -- "Note that Zeta and Alpha could move toward Beacon Three even though they can't see it.[paragraph break]To have Gamma take the beacon back, try 'GAMMA, PICK UP BEACON THREE' now. (By the way, beacons work even when scouts are carrying them.)" Gamma taking beacon three -- "Great! You can experiment with the robots' capabilities now. Whenever you're ready, type 'TAKE OFF' to finish your training mission and return to the rescue. In the main mission 'TAKE OFF' will end things immediately (otherwise, your ship will automatically take off when you've gathered all the astronauts and robots, or when the sun reaches your ship).[paragraph break]Remember, robots can move toward everything they can see, including planetary features. The sun will come from the east, and don't let anything get caught in it! It shines on higher features first, so watch out moving to higher ground.[paragraph break]Good luck!" -- -- This is the deploy alpha rule: set alpha down at 1 by (grid size / 2) - 6. This is the deploy Zeta rule: set zeta down at 3 by (grid size / 2) - 6. To reset (item - a thing): remove item from play; now the x-coordinate of item is -99; now the y-coordinate of item is -99. To set (item - a thing) down at (x - a number) by (y - a number): now the item is in the Planet; now the x-coordinate of the item is x; now the y-coordinate of the item is y; if the item is a robot: now the x-displacement of the item is (the slowness of the item + 1) / 2; now the y-displacement of the item is (the slowness of the item + 1) / 2; After Gamma taking inventory during Tutorial: follow the Tutorial rules. [Since inventory doesn't take time and doesn't trigger the Every Turn rules, we need to trigger them by hand.] Chapter 13 - Generating the World To generate the world: randomly place the terrain features; repeat with bot running through robots: deploy bot; now the x-displacement of bot is (the slowness of bot + 1) / 2; now the y-displacement of bot is (the slowness of bot + 1) / 2; repeat with Cosmo running through astronauts: deploy Cosmo; repeat with blazon running through beacons: deploy blazon; deploy the spaceship exterior; deploy the wreckage of the Russ; update the coordinates of carried items. To deploy (item - the spaceship exterior): now the spaceship exterior is in the Planet; now the x-coordinate of the spaceship exterior is 1; now the y-coordinate of the spaceship exterior is grid size / 2; [dump the planet map.] To deploy (item - a thing): now item is in Planet; now the x-coordinate of item is a random number between 1 and the grid size; now the y-coordinate of item is a random number between 1 and the grid size. To deploy (item - a beacon): now the owner of the item carries the item. To deploy (item - wreckage of the Russ): now item is in Planet; now the x-coordinate of item is grid size / 2; now the y-coordinate of item is grid size / 2. Chapter 14 - Some Response Replacements and Other Messages The can't take people's possessions rule response (A) is "[The owner] already has that." The standard report dropping rule response (B) is "[The actor] [put] [the noun] down on the surface." [I'm actually going to leave "Alpha is unable to do that" as is. Suitably robotic.] The parser error internal rule response (E) is "[The person asked] [cannot] visually identify any such thing." The parser error internal rule response (R) is "That command could not be understood. (Note that, other than waiting[if Tutorial is happening], taking off, or waking from the tutorial[otherwise] or taking off[end if], you can only accomplish things by issuing orders to robots: 'ROBOT, GO NORTH' etc. The robots can move around, pick up or drop things, look, take their inventory, and exit from your spaceship if they've entered it.)" [This is "the noun does not make sense in that context," which is the basic syntax error here.] The parser error internal rule response (X) is "Type 'z' to make time pass. Type 'commands' to see a list of possible commands." ["I beg your pardon?"] The parser error internal rule response (U) is "It's not clear which robots you mean to address." The parser clarification internal rule response (D) is "Which do you mean, ". [robot disambiguation shouldn't say "Who"] The give actor's name in multicommand error rule response (A) is "[printed name of the player]: [run paragraph on]". Unsuccessful attempt by a robot dropping something when the reason the action failed is the can't drop what's not held rule: say "[The actor] isn't carrying that." Chapter 15 - More Kludges Section 1 - Disallowing "AGAIN" ["Again" and "g" are broken in Multiple Actors, at least with my kludges. Worse yet, "robots, again"--which I think is supposed to give an error anyway, look through the parser for a comment on "frog, jump"--sends it into an infinite loop. So let's just zap any command that contains "g" or "again" with a helpful error message.] First after reading a command when the player's command includes "again/g": say "Apologies, but this game does not support 'AGAIN.' In many interpreters you can press the up arrow to load previous commands onto your command line. On iFrotz you can double-tap the command line to bring up a command history. "; reject the player's command. Section 2 - Rejecting Chained Commands [Chained commands mess things up because the every turn rules are tied to the command prompt, so reject them. (Otherwise we could type "gamma, w. gamma, w. gamma, w. gamma, w." and have gamma move four steps in one turn.)] First after reading a command when the player's command includes "then": say "Sorry, but it looks like you've chained more than one command together with the word 'THEN.' This game doesn't support that feature."; reject the player's command. First after reading a command when the player's command matches the regular expression "\.": say "Sorry, but it looks like you've chained more than one command together with periods. This game doesn't support that feature."; reject the player's command. [Thanks to Andrew Schultz for the code for that last one!] Chapter 16 - About, Credits, Help Requesting the about text is an action out of world. Understand "about" as requesting the about text. Carry out requesting the about text: say "Terminator is a randomized rescue game that experiments with commanding multiple actors at once and grid-based movement and vision.[paragraph break]For the credits, type 'CREDITS.'[paragraph break]For a list of commands, type 'COMMANDS.'[paragraph break]For a general description of how the game works, type 'DESCRIPTION.'[paragraph break]For some general advice about what to do, type 'HELP' or 'HINT.'" Requesting the credits is an action out of world. Understand "credits" or "credit" as requesting the credits. Carry out requesting the credits: say "Terminator was written by Matt Weiner for ParserComp 2015.[paragraph break]Thanks to Daniel Stelzer for the Multiple Actors extension, without which this game could not exist. Thanks also to Ron Newcomb and Andrew Plotkin for their extensions, and to all the denizens of intfiction.org for their coding help.[paragraph break]Especially warm thanks to Neil Butters, Steph Cherrywell, Andrew Schultz, and Caleb Wilson for beta testing and providing invaluable feedback.[paragraph break]Thanks also to Carolyn VanEseltine for organizing ParserComp and providing the theme.[paragraph break]The cover image is an image of Mercury taken by the MESSENGER spacecraft; credit to NASA/Johns Hopkins University Applied Physics Laboratory/Carnegie Institution of Washington.[paragraph break]For more information about the game, type 'ABOUT.'" Requesting the description is an action out of world. Understand "description" or "guide" as requesting the description. Carry out requesting the description: say "Terminator takes place on an 18 by 18 grid. Your spaceship is always around the middle of the west edge and the wreckage of the Russ is always around the very middle of the grid. Everything else--robots, astronauts, terrain features--is randomly placed.[paragraph break]The robots will describe what's around them every turn, in a rather crude way--they're only robots. What they see will depend on how big the things around them are and how far they can see; scouts can see things from a little farther away than haulers.[paragraph break]Sometimes terrain features will obscure things from sight. In particular, craters always have a little dip in the middle and the crater wall may hide what's inside.[paragraph break]Scouts are faster than haulers and carry beacons that robots can move toward from anywhere on the map, but haulers are the only robots that can carry astronauts (each hauler can carry an unlimited number of astronauts). Robots will move only when you command them.[paragraph break]Your goal is to find the astronauts and bring them back to your spaceship, before the sun comes from the east and burns everything up. Good luck!" Asking for a hint is an action out of world. Understand "help" or "hint" or "hints" as asking for a hint. Carry out asking for a hint during Tutorial: if the expected action is the action of launching: say "It looks like you've finished the tutorial! Anytime you want, you can type 'TAKE OFF' to return to the main game."; otherwise: say "[Expected action] will get you to the next step of the tutorial--though if you've got off track, things might not happen exactly as the tutorial text describes." Carry out asking for a hint during Rescue Mission: say "It helps to cover as much ground as you can early on, so at the beginning I suggest having all the robots move; the more robots there are moving, the more new territory will be visible each turn, and the more likely you are to be able to locate astronauts and find landmarks to orient yourself.[paragraph break]Since the sun comes in from the east, you might want to try to rescue the easternmost astronauts first.[paragraph break]Many players find it helpful to place a beacon near your spaceship, so haulers can be directed toward the spaceship from anywhere on the map. Also, often scouts will often find astronauts before haulers do, so you can use beacons to help direct the haulers toward the astronauts.[paragraph break]Remember, once you find an astronaut you don't have to rescue them immediately; you just have to get them back to the spaceship before the terminator comes. Still, haulers can only just outrun the terminator, so don't let them get caught.[paragraph break]Good luck!" Requesting the command list is an action out of world. Understand "commands" or "command" or "verbs" or "verb" or "verb list" as requesting the command list. Carry out requesting the command list: say "You yourself can WAIT or end the game by typing TAKE OFF.[line break]But mostly you'll be commanding robots. Type the names of the robots or a description like 'ROBOTS,' 'SCOUTS,' or 'HAULERS,' followed by a comma, and then:[line break]GO a direction (or just the direction)[line break]GO TO something they can see, or a beacon[line break]DROP something[line break]PICK UP something[line break]LOOK[line break]INVENTORY to see what they're carrying[line break]EXIT to leave the Tiptree once they've entered it.[line break]Entering the Tiptree and transferring astronauts to the Tiptree is done automatically."