"Death on the Stormrider" by "Daniel M. Stelzer"
 
Volume 0 - Logistics
 
The story headline is "An Interactive Mystery".
The story genre is "Mystery".
The release number is 2. [Fixes during the comp]
The story creation year is 2023.
 
Use American dialect and the serial comma.
 
[Include Glulx Text Effects by Emily Short.]
Include Glulx Text Styles by Daniel Stelzer.
Include Typographical Conveniences by Daniel Stelzer.
Include version 1 of Formatting Capture by Daniel Stelzer.
Include Boolean Options by Daniel Stelzer.
Include Versatile Listing by Daniel Stelzer.
Include Dijkstra Pathing by Daniel Stelzer.
Include version 13 of Implicit Actions by Eric Eve.
[Include Integrated Tutorial by Daniel Stelzer.] [Reimplemented within the game, it works better this way]
Include Epistemology by Eric Eve.
Include Basic Screen Effects by Emily Short.
Include Command Preloading by Daniel Stelzer.
Include Limited Distant Movement by Daniel Stelzer. [A version of the extension that only applies to the player, because we have our own NPC-moving code here]
Include Basic Container Supporter Incorporation v10 by Otis the Dog. [Fixes a nasty bug in the standard library with enterable supporters that are part of containers]
Include Image Scaling by Daniel Stelzer.
 
Release along with cover art ("Metal rigging silhouetted against a stormy sky, with the game's title superimposed"), the source text, an "IFComp" website, a "NewParchment" interpreter, a file of "Hints" called "hints.html", a file of "Deck Plans" called "map.jpg", and a file of "Zagin's Sketchbook" called "page.jpg".
 
Figure of Shimat is the file "shimat.jpg" ("portrait of Shimat").
Figure of Kasap is the file "kasap.jpg" ("portrait of Kasap").
Figure of Qarrad is the file "qarrad.jpg" ("portrait of Qarrad").
Figure of Udan is the file "udan.jpg" ("portrait of Udan").
Figure of Ishme is the file "ishme.jpg" ("portrait of Ishme").
Figure of Bashti is the file "bashti.jpg" ("portrait of Bashti").
Figure of Corpse is the file "corpse.jpg" ("sketch of Udan's body").
Figure of Kiang is the file "kiang.jpg" ("portrait of Kiang").
 
Report checking the image size:
    say "Example: ";
    display the Figure of Kiang at appropriate size;
    say line break. [So people can see what image sizes do]
 
Volume I - Systems
 
Book 0 - Miscellaneous Tweaks
 
Chapter A - Touching
 
To decide whether (the item - a thing) must be touched:
    if the item is the noun and the action requires a touchable noun, yes;
    if the item is the second noun and the action requires a touchable second noun, yes;
    no.
 
Chapter B - Door Directions
 
Door-directionality relates a door (called the door-in-question) to a direction (called the direction-in-question) when the room-or-door direction-in-question from the location is the door-in-question. The verb to lead toward means the door-directionality relation. The verb to lead through means the reversed door-directionality relation. [Gotta make it a relation for understanding purposes]
 
Understand "[something related by door-directionality]" as a door. [Understand "east door" for disambiguation purposes]
Understand "to [something related by door-directionality]" as a door.
 
After printing the name of a door (called the barrier):
    let the way be the direction of the barrier from the location;
    if the way is nothing: [It's not adjacent to the location, which means it's being described from a distance]
        say "between [the front side of the barrier] and [the back side of the barrier]";
    otherwise:
        say " [to the way]".
 
A ship door is a kind of door. The printed name of a ship door is usually "door". Understand "door" as a ship door. A ship door is usually closed, openable, locked, lockable, and scenery. The description of a ship door is usually "Simple and functional. This one is currently [if the item described is locked]locked[else if the item described is closed]closed but unlocked[else]hanging open[end if]."
Understand "lock" or "latch" as a ship door. [Because X LOCK should work when something is locked.]
Instead of unlocking a locked ship door with the crowbar: say "You push as hard as you can, but nothing gives. The locks on these doors are sturdy, and the little crowbar doesn't give you much leverage[--]probably better to use a key."
 
A maintenance hatch is a kind of door. The printed name of a maintenance hatch is usually "maintenance hatch". Understand "maintenance" or "hatch" as a maintenance hatch. A maintenance hatch is usually scenery, closed, openable, and not lockable. The description of a maintenance hatch is usually "Big enough to wriggle through, small enough to make it uncomfortable."
Instead of going through a maintenance hatch with something: say "You might fit through the hatch, but [the thing gone with] won't."
 
Understand "knock on/-- [something]" as attacking.
Instead of attacking a door:
    if the noun is open:
        say "It's already open.";
    otherwise if the noun is unlocked:
        say "(opening [the noun])[ccb]";
        try opening the noun instead;
    otherwise:
        say "You knock on [the noun], but there is no response."
 
Instead of searching a door:
    if the noun is closed:
        say "You can't see anything through [the noun].";
    otherwise:
        say "Through [the noun] you can make out [the other side of the noun from the location]."
 
Chapter C - Hinting at Pushing
 
Instead of taking something when the noun is pushable between rooms: say "It's too unwieldy to lift, but you might be able to push it around."
 
Last instead of turning or pushing or pulling something when the noun is pushable between rooms: say "It takes a bit of effort, but it moves when you shove it.".
 
Chapter D - Humans
 
A human is a kind of thing.
A person is a kind of human.
A corpse is a kind of human.
[Adding an intermediate level between "thing" and "person" to attach behavior to people and also Udan's body]
 
A person has some text called the journal entry. [Can't attach this property to "human" because of a compiler bug so we attach it to each subclass separately]
A corpse has some text called the journal entry.
 
Chapter E - Adjectives
 
Definition: a person is another if they are not the player.
Definition: a person is other if they are not the player.
 
Chapter F - Basic Actions
 
Shouting is an action applying to nothing.
Understand "answer" as shouting. [SHOUT redirects to that]
Understand the commands "yell" and "scream" and "sing" as "answer".
Report shouting in the presence of another person:
    say "[The list of other visible people] [look] sharply at you, but [do]n't seem to understand you any better this way.";
    rule succeeds.
Report shouting:
    say "Your voice echoes through the ship. But nobody seems to care. Whatever you're doing isn't important enough to pull them away from their tasks."
Check shouting when the player is hidden: say "That would somewhat defeat the purpose of hiding." instead.
 
Chapter G - Basic Definitions
 
Definition: a thing is other if it is not the player.
Definition: a thing is another if it is not the player.
 
Chapter H - Supporters in Room Descriptions
 
[Before printing a locale paragraph about a mentioned supporter (called the item) (this is the amend the mentioned supporters behavior rule):
    now all unhandled things on the item are mentioned.]
[TODO is there a better way to do this?]
 
Definition: a person is locale-supportable: no. [Don't relegate people to "on the X is Y" lists]
 
Chapter I - Distant Movement + Dijkstra Pathing
 
[These two extensions aren't designed to work together, so we need to integrate them here]
Setting action variables for moving toward (this is the modified set direction moved rule):
    let the temporary be the person asked;
    now the person asked is the player;
    recalculate Dijkstra paths from the location;
    now the direction moved is the Dijkstra route to the noun;
    now the room moved toward is the next step on the Dijkstra path to the noun;
    now the person asked is the temporary.
The set direction moved rule does nothing.
[That's the only place in Limited Distant Movement that the route-finder is called]
 
Edge cost rule when the person asked is the player (this is the player's edge cost rule):
    if the edge source is the Cargo Hold and the edge destination is the Lower Deck and the open tripod is in the Lower Deck: [Staircase is jammed, can't use it]
        rule succeeds with result -1; [Impassible]
    if the edge source is the Miscellany: [For simplicity we just don't route through this; this does stop you from using GO TO when there, but that's a sacrifice I'm willing to make this close to the deadline]
        unless the open tripod is in the Miscellany, rule succeeds with result -1;
    if the edge destination is an overheated boiler-room: [Overheated, can't use it]
        rule succeeds with result -1;
    if the edge door is locked: [Locked door, can't pass through]
        rule succeeds with result -1;
    if the edge destination is innavigable: [Don't go to unvisited rooms this way]
        rule succeeds with result -1;
    if the edge destination is a crawlspace: [Penalize crawlspaces a bit so they're dispreferred]
        rule succeeds with result 3;
    rule succeeds with result 1.
 
Chapter J - Hidden Prompt for Waiting
 
Smooth waiting is an active boolean option with description "allow waiting for multiple turns by pressing ENTER". [Because the Skein hates Hidden Prompt :( ]
 
Before waiting when hidden prompt is false and smooth waiting is active (this is the let waiting last a while rule):
    hide the command prompt with implicit command "wait".
 
Chapter K - Misleading Error Messages
 
First before printing a parser error when the latest parser error is the noun did not make sense in that context error: now the latest parser error is the not a verb I recognise error. [A bug in the parser means that, if we have any grammar lines starting with an object token, the "not a verb I recognize" error will be replaced by the "noun did not make sense in that context" error. Since the latter will basically never come up in any other case, here we just redirect it back to the more informative "not a verb I recognize".]
 
[The following is based on Small Kindnesses by Aaron Reed]
Understand ["look at/around/in/into the/a/an/some/-- [room]" or "look [room]" or "x [room]" or "examine [room]" or] "search [room]" as overly elaborate looking. Overly elaborate looking is an action applying to one thing.
After deciding the scope of the player when overly elaborate looking:
   place the location in scope, but not its contents.
Before overly elaborate looking:
    say "(looking around)[ccb]";
    try looking instead.
 
[Causes problems with X RUDDER that I can't afford to fix one day before the deadline]
 
Chapter L - Grabbing
 
Grabbing is an action applying to one thing. Understand "grab [something]" as grabbing.
 
Before grabbing something:
    if the noun is portable:
        say "(taking [the noun])[ccb]";
        try taking the noun instead;
    otherwise:
        say "(pulling [the noun])[ccb]";
        try pulling the noun instead.
 
Chapter M - Getting Down
 
Before going down when the player is enclosed by an enterable supporter (called the barrier) (this is the convert go down into exit rule):
    say "(off [the barrier])[ccb]";
    try exiting instead.
Before jumping when the player is enclosed by an enterable supporter (called the barrier) (this is the convert jump into exit rule):
    say "(off [the barrier])[ccb]";
    try exiting instead.
 
[This does mean you have to say GO DOWN twice to go through a down exit when on a bed, but I think that's an acceptable sacrifice—in this game I think it only matters when you're lying on Udan's or Qarrad's bunk]
 
Book 1 - Hiding
 
Chapter 1 - Positions
 
Position is a kind of value. The positions are defined by the Table of Positions.
 
Table of Positions
position    name
null-position    "POSITION ERROR - REPORT THIS"
inside-position    "inside"
above-position    "on top of"
below-position    "underneath"
behind-position    "behind"
 
Understand "in" or "inside of/--" as inside-position.
Understand "on/over/above" or "on top of/--" as above-position.
Understand "under/underneath/below" as below-position.
Understand "behind" as behind-position.
 
The concealing object is an object that varies.
The concealing position is a position that varies.
 
To decide whether the/-- player is hidden:
    if the concealing position is the null-position, no;
    yes.
To decide whether the/-- player is not hidden:
    if the player is hidden, no;
    yes.
 
Concealment potential relates various things to various positions. The verb to allow concealment in means the concealment potential relation. The verb to be allowed by means the reversed concealment potential relation.
[Every enterable container allows concealment in inside-position.]
 
Definition: a thing is a hiding place if it allows concealment in a position.
 
After examining a hiding place which is not the concealing object:
    say "[We] [could] probably fit ";
    print a list of "[name of position being listed]" for positions that are allowed by the noun, disjunctive;
    say " [regarding the noun][them], if [we] needed to hide.";
    continue the action.
 
Chapter 2 - Actions
 
Hiding vaguely is an action applying to nothing. Understand "hide" as hiding vaguely. Understand the commands "sneak" and "stealth" as "hide".
Check hiding vaguely (this is the redirect to hiding specifically rule):
    if there is a touchable hiding place thing (called the chosen place):
        let the chosen position be a random position allowed by the chosen place;
        say "([name of the chosen position] [the chosen place])[ccb]";
        try hiding in the chosen position of the chosen place instead;
    say "[We] [scan] [our] surroundings, but [don't] see anywhere good to hide!" instead.
To scan is a verb.
 
Hiding in it of is an action applying to one position and one thing.
Understand "hide [position] [something]" as hiding in it of.
Understand "get [position] [something]" as hiding in it of.
Understand "go [position] [something]" as hiding in it of.
Check hiding in a position of a thing (this is the check position for hiding rule):
    if the second noun does not allow concealment in the position understood:
        say "[There] [are] no room [name of the position understood] [the second noun] to hide!" instead.
Check hiding in a position of a thing in the presence of another person (called the witness) (this is the can't hide while observed rule):
    say "Not very useful when [the witness] can see you already. Best do it when [we]['re] out of [regarding the witness][their] sight." instead.
Carry out hiding in a position of a thing (this is the standard hiding rule):
    move the player to the location, without printing a room description; [Remove from all supporters and containers]
    now the concealing object is the second noun;
    now the concealing position is the position understood.
Report hiding in a position of a thing (this is the standard report hiding rule):
    say "[We] [scramble] [name of the position understood] [the second noun] and [regarding the player][try] to hide."
To scramble is a verb. To try is a verb.
 
Before going up in the presence of a hiding place thing (called the target) that allows concealment in above-position (this is the convert go up into hide rule):
    say "(climbing [the target])[ccb]";
    try hiding in above-position of the target instead.
Before climbing a hiding place that allows concealment in above-position (this is the convert climb to hide rule):
    try hiding in above-position of the noun instead.
Before entering a hiding place (this is the convert enter into hide rule):
    let the chosen position be a random position allowed by the noun;
    try hiding in the chosen position of the noun instead.
 
Reappearing is an action applying to nothing. Understand "reappear" and "emerge" and "unhide" as reappearing.
 
The reappearing action has a position called the former hiding position.
The reappearing action has an object called the former hiding place.
Setting action variables for reappearing:
    now the former hiding position is the concealing position;
    now the former hiding place is the concealing object.
 
Before exiting when the player is hidden (this is the convert exit into reappear rule): try reappearing instead.
Before going down when the concealing position is above-position (this is the convert go down into reappear rule): try reappearing instead.
Before jumping when the player is hidden (this is the convert jump into reappear rule): try reappearing instead.
Check reappearing when the player is not hidden (this is the can't reappear unless hidden rule): say "But [we]['re] not hiding right [now]." instead.
Carry out reappearing (this is the standard reappearing rule):
    now the concealing object is nothing;
    now the concealing position is the null-position.
Report reappearing (this is the standard report reappearing rule):
    say "[We] [emerge] from [name of the former hiding position] [the former hiding place]."
To emerge is a verb.
 
Before going to a room when the player is hidden (this is the reappear before going rule): try reappearing. ["To a room" means there has to actually be an exit in that direction]
 
Before entering a hiding place:
    let the chosen position be a random position allowed by the noun;
    say "(hiding [name of the chosen position] [regarding the noun][them])[ccb]";
    try hiding in the chosen position of the noun instead.
 
Chapter 3 - Descriptions
 
To say the/-- location with hiding:
    say "[location][if the player is hidden] ([name of the concealing position] [the concealing object])[end if]".
[When play begins:
    now the left hand status line is "[location with hiding]".]
 
Carry out looking (this is the modified room description heading rule):
    say bold type;
    if the visibility level count is 0:
        begin the printing the name of a dark room activity;
        if handling the printing the name of a dark room activity:
            say "Darkness" (A);
        end the printing the name of a dark room activity;
    otherwise if the visibility ceiling is the location:
        say "[visibility ceiling]";
    otherwise:
        say "[The visibility ceiling]";
    say roman type;
    let intermediate level be the visibility-holder of the actor;
    repeat with intermediate level count running from 2 to the visibility level count:
        if the intermediate level is a supporter or the intermediate level is an animal:
            say " (on [the intermediate level])" (B);
        otherwise:
            say " (in [the intermediate level])" (C);
        let the intermediate level be the visibility-holder of the intermediate level;
    [Here's the new stuff]
    if the player is hidden:
        say " (hiding [name of the concealing position] [the concealing object])";
    [And back to the old]
    say line break;
    say run paragraph on with special look spacing.
[The modified room description heading rule is listed instead of the room description heading rule in the carry out looking rules.]
The modified room description heading rule is listed instead of the alt room description heading rule in the carry out looking rules. [This clobbers the Container Supporter Incorporation changes but that's intentional, I don't want the (attached to) notes]
 
Book 2 - NPCs and Autonomy
 
Chapter 1 - Overview
 
[
Debug NPC actions is an inactive boolean option with description "show what NPCs are doing at all times for debugging".
Before someone doing anything when debug NPC actions is active (this is the describe NPC actions for debugging rule):
    say "** [i]In [the location of the actor], you sense [current action], with the goal of [the goal of the actor].[/i]"
]
 
Unsuccessful attempt by someone doing something:
    say "PROBLEM: action failed: [the current action] reason: [the reason the action failed]! Report this bug!".
 
A person has an object called the goal.
Goal-setting is an object-based rulebook.
Autonomy is an object-based rulebook. The autonomy rules have default success.
A person can be active or inactive. A person is usually inactive.
 
A person has a stored action called the previous behavior.
First after someone doing something (this is the record previous behavior rule):
    now the previous behavior of the actor is the current action;
    continue the action.
 
A person has a number called the repetition count. [Set this to a positive number to make them repeat an action for that many turns, unless a First Autonomy rule changes it.]
To cancel repetitions for (the character - a person): now the repetition count of the character is zero. [Call this in any "first" autonomy rules since those will interrupt repeated actions]
 
First every turn (this is the autonomy stage rule):
    repeat with the character running through active people:
        follow the goal-setting rules for the character;
        follow the autonomy rules for the character.
 
First autonomy for a person (called the character) when the repetition count of the character is greater than zero:
    [say "Repeating [the previous behavior of the character]: [the repetition count of the character] more times.";]
    decrement the repetition count of the character;
    try the previous behavior of the character.
 
Last autonomy rule for a person (called the character) when the goal of the character is not nothing (this is the accomplish a goal rule):
    let the target be the goal of the character;
    if the location of the character is the target:
        now the goal of the character is nothing;
        try the character looking;
        rule succeeds;
    otherwise if the target is a thing and the character can touch the target:
        if the target is portable:
            try the character taking the target;
        otherwise if the target is enterable:
            try the character entering the target;
        otherwise:
            try the character examining the target;
        now the goal of the character is nothing;
        rule succeeds;
    make no decision.
 
Last autonomy rule for a person (called the character) when the goal of the character is not nothing (this is the try to pursue a goal rule):
    let the destination be the goal of the character;
    if the destination is a thing, let the destination be the location of the destination;
    if the holder of the character is not a room:
        try the character exiting;
        rule succeeds;
    let the temporary actor be the person asked;
    now the person asked is the character; [For use in the Dijkstra routing rules]
    let the way be the Dijkstra route from the location of the character to the destination;
    now the person asked is the temporary actor;
    [The way is now the best route according to the new Dijkstra pathfinding]
    if the way is nothing: [No route there]
        now the goal of the character is nothing;
        try the character looking;
    otherwise if the room-or-door way from the location of the character is a door (called the barrier): [Have to pass through a door]
        if the barrier is locked:
            if the character carries a thing (called the pass) that unlocks the barrier:
                try the character unlocking the barrier with the pass;
            otherwise:
                let the key be a random thing which unlocks the barrier;
                now the goal of the character is the key;
                try the character examining the barrier;
        otherwise if the barrier is closed:
            try the character opening the barrier;
        otherwise:
            try the character entering the barrier;
    otherwise:
        try the character going the way.
 
Edge cost rule: [Default pathfinding for most characters: don't use locked doors or crawl hatches, closed doors take 2 turns (one to open one to move), everything else takes 1 turn]
    if the edge door is a locked door, rule succeeds with result -1;
    if the edge door is a crawl hatch, rule succeeds with result -1;
    if the edge door is a closed door, rule succeeds with result 2;
    if connecting Shimat's Cabin and the Miscellany, rule succeeds with result -1; [I don't know why NPCs are getting stuck in Shimat's cabin but this should prevent it hopefully]
    rule succeeds with result 1.
 
Last autonomy rule for a person (called the character) when the goal of the character is nothing (this is the autonomy fallback rule):
    try the character waiting.
 
Section A - Contraband
 
To decide whether (the character - a person) notice/notices the/-- player:
    if the player is hidden, no;
    if the location of the character is not the location, no;
    if the character cannot see the player, no;
    yes.
 
A thing can be legal or illegal. A thing is usually legal.
A thing can be concealable or unconcealable. A portable thing is usually concealable. A fixed in place thing is usually unconcealable.
A thing has an object called the natural home.
When play begins (this is the set natural homes rule):
    repeat with the item running through on-stage things:
        if the natural home of the item is nothing:
            now the natural home of the item is the holder of the item.
Definition: a thing (called the item) is out-of-place if the holder of the item is not the natural home of the item.
 
Rule for deciding the concealed possessions of the player: [Try to hide illegal things when we can]
    if the particular possession is illegal and the particular possession is concealable, yes;
    otherwise no.
 
Definition: a person is confiscatory if they are Qarrad or they are Bashti. [To fix some bugs, only they are allowed to confiscate illegal things]
 
First goal-setting for a confiscatory person (called the character) who carries an illegal thing (called the target) (this is the plan to return contraband rule):
    now the goal of the character is the natural home of the target.
 
Definition: a thing is ready-to-be-returned if it is illegal and it is held by a confiscatory person and (the holder of it can touch the natural home of it or the location of the holder of it is the natural home of it). [Can the holder of this object return it this turn?]
 
First autonomy for a confiscatory person (called the character) who holds a ready-to-be-returned thing (called the contraband) (this is the actually return contraband rule):
    cancel repetitions for the character;
    let the destination be the natural home of the contraband;
    if the destination is a closed container:
        try the character opening the destination;
    otherwise if the destination is a container:
        try the character inserting the contraband into the destination;
    otherwise if the destination is a supporter:
        try the character putting the contraband on the destination;
    otherwise if the destination is a room:
        try the character dropping the contraband;
    otherwise:
        say "BUG: [the character] needs to return [the contraband] to [the destination], but that's not a supporter, container, or room!";
    if the holder of the contraband is the destination, now the goal of the character is nothing. [Mission complete]
 
Instead of going in the presence of another person (called the character) when the player encloses an unconcealable illegal thing (called the target) (this is the don't escape with contraband rule):
    say "You start to move past [the character], and [they] glances over at you[--]and [the target] that [are] too big to easily hide.".
 
First autonomy for a confiscatory person (called the character) when the character notices the player and the player encloses an unconcealable illegal thing (called the target) (this is the confiscate contraband rule):
    cancel repetitions for the character;
    try the character confiscating the target from the player.
 
First autonomy for a confiscatory person (called the character) when an illegal out-of-place thing (called the target) is in the location of the character (this is the pick up contraband rule):
    [say "Character: [character] Location: [location of the character] Target: [target] Illegal: [whether or not Bashti is illegal][br]";]
    cancel repetitions for the character;
    try the character taking the target.
 
Definition: a thing is touch-required if it must be touched. [Hack]
Before doing something in the presence of another person (called the witness) when an illegal thing (called the contraband) is touch-required:
    if dropping and the noun is unconcealable, continue the action; [Allow this one in particular, since the thing is about to get confiscated]
    if giving or showing evidence to another person, continue the action; [Don't pre-empt the ending]
    say "Better not. If [the witness] [see] [us] [if the contraband is not enclosed by the player]messing [end if]with [the contraband], [we] [would have] a lot of explaining to do." instead.
 
[This action doesn't really do anything except give appropriate messages]
Concealing is an action applying to one carried thing. Understand "hide [something preferably held]" as concealing.
Check concealing an unconcealable thing: say "[The noun] [are] too big and unwieldy to hide on [our] person. [We] [would] have to find somewhere to put [regarding the noun][them]." instead.
Check concealing a thing when the player does not carry the noun: try taking the noun instead.
Check concealing: say "[The noun] [are] small enough that [we] [can] fairly easily keep [regarding the noun][them] hidden." instead.
 
After examining an illegal thing:
    if the noun is portable:
        if the noun is enclosed by the player:
            say "[We] [aren't] supposed to have [regarding the noun][them], [if the noun is concealable]but [they]['re] small enough to keep hidden if anyone [regarding nothing][see] [us][else]and [regarding the noun][they]['re] too big to hide easily[--][we] will need to avoid being noticed[end if].";
        otherwise:
            say "[They]['re] small enough to carry, [if the noun is concealable]and to hide on [our] person if anyone [regarding nothing][see][else]but too big to keep hidden[--]if [we] take it, [we] will need to avoid being noticed[end if].";
    otherwise if the noun is not evidence: [Printing this for evidence supplies is a bit weird]
        say "[We] [aren't] supposed to mess with it, so probably best to stay away when other people [regarding 2][are] around.";
    continue the action.
 
Chapter 2 - NPC Actions
 
Section A - Shooing and Escorting
 
Shooing it to is an action applying to one thing and one visible thing. [No Understand lines: the player can't do this, only NPCs.]
The shooing it to action has an object called the room shooed into (matched as "into").
Setting action variables for an actor shooing something to: now the room shooed into is the room (second noun) from the location of the actor.
Check an actor shooing when the room shooed into is nothing:
    say "ERROR - tried to shoo [the noun] [to the second noun] from [the location of the actor], which does not lead to a room!" instead.
Carry out an actor shooing:
    move the noun to the room shooed into, without printing a room description.
Last report someone shooing the player to: try looking.
 
Report Ishme shooing the player to a direction: say "'[one of][akk]Atti[eng]You[/akk][or][akk]Ai[eng]Hey[/akk][purely at random]! [one of][akk]Alki[eng]Move[/akk][or][akk]Turi[eng]Get back[/akk][or][akk]La[eng]No[/akk][at random]!' Ishme turns to glare at you, looking like she just remembered your existence, and snaps something short and harsh in Kishadu. You aren't sure what the words mean, but the look in her eyes sends you scurrying back [to the second noun]." [You/Hey! Move/Go back/No!]
Report someone who is not Ishme shooing the player to a direction: say "In lieu of words you won't understand, [the actor] points [to the second noun], and glares at you until you start moving that way."
 
Escorting it to is an action applying to one thing and one visible thing.
The escorting it to action has an object called the room escorted into (matched as "into").
Setting action variables for an actor escorting something to: now the room escorted into is the room (second noun) from the location of the actor.
Check an actor escorting when the room escorted into is nothing:
    say "ERROR - tried to escort [the noun] [to the second noun] from [the location of the actor], which does not lead to a room!" instead.
Carry out an actor escorting:
    move the noun to the room escorted into, without printing a room description;
    move the actor to the room escorted into, without printing a room description.
Last report someone escorting the player to: try looking.
Last report the player escorting someone to: try looking.
 
Report someone escorting the player to a direction: say "Looking thoroughly unamused, [the actor] grabs you by the shoulder and hauls you [to the second noun] with [regarding the actor][them]."
 
Section B - Confiscating
 
Confiscating it from is an action applying to two things.
Check an actor confiscating something from:
    if the second noun does not enclose the noun, stop the action.
Check an actor confiscating something from:
    if the noun is part of something or the noun is fixed in place, stop the action.
Carry out an actor confiscating something from:
    now the actor carries the noun.
 
Report Qarrad confiscating a thing from the player:
    say "Qarrad spots [the noun] in your hands, and with a wordless growl snatches [them] away."
Report someone who is not Qarrad confiscating a thing from the player:
    say "[The actor] looks puzzled as to why you have [the noun], and takes [them] from you."
 
Section C - Repairing
 
Repairing is an action applying to one thing. Understand "fix [something]" as repairing. Understand the commands "repair" and "mend" and "realign" as "fix".
Check repairing (this is the block repairing rule): say "[We]['re] not sure how to fix [a noun]." instead.
 
Fixing it with is an action applying to two things. Understand "fix [something] with [something preferably held]" or "pull [something] with [something preferably held]" or "push [something] with [something preferably held]" as fixing it with.
Before fixing something with something (this is the block multi-fixing rule):
    say "(In this game, you don't need to specify [the second noun]. When you try to push or pull something, the game will choose an appropriate tool automatically.)[p]";
    try repairing the noun instead.
Harming it with is an action applying to two things. Understand "attack [something] with [something preferably held]" as harming it with.
Before harming something with something (this is the block multi-attacking rule):
    say "(In this game, you don't need to specify [the second noun]. When you try to push or pull something, the game will choose an appropriate tool automatically.)[p]";
    try attacking the noun instead.
 
Section D - Conversation
 
[Not an action taken by NPCs, this time, but an action involving NPCs. Seems close enough to put it in this section anyway.]
 
Talking to is an action applying to one thing. Understand "talk to/-- [someone]" as talking to.
 
Answering someone that is conversation.
Telling someone about is conversation.
Asking someone about is conversation.
Asking someone for is conversation.
Before conversation:
    try talking to the noun instead.
Before asking someone to try doing something:
    try talking to the noun instead.
 
Saying yes is indirect conversation.
Saying no is indirect conversation.
Saying sorry is indirect conversation.
Before indirect conversation in the presence of another person (called the character):
    try talking to the character instead.
 
Instead of talking to yourself: say "[i]You[/i] can understand yourself, at any rate."
 
Before talking to someone when the player is hidden: say "That would somewhat defeat the purpose of hiding." instead.
Before giving or showing something to someone when the player is hidden: say "It's hard to do that while remaining hidden." instead.
 
Last check talking to: [Should be overridden by character-specific rules]
    say "[The noun] [don't] seem to understand [us]." instead.
 
To say general conversation refusal: say "[first time][br]The one person on this crew who actually spoke your language was Udan, and now he's gone. Without him, you're alone on a ship full of strangers with no way to communicate. But you're also Kiang's only hope.[only]".
 
Instead of smelling or tasting or attacking or kissing or rubbing or touching or pushing or pulling or turning or squeezing another person: say "Your position here is more than a bit precarious at the moment. Nobody's stopping you from going where you want right now, but if [the noun] thought you were being aggressive[--]especially when you can't explain yourself[--]you might end up with Kiang in the brig."
 
Section E - Waiting
 
[This is the default action an NPC takes when nothing else intervenes, so it should have descriptions appropriate to the NPC]
 
 
 
Chapter 3 - Reporting Actions
 
Section A - Nearness
 
Liminality relates a door (called X) to a room (called Y) when the front side of X is Y or the back side of X is Y. The verb to be a threshold of means the liminality relation. The verb to be liminal to means the liminality relation.
To decide whether a door connects (X - a room) and (Y - a room):
    repeat with D running through doors liminal to X:
        if the other side of D from X is Y, yes;
    no.
Proximity relates a room (called X) to a room (called Y) when a door connects X and Y. The verb to be proximate to means the proximity relation.
Nearness relates a room (called X) to a room (called Y) when X is adjacent to Y or X is proximate to Y. The verb to be near means the nearness relation.
Definition: a room is nearby if it is near the location. Definition: a thing is nearby if the location of it is near the location.
 
Section B - Sound Stage
 
Sound is a rulebook. ["Sound of Ishme touching the pipes…"]
The concept of sound propagation is an object. [Sentinel]
 
The sound propagation limit is always 2. [TODO: reduce to 2?]
 
Edge cost rule when the person asked is the concept of sound propagation:
    rule succeeds with result 1. [Sound doesn't care about doors, obstacles, etc; it can travel through every part of the ship]
A specific action-processing rule (this is the sound stage rule):
    if the actor is the player or within the player's sight is true, make no decision; [Only worry about this for things the player *can't* see]
    [Run Dijkstra's algorithm for the concept of sound propagation, from the location of the player]
    let the temporary be the person asked;
    now the person asked is the concept of sound propagation;
    recalculate Dijkstra routes from the location;
    now the person asked is the temporary;
    [Calculate the distance from the player to the action]
    let the point of origin be the location of the actor;
    if the current action is someone going: [Going involves two rooms, and we want the nearest]
        if the Dijkstra distance of the room gone from < the Dijkstra distance of the point of origin: [Note "of" instead of "to" to make this comparison work nicely!]
            now the point of origin is the room gone from;
    if the noun is a door: [Similarly actions on doors involve two rooms and we should propagate sound from the closer one]
        let the opposite side be the other side of the noun from the point of origin;
        if the Dijkstra distance of the opposite side < the Dijkstra distance of the point of origin: [Likewise]
            now the point of origin is the opposite side;
    let the propagation distance be the Dijkstra distance to the point of origin;
    if the propagation distance <= 0 or the propagation distance > the sound propagation limit, make no decision; [Limit how far sound can spread; -1 means no connection at all]
    let the propagation direction be the Dijkstra route to the point of origin;
    [Now, figure out what we should print, if anything]
    start capturing text;
    follow the sound rules; [Capture all the output of the sound rules so that we can stick a preface in front of it]
    stop capturing text;
    let the sound report be the substituted form of "[the captured text]";
    unless the sound report is empty: [This is why we capture it: we don't want to print a preface if there's no report]
        say "[sound preface for the propagation distance from the propagation direction][the sound report][r]".
 
The sound stage rule is listed before the report stage rule in the specific action-processing rules.
 
[To decide whether the action is nearby:
    [if the actor is nearby, yes;] [Can't check this in a "to decide" because "actor", unlike "noun" et al, is not a global!]
    [if the action is someone going and the room gone from is nearby, yes;] [Handled by an after rule for going]
    if the noun is a door and (the front side of the noun is nearby or the back side of the noun is nearby), yes;
    no.
A specific action-processing rule (this is the sound stage rule):
    if within the player's sight is false and (the actor is nearby or the action is nearby):
        follow the sound rules.]
 
Section C - Sound Preface
 
To say sound preface for (the distance - a number) from (the way - a direction):
    if the distance is:
        -- 1: say "Just [adverb the way], ";
        -- 2: say "Some distance [adverb the way], ";
        -- 3: say "Far [adverb the way], ";
    say "[one of]you hear[or]you can hear[or]you can make out[at random] ".
 
Section D - Going
 
Motion report reason is a kind of value. The motion report reasons are arrival reason, departure reason, distant arrival reason, distant departure reason, distant movement reason, and adverb reason.
 
To say (the character - a person) uses (the reason - a motion report reason):
    describe the character moving for the reason.
 
To describe (the character - a person) moving for (the reason - a motion report reason):
     if the reason is:
        -- arrival reason: say "[The character] [arrive]";
        -- departure reason: say "[The character] [go]";
        -- distant arrival reason: say "someone approaching";
        -- distant departure reason: say "someone moving away";
        -- distant movement reason: say "someone moving";
        -- adverb reason: do nothing.
 
The describe room gone into rule response (A) is "[The actor uses departure reason] up[the actor uses adverb reason]".
The describe room gone into rule response (B) is "[The actor uses departure reason] down[the actor uses adverb reason]".
The describe room gone into rule response (C) is "[The actor uses departure reason] [to the noun][the actor uses adverb reason]".
The describe room gone into rule response (K) is "[The actor uses departure reason] through [the noun][the actor uses adverb reason]".
 
The describe room gone into rule response (D) is "[The actor uses arrival reason] from above[the actor uses adverb reason]".
The describe room gone into rule response (E) is "[The actor uses arrival reason] from below[the actor uses adverb reason]".
The describe room gone into rule response (F) is "[The actor uses arrival reason] from the [back way] passage[the actor uses adverb reason]".
The describe room gone into rule response (L) is "[The actor uses arrival reason] through [the noun][the actor uses adverb reason]".
The describe room gone into rule response (G) is "[The actor uses arrival reason][the actor uses adverb reason]".
 
Sound of someone going:
    let X be the Dijkstra distance of the room gone from; [Of instead of to, again, so that infinity is represented by a big number instead of -1; it makes the comparisons easier]
    let Y be the Dijkstra distance of the room gone to;
    if X < Y:
        describe the actor moving for distant departure reason;
    otherwise if X > Y:
        describe the actor moving for distant arrival reason;
    otherwise: [X = Y]
        describe the actor moving for distant movement reason;
    say ".[p]".
 
[
After someone going (this is the describe the sounds of movement rule):
    if the room gone from is the location or the room gone to is the location, continue the action; [This will be handled by the report rules, no need to intervene]
    let source audible be whether or not the room gone from is nearby;
    let destination audible be whether or not the room gone to is nearby;
    if source audible is false and destination audible is false, continue the action; [It's too far away for the player to hear]
    if source audible is true and destination audible is true:
        let the source direction be the best route from the location to the room gone from, using even locked doors;
        let the destination direction be the best route from the location to the room gone to, using even locked doors;
        say "[Adverb the source direction], [the actor uses distant movement reason] [to the destination direction]" (A);
    otherwise if source audible is true:
        let the source direction be the best route from the location to the room gone from, using even locked doors;
        say "[Adverb the source direction], [the actor uses distant departure reason]" (B);
    otherwise [if destination audible is true]:
        let the destination direction be the best route from the location to the room gone to, using even locked doors;
        say "[Adverb the destination direction], [the actor uses distant arrival reason]" (C);
    say ".".
]
 
Book 3 - Shipboard Directions
 
Shipboard directions is an active boolean option with description "describe directions as fore, aft, port, and starboard instead of east, west, north, and south".
 
Understand "fore" or "f" or "forward" or "foreward" as east. The printed name of east is "[if shipboard directions is active]fore[else]east".
Understand "starboard" or "sb" or "star" as south. The printed name of south is "[if shipboard directions is active]starboard[else]south".
Understand "aft" or "a" as west. The printed name of west is "[if shipboard directions is active]aft[else]west".
Understand "port" or "p" as north. The printed name of north is "[if shipboard directions is active]port[else]north".
 
To say to the/-- (way - a direction):
    if the way is:
        -- east: say "[if shipboard directions is active]forward[else]to [the way]";
        -- west: say "[if shipboard directions is active]aft[else]to [the way]";
        -- up: say "upward";
        -- down: say "downward";
        -- north: say "[if shipboard directions is active]to [way][else]to [the way]";
        -- south: say "[if shipboard directions is active]to [way][else]to [the way]";
        -- otherwise: say "to [the way]".
To say To the/-- (way - a direction):
    let T be "[to the way]";
    say T in sentence case.
 
To say adverb the/-- (way - a direction):
    if the way is:
        -- east: say "[if shipboard directions is active]forward[else]to [the way]";
        -- west: say "[if shipboard directions is active]aft[else]to [the way]";
        -- up: say "above";
        -- down: say "below";
        -- north: say "[if shipboard directions is active]to [way][else]to [the way]";
        -- south: say "[if shipboard directions is active]to [way][else]to [the way]";
        -- otherwise: say "to [the way]".
 
To say Adverb the/-- (way - a direction):
    if the way is:
        -- east: say "[if shipboard directions is active]Forward[else]To [the way]";
        -- west: say "[if shipboard directions is active]Aft[else]To [the way]";
        -- up: say "Above";
        -- down: say "Below";
        -- north: say "[if shipboard directions is active]To [way][else]To [the way]";
        -- south: say "[if shipboard directions is active]To [way][else]To [the way]";
        -- otherwise: say "To [the way]".
 
[When play begins:
    repeat with the way running through directions:
        say "[way] [the way] [to the way] [To the way][br]".]
 
Book 4 - Clues and Information
 
Chapter 1 - Actions and Things
 
The ship itself is a familiar backdrop. It is everywhere. Understand "ship" or "Mekhe" or "Irakkab" or "Mekhe-Irakkab" as the ship itself. The description of the ship itself is "The ship is too big to really examine as a whole, at least from the inside." [Because X SHIP is reasonable, separate from the ship notes]
 
A writing tablet is a thing. The indefinite article of the writing tablet is "your". The description of the writing tablet is "For writing down ideas and sketching the scenery. And now, maybe, for solving a murder. [if there is another seen person]You've currently marked out sections labelled SHIP NOTES, PEOPLE NOTES, TASKS, and CLUES[else]There's not much yet, but you'll be adding notes as you go[end if]."
Understand "your" or "my" as the writing tablet.
 
A note-section is a kind of thing. Understand "[note-section]" or "read about [note-section]" as examining. [People want to just say TASKS or SHIP NOTES]
 
The ship notes are a note-section that is part of the tablet. The indefinite article of the ship notes is "your".
The people notes are a note-section that is part of the tablet. Understand "crew" as the people notes. The indefinite article of the people notes is "your".
The tasks-item are a note-section that is part of the tablet. The printed name is "tasks". Understand "task" or "tasks" or "list" as the tasks-item. The indefinite article of the tasks-item is "your".
The clues-item are a note-section that is part of the tablet. The printed name is "clues". Understand "clue" or "clues" or "evidence" or "list" as the clues-item. The indefinite article of the clues-item is "your".
 
The description of the ship notes is "The [i]Mekhe-Irakkab[/i] is not much of a ship. But beggars can't be choosers. It's flying some kind of cargo from the capital back to the Arali provinces, and Kiang was able to arrange a ride for the two of you for dirt cheap. Apparently the name means 'Stormrider' in Kishadu[--]or rather something like 'She Rides the Storm', because the Kishadu like naming things in full sentences. So far you haven't encountered a storm big enough to see if it lives up to the name.[p]It's also horribly understaffed. They were supposed to pick up more of a crew before taking off, but something happened and they needed to leave in a real hurry, which is why they were so glad to have you onboard. There are only six actual crew members; at any time, three are resting and three are keeping the ship in the air. You and Kiang traded off filling in whatever needs doing.[p]Now, of course, nobody's getting any sleep. And Kiang's in the lazarette, and nobody's giving you any instructions, since Udan was the only one who spoke Arali[--]and now he's gone."
 
The crew muster is a list of humans that varies. [Actually it never varies but this is how it has to be]
 
The description of the people notes is "[people list]".
To say people list:
    repeat with the character running through the crew muster:
        if the character is not known, next; [This is how I make them print in the right order]
        say "[b][character][/b]: [journal entry of the character]";
        unless expanding text for comparison purposes: [Which hides text output but not figures!]
            display the portrait of the character at appropriate size;
        say "[p][run paragraph on]".
 
The description of the tasks-item is "[task list]".
The description of the clues-item is "[clue list]".
 
Chapter 2 - Clues
 
A clue is a kind of object. A clue can be known or unknown. A clue is usually unknown. A clue has some text called the description.
 
To reveal (the evidence - a clue):
    if the evidence is unknown:
        now the evidence is known;
        [increase the score by 1;
        say "You [if the tablet is touchable]note down this evidence on your tablet[else].";]
 
To say clue list -- running on:
    if there is a known clue:
        say "You've uncovered the following clues:";
        repeat with the item running through known clues:
            say "[p][description of the item]";
    otherwise:
        say "Once you've found some clues, this part of the tablet will list the deductions and inferences you can make from them.[br][r]".
 
The previous clue number is a number that varies.
When play begins: now the previous clue number is the number of known clues.
 
Every turn:
    if the number of known clues is not the previous clue number:
        now the previous clue number is the number of known clues;
        say "(You [if the writing tablet is touchable]add an entry on your tablet[else]make a mental note to add to the tablet later[end if].)[p]".
 
Smuggling-clue is a clue with description "You can guess now why they had to take off so quickly. The cargo they're carrying isn't legal to transport anywhere in the Empire. They must be bribing someone in customs not to report it.".
 
Explosives-clue is a clue with description "[if smuggling-clue is known]Not only are they smuggling[--]they're[else]This ship is[end if] transporting incredibly dangerous explosives. Maybe they're selling them to Arali separatists; you can't think of anyone else who would buy something like that.".
 
Qarrad-explosives-clue is a clue with description "Qarrad is the one who packed the explosives, but Bashti had contact with them at some point. None of the rest of the crew did."
 
Weapon-rack-clue is a clue with description "No weapons are missing from the racks in the Gunnery. Whatever killed him wasn't one of the ship weapons."
 
Weapon-clue is a clue with description "Udan's body has burn marks on the inside of his shoulder. It looks like an electric shock of some kind."
 
Weapon-user-clue is a clue with description "Both Udan and Bashti touched the weapon that killed him, but it seems to have belonged to Udan."
 
Chapter 3 - Tasks
 
The room under consideration is a room that varies. [Need to stick it in a global for the sake of clear definitions]
Definition: a door is blocked if (it is closed and it is locked) or (it is the cargo staircase and the open tripod is in the Lower Deck). [This could be made more elegant]
 
Definition: a room is not-thoroughly-explored if it is visited and it is near an unvisited room.
Definition: a direction (called the way) is unexplored if the room way from the room under consideration is unvisited.
Definition: a direction (called the way) is blocked:
    let the barrier be the room-or-door (way) from the room under consideration;
    if the barrier is a door and the barrier is blocked, yes;
    if the room under consideration is the Miscellany and the way is east, yes; [Hack - this could be done better but I'm out of time]
    no.
 
To list places to explore:
    if there is a not-thoroughly-explored room:
        say "You haven't yet gone:";
        repeat with the place running through not-thoroughly-explored rooms:
            now the room under consideration is the place;
            say "[br]- ";
            print a list of "[direction being listed][if the direction being listed is blocked] (blocked)" for unexplored directions, disjunctive;
            say " from [the place]";
        say "[p]".
 
To list problems to solve:
    say "The immediate problems you're facing are:";
    if the cabin door is locked, say "[br]Escaping your cabin[if the Rudder-Access is visited] (through the main door)[end if]";
    if Ishme is seen and Ishme's Cabin is unvisited, say "[br]Getting past Ishme";
    if the cargo staircase is seen and the Lower Deck is unvisited, say "[br]Opening the staircase to the lower deck";
    if the toolbox is seen and the toolbox is locked, say "[br]Getting the toolbox to a place where you can open it";
    if the Bashti-door is seen and the Bashti-door is locked, say "[br]Opening the door to Bashti's cabin ([east] from the work area)";
    if the Udan-door is seen and the Udan-door is locked, say "[br]Opening the door to Udan's cabin ([north] from the boilers)";
    if the Qarrad-door is seen and the Qarrad-door is locked, say "[br]Opening the door to Qarrad's cabin ([south] from the boilers)";
    if a crawl hatch is seen and no crawlspace is visited, say "[br]Opening the hatches between the decks";
    if the spectrometer is seen and the spectrometer is mysterious, say "[br]Figuring out how to work the device in Kasap's cabin";
    if the Shimat-door is seen and the Shimat-door is locked, say "[br]Opening the door to Shimat's cabin ([north] from the lower decks)";
    if a netted-thing is seen and we have not opened the lone box and we have not opened the lone cask, say "[br]Opening up some of the cargo you've seen";
    if the stack of parcels is seen and we have not opened the lone parcel, say "[br]Opening up those mysterious packages between the decks";
    if the shock stick is seen and the shock stick is not handled, say "[br]Examining that glint you saw between the decks";
    if the shock stick is handled and the shock stick is unanalyzed, say "[br]Analyzing the murder weapon";
    if the spectrometer is not mysterious and there is an unanalyzed person, say "[br]Figuring out what the data from Kasap's device means";
    say "[br]Doing something about the murder".
 
To say task list:
    list places to explore;
    list problems to solve.
 
Chapter 4 - People
 
The previous people number is a number that varies.
When play begins: now the previous people number is the number of known humans.
Yourself is familiar.
 
Every turn:
    if the number of known humans is not the previous people number:
        now the previous people number is the number of known humans;
        say "(You [if the writing tablet is touchable]add a sketch to your tablet[else]make a mental note to add to the tablet later[end if].)[p]".
 
The journal entry of Shimat is "Shimat-Adad is both the pilot and the navigator, currently, since the crew is too small to have two people working down there at once. You think she's also the captain, though it's sometimes hard to tell whether she or Kasap is really in charge[--]with a crew of six there's not a lot of pulling rank. She trades off shifts with Kasap so that there's always someone at the helm. Right now she's making all the preparations for landing."
 
The journal entry of Kasap is "Kasap-Sin is the ship's second-in-command (probably, at least), and also takes care of anyone who gets injured. He trades off shifts with Shimat so that there's always someone at the helm, though she's the one who does most of the navigation. Right now Shimat is on duty and he's examining the body; seems he can't sleep either."
 
The journal entry of Ishme is "Ishme-Nabium is the ship's chief engineer, responsible for keeping it functioning and flying. She trades off shifts with Bashti so that there's always someone available to deal with technical problems. Right now Bashti is on duty and Ishme has locked herself in her cabin, where she's working on patching the hull rather than getting any sleep."
 
The journal entry of Bashti is "Bashti-Shadu is the ship's apprentice engineer (engineer's mate? is that the term?), learning the ropes and doing a lot of the less pleasant work with scalding pipes and cramped maintenance crawls. He trades off shifts with Ishme so that there's always someone available to deal with technical problems. Right now he's on duty, running back and forth all over the ship dealing with any problems that come up."
 
The journal entry of Qarrad is "Qarrad-Shamash is the ship's gunner, keeping the ship safe from any and all outside threats. If it ever got boarded, she's the one who would take charge, but thankfully that hasn't happened...yet. She used to trade off shifts with Udan so there would always be someone who could man the big cannons, but now she's handling it alone."
 
The journal entry of Udan is "Udan-Ishtar was the ship's...steward might be the right word? He was the one who took care of the crew, made the food, and kept morale up. He was the one who first brought you on and made sure you knew what to do around the ship. He also traded off shifts with Qarrad manning the guns. Kiang spent most of the trip working with him."
 
The journal entry of Kiang is "Kiang is your brother, currently locked in the lazarette. The two of you helped with anything you could around the ship, but he spent most of his time working with Udan in particular[--]and he had a key to the locked cabin where Udan's body was found. Now you need to find some evidence that will save him."
 
A human has a figure name called the portrait.
The portrait of Shimat is the Figure of Shimat.
The portrait of Kasap is the Figure of Kasap.
The portrait of Ishme is the Figure of Ishme.
The portrait of Bashti is the Figure of Bashti.
The portrait of Qarrad is the Figure of Qarrad.
The portrait of Udan is the Figure of Udan.
The portrait of Kiang is the Figure of Kiang.
 
After examining another person:
    display the portrait of the noun at appropriate size;
    continue the action.
After examining Udan:
    display the Figure of Corpse at appropriate size; [Separate picture for when he's dead]
    continue the action.
 
Book 5 - The Compass
 
[
Table of Full Compass Status
left    central    right
""    "[compass rose north]"    "[compass rose up]"
"[spaced compass rose west]"    "[compass location]"    "[compass rose east]"
"[spaced compass rose down]"    "[compass rose south]"    ""
 
There is an active boolean option called compass rose.
There is an active boolean option called compass location names.
 
Equation - Just Past the Location
    RAD = ((SBW - LOC - 1) / 2) - OFF
where RAD is a number, SBW is a number, LOC is a number, OFF is a number.
 
To decide what number is the central column width:
    let X be the number of characters in "[compass rose north]";
    let Y be the number of characters in "[compass location]";
    let Z be the number of characters in "[compass rose south]";
    if Y > X, let X be Y;
    if Z > X, let X be Z;
    decide on X.
 
Rule for constructing the status line:
    [if we have not looked, rule succeeds; [No status line before play begins]]
    if compass rose is active:
        let SBW be the status bar width;
        let LOC be the central column width;
        let OFF be 3;
        let RAD be given by Just Past the Location;
        now the right alignment depth is RAD;
        fill the status bar with the Table of Full Compass Status;
    otherwise:
        center "[location]" at row 1;
    rule succeeds.
 
To say (N - a number) spaces: (- spaces {N}; -).
To decide what number is the/-- status bar width: (- VM_ScreenWidth() -).
 
To say compass rose (way - a direction):
    let the place be the room (way) from the location;
    let the barrier be the room-or-door (way) from the location; [We only care about this in the case that it's actually a door]
    if the place is nothing, stop;
    let T be "";
    if compass location names is active:
        if the place is visited:
            let T be "[place]";
        otherwise:
            let T be "[way]" in upper case;
    otherwise:
        let T be "[way]" in upper case;
    if the barrier is a door:
        if the barrier is closed and the barrier is locked:
            let T be "([T])";
    say T.
 
To say compass location:
    say "- [location] -".
 
To say spaced compass rose (way - a direction):
    let T be "[compass rose way]";
    let N be the right alignment depth minus the number of characters in T;
    if N < 1, stop;
    say "[N spaces][T]".
]
 
Rule for constructing the status line:
    center "[location with hiding]" at row 1.
 
Book 6 - Analysis
 
Chapter 1 - The Analyzing Action
 
A thing can be analyzed or unanalyzed. A thing is usually unanalyzed. [For objects, knowing who handled them; for humans, knowing their signature]
 
Ownership relates one human (called the owner) to various things. The verb to own means the ownership relation. The verb to belong to means the reversed ownership relation. [This is for things that are only handled by a single person; things handled by multiple people get their own special code.]
 
The special analysis rules are an object based rulebook. The special analysis rules have default success. [And here's where that special code goes.]
Last special analysis rule: rule fails. [So we can check the status of the rulebook to see if any other rules applied]
 
To describe the/-- spectrum of (the item - a thing):
    if the owner of the item is:
        -- Shimat: say "the brightest lines are violet and there's a brief smell of sandalwood";
        -- Kasap: say "the brightest lines are a deep indigo, and the acrid scent of disinfectant fills the air";
        -- Ishme: say "the green parts are the brightest; the smell of burning welding flux is overwhelming";
        -- Bashti: say "the brightest part shines a pale sky blue and the scent of machine oil lingers in the air";
        -- Qarrad: say "the brightest lines are in the reds and oranges, and the air smells like gunpowder";
        -- Udan: say "the yellow lines shine brighter than the rest and there's a hint of cooking oil in the air";
        -- Kiang: say "the brightest lines are an orange-yellow and it smells unpleasantly of sweat";
        -- yourself: say "the brightest lines are a pale orange and it smells unpleasantly of sweat";
        -- nothing: say "nothing in particular stands out in the spectrum".
 
Analyzing is an action applying to one carried thing. Understand "analyze [something preferably held]" as analyzing. Understand the command "analyse" as "analyze". [For the Brits]
Check analyzing when the player cannot touch the flame spectrometer: say "You don't have any equipment to analyze with." instead.
Check analyzing when the flame spectrometer is mysterious: say "This seems like a device for analyzing things, but you don't have any idea how it works." instead.
 
Carry out analyzing:
    now the noun is analyzed;
    if the owner of the noun is a human, now the owner of the noun is analyzed.
 
Report analyzing:
    say "[one of]You insert [the noun] into the device, and twist and turn the dials until you've successfully swabbed its surface and maneuvered the arm into position. Then you turn on the gas stream, press the knob to make a spark...and hope.[p]For a moment there's nothing but the hiss of gas. Then the colorless flame hits the sample and bursts into color, divided into a rainbow of lines projected across the wall[or]You insert [the noun], swab the surface, and light the gas again. The flame bursts into brilliant color, its spectrum projected across the wall[stopping].[p]";
    follow the special analysis rules for the noun;
    if rule failed: [The special analysis rules didn't handle it specially]
        say "This time, ";
        describe the spectrum of the noun;
        say "."
 
Chapter 2 - Special Analysis Rules
 
Special analysis for a netted-thing:
    say "All sorts of colors blaze up, residues of all the different hands that have touched it. The smoke has a heady, intoxicating smell to it, and you feel momentarily sharp and energized."
 
Special analysis when the parameter-object is the pinch of powder or the pinch of grain:
    say "The flame takes on a strange magenta color and the smoke is intoxicating. You feel momentarily sharp and energized."
 
Special analysis for the lone parcel:
    say "There's a brief flare of pale sky blue, which quickly burns away and leaves a bright red-orange. Maybe the blue is more recent and the orange is more thorough?"
 
Special analysis for the pinch of clay:
    say "It doesn't explode, at least. It burns a vibrant emerald and smells truly awful."
 
Special analysis for the shock stick:
    say "For a moment two different parts of the spectrum shine bright, light blue and yellow. Then the blue fades away and the yellow remains, its residue more thoroughly ingrained."
 
Special analysis for the protective gloves:
    say "The spectrum shines green-blue and pale orange."
 
Special analysis for the toolbox:
    say "The spectrum shines with greens and light blues."
 
Special analysis for the wrench:
    say "The spectrum shines with light blues and greens."
 
Chapter 3 - Clues from Analysis
 
After analyzing:
    if Udan is analyzed and Bashti is analyzed and the shock stick is analyzed:
        reveal weapon-user-clue;
    if Qarrad is analyzed and Bashti is analyzed and the lone parcel is analyzed:
        reveal Qarrad-explosives-clue;
    continue the action.
 
Book 7 - Supplies
 
[A supply is basically a source of small objects that's fixed in place; taking it gives you the small thing instead]
 
A supply is a kind of thing. A supply is always fixed in place. A supply is usually illegal.
A supply has a thing called the output. The verb to yield means the output property.
 
Does the player mean doing anything with a supply: it is unlikely. [Prefer the single item over the supply]
 
Instead of taking or searching a supply:
    let the result be the output of the noun;
    if the result is enclosed by the location:
        say "You already have one [result]. Best not to take too many.";
    otherwise if the result is on-stage:
        say "You've already taken one [result]; you left it in [the location of the result]. Best not to take too many.";
    otherwise:
        if the result is a substance:
            say "You extract [a result].";
        otherwise:
            say "You grab one [result] at random.";
        now the player carries the result;
        set pronouns from the result.
 
Instead of inserting something into a supply (this is the return things to supplies rule):
    if the output of the second noun is the noun:
        say "You put [the noun] back in [their] place.";
        remove the noun from play;
    otherwise:
        say "[The noun] [don't] belong there. [They] would look out of place."
Before inserting something into a container which contains a supply (called the source) (this is the redirect to supplies in some cases rule):
    if the output of the source is the noun:
        try inserting the noun into the source instead.
Instead of putting something on a supply:
    try inserting the noun into the second noun.
 
A substance is a kind of thing. [Liquids, powders, etc that can't be dropped]
Instead of dropping a substance:
    say "[The noun] [scatter] and [are] lost.";
    remove the noun from play.
To scatter is a verb.
Instead of inserting a substance into something (this is the discard when inserting substances rule): try dropping the noun.
Instead of putting a substance on something: try dropping the noun.
 
The return things to supplies rule is listed before the discard when inserting substances rule in the instead rulebook.
 
Book 8 - Chests
 
[Mostly taken from example 58 U-Stor-It]
 
A chest is a kind of container. A chest is always openable. A chest is usually fixed in place. A chest is usually closed. A chest is usually not enterable.
A lid is a kind of supporter. A lid is part of every chest. A lid is usually enterable.
 
Before entering or climbing a chest:
    say "(climbing on top of it)[ccb]";
    let the item be a random lid incorporated by the noun;
    try entering the item instead.
Before entering a lid which is part of an open chest (called the item):
    say "(first closing [the item])[ccb]";
    silently try closing the item.
Instead of entering a lid which is part of an open chest:
    say "You can't climb on top while it's open, and it's a bit too small to fit inside."
 
Before opening a lid which is part of a chest (called the item):
    try opening the item instead.
Before closing a lid which is part of a chest (called the item):
        try closing the item instead.
Before opening a chest (called the box) when something is on a lid (called the obstruction) which is part of the box:
    if the player is enclosed by the obstruction:
        say "(getting off it first)[ccb]";
        silently try exiting;
    repeat with item running through things on the obstruction:
        carry out the implicitly taking activity with the item.
Instead of opening a chest when something is on a lid (called the item) which is part of the noun:
    say "[We]'d have to remove [the list of things on the item] from the lid first." instead.
Instead of looking under a lid which is part of a chest (called the item):
        try opening the item.
 
Before inserting something into a lid which is part of a chest (called the item):
    try inserting the noun into the item instead.
Before putting something on a chest when a lid (called the item) is part of the second noun:
    try putting the noun on the item instead.
 
Before putting something on a lid which is part of an open chest (called the item):
    say "(first closing [the item])";
    silently try closing the item.
Instead of putting something on a lid which is part of an open chest (called the item):
    say "[The item] would need to be closed first."
 
After examining or searching a closed chest when something is on a lid (called the top) which is part of the noun:
    say "On top of it [is-are a list of things on the top].";
    continue the action.
 
After printing the name of a chest (called the item) while listing contents of a room:
    if a lid (called the second item) which supports something is part of the item:
        say " (on which [is-are a list of things on the second item])";
        omit contents in listing.
 
Book 9 - Using
 
Using it on is an action applying to two things. Understand "use [something preferably held] on/for/with [something]" as using it on.
Check using something on something: say "It's not clear how to use [a noun] for that. You may need to describe your intent more explicitly." instead.
 
Instead of using the crowbar on something:
    say "(opening [the second noun] with the crowbar)[ccb]";
    try unlocking the second noun with the crowbar.
 
Instead of using the screwdriver on something:
    say "(unscrewing [the second noun] with the screwdriver)[ccb]";
    try unlocking the second noun with the screwdriver.
 
Instead of using the wrench on something:
    say "(turning [the second noun] with the wrench)[ccb]";
    try unlocking the second noun with the noun.
 
Instead of using the gloves on something when the gloves are not worn:
    say "(putting on the gloves, then pulling [the second noun])[ccb]";
    try wearing the gloves;
    try pulling the second noun.
 
Instead of using the gloves on something when the gloves are worn:
    say "(pulling [the second noun] while wearing the gloves)[ccb]";
    try pulling the second noun.
 
Instead of using the flame spectrometer on something:
    say "(analyzing [the second noun])[ccb]";
    try analyzing the second noun.
 
Instead of using the shock stick on something:
    say "(attacking [the second noun])[ccb]";
    try attacking the second noun.
 
Vaguely using is an action applying to one thing. Understand "use [something preferably held]" as vaguely using.
Check vaguely using something: say "It's not clear what you want to use [the noun] for. You may need to describe your intent more explicitly." instead.
 
Book 10 - Locale Priority
 
[By default, things are sorted in room descriptions based on their definition order in the source and how recently they've been moved. I'd like to override that and have fixed things > people > pushable things > portable things.]
 
To decide what number is the calculated priority for (the item - a thing):
    if the item is fixed in place or the item is scenery or the item is a door, decide on 1;
    if the item is a person, decide on 2;
    if the item is pushable between rooms, decide on 3;
    decide on 4.
 
Rule for choosing notable locale objects (this is the better notable locale objects rule):
    let the domain be the parameter-object;
    let the held item be the first thing held by the domain;
    while the held item is a thing:
        [say "** [the held item]: [the calculated priority for the held item][br]";]
        set the locale priority of the held item to the calculated priority for the held item;
        now the held item is the next thing held after the held item;
    continue the activity.
 
The standard notable locale objects rule does nothing.
 
Book 11 - Replacing Default Messages
 
The report listening rule response (A) is "It's never truly silent on a ship like this. You've gotten used to all the sounds of the ship and the crew surrounding you."
 
[Block consulting left untouched]
[Block giving left untouched]
[Block showing left untouched]
 
The futile to throw things at inanimate objects rule response (A) is "If you want to break [the second noun], probably better to do it hands-on."
The block throwing at rule response (A) is "You could throw [the noun] at [the second noun], but you're not at all confident in your ability to escape before [they] sees you."
 
The block attacking rule response (A) is "You don't see an obvious way to damage [the noun]."
 
[Block kissing handled elsewhere]
[Block answering handled elsewhere]
[Block telling handled elsewhere]
[Block asking handled elsewhere]
 
The block saying yes rule response (A) is "You'd think the crew might at least recognize 'yes' and 'no', but it seems not."
The block saying no rule response (A) is "You'd think the crew might at least recognize 'yes' and 'no', but it seems not."
 
The block burning rule response (A) is "You're not above a bit of sabotage if it'll save Kiang. But basically everything on the ship has been designed to not catch fire easily."
 
The block waking up rule response (A) is "Wouldn't it be lovely if this were all just a bad dream? But it's not."
 
The block thinking rule response (A) is "You pause to ponder your options. The notes on your tablet might help."
 
Before cutting something: try attacking the noun instead. [Redirect]
 
The block tying rule response (A) is "You've helped out wherever you could on the voyage, but you're still not much of a sailor."
 
The block saying sorry rule response (A) is "You try to look apologetic."
 
The block swinging rule response (A) is "You've helped out wherever you could on the voyage, but you're still not much of a sailor."
 
The block setting it to rule response (A) is "You can push, pull, and turn things, but the finer details of the controls are beyond you."
 
The block buying rule response (A) is "You barely had enough money to book passage home."
 
The block climbing rule response (A) is "[The noun] [are]n't very climbable."
 
[Block sleeping handled elsewhere]
 
Book 12 - Subtitles
 
Subtitles are a boolean option with description "display English equivalents for Kishadu dialogue, for linguistically-inclined players". The subtitles object translates into I6 as "subtitles".
 
To say akk -- beginning say_akk -- running on: do nothing.
To say eng -- continuing say_akk -- running on: (- if(SubtitlesEnabled()){-open-brace} StartSubtitles(); -).
To say /akk -- ending say_akk -- running on: (- EndSubtitles(); {-close-brace} -).
 
Include (-
 
[ SubtitlesEnabled ;
    if(subtitles has boolean_option) rtrue;
    rfalse;
];
 
[ StartSubtitles ;
    style underline;
    print "[";
];
 
[ EndSubtitles ;
    print "]";
    style roman;
];
 
-).
 
[Instead of jumping: say "Testing [akk]Akkadian[eng]English[/akk] testing.".]
 
Volume II - The World
 
Book 1 - Ishme and the Tutorial Area
 
Chapter 0 - Introductory Text
 
When play begins, say "You'd been so optimistic, starting out. The empire had seemed so promising, so exciting. You and your brother had devoted everything you had to move to the capitol, so bright and full of potential compared to your backwater province. A place where a hard worker could make their fortune. Kiang and Zagin, together against the world.[p]It didn't turn out that way at all. You were barely able to scrounge up the means to limp your way back, tail between your metaphorical legs. Kiang found a tiny Kishadu freighter looking for extra hands on short notice, and you've spent your time in the air helping when you're needed and stewing in regret when you're not.[p]But now...[p]Udan, the one who hired you on[--]the only one of the crew who spoke Arali[--]is dead. They think your brother did it. You don't know how, or why. But unless you can find out the truth, he's going to spend the next decade in a Kishadu prison.[p]Six hours until the ship lands. Six hours to solve a murder. You have no idea where even to start. But this is Kiang's only chance at justice. Prepared or not, you've got to try."
 
Chapter 1 - Rooms
 
Section A - The Passenger Cabin
 
The description of yourself is "You're a bit of a mess after so many days aboard ship, and you've gotten your share of burns and blisters as you learned the ropes. But all in all, it had been an uneventful voyage, up until the murder happened."
Understand "zagin" as yourself.
 
The Passenger Cabin is a room. "'Cabin' feels like too fancy of a word for this. It's a tiny storeroom at the back of the cargo hold, with quilts rolled out over the empty shelves to act as bunks. But travelling on a cargo ship means being treated as cargo[--]the crew's not getting anything better. And with Kiang locked up in the brig, you have the whole thing to yourself.
 
[To the east], the door leads out to the rest of the ship; a hatch in the [south] wall connects to one of the engineers['] maintenance passages."
Before exiting when the holder of the player is the Passenger Cabin: try going east instead.
Understand "my" as the Passenger Cabin.
 
A makeshift bunk is an ambiguously plural enterable scenery supporter in the Passenger Cabin. Understand "bunks" and "shelf" and "shelves" and "quilt" and "quilts" and "bed" as the makeshift bunk. The description of the makeshift bunk is "Not the worst place you've ever slept. But you can understand why your brother preferred to find other places to sleep." The bunk allows concealment in below-position. [This isn't at all useful but it gives the player a chance to play with the hiding code]
 
A cabin door is a door. It is east of the Passenger Cabin and west of the Cargo Hold. It is locked and scenery. The description is "[if locked]Jammed shut. You don't think you're supposed to be confined to quarters or anything, but it won't budge, and no matter how hard you knock nobody's been back to let you out[else]Freedom is yours. Time to figure out the truth[end if]."
Instead of opening or unbolting the locked cabin door:
    say "It won't budge. You don't think you're supposed to be confined to quarters or anything, but the lock is jammed in a way that's beyond your ability to fix[--]without some tools, at least.".
 
After unlocking the cabin door with something:
    say "You fit the end of the pry bar between the door and its frame, and wiggle it back and forth until it catches on the bolt. Then you lean forward and throw all your weight against it. At first, nothing happens[--]then all at once the lock comes unstuck and the door falls open.";
    now the cabin door is open.
 
Instead of locking the cabin door with something:
    say "You don't really want it to get stuck again."
 
The Zagin-hatch is a maintenance hatch. It is south of the Passenger Cabin and north of the Rudder-Access.
After going through the Zagin-hatch:
    say "[one of]You've never used this one before, but with some effort you manage to[or]You[stopping] squirm your way through the hatch.";
    continue the action.
 
The writing tablet is in the Passenger Cabin. The initial appearance of the writing tablet is "Your writing tablet lies off to one side." It belongs to yourself.
Instead of dropping the tablet: say "But where will you keep your notes without it?".
Instead of inserting the tablet into: try dropping the tablet.
Instead of putting the tablet on: try dropping the tablet.
Rule for deciding whether all includes the tablet when dropping or inserting: it does not.
 
Writing on is an action applying to one thing. Understand "write on/-- [something preferably held]" as writing on. Understand the commands "sketch" and "draw" as "write".
Check writing on something: say "It wouldn't do much good. The crew can't read Arali any better than they can speak it."
Instead of writing on the writing tablet: say "You'll add sketches and notes to the tablet automatically throughout the game."
 
Section B - The Rudder
 
Rudder-Access is a room. "The maintenance passage ([to the east]) ends, sharply, terrifyingly, with a narrow metal platform[--]and then nothing but the great expanse of the air behind you, the ground so far below that you can barely make it out. A hatch [to the north] leads back to the safety of your cabin."
Understand "rudder" and "access" as Rudder-Access. The printed name of Rudder-Access is "Rudder Access".
 
The starboard rudder is fixed in place in Rudder-Access. "One of the ship's enormous rudders extends out into the air, surrounded by the tangle of machinery that translates the pilot's instructions into the ship's movement[if jammed]. That machinery currently seems to be jammed. It's stuck in place, steam whistling out of a release valve[end if].". Understand "enormous" or "ship's" or "machinery" or "machine" or "tangle" or "tangle of" or "arrangement" or "arrangement of" or "steam" or "rotary" or "shaft" or "shafts" or "gyroscope" or "gyroscopes" or "jammed" or "jam" or "venting" or "vent" or "valve" or "valves" or "release" or "mechanism" or "bar" or "bars" or "rudders" as the rudder.
[Does the player mean doing something with the rudder: it is likely. [Don't prefer the omnipresent pipes over the rudder!]]
The rudder can be jammed or unjammed. The rudder is jammed. The description of the rudder is "A frightfully complicated arrangement of rotary shafts and gyroscopes controls the rudder's motion, steering the ship in whichever direction the pilot intends. [if jammed]At the moment, though, it looks like something is jammed up, and steam is venting out the back in a way it probably shouldn't be[else]As far as you can tell[--]which isn't very far, if you're being honest[--]it's all working as intended, keeping the [i]Mekhe-Irakkab[/i] on its course...for now. Some bars are rubbing against each other and it wouldn't be hard to jam it all up again[end if]."
Instead of pushing or pulling or turning or attacking or rubbing or touching or repairing the rudder:
    if Ishme is visible:
        say "Judging from Ishme's expression, it would be a very bad idea to do that in front of her.";
    otherwise if the rudder is jammed:
        say "You have no idea how to fix this, even if there [i]weren't[/i] scalding-hot steam venting out.";
    otherwise:
        say "You grab hold of one of the shafts, mostly at random, and another shaft rams up against it[--]and within a few moments the whole mechanism has jammed up again.";
        now the rudder is jammed.
 
After going through the Zagin-hatch: now Ishme is active; continue the action. [So she'll come repair the jam for the first time]
 
Instead of going down when the location is the Rudder-Access or the location is the Precipice: try jumping.
Instead of jumping when the location is the Rudder-Access or the location is the Precipice: say "For a moment you have the terrifying urge to throw yourself over the edge, and grab onto the hull with renewed vigor."
 
Section C - The Starboard Walk
 
East of the Rudder-Access is the Starboard Walk [Aft. The printed name of the Starboard Walk Aft is "Starboard Walk"]. The description of Starboard Walk [Aft] is "The maintenance passages along the hull are dark and cramped, meant to let the engineers access what they need to access rather than to actually move around in. Steam pipes run above and below the walkway, and you have to keep your arms in to avoid brushing against them and getting a nasty burn."
 
East of the Starboard Walk [Aft] is the Precipice. The description of the Precipice is "The claustrophobia of the tunnel opens out into sudden, vertiginous terror. There's a huge gap in the starboard hull, and beyond it, nothing but the open sky below. The walkway under your feet is steady enough, but it's barely two feet of metal, and your grip on the wall suddenly feels a lot less stable than it was before. Farther [to the east] is the [if the Ishme-hatch is open]open[else]closed[end if] hatch to the engineer's quarters."
A huge gap in the hull is scenery in the Precipice. The description of the huge gap is "Easily big enough for a person to fall through."
Instead of searching the huge gap: say "Beyond it is nothing but the vast, open sky."
Before entering the huge gap: try jumping instead.
Before examining down when the location is the Precipice: try examining the huge gap instead.
 
A piece of hull material is in the Precipice. It is pushable between rooms. It allows concealment in below-position and behind-position. "[if the location is Precipice]The missing[else]A[end if] section of hull-metal is propped against the wall, waiting for the engineers to finish patching the tears." Understand "hull-metal" and "metal" and "section" and "tear" and "tears" and "sheet" and "grid" as the hull material. The description of the hull material is "One side is a thin sheet of the brassy-golden metal they make hulls out of; the other side is a grid of hexagons of some darker, grayer metal that gets connected to the rest of the ship. The gold side of this one looks bubbly, like something half-melted it[--]a lightning strike, maybe?" Instead of taking the hull material: say "This piece is light enough that you can push it around, but too heavy to actually lift."
Instead of going with the hull material:
    say "You grab hold of the hull material and heave with all your strength, and it starts to slide...";
    continue the action.
 
Instead of hiding in a position of when the location is Precipice: say "Not here! You could fit behind it, but if the ship tilted at all you'd be falling out into space."
 
[East of the Precipice is the Starboard Walk Fore. The printed name of Starboard Walk Fore is "Starboard Walk". The description of the Starboard Walk Fore is "The maintenance passage opens out here into a small room, just [west] of the main engineer's workshop."]
A metal walkway is a backdrop. It is in the Rudder-Access and the Starboard Walk and the Precipice. Understand "walk" and "way" and "little" and "ridge" and "ridges" as the metal walkway. The description of the walkway is "Covered in little ridges to keep you from slipping as you move."
Instead of entering the metal walkway: say "You're already on it."
 
Section D - Ishme's Cabin
 
The Ishme-hatch is a maintenance hatch. It is east of the Precipice and west of Ishme's Cabin.
[East of [the Starboard Walk Fore] the Precipice is Ishme's Cabin.] The description of Ishme's Cabin is "Or maybe 'lair' is a better term. This is where the chief engineer lives, sleeps, and works, when she's not dealing with some emergency or other. Everyone has been dealing with the murder in their own way, and Ishme's way seems to be shutting out the rest of the world and focusing on the things she can fix. She's off-duty this shift, but seems to have been working frenetically on hull repairs instead of getting any sleep; a shelf pushed in front of the main door shows how little she wants to be disturbed. The only other exit is a maintenance hatch [to the west]."
Understand "lair" as Ishme's cabin. [For GO TO]
The barricaded door is scenery in Ishme's Cabin. Understand "main" and "shelf" and "barricade" as the barricaded door. The description of the barricaded door is "Ishme seems to have no intention of being disturbed until her next shift. Un-barricading the door would take more strength than you've got."
Instead of opening or unbolting or pushing or pulling the barricaded door: try examining the noun.
Instead of unlocking the barricaded door with something: try unbolting the noun.
 
Ishme's workbench is a supporter in Ishme's Cabin. "Her workbench is covered with a mess of tools, components, and diagrams, all fastened to the surface with magnets so they don't shift when the ship does." The description of Ishme's workbench is "Little more than a slab of metal bolted to the wall." Understand "slab" or "metal" or "of metal" or "work" or "bench" as Ishme's workbench.
 
Ishme's workbench allows concealment in below-position. [Not useful but fun]
 
Ishme's tools are plural-named scenery on Ishme's workbench. Understand "tool" or "tools" or "component" or "components" or "diagram" or "diagrams" or "magnet" or "magnets" or "magnifying" or "lens" or "schematic" or "schematics" or "paper" or "papers" or "mess" or "mess of" or "sheet" or "sheets" or "hull" or "metal" or "hull-metal" as the tools. The description of the tools is "You don't even know what half of these things do, but somehow they're all essential to keeping the ship in the air."
Instead of taking Ishme's tools:
    if the crowbar is on Ishme's workbench:
        say "You rifle through the tools and find a promising-looking crowbar.";
        silently try taking the crowbar instead;
    otherwise:
        say "None of the other tools look immediately useful to you."
 
On Ishme's workbench is an undescribed key called a crowbar. The crowbar unlocks the cabin door. The description of the crowbar is "A small crowbar, about twice the width of your palm[if the location of the item described is Ishme's Cabin] and easy to overlook on the messy workbench[end if]. Ishme will probably never notice it's gone." Understand "crow" and "bar" and "pry" and "prybar" and "small" and "steel" as the crowbar. The crowbar is illegal and concealable. It belongs to Ishme.
Before searching Ishme's tools: try searching Ishme's workbench instead.
After examining when (the noun is Ishme's tools or the noun is Ishme's workbench) and the crowbar is on Ishme's workbench:
    say "There's a glint of steel under one of the diagrams.";
    now gleam-seen is true; [Used in the tutorial]
    continue the action.
Understand "glint" or "glint of" as the crowbar when the crowbar is on Ishme's workbench.
After taking the crowbar when the crowbar was not handled:
    say "You fish the pry bar out from under a sheet of schematics.";
    now the crowbar is not undescribed.
 
Instead of searching Ishme's workbench:
    if the crowbar is on the workbench:
        say "A lot of tools, papers, and other things you don't understand. And one thing you do[--]a glint of steel under one of the diagrams looks like a small crowbar.";
    otherwise if there is a portable thing on the workbench:
        say "Amid the tools, you recognize [a list of portable things on the workbench].";
    otherwise:
        say "A lot of tools, papers, and other things you don't understand. Hopefully she won't miss the crowbar."
 
Instead of unlocking something portable with the crowbar when the location is not private: say "Prying containers open with a crowbar is the sort of thing that'll be [i]really[/i] hard to explain if you're noticed. Best to do it somewhere you won't be disturbed[one of][or], like in your cabin[stopping]."
Instead of locking something with the crowbar: say "A pry bar is a great way to open something, and a less great way to seal it up again."
After unlocking something with the crowbar: say "You wedge the little crowbar into a gap in [the noun] and push until something gives. [They] should be able to open now."
Understand the command "pry" as "unlock".
 
Definition: something is crowbar-lockable if the matching key of it is the crowbar.
 
A workshop chair is an enterable supporter in Ishme's Cabin. "The chair in front of the workbench looks like it's been extensively modified, rebuilt, and adjusted for the comfort of one person and one alone." The description of the chair is "Incredibly over-engineered."
 
Chapter 2 - The Tutorial System
 
Section A - Setup
 
Tutorial mode is initially false.
Activating tutorial is an action out of world applying to nothing. Understand "tutorial on/--" as activating tutorial.
Check activating tutorial when the Cargo Hold is visited: say "[tut]If you've made it this far, you've already learned everything the tutorial has to teach you![/tut]" instead.
Check activating tutorial when tutorial mode is true: say "[tut]The tutorial is already going![/tut]" instead.
Carry out activating tutorial: now tutorial mode is true.
[Report activating tutorial: say "Tutorial messages are now on."]
 
Deactivating tutorial is an action out of world applying to nothing. Understand "tutorial off" as deactivating tutorial.
Check deactivating tutorial when tutorial mode is false: say "[tut]The tutorial is already off![/tut]" instead.
Carry out deactivating tutorial: now tutorial mode is false.
Report deactivating tutorial: say "Tutorial messages are now off."
 
To say tut -- running on: say "[using note style][bracket]".
To say /tut -- running on: say "[close bracket][using normal style][paragraph break]".
 
Tutorial-offered is initially false.
Before reading a command when tutorial-offered is false:
    say "[tut]If you're new to this sort of interactive fiction, type TUTORIAL for a quick introduction.[/tut]";
    now tutorial-offered is true.
 
Tutorial-already-given is initially false.
First before reading a command when tutorial mode is true and hidden prompt is false:
    if tutorial-already-given is false, give the current tutorial;
    now tutorial-already-given is false.
 
Taught-hidden is initially false.
First before reading a command when hidden prompt is true and taught-hidden is false:
    say "[tut]When the prompt turns into a '[close bracket]' like this, it means you can press SPACE or ENTER to just keep doing the same thing. If you start typing a command, the normal prompt will come back.[/tut]";
    now taught-hidden is true.
 
Section B - Effects
 
Hid-successfully is initially false.
After hiding in a position of something:
    now hid-successfully is true;
    continue the action.
 
Hid-unsuccessfully is initially false.
Before hiding in a position of the hull material: now hid-unsuccessfully is true.
 
Tried-unlocking is initially false.
Before opening the cabin door: now tried-unlocking is true.
 
Gleam-seen is initially false.
 
After someone going (this is the hack around the limits of epistemology rule): [Messy hack to deal with a limitation of Epistemology when other people move around]
    if the location of the actor is the location:
        now the actor is seen;
    continue the action.
 
To give the current tutorial:
    if the Cargo Hold is visited:
        say "[tut]You've got the hang of this now! Just remember to EXAMINE anything that stands out, and see what you can do with those things. If something goes horribly wrong, you can always UNDO and try again. And if you're truly stuck, you can always ask for HELP.[/tut]";
        now tutorial mode is false;
    otherwise if the cabin door is unlocked:
        say "[first time][tut]You've done it![/tut][only][r]";
    otherwise if the location of the crowbar is not Ishme's Cabin:
        if the location is the Passenger Cabin:
            say "[tut]With a tool in hand, you can probably guess what to do now[one of][or]: OPEN DOOR WITH CROWBAR[stopping].[/tut]";
        otherwise:
            say "[tut][first time]Score! With this, you might be able to do something about that stuck door. [only]Instead of remembering the directions back down the hallway, you can just GO TO THE PASSENGER CABIN.[/tut]";
    otherwise if we have examined the crowbar and the crowbar is not handled and Ishme is in Ishme's Cabin:
        say "[tut]Looks like the timing didn't quite work out. When that happens, you can go back and try it over again, or you can use UNDO to take back a move.[/tut]";
    otherwise if gleam-seen is true:
        say "[one of][tut]That glint looks promising.[/tut][or][stopping][r]";
    otherwise if the location is Ishme's Cabin:
        say "[tut]You don't have much time until she comes back. Out of everything here, that workbench looks the most promising.[/tut]";
    otherwise if the Dijkstra route from the location to the location of Ishme is west:
        say "[tut]You've gotten past her! Quick, head [to the east] while she's out of her cabin![/tut]";
    otherwise if the concealing object is the hull material and the rudder is jammed:
        say "[tut]Now, all you can do is WAIT until she's past.[/tut]";
    otherwise if the hull material is not in the Precipice:
        if the rudder is jammed:
            say "[tut][one of]That should do it. Ishme will be heading this way as soon as she sees something's wrong. [or]Ishme is coming! [stopping]Time to get to your hiding place in [the location of the hull material]![/tut]";
        otherwise if the location is the Rudder-Access:
            say "[tut]Ishme fixed the machinery here, but it really needs proper maintenance[one of][or]. Maybe you can find a way to jam it up again[or][or]. Try to JAM THE RUDDER[stopping].[/tut]";
        otherwise if hid-successfully is true:
            say "[one of][tut]This seems like a good hiding place. Now you just need Ishme to go past, so that you can get behind her without being spotted.[/tut][or][tut]How can you get Ishme to go back to the [west] end?[/tut][or][stopping][r]";
        otherwise:
            say "[tut]Now that there's no precipice in the way, let's [if the hull material is not visible]go back to [the location of the hull material] and[end if] see if HIDE BEHIND MATERIAL works.[/tut]";
    otherwise if hid-unsuccessfully is true:
        say "[tut][one of]When the game doesn't let you do something, it'll usually tell you why[--]in this case, the big gap in the hull. What if you tried this in a different location?[r][or]Maybe you can carry the hull metal somewhere else.[r][or]Try PUSH MATERIAL AFT.[r][stopping][/tut]";
    otherwise if we have examined the hull material and the hull material is visible and the location of Ishme is Ishme's Cabin:
        say "[tut]The descriptions of things often suggest what you can do with them. In this case, it's hinting that you can HIDE BEHIND MATERIAL.[/tut]";
    otherwise if Ishme is seen:
        if the goal of Ishme is the rudder:
            if the location is the Passenger Cabin:
                say "[tut]To let time pass without doing anything, type WAIT (or Z for short).[/tut]";
            otherwise:
                say "[tut][one of]Who is this? What's she doing here?[r][or]It looks like she doesn't want you sneaking around back here.[r][or]She doesn't want to let you past. Probably best to go wait in your cabin until she leaves.[r][stopping][/tut]";
        otherwise if Ishme is not in the Rudder-Access and the location of Ishme is not the location:
            say "[one of][tut]Sounds like she fixed the rudder and left. Maybe you can go back out now.[/tut][or][tut]If you want to explore the [east] end of this corridor, you'll need to get past her somehow.[/tut][or][stopping][r]";
    otherwise if the hull material is seen:
        [say "Ishme seen: [whether or not Ishme is seen].";]
        say "[tut]That piece of hull metal looks important. Let's EXAMINE it.[/tut]";
    otherwise if the Rudder-Access is visited:
        say "[tut][one of]A new area to explore, with new things to examine![r][or]It looks like the only way to go from [if the location is the Passenger Cabin]the rudder[else]here[end if] is FORE (or F).[r][or]Since this game is on a ship, everything is described with shipboard directions (fore, aft, port, starboard) by default. If you don't like this, you can change it in the OPTIONS.[r][or]Let's keep exploring![r][stopping][/tut]";
    otherwise if the Zagin-hatch is open:
        say "[tut]It worked! Now you have a new way to go: STARBOARD (or S).[/tut]";
    otherwise if tried-unlocking is true:
        say "[tut]It sounds like you need some way to unjam that door. But there's another door you can try: how about OPEN HATCH?[/tut]";
    otherwise if we have taken inventory and we have examined:
        say "[tut]It'll be hard to solve a mystery sitting in your cabin. Let's OPEN THE DOOR and explore the rest of the ship.[/tut]";
    otherwise if the player carries something:
        say "[tut]You can use INVENTORY or I to see what you're carrying at any given point.[/tut]";
    otherwise:
        say "[tut][one of]In this sort of interactive fiction, you type commands for your character to carry out in the game world. To see a description of your surroundings, for example, type LOOK[or]To get more information about something, use the EXAMINE command (X for short). For example, EXAMINE THE TABLET, or just X TABLET[or]You can generally examine anything mentioned in the description. For example, you can also X QUILTS, or even X ME to take a look at yourself[or]Many puzzles in this sort of game involve manipulating the objects around you. If you see something that looks portable, you can TAKE it: for example, TAKE THE TABLET[stopping].[/tut]".
 
Section C - Miscellaneous Notes
 
Report listing boolean options:
    say "[first time][tut]You can toggle any of these options by typing its name as a command.[/tut][only][r]";
    now tutorial-already-given is true.
 
Chapter 3 - Ishme
 
Section A - Descriptions
 
Ishme is an inactive woman on the workshop chair.
Rule for writing a paragraph about Ishme:
    say "[Ishme], the [if the location is Ishme's Cabin]engineer in question[else]chief engineer[end if], is ";
    if the previous behavior of Ishme is waiting:
        say "hunched over her workbench, [one of]examining a warped piece of hull-metal under a huge magnifying glass[or]cross-referencing some schematics[or]scribbling calculations down on a scrap of blueprint paper[or]checking the gauges around the workshop[at random]";
    otherwise:
        say "[if the previous behavior of Ishme is Ishme going]storming through, [end if]looking annoyed that the ship had the temerity to interrupt her work";
    say ".".
Report Ishme waiting in Ishme's Cabin:
    say "Ishme [one of]hunches over her magnifying lens, checking the curvature of her piece of hull-metal[or]applies more and more force to a piece of hull-metal until it finally bends[or]pulls out another schematic, checking it against her notes[or]flips over a bit of paper to do a calculation on the back[or]looks around at the gauges[at random].";
    rule succeeds.
Sound of Ishme waiting in Ishme's cabin: say "the vague sounds of an engineer at work."
Sound of Ishme exiting: say "a grunt as someone gets to their feet."
 
The description of Ishme is "Squat, graying, and famous for her storm-faced glare when someone gets in her way. She has a way of glowering down at you, even when you're a good six inches taller than her.[p]She's also, apparently, the main reason the ship's stayed in the air with such a small crew. She and her apprentice have been working overtime to keep it flying, and getting increasingly touchy about that as the voyage progresses."
 
To describe (the character - Ishme) moving for (the reason - a motion report reason):
     if the reason is:
        -- arrival reason: say "Ishme stomps in";
        -- departure reason: say "Ishme storms out";
        -- distant arrival reason: say "heavy footsteps approaching";
        -- distant departure reason: say "heavy footsteps moving away";
        -- distant movement reason: say "heavy footsteps";
        -- adverb reason: say ", [one of]grumbling[or]muttering[or]complaining[at random] [one of]in Kishadu[or]under her breath[or]as she goes[at random]".
 
Carry out Ishme repairing the jammed rudder:
    now the rudder is not jammed.
Report Ishme repairing the rudder when the rudder was jammed:
    say "Ishme surveys the machinery for a moment, then reaches her bare hands into the guts of the device and wrenches one bar free of another. The mechanism re-aligns itself with a clatter of brass and steel.";
    stop the action.
Sound of Ishme repairing the rudder when the rudder was jammed:
    say "a solid [i]clang[/i] as someone re-aligns the rudder."
 
Carry out Ishme repairing a room:
    now the noun is not sabotaged.
Report Ishme repairing a room:
    say "Ishme surveys the pipes, finds the problem, and fixes it with blunt certainty."
Sound of Ishme repairing a room:
    say "sudden silence[--]the hissing of a loose valve has stopped."
 
Instead of talking to Ishme: say "[akk]'Ekh? Amminim taraggami-nni?'[eng]Huh? Why are you talking to me?[/akk] She shakes her head, clearly not understanding, and turns back to her task. [akk]'Ul Araliam eshemme.'[eng]I don't speak Arali.[/akk][general conversation refusal]" [What? Why are you calling me? I don't understand Arali.]
 
Section B - Behavior
 
Instead of going east in the presence of Ishme:
    say "[akk]'Ai! La tallaki. Arkhis turi.'[eng]Hey! Not that way. Go on, get back.[/akk] Ishme puts out a hand, and her glare makes you think better of it." [Hey! Don't go [over there]. Turn back.]
 
Goal-setting for Ishme when the goal of Ishme is nothing (this is the Ishme's standard priority rule):
    if the rudder is jammed and (the location of Ishme is the Rudder-Access or the location of Ishme is Ishme's Cabin): [She doesn't see the gauge acting up until she's in her workshop]
        now the goal of Ishme is the rudder;
    otherwise if a room (called the place) in the Tutorial Area is sabotaged:
        now the goal of Ishme is the place;
    otherwise if Ishme is on the workshop chair:
        now the goal of Ishme is nothing;
    otherwise:
        now the goal of Ishme is the workshop chair.
 
Autonomy for Ishme when the location of Ishme is sabotaged:
    try Ishme repairing the location of Ishme.
 
Autonomy for Ishme when Ishme can touch the jammed rudder:
    try Ishme repairing the rudder.
 
[Autonomy for Ishme when Ishme is in Ishme's Cabin and the hull material is in Ishme's Cabin: [Don't let the player softlock by putting the material in the workshop - Ishme doesn't want it there and will push it out]
    try Ishme pushing the hull material to west.]
[No longer needed now that there's a maintenance hatch there, the hull material can't be pushed through that]
 
Autonomy for Ishme when Ishme notices the player and the location is not the Passenger Cabin: [Bug fix: shouldn't shoo you if she's in your own room]
    if the location of Ishme is the Rudder-Access:
        try Ishme shooing the player to north;
    otherwise if the previous behavior of Ishme is Ishme shooing someone to:
        try Ishme escorting the player to west; [She won't just stand there if you try to walk up to her over and over again]
    [otherwise if the location of Ishme is Ishme's Cabin:
        make no decision; [In her cabin she ignores you]]
    otherwise:
        try Ishme shooing the player to west.
 
Book 2 - Qarrad and the Cargo Hold
 
Chapter 1 - Rooms
 
Section A - Stern
 
The Cargo Hold is a room. "This is the [west] end of the upper deck, a little bit of open space between all the crates and boxes that represent the [i]Mekhe-Irakkab[/i]'s real purpose. Narrow aisles [to north] and [south] lead forward into the depths of the cargo; the door [to west] leads back into your cabin."
Instead of going east in the Cargo Hold: say "There are two aisles [to the east], one [north] and one [south]."
Some various pieces of cargo are scenery in the Cargo Hold. Understand "crates" and "boxes" and "crate" and "box" as the various pieces of cargo.
Instead of doing anything with the various pieces of cargo: say "This little area at the stern is kept free of cargo, so that people can actually get in and out of the hold without the staircase getting covered up. To get to the cargo itself, you'll want to go forward through one of the two aisles ([to the north] and [to the south])."
 
The main turret is fixed in place in the Cargo Hold. "The main turret is set into the [west] wall, ready for any threats the ship might face." The main turret is illegal. [You can't mess with it in someone else's presence]
The main turret can be damaged or undamaged. The main turret is undamaged. [The player has sabotaged it]
The main turret can be reported or unreported. The main turret is unreported. [Qarrad found something wrong with it]
The description of the main turret is "If the [i]Mekhe-Irakkab[/i] runs into trouble, either Qarrad or Udan will control the guns from here: the big one on the stern and the smaller ones on the sides. You're not sure how exactly the controls work[--]the few times they've used it, you've been hiding in your cabin[--]and hopefully you'll never need to find out. A big valve on top controls the flow of [i]kutzutum[/i][if damaged], which is currently frosting over the whole thing[end if]."
Understand "control" and "controls" and "gun" and "guns" as the main turret.
 
A big valve is part of the main turret. The description of the big valve is "You don't know what exactly [i]kutzutum[/i] is, except that the pipes will freeze your skin off if you touch them with your bare hands[if the main turret is damaged]. And right now it's freezing up the turret too[end if]."
Does the player mean doing something to the big valve: it is likely. [Prefer this over the omnipresent pipes]
 
Instead of doing anything when the gloves are not worn and the big valve must be touched: say "The valve is cold enough to take your skin off. You'll need some kind of protection first."
Instead of attacking or pushing or pulling or turning or switching on or switching off or opening or closing the big valve when the gloves are worn:
    if the main turret is damaged:
        say "You give it another twist for good measure. More icy steam billows out.";
    otherwise:
        say "Your hands safely gloved, you grab hold of the valve and give it a yank. Icy-cold steam starts billowing out and frost is forming over the controls.";
        now the turret is damaged.
Instead of attacking or pushing or pulling or turning or switching on or switching off the main turret: say "The actual weapon controls are intricate enough[--]and all labelled in Kishadu[--]that you're not entirely confident you could operate them without blowing a massive hole in the ship. You might be able to work the valve, though; it might be cold enough to take skin off, but at least it probably won't kill anyone if you mess with it the wrong way."
 
Instead of opening the cargo staircase when the open tripod is in the Lower Deck: say "You push on the staircase but it doesn't budge. Something is holding it shut[if the tripod is known], and you have a pretty good idea of what[end if]."
Understand "jump on/-- [something]" as climbing.
Instead of climbing or pushing or pulling the cargo staircase when the open tripod is in the Lower Deck: say "You put as much force as you can on the staircase, but [if the tripod is unknown]whatever's[else]the tripod[end if] underneath it holds fast."
 
The cargo staircase is a door. It is below the Cargo Hold and above the Lower Deck. It is closed. Understand "stairs" and "stair" and "folding" and "mechanism" and "intricate" as the staircase.
Rule for writing a paragraph about the cargo staircase:
    if the location is the Cargo Hold:
        say "A staircase leads down to the deck[if closed][--]or at least it normally would. Right now it's folded up, becoming part of the floor[end if].";
    otherwise if the cargo staircase is open:
        say "The deck itself runs [east] and [west], and a staircase leads up to the cargo hold.";
    otherwise:
        say "The stairs to the cargo hold have been folded up into the ceiling, leaving a wide passage [east] and [west]."
The description of the cargo staircase is "The big staircase that connects the two decks. Its intricate folding mechanism is currently [if open]open[else]closed[end if]."
 
Before someone opening the cargo staircase when the location of the actor is the Lower Deck and the open tripod is in the Lower Deck (this is the free the staircase before opening it rule):
    try the actor closing the tripod instead.
 
Report an actor opening the cargo staircase:
    say "[if the actor is the player]At your touch[else]With some unseen stimulus[end if] the staircase unfurls downward in a cascade of levers and gears, like an animal stretching out its back.";
    rule succeeds.
Sound of an actor opening the cargo staircase: say "a long series of [i]click-click-clicks[/i] echoing through the ship."
 
There is a tripod in the Lower Deck. It is pushable between rooms. The tripod can be open or closed. It is open. The tripod can be openable. It is openable. Understand "leg" or "legs" or "sturdy" or "three" or "strange" or "device" or "screw" or "mechanism" or "pole" or "long" or "jack" as the tripod.
Understand the command "extend" as "open". Understand the command "retract" as "close".
 
Precondition for going with the open tripod:
    initialize the implicit action;
    silently try closing the tripod;
    finish the implicit action with participle "closing" infinitive "close" object "the tripod" and condition (whether or not the tripod is closed);
    if the tripod is open, say "With the tripod open, it's too unwieldy to fit through the passages." instead.
 
Rule for writing a paragraph about the tripod:
    if the location is the Lower Deck:
        say "A strange device has been set up under the staircase, a long pole attached to three sturdy legs. It looks like there's some kind of screw mechanism to extend or retract the pole. It's currently [if the tripod is open]extended, holding the staircase shut[else]retracted, allowing the staircase to open[end if].";
    else if the location is Miscellany:
        say "The tripod has been positioned under the fallen shelves, [if the tripod is open]propping them up enough for someone to squeeze past[else]though it's still retracted at the moment[end if].";
    otherwise:
        say "The tripod mechanism stands off to one side, currently [if the tripod is open]extended to touch the ceiling[else]retracted to make it easy to move[end if].".
 
The description of the tripod is "It looks like it's meant to hold something up while repairing it, like a jack. Currently, what it's holding up is [if the tripod is closed]nothing, since the pole is retracted[else if the location is the Lower Deck]the staircase to the cargo hold[else if the location is Miscellany]the fallen shelves[else]the ceiling[end if]."
 
Before turning the tripod:
    if the tripod is closed, try opening the tripod instead;
    otherwise try closing the tripod instead.
 
Report opening the tripod: say "You twist the screw around a few times, and the pole extends to rest against [if the location is the Lower Deck]the bottom of the staircase, holding it firmly shut[else if the location is Miscellany]the underside of the shelves. It takes some effort, but you keep twisting the screw, and little by little the shelf rises enough to slip underneath[else]the ceiling[end if]."; rule succeeds.
Report closing the tripod: say "You twist the screw around a few times, and the pole retracts into the mechanism[if the location is the Lower Deck], freeing the staircase[else if the location is Miscellany]. The shelf sinks back down to where you originally found it[end if]."; rule succeeds.
 
Sound of someone opening or closing the tripod: say "someone turning a crank, over and over and over."
 
Precondition for opening the tripod when the location is the Lower Deck and the cargo staircase is open:
    initialize the implicit action;
    silently try closing the cargo staircase;
    finish the implicit action with participle "closing" infinitive "close" object "the staircase" and condition (whether or not the cargo staircase is closed);
    if the cargo staircase is open, say "With the staircase open, there's no room for the pole to extend." instead.
 
Instead of attacking the cargo staircase:
    if the open tripod is in the Lower Deck:
        say "It seems quite thoroughly jammed already!";
    otherwise if the location is the Lower Deck and the tripod is in the Lower Deck:
        say "(opening the tripod)[ccb]";
        try opening the tripod instead;
    otherwise:
        say "The tripod device was jamming it earlier; it's currently in [the location of the tripod]."
 
Instead of going to a room with the tripod:
    say "You shuffle the tripod across the floor with you.";
    continue the action.
 
After going to the Cargo Hold: now Qarrad is active; continue the action.
 
Section B - Cargo
 
A netting-place is a kind of supporter. A netting-place is always fixed in place.
A netted-thing is a kind of container. A netted-thing is always illegal, unconcealable, closed, locked, and lockable. Every netted-thing is unlocked by the crowbar.
Rule for printing a locale paragraph about a netting-place (called the item):
    now every netted-thing on the item is mentioned;
    continue the activity.
Definition: a netted-thing is locale-supportable if it is not on a netting-place. [Somehow I need to suppress these things getting described in room descriptions…supporters whyyyyy]
Instead of pushing or pulling or turning or climbing or entering a netted-thing which is on a netting-place: say "It slides easily; you could probably take it out entirely if you got your fingers under it."
Instead of opening a locked netted-thing: say "It's sealed tight."
The description of a netted-thing is usually "One of the big containers that makes up the ship's cargo. It takes two hands to carry it."
Instead of taking a netted-thing when the player encloses a netted-thing (called the obstacle): say "You can carry one [obstacle] with some effort, but you definitely can't pick up another one at the same time. You'll have to set [the obstacle] down somewhere first."
Before locking a netted-thing with something: try bolting the noun instead.
Instead of bolting a netted-thing: say "[The noun] doesn't have a lock, per se. You're not sure how exactly the lid was sealed in place, but it's going to be hard to replicate."
 
Definition: a netting-place is describable rather than indescribable if it supports something that is not a netted-thing.
The examine supporters rule does nothing when the noun is an indescribable netting-place.
 
Instead of inserting a netted-thing into a container: say "[A second noun] isn't really designed to fit an entire cargo container inside it."
 
Instead of opening or unbolting a netting-place: say "There's no way to open them when they're all stacked together like this."
Instead of unlocking a netting-place with something: try unbolting the noun.
Before taking a netting-place that encloses a netted-thing (called the target):
    say "(specifically, [the target])[ccb]";
    try taking the target instead.
Instead of taking a netting-place: say "One piece of cargo probably won't be missed. But unpacking any more will definitely be noticed."
 
Crates-and-Boxes is a room. The printed name is "Crates and Boxes". South of the Cargo Hold is west of Crates-and-Boxes. Index map with Crates-and-Boxes mapped southeast of the Cargo Hold.
Before going north in Crates-and-Boxes: say "([west])[ccb]"; try going west instead.
The description of Crates-and-Boxes is "A narrow aisle barely a yard wide cuts through the cargo here, walled in by a stack of boxes on one side and metal crates on the other. The light coming down from above makes it look like they extend upward forever, an infinite tower of cargo."
A thing called some various boxes and crates is scenery in Crates-and-Boxes. Understand "box" and "crate" and "stack" and "of" and "metal" and "tower" and "cargo" as the various boxes and crates. The description of the various boxes is "All stamped with labels in Kishadu: the glyphs are familiar but the words complete nonsense to your eyes.".
 
Some webbed boxes are a netting-place in Crates-and-Boxes. "A web of netting holds several of the boxes together, keeping them from shifting in flight." Understand "web" and "net" and "netting" and "of netting" as the webbed boxes. The description of the webbed boxes is "The netting holds them together on the sides, but it's loose at the top[if the lone box is on the webbed boxes]; the topmost box has more room to move than the rest[else]; you've made a bit of a gap there[end if]."
The webbed boxes allow concealment in above-position.
On the webbed boxes is a lone box. The lone box is a netted-thing. Understand "topmost" or "top" or "crate" as the lone box. The printed name of the lone box is "[if the lone box is on the webbed boxes]topmost [else if there is a netting-place in the location or the asking which do you mean activity is going on]lone [end if]box".
A strange powder is a legal supply in the lone box. The description of the strange powder is "Deep red and very fine, with a spicy smell. Is this zahili? The ground-up seeds are an inordinately expensive spice[--]why would it be transported in unmarked boxes on a ship like this?"
A pinch of powder is a substance. The description of the pinch of powder is "Deep red and very fine, with a spicy smell. Is this zahili? The ground-up seeds are an inordinately expensive spice[--]why would it be transported in unmarked boxes on a ship like this?"
The strange powder yields the pinch of powder.
 
Barrels-and-Pallets is a room. The printed name is "Barrels and Pallets". North of the Cargo Hold is west of Barrels-and-Pallets. Index map with Barrels-and-Pallets mapped northeast of the Cargo Hold.
Before going south in Barrels-and-Pallets: say "([west])[ccb]"; try going west instead.
The description of Barrels-and-Pallets is "A narrow aisle barely a yard wide cuts through the cargo here, walled in by stacked pallets on one side and a wall of barrels on the other. The light coming down from above makes it look like they extend upward forever, an infinite tower of cargo."
A thing called some various pallets and barrels is scenery in Barrels-and-Pallets. Understand "barrel" and "pallet" and "casks" and "cask" and "stacked" and "stack" and "wall" and "of" and "tower" and "cargo" as the various pallets and barrels. The description of the various pallets is "The pallets are loaded with some kind of equipment; the barrels, you can only guess."
 
Some webbed barrels are a netting-place in Barrels-and-Pallets. "A web of netting holds several of the barrels together, keeping them from shifting in flight." Understand "web" and "net" and "netting" and "of netting" as the webbed barrels. The description of the webbed barrels is "The netting holds them together on the sides, but it's loose at the top[if the lone cask is on the webbed barrels]; the cask at the top has more room to move than the rest[else]; you've made a bit of a gap there[end if]."
The webbed barrels allow concealment in above-position.
On the webbed barrels is a lone cask. The lone cask is a netted-thing. Understand "topmost" or "top" or "barrel" or "at the top" as the lone cask. The printed name of the lone cask is "[if the lone cask is on the webbed barrels]topmost [else if there is a netting-place in the location or the asking which do you mean activity is going on]lone [end if]cask".
A strange grain is a legal supply in the lone cask. The description of the strange grain is "This sort of cask should have liquid in it, but instead it's full of little red seeds. It smells like zahili[--]but how are they importing that? Growing it is illegal in Arali; the Empire likes controlling the market."
A pinch of grain is a substance. The description of the pinch of grain is "It smells like zahili[--]but how are they importing that? Growing it is illegal in Arali; the Empire likes controlling the market."
The strange grain yields the pinch of grain.
 
Definition: something is zahili if it is the strange powder or it is the pinch of powder or it is the strange grain or it is the pinch of grain.
Understand "spice" or "zahili" as a thing when the item described is zahili.
After examining zahili:
    reveal smuggling-clue;
    continue the action.
 
Instead of smelling or tasting or eating or drinking or kissing zahili:
    say "A little pinch incorporated into a sauce gives it a rich flavor. Mixed with some other things and snorted, it gives you incredible hallucinations. Consumed directly...you have no idea what it would do to you, but it probably wouldn't be good."
Understand the command "lick" as "taste".
 
Instead of hiding in a position of a netting-place when a netted-thing (called the obstacle) is on the second noun: say "There's barely enough room for [the obstacle] alone up there. Not enough for [the obstacle] and also you."
Instead of hiding in a position of a netting-place when the player encloses a netted-thing (called the obstacle): say "There's barely enough room for [the obstacle] alone up there. Not enough for [the obstacle] and also you."
Instead of putting a netted-thing on a netting-place which encloses a netted-thing (called the obstacle): say "There's barely enough room for [the obstacle] alone up there. Definitely not enough for [the noun] too."
 
Instead of someone putting something on a netting-place when the second noun is the concealing object: [I.e. when you're hiding somewhere and an NPC tries to put a thing back there]
    say "[The actor] [spot] you with a look of utter bewilderment. It seems prudent to get out of there.";
    try reappearing.
To spot is a verb.
 
Section C - Boilers
 
A boiler-room is a kind of room. The description of a boiler-room is "You're at the heart of the ship itself: one of the two massive boilers that provides the power to keep the [i]Mekhe-Irakkab[/i] in the air. Solid heat seems to pour off the pipes and machinery in waves and the air is hot enough to make you nauseous[--]you don't even want to imagine what would happen if you touched any of it with your bare hands. The passages [to the east] and [west] seem more bearable."
A boiler-room can be overheated. A boiler-room is usually not overheated.
Instead of going to an overheated boiler-room: say "You barely make it a few steps before a wave of heat drives you back. Whatever lies that way is too hot to get close to."
 
The Port-Boiler-Room is a boiler-room. The Port-Boiler-Room is east of Barrels-and-Pallets. The printed name of the Port-Boiler-Room is "Port Boiler". Understand "port" or "boiler" as the Port-Boiler-Room.
Before going south in the Port-Boiler-Room: say "([east])[ccb]"; try going east instead.
The Starboard-Boiler-Room is an overheated boiler-room. The Starboard-Boiler-Room is east of Crates-and-Boxes. The printed name of the Starboard-Boiler-Room is "Starboard Boiler". Understand "starboard" or "boiler" as the Starboard-Boiler-Room.
Before going north in the Starboard-Boiler-Room: say "([east])[ccb]"; try going east instead.
Index map with the Port-Boiler-Room mapped northwest of the Work Area.
 
The boiler machinery is a backdrop. "The vast machinery of the boiler surrounds you, even the controls far too hot to touch." It is in the Port-Boiler-Room and the Starboard-Boiler-Room. It is fixed in place and not scenery. The description of the boiler machinery is "It doesn't [i]just[/i] boil things, if you understood that explanation right. It does produce steam, but its main purpose is to heat the air in the lift vessels until it becomes...something that's not air? [i]Girrutum[/i]; Udan didn't know the Arali word for it. Whatever it is, it's the key to lifting the weight of an entire ship.[p]Most of the controls are inscrutable, but there's one big lever that stands out."
Understand "control" or "controls" or "boilers" as the boiler machinery.
 
The big lever is part of the boiler machinery. The big lever is illegal and fixed in place. The description of the big lever is "You can't read the label, but you remember the engineers using it to...rebalance the load? Something like that. Shifting the work between the two boilers so that neither one takes too much strain."
 
Instead of doing anything when the boiler machinery must be touched:
    say "That would probably do something truly horrific to your hands[if the protective gloves are worn], even through the gloves; you might be able to handle the controls, but not the boiler itself[end if]."
Instead of doing anything when the big lever must be touched and the protective gloves are not worn: say "Even the controls are too hot to touch with your bare hands."
Before doing anything when the big lever must be touched and the protective gloves are worn: say "With the gloves on, it's unpleasantly hot, but doesn't burn."
 
Last instead of pushing or pulling or turning the big lever: [This needs to come after the previous rules]
    say "You give the lever a heave, and with a creaking and grinding of gears the two boilers rebalance their load. More and more heat starts to pour off the one in front of you until your eyes are burning and you're sent scrambling back...";
    if the Port-Boiler-Room is overheated:
        now the Port-Boiler-Room is not overheated;
        now the Starboard-Boiler-Room is overheated;
    otherwise:
        now the Starboard-Boiler-Room is not overheated;
        now the Port-Boiler-Room is overheated;
    try going east.
 
Load-rebalancing is an action applying to nothing. Understand "rebalance the/-- load/work/boiler/boilers/--" as load-rebalancing.
Before load-rebalancing in the presence of the big lever:
    say "(pulling the lever)[ccb]";
    try pulling the big lever instead.
Check load-rebalancing: say "You have no idea how to do that from here." instead.
 
Section D - Fore
 
The Work Area is a room. North of the Work Area is east of the Port-Boiler-Room. South of the Work Area is east of the Starboard-Boiler-Room. Index map with the Work Area mapped northeast of the Starboard-Boiler-Room.
The description of the Work Area is "This little alcove at the [east] end of the hold has been set aside for the engineers, to coordinate their efforts to keep the ship in the air at any cost. Two narrow aisles lead back toward the boilers and the rest of the hold, [north] and [south], while doors further [to the east] lead to the engineers['] individual cabins[if the Bashti-door is unlocked][--]Ishme's is sealed tight, but Bashti's has been opened[else][--]both sealed tight[end if]."
Ishme's door is proper-named scenery in the Work Area. The description is "Given what Ishme's done to the other side of it, there's no chance of it opening." Understand "Ishme" as Ishme's door. Understand "doors" as the plural of Ishme's door.
Instead of opening or unbolting or pushing or pulling Ishme's door: try examining Ishme's door.
Instead of unlocking Ishme's door with something: try unbolting the noun.
Instead of going west in the Work Area: say "There are two aisles leading [west], one [north] and one [south]."
 
A general workbench is a supporter in the Work Area. It is fixed in place. "A workbench is clamped to the bulkhead, equipped with the larger sorts of tools that need to be fixed in place[if the toolbox is on the workbench]. Amid the vises and presses [a toolbox] has been left sitting out[else]: vices, presses, and stranger things you have no name for[end if]." Understand "tools" and "tool" and "vise" and "vises" and "vice" and "vices" and "press" and "presses" and "router" and "drill" and "work" and "bench" as the workbench.
Instead of taking the workbench: say "The tools fixed to the bench here are too big to easily carry, even if you could get them free."
The description of the general workbench is "A good place for fixing...everything, probably."
 
A toolbox is a portable container on the general workbench. It is closed, locked, and openable. The crowbar unlocks the toolbox. The description of the toolbox is "Presumably meant to hold whatever tools the engineers need to have on hand[if the toolbox is locked]. It's currently latched shut[else]. Someone has forced its latch open with a prybar. How rude of them[end if]." Understand "tool" and "box" and "tools" as the toolbox. The toolbox is illegal and unconcealable.
 
A wrench is in the toolbox. The wrench is illegal. The description of the wrench is "The standard size for working with the pipes all over the ship. Good for fixing problems...or probably creating them, too." Understand "spanner" as the wrench.
 
Some protective gloves are a plural-named wearable illegal thing in the toolbox. The description of the gloves is "Woven out of strips of rubber to protect an engineer's hands from the heat of...well, just about [i]everything[/i] on an airship. Turning air into not-air to make a ship's worth of cargo float involves a lot of heat. (And, weirdly enough, a lot of cold. Some of the pipes are cold enough to take your skin off.) They'll probably fit your hands reasonably well.". Understand "strips" or "rubber" or "of" as the gloves.
 
Chapter 2 - Qarrad
 
Qarrad is an inactive woman in the Cargo Hold. "Qarrad, the ship's gunner, is pacing steadily around the deck." The description is "She's built like a brick wall and holds herself with a military bearing. You're not sure if she's officially called the gunner, or the bosun, or something else[--]how do these titles work with a crew of only six people? But she's the one in charge of the cargo and the ship's weapons, and without Udan, she doesn't have anyone to trade off shifts with. She's spent the past while pacing in circles around the hold, waiting for the signal for whatever comes next."
 
To describe (the character - Qarrad) moving for (the reason - a motion report reason):
     if the reason is:
        -- arrival reason: say "Qarrad paces in";
        -- departure reason: say "Qarrad paces away";
        -- distant arrival reason: say "sharp, measured footsteps approaching";
        -- distant departure reason: say "sharp, measured footsteps departing";
        -- distant movement reason: say "sharp, measured footsteps";
        -- adverb reason: say ", [one of]treading and retreading the same steady circuit of the deck[or]treading and retreading the same steady circuit of the deck[or]lost in thought[or]gazing off into the distance at nothing in particular[or]face impassive[at random]".
 
After Qarrad going when the room gone to is an overheated boiler-room and the room gone from is the location: ["From the location" ensures it only happens when we can see it]
    say "Qarrad strides off [to the noun], completely unbothered by the heat. She must have skin of iron."
After Qarrad going when the room gone to is the location and the room gone from is an overheated boiler-room: [Same]
    say "Qarrad paces in, overheated air swirling into the room behind her."
 
Autonomy for Qarrad when Qarrad can see the unreported main turret and the previous behavior of Qarrad is not Qarrad examining the main turret (this is the fix my miscalculation in the puzzle planning rule):
    try Qarrad examining the main turret.
[For this puzzle to work, the player needs to be able to pick up the toolbox in the Work Area, go to the Port Boiler, go to Barrels and Pallets, and hide, all before Qarrad arrives. But I was off by one in my planning and she arrives one turn before you can hide. So I added something for her to examine at the aft end of the ship which delays her by one additional turn.]
 
[And now this has become the basis for getting into Bashti's cabin! Woo reuse!]
Carry out Qarrad examining the damaged main turret:
    now the turret is reported;
    now Bashti is active. [Gotta make him active if he isn't already so he can fix it]
Report Qarrad examining the damaged main turret:
    say "Qarrad glances at the turret...and sees it covered in frost. All the tension in her body seems to be drawn together at once like a coiled spring getting released. She checks over the controls, making sure nothing has misfired, then raps her bare hand on one of the pipes. [akk]'Ai! Bashti! Butuqtu kutzutim shebru-ma kakku imakkhatza! Epeshum edud!'[r][eng]Ey! Bashti! The kutzutum channels are screwed up and it's going to damage the weapons! Get that fixed, stat![r][/akk][br][br]"; [Hey! Bashti! The channels for kutzutum are fucked up and it's damaging the weapons! Deal with it quickly!]
    rule succeeds.
After Qarrad examining the damaged main turret when the player is not in the Cargo Hold:
    say "A shout echoes from somewhere. [akk]'Ai! Bashti! Butuqtu kutzutim shebru-ma kakku imakkhatza! Epeshum edud!'[eng]Ey! Bashti! The kutzutum channels are fucked up and it's going to damage the weapons! Get that fixed stat![/akk]";
    continue the action.
 
Autonomy for Qarrad when Qarrad can see the reported main turret (this is the Qarrad keeps an eye on the turret rule): try Qarrad waiting.
Report Qarrad waiting:
    say "Qarrad surveys the room, making sure nothing is out of place.";
    rule succeeds.
 
Goal-setting for Qarrad when the goal of Qarrad is nothing or the goal of Qarrad is the location of Qarrad (this is the Qarrad's standard priority rule):
    if the location of Qarrad is Barrels-and-Pallets:
        now the goal of Qarrad is the Work Area;
    otherwise if the location of Qarrad is the Work Area:
        now the goal of Qarrad is Crates-and-Boxes;
    otherwise:
        now the goal of Qarrad is Barrels-and-Pallets.
 
Instead of talking to Qarrad: say "She looks up as if she's only just noticed your presence. [akk]'Minam taqqabi?'[eng]What did you say?[/akk] It sounds like a question, but repeating yourself doesn't help; she just shakes her head and goes back to her own thoughts.[general conversation refusal]" [What did you say?]
 
Chapter 3 - Pipes and Sabotage
 
Definition: a room is piped if it is not a crawlspace and it is not the Rudder-Access [and it is not the Port-Rudder-Access]. [Ensure no conflict with "pipe" and "pipes" as synonyms]
The omnipresent steam pipes are a plural-named backdrop. They are fixed in place and not scenery. Understand "pipe" or "loose" or "join" or "valve" or "valves" as the pipes. Understand the commands "sabotage" and "jam" and "kick" and "shock" and "jab" as "attack". Understand the command "shove" as "push".
When play begins: move the omnipresent steam pipes backdrop to all piped rooms. [Why can't this be done at compile-time?]
Before unlocking the omnipresent pipes with something: try unbolting the pipes instead. [For TURN X WITH Y]
 
The description of the omnipresent pipes is "They're everywhere on the ship, transporting steam and lifting gas and other things you don't know the names of to where they're needed. You're not sure why they're not hidden inside the walls and floors, but this is a cargo vessel, so maybe making the walls lighter was worth the risk of getting burned everywhere you go. (You still have some blisters from the first time the ship rolled to the side in a storm.)"
Instead of doing anything when the omnipresent pipes must be touched:
    if the gloves are worn:
        continue the action;
    if the wrench is touchable:
        unless the current action involves the wrench, say "(using [the wrench])[ccb]";
        continue the action;
    say "A light touch is enough to confirm they're scalding hot. Too hot to touch with your bare hands." instead.
Some blisters are part of yourself. The description of the blisters is "Slowly healing ever since the storm. But you're not keen on getting thrown into the pipes again. Apparently you were lucky to hit the just-plain-hot ones instead of the cold ones or the melt-your-skin ones." [Because why not, objects are cheap] Understand "blister" and "burn" and "burns" as the blisters.
 
A room can be sabotaged. A room is usually not sabotaged.
The pipes can be hinted or unhinted. The pipes are unhinted.
 
After examining the wrench: [The hint shows again if you examine the wrench again]
    now the pipes are hinted;
    continue the action.
 
Before turning or pushing or pulling or rubbing or bolting or unbolting the pipes:
    if the location is sabotaged:
        try repairing the pipes instead;
    otherwise:
        try attacking the pipes instead.
Instead of attacking the pipes in the presence of another person (called the witness): say "Probably best not to let [the witness] see you sabotaging the ship."
Instead of repairing the pipes in the presence of another person (called the witness): say "Probably best not to let [the witness] see you sabotaging the ship. Which is what this will look like, even if you're trying to fix it."
 
Last instead of repairing the pipes:
    if the wrench is not carried:
        say "You don't have the right tools[if the wrench is visible or the location of the wrench is not the Work Area] in hand[end if] for that[if the crowbar is carried][--]the joints are remarkably crowbar-proof, which is probably a good thing[end if]." instead;
    if the location is sabotaged:
        say "You do your best to tighten up the pipe you loosened. The engineers probably appreciate the help.";
        now the location is not sabotaged;
        now the pipes are unhinted;
    otherwise:
        say "The pipes here aren't in great condition[--]is [i]anything[/i] on this ship in great condition?[--]but none of them are obviously broken. Any adjustments you made would probably hurt more than help."
 
Last instead of attacking the pipes:
    if the wrench is not carried:
        say "You don't have the right tools[if the wrench is visible or the location of the wrench is not the Work Area] in hand[end if] for that[if the crowbar is carried][--]the joints are remarkably crowbar-proof, which is probably a good thing[end if]." instead;
    if the location is sabotaged:
        say "The pipes here are already venting steam out into the room. Any more damage and they might guess someone's sabotaging them.";
    otherwise if the location is the Passenger Cabin:
        say "Probably best not to sabotage the pipes in this particular room, unless you want the engineers coming in and realizing where their tools have gone.";
    otherwise:
        say "You clamp the wrench around a random joint[--]hopefully not one that's under too much pressure[--]and give it a hard yank. Steam starts leaking out at the seams.";
        now the location is sabotaged;
        now the pipes are unhinted;
        now Bashti is active.
 
Rule for writing a paragraph about the omnipresent pipes:
    if the location is sabotaged:
        say "Steam leaks from a loose joint with a quiet [i]hiss[/i].";
    otherwise if the pipes are hinted:
        say "You look at the omnipresent pipes with new eyes, now that you have a wrench to work with.";
    otherwise:
        do nothing;
    now the pipes are mentioned.
The set pronouns from items in room descriptions rule does nothing when the parameter object is the omnipresent pipes. [It keeps resetting IT and THEM when I don't want it to!]
To decide which object is the parameter object: (- parameter_object -). [I think the standard library exposes this already but it's not documented as far as I can tell, so best not to rely on it]
 
Book 3 - Udan and the Cabins
 
Chapter 1 - Geography
 
Section A - Port
 
The Mess is a room. The Udan-door is a locked ship door. It is south of the Mess and north of the Port-Boiler-Room. The Udan-door is not scenery. The initial appearance of the Udan-door is "[if the location is the Mess]A door leads back [to the south][else]A door in the [north] wall leads to the mess[end if][if locked], currently locked[end if].". Understand "Udan's" and "cabin" as the Mess.
The description of the Mess is "This space used to be two separate cabins, but you helped them take down the middle divider a few days in. Now it's a long, narrow room almost half the length of the ship that acts as a pantry, kitchen, and dining room all in one, a place where Kiang was learning how to make Kishadu food (or at least Kishadu ship food), as well as a place for Udan to bunk.[p]Or, well. It [i]was[/i] that, until today.[p]They found Udan's body in here with the door locked, and Kiang had the key. So now he's in the brig, Udan has been moved down to the surgery, and this cabin is as still as a grave. The stove and the shelves of food sit untouched.".
A stove is scenery in the Mess. The description of the stove is "You have no idea how to work it. Kiang would.".
Some shelves of food are scenery in the Mess. They are a supply. The description of the shelves of food is "Everything packed with neatness and precision to fit as much food in as little space as possible. With only eight people eating, the meals have been far better than you expected on a freighter.".
Instead of eating the shelves of food: say "What's on the shelves is mostly raw ingredients. Not especially appetizing, even if someone hadn't just been murdered here."
A metal jar is an illegal thing. The description of the metal jar is "Square-shaped so it packs nicely onto the shelves. Most of the food on the ship is stored in these sorts of things." It belongs to Udan. Understand "oil" and "cooking" as the metal jar.
Instead of opening the metal jar: say "You don't really want to spill cooking oil everywhere."
The shelves of food yield the metal jar.
Instead of eating or drinking the metal jar: say "Out of all the things that would help this situation, drinking raw cooking oil is probably near the bottom of the list."
Instead of putting the metal jar on something that is not a supporter: say "Cooking oil is more likely to make a mess than to actually improve [the second noun]."
Instead of smelling the metal jar: say "It smells like good food."
Instead of smelling the Mess: say "It smells like good food. You can see why Kiang spent so much time in here."
 
Udan's bunk is an enterable scenery supporter in the Mess. The description is "Presumably very comfortable. Kiang slept in here a few times instead of coming back to your cabin."
After entering Udan's bunk: say "It is in fact very comfortable. Wider than most of the others."
 
Section B - Starboard
 
The Gunnery is a room. The Qarrad-door is a locked ship door. It is north of the Gunnery and south of the Starboard-Boiler-Room. Understand "Qarrad's" and "cabin" as the Gunnery.
The Qarrad-door is not scenery. The initial appearance of the Qarrad-door is "[if the location is the Gunnery]A door leads back [to the north][else]A door in the [south] wall leads to the gunnery[end if][if locked], currently locked[end if]."
The description of the Gunnery is "The most dangerous room on the ship. You've never actually seen the inside of it before today, but you haven't immediately died walking through the door, which is a good sign. This is where Qarrad and Udan work with the ship's weapons: the big guns on the outside of the hull, and the smaller personal ones in case of enemy boarding. (Which thankfully has not happened yet.)[p]Most of the space is taken up by racks of weapons and cases of fuel and powder. Qarrad's bunk seems almost like an afterthought, crammed down at one end of the long, narrow cabin.".
Some racks of weapons are scenery in the Gunnery. Understand "weapon" and "guns" and "gun" as the racks of weapons. The description of the racks are "The gunnery has weapons of every shape and size imaginable. You've never had to use any of them and hopefully never will, but they're kept locked up, just in case.[p]There aren't any gaps where something is obviously missing. But where else would the murder weapon have come from?"
Instead of taking the racks of weapons: say "They're kept locked up for a reason."
Before searching the racks of weapons: try examining the noun instead.
In the Gunnery is a scenery thing called some cases of fuel and powder. The cases are a supply. Understand "case" as the cases of fuel. The description of the cases is "Not locked up like the weapons are, which hopefully means they're less dangerous on their own."
An empty powder bag is an illegal thing. The description of the empty powder bag is "A simple design, but apparently it works well for its purpose: separating out the right amount of powder for one of the big weapons." It belongs to Qarrad. The cases of fuel yield the empty powder bag.
 
Qarrad's bunk is an enterable scenery supporter in the Gunnery. The description of Qarrad's bunk is "Buried at the back of the cabin. It looks softer than you'd expected."
After entering Qarrad's bunk: say "It is in fact very comfortable."
 
Instead of inserting something into the empty powder bag: say "It's not really shaped to hold [a noun]."
Instead of inserting a substance into the empty powder bag: say "Despite the name, a powder bag isn't really designed for holding just a pinch of something. It's supposed to be packed full of gunpowder; [the noun] would just be lost."
 
After examining the racks of weapons:
    reveal weapon-rack-clue;
    continue the action.
 
Index map with the [Starboard Walk Fore] Precipice mapped south of the Gunnery.
Index map with the Starboard Walk mapped west of the Precipice.
Index map with the Passenger Cabin mapped west of the Cargo Hold.
 
Section C - Fore
 
Bashti's Cabin is a room. The Bashti-door is a ship door. Understand "Bashti's" and "Bashti" as the Bashti-door. The Bashti-door is east of the Work Area and west of Bashti's Cabin. Index map with Bashti's Cabin mapped northeast of the Mess.
Rule for printing the name of the Bashti-door when asking which do you mean: say "Bashti's door".
The description of Bashti's Cabin is "Bashti's cabin is barely-contained chaos, with tools and components everywhere. It looks like something fell over or broke open when the ship tilted and he hasn't had a chance to properly fix it, just digging what he needs out of the mess. Even the bunk is being used for sorting out bits of metal instead of for sleeping. The door leads back [to the west]."
A mitten is a wearable thing in Bashti's cabin. The description is "A bit of rubberized cloth to wrap around your hand."
Instead of doing anything when the mitten must be touched: say "Bashti wouldn't like that." [A patch over one obscure issue where you can take it one turn before Bashti does since he needs one turn to open the door and one turn to come in]
 
Bashti's bunk is ambiguously plural scenery in Bashti's Cabin. It is a supply. The description of Bashti's bunk is "The bunk is covered in unrecognizable bits and ends. Has he been sleeping at all?". Understand "mess" and "tool" and "tools" and "component" and "components" and "bit" and "bits" and "end" and "ends" and "and ends" and "metal" and "of metal" and "cog" and "cogs" as the bunk.
A little brass cog is an illegal thing. The description of the little brass cog is "Surely a vital component of something or other." It belongs to Bashti.
Bashti's bunk yields the little brass cog.
Instead of entering Bashti's bunk: say "There might be a comfortable bunk buried under the pieces of metal, but Bashti hasn't made it easy to reach it."
 
In Bashti's Cabin is a standard-sized screwdriver. The initial appearance of the screwdriver is "You have no idea what most of the tools are, but there's a recognizable screwdriver amid the debris." Understand "screw" or "driver" or "standard" or "size" or "sized" or "recognizable" or "recognisable" as the screwdriver. The screwdriver is a key. The screwdriver belongs to Bashti. The screwdriver is illegal.
Does the player mean turning the screwdriver: it is unlikely. [Prefer TURN SCREW to use the tripod]
The description of the standard-sized screwdriver is "Many of the engineers['] tools are incomprehensible to you. It's nice to finally have one just make sense."
 
[Serves no gameplay purpose, removed for simplicity]
[Re-added post-comp based on reviewer feedback]
[TODO improve descriptions!]
The Bashti-hatch is a maintenance hatch. It is north of Bashti's Cabin and east of the Port Walk. It is closed and locked.
The Port Walk is a room. "Like its counterpart on the starboard side, this passage is narrow, dark, and cramped[--]but mercifully lacking any huge gaps in the hull. [To the east] is Bashti's cabin and [west] is, with any luck, the lazarette where Kiang is being kept."
West of the Port Walk is the Port-Rudder-Access. The description of the Port-Rudder-Access is "The port walk ([to the east]) ends at the rudder, just like the starboard one. But where you'd hoped to find a hatch into the lazarette, matching the one into your little cabin, there's nothing but a blank wall."
The port rudder is fixed in place in the Port-Rudder-Access. The initial appearance of the port rudder is "The ship's other rudder extends out into the air." The description of the port rudder is "As complicated as the starboard one, but in apparently better repair. This one doesn't look like it's on the verge of jamming."
 
Book 4 - Bashti and the Crawlspace
 
Chapter 1 - The Crawlspace
 
A crawlspace is a kind of room. The description of a crawlspace is usually "There's about two and a half feet of space between the bottom of the upper deck and the top of the lower one, a vast, dim void that's barely tall enough to wriggle through on your stomach. The heat is oppressive and the din of machinery is deafening. The crawlspace extends into darkness [if the item described is Crawlspace Fore][to the west][else][to the east][end if].".
 
A crawl hatch is a kind of door. A crawl hatch is usually closed, openable, locked, and lockable. The printed name of a crawl hatch is usually "crawl hatch". Understand "crawl" or "hatch" or "inconspicuous" as a crawl hatch.
Definition: a direction (called the way) is open-hatched if the room-or-door (way) from the location is an unlocked crawl hatch.
The description of a crawl hatch is usually "You've seen a few of them around the ship, set unobtrusively into the floors and ceilings. Probably another way for the engineers to get where they need to go for maintenance without being blocked by cargo. This one is [if locked]sealed[else if open]hanging open[else]unsealed[end if]."
 
Instead of unlocking a locked crawl hatch with a crowbar:
    say "You try to fit the crowbar under the seal, but you just can't get enough leverage to actually force it open."
 
A crawl hatch can be pending. A crawl hatch is usually not pending.
Every turn:
    repeat with the portal running through open crawl hatches:
        if the portal is pending:
            try the portal closing the portal; [It closes itself after one turn]
            now the portal is not pending;
        otherwise:
            now the portal is pending.
 
Rule for writing a paragraph about a crawl hatch:
    if the location is Crawlspace Fore:
        say "The only light filters in through the hatches that connect this space to the rest of the ship. Two of them lead up to the cabins, [north] and [south], while another [to the east] leads down to the lower deck";
        [repeat with the item running through crawl hatches in the location:
            say "* [item] [if the item is locked]L[else]U[end if] [if the item is open]O[else]C[end if][br]";]
        if an unlocked crawl hatch is in the location:
            say ". The [list of open-hatched directions] one[if there is exactly one open-hatched direction] has[else]s have[end if] been unsealed";
        say ".";
        now all crawl hatches are mentioned;
    otherwise if the location is Crawlspace Aft:
        say "The only light filters in through the hatches that connect this space to the rest of the ship. The ones leading up to the cargo hold are sealed over completely for this trip, while the [west] one leading down to the lower deck [if the aft-hatch is locked]looks like it could be opened with the right key[else]has recently been unsealed[end if].";
        now the aft-hatch is mentioned;
    otherwise:
        say "A[if the item described is locked]n inconspicuous[end if] hatch is set in the [if the direction of the item described from the location is up]ceiling[else]floor[end if][if the item described is closed and the item described is unlocked]; this one must have been used recently, because it's closed but not sealed[end if].";
        now the item described is mentioned.
 
After opening a crawl hatch when the location is a crawlspace: say "You wrap your arms around the hatch and pull with all your strength. There's not enough space to get proper leverage here, but you're able to pry it open about a foot.". [After instead of report so it gets printed for implicit opens]
 
Report an actor closing a crawl hatch when the actor is a crawl hatch: say "[The noun] settles closed again."; rule succeeds.
Sound of an actor closing a crawl hatch when the actor is a crawl hatch: say "the [i]clang[/i] of a hatch slamming itself shut again."
 
Crawlspace Fore is a crawlspace. The fore-hatch is a crawl hatch. It is east of Crawlspace Fore and above the Deck Fore. The Udan-hatch is a crawl hatch. It is north of Crawlspace Fore and below the Mess. The Qarrad-hatch is a crawl hatch. It is south of Crawlspace Fore and below the Gunnery.
Before going down in Crawlspace Fore: say "([east])[ccb]"; try going east instead.
Instead of going up in Crawlspace Fore: say "There are two hatches leading up, [north] and [south]."
 
Crawlspace Aft is a crawlspace. It is west of Crawlspace Fore. The aft-hatch is a crawl hatch. It is west of Crawlspace Aft and above the Deck Aft.
Before going down in Crawlspace Aft: say "([west])[ccb]"; try going west instead.
 
A stack of parcels is a supply in Crawlspace Aft. "A bunch of carefully-wrapped parcels have been shoved back here where they won't be seen." Understand "bunch" or "carefully" or "wrapped" or "carefully-wrapped" or "parcel" or "package" or "burlap" or "unlabelled" as the stack of parcels. The description of the stack of parcels is "Roughly square packages carefully wrapped in unlabelled burlap."
A lone parcel is a container. It is closed and openable. The stack of parcels yields the lone parcel. The description of the lone parcel is "Carefully wrapped in burlap to conceal what's inside it." Understand "burlap" or "package" or "carefully" or "wrapped" or "carefully-wrapped" as the lone parcel. The printed name of the lone parcel is "[if the location is a crawlspace or the asking which do you mean activity is going on]lone [end if]parcel".
A strange clay-like substance is a legal concealable supply in the lone parcel. Understand "clay" or "like" as the strange substance. The description of the strange substance is "Pale green and slightly soft to the touch, with a bitter smell. You've never seen it before[--]but you have a horrible, horrible suspicion that this is some kind of explosive."
A pinch of clay is a substance. The strange substance yields the pinch of clay. The description of the pinch of clay is "Pale green and slightly soft to the touch, with a bitter smell. You've never seen it before[--]but you have a horrible, horrible suspicion that this is some kind of explosive."
After examining when the noun is the strange substance or the noun is the pinch of clay:
    reveal explosives-clue;
    continue the action.
Before touching or smelling or tasting or eating or drinking when the noun is the strange substance or the noun is the pinch of clay: try examining the noun instead.
 
Instead of opening the stack of parcels:
    say "(first taking one)[ccb]";
    try taking the stack of parcels;
    if the player carries the lone parcel, try opening the lone parcel instead.
 
There is a shock stick in Crawlspace Aft. "There's a glint of metal in the darkness, where something has been thrown into a far corner." Understand "glint" or "metal" or "of metal" as the shock stick when the item described is not handled. Understand "shockstick" or "taser" or "baton" as the shock stick.
After taking the shock stick when the shock stick was not handled:
    say "You squirm as far as you can into the edges of the crawlspace and feel for the glint. Your hand closes on something cold and metallic, about a foot long. Feels like a baton of some sort...";
    continue the action.
Instead of examining the shock stick when the shock stick is not handled: say "It's hard to make out any detail from here." [Why can't the standard rules define "unhandled"? Grr]
The description of the shock stick is "You've never held one of these before[--]it looks like a shock stick, a kind of baton used by Imperial enforcers. Jab someone with the end of it and it'll make their body freeze up for a moment. Hold it against them for long enough and it'll stop their heart. (Which officially never happens. Officially speaking it never causes permanent damage.)"
 
[Index map with Crawlspace Fore mapped northeast of the Passenger Cabin. Index map with Crawlspace Aft mapped northwest of the Passenger Cabin.]
 
Chapter 2 - Bashti
 
Section A - Objects
 
The Bridge is a room.
Bashti is an inactive man in the Bridge. The description of Bashti is "Young and eager, with a face that always looks a little bit scared. He's Ishme's apprentice, and with only the two of them keeping the ship running, he's been getting plenty of hands-on experience.[p]He's the youngest person on the crew by a good ten years, and he seemed nervous and jumpy even before Udan's death. Now it seems like he never stops moving."
Definition: Bashti is busy if the goal of Bashti is sabotaged or the main turret is reported.
The initial appearance of Bashti is "Bashti, the younger of the two engineers, is [if busy]rushing to handle the next impending emergency[else]examining the pipes for potential issues[end if]."
 
Instead of talking to Bashti:
    if Bashti is busy:
        say "[akk]'Akkhathi! Ammashi-ki, akhasshikh-ma shipri eppesh.'[eng]Sorry! I'm neglecting you, but I need to handle my tasks.[/akk] And he hurries away on his task."; [Sorry! I'm neglecting you, but I need to do my tasks.] [I couldn't actually find a good word for "sorry" (or "I regret this" or "I apologize" or such) so this is "I am committing an offense"]
    otherwise:
        say "He looks up at the sound of your voice, then shakes his head. [akk]'Ah, Zagin. Akkhathi; ul Araliam balam Udan eshemme.'[eng]Ah, Zagin. Sorry, but I can't understand Arali without Udan.[/akk][general conversation refusal]". [Ah, Zagin. Sorry; I can't understand Arali without Udan.]
 
To describe (the character - Bashti) moving for (the reason - a motion report reason):
    if the reason is:
        -- arrival reason: say "Bashti [if Bashti is busy]rushes[else]scurries[end if] in";
        -- departure reason: say "Bashti [if Bashti is busy]hurries[else]moves[end if] out";
        -- distant arrival reason: say "[if Bashti is busy]frantic[else]nervous[end if] footsteps getting closer";
        -- distant departure reason: say "[if Bashti is busy]frantic[else]nervous[end if] footsteps going away";
        -- distant movement reason: say "[if Bashti is busy]frantic[else]nervous[end if] steps in the distance";
        -- adverb reason: say "[if Bashti is busy], focused on his task[else], on alert for the next problem[end if]".
 
Bashti carries a key called Bashti's key. It belongs to Bashti. [Should never matter but why not]
Every ship door is unlocked by Bashti's key.
Every crawl hatch is unlocked by Bashti's key.
 
Section B - Autonomy
 
Edge cost rule when the person asked is Bashti: [Bashti uses more elaborate route-finding than most]
    let the total be 1;
    if the edge source is the Cargo Hold and the edge destination is the Lower Deck and the open tripod is in the Lower Deck: [Staircase is jammed, can't use it]
        rule succeeds with result -1; [Impassible]
    if connecting Shimat's Cabin and the Miscellany: [Bashti never uses this connection, for simplicity]
        rule succeeds with result -1;
    if connecting the Cargo Hold and the Passenger Cabin: [Bashti also never uses this connection to keep him out of Ishme's area]
        rule succeeds with result -1;
    if the edge destination is an overheated boiler-room, increase the total by 10; [Bashti does not like the heat]
    if the edge destination is a crawlspace and the edge source is not a crawlspace, increase the total by 5; [Penalize entering the region but don't penalize moving through it]
    if the edge door is a locked door, increase the total by 2; [Unlocking doors is an inconvenience but not a fatal one]
    rule succeeds with result (the total).
 
Definition: a room is ready if its Dijkstra distance is 5 or less. [Used to define "readier" and "readiest"]
Definition: a room (called the place) is accessible if the Dijkstra distance to it is not -1. [There exists a path, no matter how long - here we use the phrase instead of the property to convert INFINITY to -1 for us]
 
Definition: a room is open-door-adjacent if it is liminal to an open ship door.
 
Goal-setting for Bashti when the main turret is reported (this is the turrets are the most important emergencies rule):
    if Bashti does not wear the mitten, now the goal of Bashti is the mitten;
    otherwise now the goal of Bashti is the main turret.
 
Goal-setting for Bashti when there is a sabotaged room (this is the Bashti first handles emergencies rule):
    [say "** Bashti is looking for sabotaged rooms[br]";]
    now the person asked is Bashti;
    recalculate Dijkstra distances from the location of Bashti;
    let the target be the readiest sabotaged accessible room;
    if the target is nothing, let the target be a random sabotaged room;
    [say "** Bashti's target: [the target] with distance [Dijkstra distance of the target][br]";]
    now the goal of Bashti is the target.
 
Goal-setting for Bashti when there are no sabotaged rooms (this is the Bashti then tidies up rule):
    now the person asked is Bashti;
    recalculate Dijkstra distances from the location of Bashti;
    let the target be the readiest accessible open-door-adjacent room;
    if the target is not nothing, now the goal of Bashti is the target.
 
Autonomy for Bashti when the location of Bashti is sabotaged (this is the fix sabotage rule):
    try Bashti repairing the location of Bashti.
 
Autonomy for Bashti when Bashti can see the mitten and Bashti does not wear the mitten (this is the get hand protection rule):
    if Bashti does not carry the mitten, try Bashti taking the mitten;
    otherwise try Bashti wearing the mitten.
 
Autonomy for Bashti when Bashti wears the mitten and Bashti can see the reported turret (this is the fix the turret rule):
    try Bashti repairing the turret.
 
Autonomy for Bashti when the goal of Bashti is nothing and the location of Bashti is an overheated boiler-room (this is the get out of uncomfortable places rule): [Kudos to Mel for finding this!]
    try Bashti going east.
 
[Autonomy for Bashti when the location of Bashti is the Lower Deck and Bashti can touch the open tripod and the Lower Deck is not sabotaged (this is the unjam the staircase rule):
    try Bashti closing the tripod.]
[This was replaced with a "before someone opening" rule that will convert an "opening the staircase" action into a "closing the tripod" action if necessary. The standard autonomy rules will then make that happen, since people try to open doors before going through them.]
 
[Autonomy for Bashti when the previous behavior of Bashti is closing a door (called the target) and Bashti carries a thing (called the pass) which unlocks the target (this is the Bashti locks doors after closing them rule): [After he closes a door, he'll lock it on the next turn]
    try Bashti locking the target with the pass.
 
Autonomy for Bashti when the location of Bashti is liminal to an open ship door (called the target) and the goal of Bashti is not sabotaged (this is the Bashti closes doors when he has time rule): [Only worry about open doors when there's not an emergency going on]
    try Bashti closing the target.]
 
Section C - Actions
 
Carry out Bashti repairing a sabotaged room:
    now the noun is not sabotaged.
 
Report Bashti repairing a room:
    say "With a practiced eye, Bashti picks out which valve is the problem, and tightens it back up."
 
Sound of Bashti repairing a room:
    say "sudden silence as the hissing of a loose valve is cut off. You barely noticed it until it was gone."
 
Carry out Bashti repairing the turret:
    now the turret is undamaged;
    now the turret is unreported.
 
Report Bashti repairing the turret:
    say "His hand wrapped in a sort of canvas mitten, Bashti grabs hold of the big valve and sets it back to the right position. The billowing steam stops."
 
Sound of Bashti repairing the turret:
    say "a valve being turned and a rush of steam ceasing, leaving a strangely empty silence."
 
[I believe only Bashti is going to use these, but no reason not to let them be generic]
Sound of someone opening a ship door:
    say "the rumble of a door being opened."
 
Sound of someone closing a ship door:
    say "the rumble of a door being closed."
 
Sound of someone unlocking a ship door with something:
    say "the satisfying click of a door being unlocked."
 
Sound of someone locking a ship door with something:
    say "the disappointing click of a door being locked."
 
Sound of someone opening a crawl hatch:
    say "a hatch being pulled open with a grunt of effort."
 
[Sound of closing handled in the code for crawl hatches since they auto-close]
 
Sound of someone unlocking a crawl hatch with something:
    say "the metallic screech of a hatch being unsealed."
 
Sound of someone locking a crawl hatch with something:
    say "REPORT THIS: A hatch just got locked. Why?"
 
Report Bashti waiting:
    say "Bashti [one of]scans over a section of the pipes[or]adjusts a joint that's begun to come loose[or]surveys the pipes, looking for issues[or]leans in to trace a complicated section of tubing[or]wipes away some sweat before getting back to work[at random].";
    stop the action.
 
Book 5 - Shimat and the Lower Deck
 
Chapter 1 - Geography
 
The Lower Deck is a room. The description of the Lower Deck is "If the boilers are the heart of the ship, this would be its...face, maybe? The shiny, clean part, the first impression everyone gets when they come aboard. At this point, though, it's as scuffed and dirty as its crew. Cleaning hasn't been a high priority when everyone is spread so thin.".
 
East of the Lower Deck is Deck Fore. The description of Deck Fore is "The lower deck is much smaller than the cargo hold: not much more than a single long corridor running from bow to stern. The captain and first mate have their cabins [to north] and [south]."
 
West of the Lower Deck is Deck Aft. The description of Deck Aft is "The lower deck is much smaller than the cargo hold: not much more than a single long corridor running from bow to stern. The cabins [to south] and [north] would probably belong to a medic and a...boatswain? quartermaster?...if you had them. But on this trip they've been repurposed for whatever the crew needs."
 
East of Deck Fore is the Observatory. The description of the Observatory is "The front of the lower deck is made entirely of glass, walls and floors alike, and the view is truly incredible. You spent a long time down here early in the voyage, looking down at the world below. On a properly-crewed ship there would be a navigator up here all the time, reporting observations back to the bridge, but with so few people you were rarely disturbed or shooed away."
 
The observatory view is scenery in the Observatory. Understand "glass" and "wall" and "walls" and "floor" and "floors" and "world" and "below" and "window" and "windows" and "view" and "sky" as the observatory view. The description of the view is "It's objectively an incredible view. But it's hard to appreciate it right now."
Before searching the observatory view: try examining the noun instead.
 
West of Deck Aft is the Bridge. The description of the Bridge is "Compared to the heat of the boilers and the views of the observatory, the [i]Mekhe-Irakkab[/i]'s bridge feels almost minimalist. It's the only part of the ship that's kept fastidiously clean: the pilot's chair in the middle, the console of controls spread out in front, the vast array of dials and readouts on every side."
 
The pilot's chair is an enterable supporter in the Bridge. It is scenery. The description of the chair is "Much less soft-looking than Ishme's." Understand "captain's" as the pilot's chair.
 
The ship's controls are illegal scenery in the Bridge. The description of the controls is "From here the pilot controls lift, thrust, steering, and probably a bunch of other parameters that you don't know the names of." Understand "console" and "of controls" and "control" and "throttle" and "wheel" as the controls.
Instead of pushing or pulling or turning or attacking or repairing or rubbing or switching on or switching off the controls: say "You really, [i]really[/i] don't want to crash the ship."
 
In the Bridge is a thing called some dials and readouts. They are scenery. Understand "dial" and "readout" as the dials.
The description of the dials is "Reporting a dizzying array of different statistics, all of which are presumably vital to keeping the ship on course."
 
The Bridge can be reported. The Bridge is not reported. [Has Shimat told Kasap to clean it up?]
 
Chapter 2 - Shimat
 
Section A - Descriptions
 
Shimat is an inactive woman on the pilot's chair. "Shimat, the captain of this whole affair, is [if Shimat is on the pilot's chair]focused intensely on the controls[else if Shimat is in the Observatory]gazing out the window[else]hurrying from one task to another[end if]."
Shimat carries a logbook. Understand "log" and "book" and "Shimat's" as the logbook. The description of the logbook is "Tracking the ship's course in great detail." The logbook is owned by Shimat. [Also shouldn't matter but eh] The logbook is illegal.
 
The description of Shimat is "Small and wiry and full of a quiet, unshakeable determination. She trades off with Kasap at the helm, acting as pilot-slash-navigator, and from watching them work you think she's the more captainly of the two: the one people will defer to in a moment of crisis. In an hour or two, Kasap will take the bridge, and she'll start marshalling everyone for the final approach; but for right now, she's focused on keeping the ship flying its course."
 
To describe (the character - Shimat) moving for (the reason - a motion report reason):
    if the reason is:
        -- arrival reason: say "Shimat strides in";
        -- departure reason: say "Shimat strides out";
        -- distant arrival reason: say "purposeful footsteps getting closer";
        -- distant departure reason: say "purposeful footsteps moving away";
        -- distant movement reason: say "purposeful, evenly-timed steps in the distance";
        -- adverb reason: say ", [one of]humming in time with her steps[or]singing under her breath[or]steps in time with her song[at random]".
 
Report Shimat entering the pilot's chair:
    say "Shimat throws herself into the pilot's chair, swinging it around to the console.";
    rule succeeds.
Report Shimat examining the dials:
    say "Shimat [one of]checks one of the dials[or]compares two readouts[or]notes down a number in her log[at random].";
    rule succeeds.
Report Shimat repairing the ship's controls:
    say "Shimat [one of]adjusts[or]nudges[purely at random] [one of]the wheel[or]the lift[or]the throttle[at random][one of], checks a gauge, then pushes it back a bit[or][or][at random].";
    rule succeeds.
Report Shimat examining the logbook:
    say "Shimat [one of]checks[or]updates[or]considers[at random] the log in her hand.";
    rule succeeds.
Report Shimat examining the observatory view:
    say "Shimat peers intently out the window, [one of]scanning the horizon[or]checking the ship's position[or]on lookout for danger[at random].";
    rule succeeds.
 
Carry out Shimat shouting:
    now the Bridge is reported;
    now the goal of Kasap is the Bridge. [Will apply after his repetitions are done]
Report Shimat shouting: say "Shimat glances at [the list of improperly-discarded things] and calls out, still in the rhythm of her footsteps. [akk]'Kasap! Apputum usuk-sunuti!'[eng]Kasap! Please get these things out of here![/akk] Her steady song picks up without missing a beat." [Kasap! Please remove these things!]
After Shimat shouting when the player is not in the Bridge:
    say "A rhythmic call echoes from somewhere in the ship. [akk]'Kasap! Apputum usuk-sunuti!'[eng]Kasap! Please get these things out of here![/akk]";
    if the player can see Kasap, say " Kasap sighs.";
    continue the action.
 
Report Shimat shooing the player to a direction:
    say "Shimat spots you in her way, and perfunctorily sends you off [to the second noun]. She has no time for anything getting in her way right now."
 
Instead of talking to Shimat:
    say "She holds up a hand to shush you without breaking her rhythm. All her focus is on flying the ship at the moment and she has no time for distractions."
 
Section B - Autonomy
 
Shimat has a number called the timer. [Easier not to use repetition count here - repetition count might have been a mistake]
Definition: Shimat is busy if the timer of Shimat is greater than zero.
 
Goal-setting for Shimat when Shimat is not busy (this is the Shimat's goal-setting rule):
    if Shimat is on the pilot's chair, now the goal of Shimat is the Observatory;
    otherwise now the goal of Shimat is the pilot's chair;
    now the timer of Shimat is 5.
 
Definition: a thing is improperly-discarded if (it is portable or it is pushable between rooms) and it is not a person and it is in the Bridge. ["In" instead of "enclosed by" means people's inventories won't be a problem]
 
Autonomy for Shimat when Shimat can see the player and the player is on the pilot's chair (this is the Shimat shoos the player out of her chair rule):
    try Shimat shooing the player to east.
 
First autonomy for Shimat when Shimat can see an improperly-discarded thing and the Bridge is not reported (this is the Shimat reports problems in the Bridge rule):
    try Shimat shouting.
 
Autonomy for Shimat when Shimat is busy and Shimat is on the pilot's chair and the goal of Shimat is not the Observatory (this is the Shimat flies the ship rule):
    if a random chance of 1 in 2 succeeds: [One of the only places randomness is used in this game]
        try Shimat examining the dials;
    otherwise:
        try Shimat repairing the ship's controls;
    decrement the timer of Shimat.
 
Autonomy for Shimat when Shimat is busy and Shimat is in the Observatory and the goal of Shimat is not the pilot's chair (this is the Shimat takes observations rule):
    if a random chance of 1 in 2 succeeds: [And again]
        try Shimat examining the observatory view;
    otherwise:
        try Shimat examining the logbook;
    decrement the timer of Shimat.
 
Book 6 - Kasap and the Lower Cabins
 
Chapter 1 - Shimat's Side
 
Section A - Shimat's Cabin
 
The Shimat-door is a ship door. It is north of Deck Fore and east of Shimat's Cabin. It is closed and locked. The description of Shimat's Cabin is "At one point you'd expected the captain to be sailing in luxury, but this cabin started out just as spartan as the rest: a simple bunk, a smattering of personal effects, and that's it. Ever since the storage room [to the west] collapsed, it's also where she keeps all the logs and maps and such a navigator needs. A door leads [to the east] and a messy passage [west]."
Before going south in Shimat's Cabin: say "([east])[ccb]"; try going east instead.
 
Shimat's bunk is scenery in Shimat's Cabin. The description is "Unlike Kasap, she hasn't bothered to keep things tidy when there's a ship to fly." Understand "personal" and "effect" and "effects" as Shimat's bunk.
 
In Shimat's Cabin is an illegal scenery supply called some various logs and maps. The description of the various logs is "Neatly written; messily arranged." Understand "log" or "map" as the various logs.
A log page is an illegal thing. The description of the log page is "Events recorded in neat rows and columns." The log page belongs to Shimat. The output of the various logs is the log page.
After printing the name of the various logs when asking which do you mean: say " (scattered around the cabin)".
 
A metal chest is a chest in Shimat's Cabin. It is fixed in place and pushable between rooms. "A huge metal chest has been pulled in from the Miscellany, looking very much the worse for wear." Understand "huge" or "big" or "battered" or "dented" as the metal chest.
The description of the metal chest is "Broad and sturdy, but not sturdy enough to withstand a room's worth of shelves falling on it. The lid was originally flat, but the front's been caved in by the force; the hinges seem fine, but the lock is jammed beyond repair."
Before examining the metal chest's lid: try examining the metal chest instead.
A lock is part of the metal chest. The description of the lock is "Caved in when the Miscellany collapsed. No key would fit into this now." Understand "latch" as the lock.
Does the player mean doing something to the lock: it is likely. [Avoid disambiguating against the door]
Some hinges are part of the metal chest. The description of the hinges is "Remarkably undamaged. The screws connecting them to the chest are nice and shiny[if the metal chest is unlocked][--]albeit currently detached from the lid[end if]." Understand "hinge" or "screw" or "screws" as the hinges.
Understand "turn [something] with [something preferably held]" as unlocking it with.
Instead of turning when the noun is the metal chest or the noun is incorporated by the metal chest:
    if the screwdriver is touchable:
        say "(with the screwdriver)[ccb]";
        try unlocking the metal chest with the screwdriver instead;
    otherwise:
        say "You don't have anything that fits these screws."
Before repairing when the noun is the metal chest or the noun is part of the metal chest:
    try bolting the metal chest instead.
 
[
[Now to work around an annoying bug in Inform!]
The metal chest is transparent. [Allow the player to see the room when they're on top of the lid, because of an issue in how Inform handles supporters that are part of containers]
Rule for deciding the concealed possessions of the metal chest:
    if the particular possession is the chest's lid or the particular possession is enclosed by the chest's lid, no; [Don't hide the lid or anything on the lid]
    yes. [But hide everything inside]
]
 
The metal chest is locked. The screwdriver unlocks the metal chest.
Before unbolting something incorporated by the metal chest: try unbolting the metal chest instead.
Before unlocking a thing incorporated by the metal chest with something: try unlocking the metal chest with the second noun instead.
Before bolting something incorporated by the metal chest: try bolting the metal chest instead.
Before locking a thing incorporated by the metal chest with something: try locking the metal chest with the second noun instead.
Before turning a thing incorporated by the metal chest: try turning the metal chest instead.
 
Instead of unlocking the metal chest with the crowbar: say "You try to get the end of the pry bar to fit under the lid, but no dice. The front of the lid is jammed fast."
After unlocking the metal chest with the screwdriver: say "The latch might be ruined, but the hinges look just fine. All it takes is a few tedious minutes of unscrewing and they come undone, the top of the chest now hanging loose."
After locking the metal chest with the screwdriver: say "You screw the hinges back in, leaving the chest as jammed as you found it. The crew will have to find some other way to open it."
 
In the metal chest is a supply called an assortment of charts and logs. The description of the assortment is "Maps, diagrams, records of all sorts...presumably very important for tracking the ship's progress." Understand "map" or "diagram" or "diagrams" or "chart" or "log" as the assortment.
After printing the name of the assortment when asking which do you mean: say " (in the chest)".
A navigational chart is an illegal thing. The assortment of charts yields the navigational chart. The description of the navigational chart is "A detailed record of the wind patterns at different altitudes...somewhere in the Empire, presumably. Without being able to read the labels it's just a bunch of numbers and colored squiggles." The navigational chart belongs to Shimat.
 
In the metal chest is a closed openable portable container called an envelope. The description of the envelope is "The front is stamped [akk]ANA PAN MELETZ ESUN WAKAL NASHPAKI[eng]FOR MELETZ-ESUN, THE INSPECTOR OF CARGO SHIPS[/akk], whatever that means: maybe that's who it gets delivered to?" [FOR MEL JASON, THE INSPECTOR OF CARGO SHIPS] The envelope belongs to Kasap.
In the envelope is a manifest. The description of the manifest is "The words are meaningless, but you can tell it's a list, with numbers next to each entry. Kasap got this prepared in advance so he won't have to deal with more paperwork after landing." The manifest belongs to Kasap.
 
Instead of writing on when the noun is the envelope or the noun is the manifest: say "Writing on the manifest is sure to get the authorities['] attention, but they might not be able to read Arali."
 
Definition: a thing is flat rather than non-flat if it is the manifest or it is the navigational chart or it is the log page or it is the envelope or it is a substance.
Instead of inserting a non-flat thing into the envelope: say "It's only really meant to hold papers, or maybe something that can be squished flat. [The noun] [are] neither: even if [they] fit, [they] would leave a suspicious bulge."
 
Instead of going to a room with the metal chest:
    say "You shove the chest across the floor, making an awful squeal of metal on metal.";
    continue the action.
 
Section B - The Miscellany
 
West of Shimat's Cabin is Miscellany. The description of Miscellany is "The cargo hold is for transporting the things the crew get paid for; this room is for transporting the things the crew need to have on hand. Or at least that was the plan. It started out well-stocked with books and equipment and food and such, but a strut broke free a week into the voyage and the shelves came down like dominos. Now it's just a hopeless mess that nobody's had the time to fix. Half-cleared doors lead [west] to the deck and [east] to Shimat's cabin."
Miscellany has a room called the last entrance.
After going to Miscellany:
    now the last entrance of Miscellany is the room gone from;
    continue the action.
Instead of going from Miscellany:
    if the room gone to is the last entrance of Miscellany:
        continue the action;
    if the open tripod is in Miscellany:
        say "With the tripod holding the shelves up, you're able to slip underneath.";
        continue the action;
    say "You try to squirm under or scramble over the fallen shelves, but it's hopeless. You'll have to go back the way you came.".
Some wreckage of fallen shelves is fixed in place in Miscellany. "Most of the room is taken up by the fallen shelves, and whatever remains of their contents." Understand "contents" and "remains" and "mess" and "chemical" and "samples" and "sample" and "labels" and "label" and "labelled" and "collection" and "ingredient" and "food" and "ingredients" and "shelf" as the wreckage of fallen shelves. The description of the wreckage is "An utter mess, which has just gotten worse every time the ship shakes or rocks. One of Kiang's jobs was to search through the wreckage for the ingredients Udan needed, but nobody is in the mood for eating right now[if the open tripod is in the Miscellany]. The tripod is currently propping the shelves up, making it a bit more accessible[else if the closed tripod is in the Miscellany]. The tripod has been positioned underneath, getting in the way even more[end if]."
Instead of taking the wreckage: say "Nothing you can extract from the wreckage seems especially useful at the moment."
Instead of pushing or pulling or turning or repairing or rubbing the wreckage: say "With your bare hands? Hopeless. It would take days to make any real progress on fixing this."
Instead of climbing or entering the wreckage: say "'Solid enough to be hard to move' doesn't necessarily mean 'solid enough not to collapse further when you climb around on them'."
Instead of searching or looking under the wreckage:
    if the open tripod is in Miscellany, say "With the tripod supporting the shelf, you now have access to...a collection of chemical samples, it looks like. But without being able to read the labels, they're useless to you.";
    otherwise say "You sift through the detritus, but don't find anything helpful."
The wreckage allows concealment in below-position. [Just for flavor]
Before going south in Miscellany: say "([west])[ccb]"; try going west instead.
 
After going to Miscellany with the tripod:
    say "(You pull the tripod in, and shove it under one of the less-collapsed shelves. That's the only place it will fit.)";
    continue the action.
 
A vast panoply is scenery in the Miscellany. [Existing solely for TAKE ALL to give a funny response]
Instead of doing anything with the vast panoply: say "There's far too much stuff here to go through it all."
Instead of taking the vast panoply: say "You're good at carrying a lot of things. But this is far, [i]far[/i] beyond your limits."
Rule for deciding whether all includes the panoply: it does.
 
The can't search unless container or supporter rule does nothing when the noun is the wreckage.
 
Instead of going with something when (the room gone to is Shimat's Cabin and the room gone from is Miscellany) or (the room gone from is Shimat's Cabin and the room gone to is Miscellany): say "You can fit between the collapsed shelves without much difficulty, but you won't be able to bring [the thing gone with] with you."
 
Edge cost rule when connecting Shimat's Cabin and the Miscellany: rule succeeds with result -1. [Make it so Bashti will never use this map connection, but the player can.]
 
The Miscellany-door is an unlocked open ship door. It is west of the Miscellany and north of Deck Aft.
 
Index map with Miscellany mapped northeast of Deck Aft. Index map with Shimat's Cabin mapped northwest of Deck Fore. Index map with Lower Deck mapped southeast of Miscellany. Index map with Lower Deck mapped southwest of Shimat's Cabin.
 
Chapter 2 - Kasap's Side
 
Section A - Kasap's Cabin
 
The Kasap-door is a ship door. It is closed, unlocked, and not lockable. It is south of Deck Fore and east of Kasap's Cabin. The description of Kasap's Cabin is "At one point you'd expected the first mate to be sailing in luxury, but this room is as packed as the engineers['] workspaces, full of equipment you barely understand. The bunk is practically the only open surface. It's not cluttered[--]everything is positioned with great care and accuracy[--]but you wouldn't even know where to begin searching." The description of the Kasap-door is "Unlike most of the doors on the ship, this one hangs loose; one of the hinges is broken and the lock doesn't close properly." Understand "hinge" or "hinges" or "lock" as the Kasap-door.
Before going north in Kasap's Cabin: say "([east])[ccb]"; try going east instead.
 
Kasap's bunk is scenery in Kasap's cabin. The description of Kasap's bunk is "Minimalist to an extreme."
Instead of entering or climbing Kasap's bunk: say "With everything so tidy, footprints on the sheets would definitely be noticed."
 
Some tidy shelves are scenery in Kasap's Cabin. The tidy shelves allow concealment in above-position. The description of the tidy shelves is "A place for everything and everything in its place. This might be the neatest organization you've seen anywhere on the ship; it's immediately obvious where [the flame spectrometer] was taken from, since nowhere else is there a gap four feet wide."
Instead of searching the tidy shelves: say "You find a great many things, none of them comprehensible."
[Before climbing or entering the tidy shelves: try hiding in above-position of the tidy shelves instead.]
Before inserting something into the tidy shelves: try putting the noun on the tidy shelves instead.
Instead of putting something on the tidy shelves: say "Kasap keeps his equipment well-organized, and it just looks wrong putting [a noun] where it doesn't belong. He'd be sure to notice the moment he came back in."
Understand "gap" and "shelf" and "matching" as the tidy shelves.
Precondition for hiding in above-position of the tidy shelves:
    if the player is not enclosed by a supporter and the player can touch an enterable supporter (called the step):
        initialize the implicit action;
        silently try entering the step;
        finish the implicit action with participle "climbing" infinitive "climb" object "onto [the step]" and condition (whether or not the player is enclosed by the step);
    if the player is not enclosed by a supporter:
        say "There's just about enough space to hide up there, but it's at least a foot above your head. You'll need some assistance to climb up there[--]nothing in here is tall enough to climb up from." instead.
 
Section B - The Flame Spectrometer
 
A flame spectrometer is fixed in place in Kasap's Cabin. "One piece of equipment in particular has been set up in the middle of the room, ready for use. There's a matching gap in the shelves that block off the [west] passage." Understand "equipment" or "piece" or "piece of" or "mysterious" or "device" or "complicated" or "intricate" or "contraption" or "compartment" or "arm" or "arms" or "metal" or "hose" or "dial" or "dials" or "knob" or "knobs" as the flame spectrometer.
The description of the flame spectrometer is "A breathtakingly intricate contraption, with a compartment on one side, two metal arms, a hose connecting it to one of the pipes on the wall, an assortment of dials and knobs[--][if not mysterious]even once you know how to make it work, it still feels like a mystery[else]a mystifying mystery[end if]."
The flame spectrometer can be mysterious, witnessed, or understood. It is mysterious.
The printed name of the flame spectrometer is "[if understood]flame spectrometer[else]mysterious device[end if]".
 
Instead of switching on or switching off or rubbing or turning or pushing or pulling the flame spectrometer:
    if the flame spectrometer is understood:
        say "You know how to use this now, and should be able to analyze samples with no further rigamarole.";
    else if the flame spectrometer is witnessed:
        say "You've seen how Kasap uses this now, and can probably replicate his process. The first step is putting the sample into the machine.";
    otherwise:
        say "You poke and prod at it for a moment, and come to the conclusion that you have no idea how to work this thing."
Instead of attacking or repairing the flame spectrometer:
    say "You're pretty confident in your ability to wreck this thing. But that would almost certainly earn you a one-way trip to the brig."
 
Instead of inserting something into the flame spectrometer:
    if the flame spectrometer is mysterious:
        say "You try to put [the noun] into the device, but nothing happens. There must be some other process involved.";
    else if the flame spectrometer is witnessed:
        now the flame spectrometer is understood;
        say "You do your best to replicate Kasap's process...[p]";
        try analyzing the noun;
        let T be "[noun]" in upper case;
        say "[tut]Now that you understand the process, you can simply ANALYZE [T].[/tut]";
    otherwise:
        try analyzing the noun.
 
Some projected spectral lines are scenery in Kasap's cabin. Understand "rainbow" and "wall" and "color" and "colors" and "spectrum" as the projected spectral lines.
Instead of doing anything with the projected lines: say "The spectrum only appeared for a moment before vanishing again[--]just long enough to make out the colors."
 
Section C - The Surgery
 
The surgery-door is an unlocked open ship door. It is south of Deck Aft and west of the Surgery. The description of the Surgery is "This tiny cabin would probably belong to the ship's medic, if you had one. Instead, Kasap has turned the bunk into a sort of examination table where he does what he can to keep the crew healthy and functional. Shelves of equipment cover up the passage [to the east], so the only way out is [west].".
Before going north in the Surgery: say "([west])[ccb]"; try going west instead.
 
Some medical shelves are scenery in the Surgery. Understand "shelf" and "equipment" and "of equipment" as the medical shelves. The description of the medical shelves is "Full of the sorts of equipment needed to deal with all sorts of injuries[--]and maybe solve a murder. But you don't know how to use any of it."
A curious implement is a thing. The description is "Hopefully not something Kasap will miss." It belongs to Kasap. The implement is illegal.
The medical shelves are a supply. The medical shelves yield the curious implement.
 
The examination table is fixed in place in the Surgery. "[Udan]'s body rests here, unnaturally still with rigor mortis." Understand "bunk" or "exam" or "sheet" or "shelf" as the examination table. The description of the examination table is "Not much more than a shelf with a sheet over it."
 
Udan is a corpse on the examination table. It is fixed in place. Understand "Udan's" or "body" or "corpse" or "cadaver" or "his" or "skin" or "face" or "chest" as Udan.
Instead of taking Udan: say "You might be able to lift his body, but what would you do with it?".
Instead of touching or turning or pushing or pulling or listening to or rubbing or squeezing Udan: say "He's cool to the touch and very stiff. Like a statue. A faintly squishy statue."
Instead of smelling or tasting or kissing Udan: say "No. Just no."
The description of Udan is "His face is locked in an expression of anger, glaring up at you with empty eyes like he blames you for his murder. His skin has turned all kinds of unnatural colors by now, but there's a vivid red scar on the inside of his left shoulder, with strange branching patterns radiating off from it. [if we have not examined the shock stick]Was he killed by a lightning strike[otherwise]Is this what death by shock stick looks like[end if]?"
After examining Udan:
    reveal weapon-clue;
    continue the action.
 
The fatal wound is part of Udan. Understand "mark" and "marks" and "vivid" and "red" and "scar" and "shoulder" and "left" and "strange" and "branching" and "pattern" and "patterns" as the fatal wound. The description of the fatal wound is "The marks fork and branch across his skin like a lightning bolt, starting just under his left shoulder."
Instead of smelling or tasting or kissing the fatal wound: try smelling Udan instead.
Instead of touching or turning or pushing or pulling or rubbing or squeezing the fatal wound: say "The skin there doesn't feel any different from the skin anywhere else. It looks like whatever killed him didn't even break the skin."
 
Index map with Surgery mapped southeast of Deck Aft. Index map with Kasap's Cabin mapped southwest of Deck Fore.
 
Chapter 3 - Kasap
 
Section A - Descriptions
 
Kasap is an inactive man in the Surgery. "[if the location of Kasap is the Surgery]Kasap is standing over the body, examining it yet again in the hopes that some new clue will reveal itself[else if the previous behavior of Kasap is Kasap going]Kasap is moving with purpose, a man focused on his goal[else]Kasap is here, lost in his own thoughts and plans[end if]."
 
After going to the Lower Deck: [Becomes active when you reach the lower deck]
    now Kasap is active;
    now Shimat is active; [Shimat too]
    continue the action.
 
To describe (the character - Kasap) moving for (the reason - a motion report reason):
    if the reason is:
        -- arrival reason: say "Kasap stalks in";
        -- departure reason: say "Kasap stalks out";
        -- distant arrival reason: say "asymmetric footsteps approaching";
        -- distant departure reason: say "asymmetric footsteps departing";
        -- distant movement reason: say "sharp, asymmetric steps in the distance";
        -- adverb reason: say ", [one of]his artificial leg resonating with every step[or]deep in thought[or]lost in his thoughts[or]eyes distant[or]clearly focused on his plan[at random]".
 
Instead of talking to Kasap: say "He waves you off without a word. He has no time for that right now.[general conversation refusal]".
 
The description of Kasap is "Tall and balding, with a metal leg that resonates against the deck and a severe-looking face that always looks like he's just bitten into something sour. He trades off with Shimat at the helm, and you're not actually sure which of them is officially in charge[--]they've got the sort of rapport that comes from working side by side for years, and you've never seen one of them pull rank. He's also the one who helps when someone gets injured, in lieu of a proper medic. And now, while Shimat prepares for the final approach, he's the one actively trying to solve the murder."
 
Some chemical samples are a thing. The description is "Some of the myriad chemical samples that were buried under the fallen shelf. The labels mean nothing to you."
Carry out Kasap searching the wreckage when the open tripod is in Miscellany:
    now Kasap carries the chemical samples.
Report Kasap searching the wreckage when the open tripod is in Miscellany:
    say "[one of]Now that the shelf has been lifted, Kasap is able to search underneath it for what he needs[or]Kasap searches methodically through the wreckage, pulling out a handful of little vials[stopping].";
    rule succeeds.
Report Kasap searching the wreckage:
    say "Kasap scrounges through the wreckage, trying to get at some particular object he needs, without success.";
    rule succeeds.
Sound of someone searching the wreckage:
    say "the clinking and clattering of someone searching through the detritus of the Miscellany.".
 
Definition: a thing is non-sample if it is not the samples. [Kasap drops non-sample things he gathers]
 
Report Kasap examining Udan:
    say "Kasap [one of]probes at the fatal wound[or]measures some detail of the corpse with a small instrument[or]prods at the body, then makes a mark on his notes[or]peers closely at the cadaver's chest[or]makes a small incision on the body[at random].";
    rule succeeds.
Sound of Kasap examining Udan:
    say "the faint, methodical sounds of a medical examination."
 
Report Kasap escorting the player to a direction:
    say "Kasap spots you and immediately has your shoulder in a vice-like grip, dragging you out of the room. It seems he has no interest in letting you watch what he's doing.".
 
Carry out Kasap analyzing the samples when the repetition count of Kasap is 0:
    remove the samples from play.
Report Kasap analyzing the samples:
    say "[if the repetition count of Kasap > 2]Kasap begins the analysis process, inserting his sample into the device[else if the repetition count of Kasap > 1]Kasap twists one of the device's arms, and it rubs against the samples[else if the repetition count of Kasap > 0]Kasap checks all the hoses, then twists another knob to create a spark, starting a small, colorless flame; when the flame touches the arm, it changes to an actinic white[else]Kasap fine-tunes the dials, and a pattern is projected onto the wall: narrow bands of different colors, like a rainbow seen through a comb[spectrometer revelation][end if]."
Sound of Kasap analyzing the samples:
    say "a whirring of delicate scientific instruments.".
Report Kasap examining the spectrometer:
    say "Kasap peers closely at the spectrum, noting down the locations of particular bands of light.";
    rule succeeds.
 
To say spectrometer revelation:
    if the player is hidden and the flame spectrometer is mysterious:
        say ".[p]There! You've seen how the device works now. Even if the inner workings are a mystery, you should be able to imitate Kasap's process well enough to analyze your own samples";
        now the spectrometer is witnessed.
 
Section B - Autonomy
 
Goal-setting for Kasap when the goal of Kasap is nothing: [Kasap's behavior: if Miscellany is accessible, he'll go there, get a sample, take it to his cabin, and analyze it. (The player can hide and observe this to figure out how the equipment works.) Otherwise he'll go to the Surgery and examine the body, periodically going back to the wreckage to check it.]
    if Kasap encloses the chemical samples:
        now the goal of Kasap is the flame spectrometer;
    otherwise if the location of Kasap is the Miscellany:
        now the goal of Kasap is Udan;
    otherwise:
        now the goal of Kasap is the wreckage.
 
Goal-setting for Kasap when the location of Kasap is the Bridge and there are no improperly-discarded things:
    now the Bridge is not reported;
    now the goal of Kasap is the Lower Deck.
 
First autonomy for Kasap when Kasap notices the player and the location of Kasap is Kasap's Cabin (this is the Kasap doesn't want you around rule):
    cancel repetitions for Kasap;
    try Kasap escorting the player to east.
 
First autonomy for Kasap when Kasap can see an improperly-discarded thing (called the item) (this is the Kasap cleans up the bridge rule):
    if the item is pushable between rooms:
        try Kasap pushing the item to east;
    otherwise:
        try Kasap taking the item.
 
Autonomy for Kasap when the location of Kasap is the Lower Deck and Kasap carries a non-sample thing (called the item) (this is the Kasap discards things from the bridge rule):
    try Kasap dropping the item.
 
Autonomy for Kasap when Kasap carries the chemical samples and Kasap can touch the flame spectrometer: [Analyze the samples ×3]
    now the repetition count of Kasap is 3;
    try Kasap analyzing the chemical samples;
    now the goal of Kasap is nothing.
 
Autonomy for Kasap when Kasap can touch the wreckage and the goal of Kasap is the wreckage: [Search the wreckage ×2]
    now the repetition count of Kasap is 1;
    try Kasap searching the wreckage;
    now the goal of Kasap is nothing.
 
Autonomy for Kasap when Kasap can touch Udan and the goal of Kasap is Udan: [Examine the body ×3]
    now the repetition count of Kasap is 2;
    try Kasap examining Udan;
    now the goal of Kasap is nothing.
 
Book 7 - Regions
 
The Tutorial Area is a region. The Passenger Cabin, Rudder-Access, Starboard Walk, Precipice, and Ishme's Cabin are in the Tutorial Area. [In this area Ishme responds to emergencies instead of Bashti]
 
The Upper Area is a region. The Tutorial Area is in the Upper Area. The Cargo Hold, Barrels-and-Pallets, Crates-and-Boxes, the Port-Boiler-Room, the Starboard-Boiler-Room, the Work Area, the Mess, the Gunnery, and Bashti's Cabin are in the Upper Area.
 
The Lower Area is a region. The Lower Deck, Deck Aft, Deck Fore, the Bridge, the Observatory, Miscellany, Shimat's Cabin, Kasap's Cabin, and the Surgery are in the Lower Area.
 
The Crawl Area is a region. Crawlspace Fore and Crawlspace Aft are in the Crawl Area.
 
Volume III - Endings
 
Book 1 - Ending Variables
 
A crime is a kind of value. Smuggling, murder, and terrorism are crimes.
The customs inspector is an object. [A dummy object to go in the instigator variable if you hide evidence in the customs report]
 
The ending instigator is an object that varies. [Who found the evidence?]
The ending crime is a crime that varies. [What does the evidence point to?]
The ending witnessed is a truth state that varies. [Did the instigator see the player?]
 
To commence the endgame with (instigator - an object) seeing/and (charge - a crime), witnessed or not witnessed:
    if witnessed:
        now ending witnessed is true;
    otherwise if not witnessed:
        now ending witnessed is false;
    otherwise:
        say "BUG - the ending was triggered without specifying witnessed or not witnessed. Instigator is [instigator] and charge is [charge]. Please report this!";
    now the ending instigator is the instigator;
    now the ending crime is the charge;
    commence the endgame.
 
Book 2 - Ending Descriptions
 
To commence the endgame:
    [say "Commencing the endgame! [ending instigator] - [ending crime] - [ending witnessed].";]
    if the ending instigator is Kiang: [This only happens if you go to sleep without solving the crime; no evidence means he just gets arrested immediately]
        have Kiang arrested;
    otherwise if the ending instigator is the customs inspector: [This one happens after the fact]
        if the ending crime is murder, say "BUG - the ending was triggered with the customs inspector learning about murder, which should not be possible. Please report this!";
        say "Carefully, gently, you extract a little bit of the [if the ending crime is smuggling]drug[else]explosive[end if] and rub it onto the back of the manifest. It might not be obvious at a quick glance, but if anyone goes through this in detail, the traces will be unmistakeable. At least that's the hope.[p]Your work done, you carefully seal up the envelope again, store it away in the chest, and tighten the hinges. Then you make your way back to your cabin. All you can do now is wait.";
        say "[p][tut]Press SPACE to continue[/tut]";
        wait for the SPACE key;
        if the ending crime is smuggling:
            have everyone arrested;
        otherwise:
            have everyone killed;
    otherwise if the ending instigator is Qarrad and the ending crime is not murder: [Qarrad has no compunctions about killing you if you reveal you know about the smuggling or the terrorism]
        if ending witnessed is true: [You showed it to her directly]
            say "Qarrad stops in her tracks. She stares down at your evidence. Then up at you. And there is no hint of sympathy and mercy in her eyes. You've just shown her that you know what [if the ending crime is smuggling]the crew is[else]she's[end if] doing, and as a result, you've just become an unacceptable risk.";
        otherwise:
            say "It doesn't take long for Qarrad to figure out who was responsible for this, and that [if the ending crime is smuggling]the crew's[else]her[end if] operation is being threatened. What you know has just become an unacceptable risk.";
        have the player killed by Qarrad;
    otherwise if the ending instigator is Bashti and the ending crime is murder: [Bashti will be desperate if you threaten him]
        if ending witnessed is true:
            say "Bashti looks down at the murder weapon, and all the color drains from his face. For a long moment he just [if the location is a crawlspace]kneels[else]stands[end if] there, paralyzed, as his body starts to shake more and more badly. He genuinely has no idea what to do.[p]And then the bone-deep panic, the knowledge that his life is on the line here, finally takes over. He might be just a kid, but right now, he's going to do whatever it takes to save his own life.";
        otherwise:
            say "When Bashti finds the murder weapon, his first response is to freeze. [i]Someone knows[/i]. Someone knows what he did, and when the ship lands, he might very well die for it.[p]He [if the location is a crawlspace]kneels[else]stands[end if] frozen there for almost a half hour before his mind can finally make the connection. There's only one person on the ship who might try to send a signal like this. And maybe, just maybe, he can keep you from telling anyone else.";
        have the player killed by Bashti;
    otherwise if the ending instigator is Ishme and the ending crime is murder: [Ishme will cover for Bashti if it comes down to it]
        say "When Ishme spots the murder weapon, her first thought is that this is another interruption she doesn't need, and she should probably let Qarrad deal with it. [p]Her second thought is that this might be the one thing more important than her work.[p]She grabs it and disappears, handling this investigation herself. And that's the last you see of it. A half hour later, you're being unceremoniously thrown into the lazarette without a word of explanation.";
        have the player silenced;
    otherwise if the ending crime is smuggling: [Everyone else responds the same way to smuggling]
        if ending witnessed is true:
            say "It takes [the ending instigator] a minute to realize what you're showing [them]. The moment [they] realizes, though, [they] drops whatever else [they]'s doing. The crew's spent the majority of the voyage focused on getting the [i]Mekhe-Irakkab[/i] to its destination in one piece, neglecting the task of keeping overly-nosy passengers out of the illegal cargo. But that's about to change.";
        otherwise:
            say "When [the ending instigator] comes across the evidence, [they] doesn't think anything of it. With everything else going wrong on the ship, it's not too unusual for one thing to have fallen out of place. [They]'s about to put it back in its place and move on as if nothing happened...when [they] realizes it's been opened.[p]From there it doesn't take long to put two and two together. It turns out, even during the final descent, the crew is able to spare enough time to keep an overly-nosy passenger from exposing their illegal smuggling.";
        have the player silenced;
    otherwise if the ending crime is terrorism: [Everyone else responds the same way to terrorism]
        if ending witnessed is true:
            say "[The ending instigator] stares at you for a moment[if the ending instigator is Bashti], trying to understand what he's seeing. Then something seems to click in his mind. He grabs the evidence from you and dashes away[else], not quite understanding. [They] takes the evidence, examines it closely, rubs a bit of the substance between [their] fingers experimentally[end if].[p]And then, before you know what's happened, you're being escorted back to your cabin and unceremoniously tossed in, the door locked behind you.";
        otherwise:
            say "When [the ending instigator] comes across the evidence[if the ending instigator is Bashti], it takes him a moment to realize what this means. Then he grabs it and dashes away[else], [they] doesn't immediately realize what [they]'s seeing. [They] picks it up curiously, examines it, rubs a bit of the substance experimentally between [their] fingers[end if]. You have just enough time to get back to the safety of your cabin before the consequences hit.";
        have Qarrad arrested;
    otherwise if the ending crime is murder: [Everyone else responds the same way to murder]
        if ending witnessed is true:
            say "When [the ending instigator] sees you with the shock-stick, [their] first priority is getting it out of your hands. You try to look as non-threatening as possible, and for a horrible moment it seems like you've just doomed yourself too.[p]But maybe the crew is fairer than they seemed. Instead of just throwing you in the brig, [if the ending instigator is Kasap]he takes it away to analyze[else][they] brings it to Kasap to be analyzed[end if].";
        otherwise:
            say "When [the ending instigator] comes across the shock-stick, it seems too convenient to be true. The murder weapon lying around in the open, overlooked until now? Did it get knocked out of its hiding place when the ship turned? Everyone had assumed Kiang threw it overboard.[p]But however it got there, it's evidence. Kasap starts analyzing it right away.";
        have Bashti arrested;
    otherwise:
        say "BUG - The combination of [ending instigator], [ending crime], and [ending witnessed] has no ending coded! Please report this!".
 
To have the player silenced:
    say "[p]If the crew overlooked you before, they're not making that same mistake again. You spend the rest of the voyage locked in the brig. Getting to see your brother again is a small comfort, but you both know what's going to happen the moment you land.[p]Did they know all along that Kiang was innocent? Did he, too, learn something he shouldn't? You may never know. They'll never give you the chance to ask.";
    end the story saying "You have been framed for murder".
 
To have the player killed by (the murderer - a person):
    if the murderer is Qarrad:
        say "[p]The end comes quickly, at least. Qarrad is brutally efficient when she has to be, and before the final descent you and Kiang have each met with a tragic accident. The rest of the crew is too preoccupied to notice.";
    else if the murderer is Bashti:
        say "[p]It's a messy, desperate act, just like Udan's death was. Bashti isn't a killer at heart, and he doesn't really know what he's doing. He just knows he can't let you share what you know. A wrench to the back of the head, and then a tragic fall from the rudder access to finish the job. They'll never find your body.";
    otherwise:
        say "BUG - How did you get killed by [the murderer]? Report this please!";
    end the story saying "You have been silenced".
 
To have Qarrad arrested:
    say "[p]The next half hour is a blur, as you strain your ears to make out what's happening. The footsteps resonating through the deck get faster as the whole crew is called together. Then there's a lot of shouting in Kishadu[--]and the sounds of a fight that seems to shake the entire ship, screams of desperation and the horrible echoes of a weapon going off. And then silence.[p]Qarrad didn't go quietly, but it was one against four. With Udan's help she might have overpowered them. Without him, she didn't stand a chance. The rest of the crew might be smugglers, but they're not terrorists, and none of them want to be associated with her when this comes to light.[p]Kiang is almost forgotten in the aftermath. Even if the crew can't understand him, there seems to be a tacit agreement that whatever happened to Udan was self-defense. When the ship lands, it's Qarrad who's taken away in chains, to whatever trial awaits; the two of you don't stick around to see the outcome. You're safe, and that's what matters.";
    end the story saying "Qarrad has been arrested".
 
To have Bashti arrested:
    say "[p]From the residues, he's able to figure out who used it last[--]and thankfully, his analysis doesn't point to you. Bashti tries to run, but Qarrad overpowers him easily. And in the resulting commotion, Kiang is unceremoniously released.[p]You can't understand anything they're saying as they reconstruct the murder, figure out how Bashti got out of the locked room, ignore his pleas as he tries to justify it. But when the ship lands, it's Bashti who's taken away to whatever trial awaits. You and Kiang don't stick around to see the outcome. You're safe, and that's what matters.";
    end the story saying "Bashti has been arrested".
 
To have everyone arrested:
    say "You can only imagine everything that happens when the ship lands. Some Kishadu customs inspector going over the manifest, taking their bribes and saying everything's all fine and good. Some boss or overseer going through the paperwork, and noticing those telltale stains you left...[p]All you know for sure is that the charges against Kiang are completely forgotten in the chaos. You don't know what will happen to the [i]Mekhe-Irakkab[/i] or its crew in court; probably a fine at the worst, and another round of bribes to make sure the matter drops. But you're home, and you're safe.";
    end the story saying "The crew has been arrested".
 
To have everyone killed:
    say "You can only imagine everything that happens when the ship lands. Some Kishadu customs inspector going over the manifest, being paid to overlook some minor smuggling. Nothing serious. And then finding illegal explosives smeared right across their paperwork. A full search of the ship until they discover that little crawlspace, and what's hidden in it...[p]All you know for sure is that you and Kiang are completely forgotten in the resulting chaos. The [i]Mekhe-Irakkab[/i] is seized by the Empire, and the last you hear of its crew, they're going to stand trial for terrorism. Udan might have gotten off lightly by comparison. But whatever happens to them, you and your brother are home, and you're safe.";
    end the story saying "The crew has been arrested".
 
To have Kiang arrested:
    say "Everything happens very quickly when the ship lands. The trial is quick and decisive. The body was found in a locked cabin; only Kiang had a key. And all your pleas fall on deaf ears. Without hard evidence, nobody wants to hear your speculation. Just like that, it's over and done.";
    end the story saying "Your brother has been convicted of murder".
 
Book 3 - Ending Triggers
 
Chapter 1 - Definitions
 
Definition: a thing is murder evidence if it is the shock stick.
Definition: a thing is smuggling evidence if it is an open netted-thing or it is the strange grain or it is the strange powder or it is the pinch of grain or it is the pinch of powder. [Doesn't count as evidence unless it's been unsealed]
Definition: a thing is terrorism evidence if it is the lone parcel or it is the strange substance or it is the pinch of clay.
Definition: a thing is evidence if it is murder evidence or it is smuggling evidence or it is terrorism evidence.
 
[Avoid some annoying redirections right at the end of the game]
The can't show what you haven't got rule does nothing when the noun is smuggling evidence.
The can't give what you haven't got rule does nothing when the noun is smuggling evidence.
 
Definition: a room is private rather than public:
    if it is a crawlspace, yes;
    if it is the Passenger Cabin, yes;
    no.
 
To decide what person is the eventual witness for (the place - a room):
    if the place is private, say "BUG - There should be no witness for [place] since it is private! Please report this!";
    if the place is in the Tutorial Area, decide on Ishme;
    if the place is the Gunnery or the place is the Mess or the place is Bashti's Cabin, decide on Bashti;
    if the place is in the Upper Area, decide on Qarrad;
    if the place is the Surgery or the place is Kasap's Cabin or the place is the Miscellany, decide on Kasap;
    if the place is in the Lower Area, decide on Shimat;
    say "BUG - No witness is assigned to [place]! Please report this!".
 
To decide what crime is the crime asserted by (proof - a thing): [I'm sure there's a better way to do this but I'm on a deadline and I need it to work more than I need elegance rn]
    if the proof is smuggling evidence, decide on smuggling;
    if the proof is terrorism evidence, decide on terrorism;
    if the proof is murder evidence, decide on murder;
    say "BUG - Trying to decide what crime is asserted by [the proof] but it is not evidence!".
 
Chapter 2 - Dropping, Showing
 
To say were: [This is a hack but I have one day left]
    if the prior naming context is plural, say "were";
    otherwise say "was".
 
Dropping evidence is disposing of evidence.
Inserting evidence into something is disposing of evidence.
Putting evidence on something is disposing of evidence.
 
Instead of disposing of evidence when the location is public:
    let the witness be the eventual witness for the location;
    say "You hesitate for a moment. [The noun] [were] hidden for a reason, and if you leave [them] here, [the witness] is likely to stumble across [regarding the noun][them]. Are you sure you want [regarding the witness][them] to see this?";
    if the player consents:
        commence the endgame with the witness seeing the crime asserted by the noun, not witnessed;
    otherwise:
        say "You decide not to reveal this evidence quite yet."
 
Before waving something in the presence of another person (called the witness): try showing the noun to the witness instead.
 
Instead of giving or showing evidence to another person:
    say "You hesitate for a moment. [The noun] [were] hidden for a reason. Are you sure you want [the second noun] to see this?";
    if the player consents:
        commence the endgame with the second noun seeing the crime asserted by the noun, witnessed;
    otherwise:
        say "You decide not to reveal this evidence quite yet."
 
Instead of disposing of evidence in the presence of another person (called the witness):
    say "You hesitate for a moment. [The noun] [were] hidden for a reason, and [the witness] is sure to see [regarding the noun][them]. Are you sure you want [regarding the witness][them] to see this?";
    if the player consents:
        commence the endgame with the witness seeing the crime asserted by the noun, witnessed;
    otherwise:
        say "You decide not to reveal this evidence quite yet."
 
Chapter 3 - Getting Caught With It
 
Instead of someone confiscating evidence from the player:
    say "[The actor] spots [the noun] in your hands...";
    commence the endgame with the actor seeing the crime asserted by the noun, witnessed.
 
Before going to a room that contains a confiscatory person (called the potential witness) when the player is carrying an unconcealable evidence thing (called the proof):
    say "You hesitate for a moment. [The potential witness] is in there, and [the proof] [are] too big to hide from [regarding the potential witness][them]. Are you sure you want [them] to see this?";
    unless the player consents:
        say "You decide not to reveal this evidence quite yet.";
        stop the action.
 
Before going from a private room when the player is carrying an unconcealable evidence thing (called the proof):
    say "Now that [the proof] is open, it's evidence that you know what the crew is up to. Are you sure you want to take it back out into a public area?";
    unless the player consents:
        say "You decide not to bring it out just yet.";
        stop the action.
 
Chapter 3 - Customs Inspection
 
To contaminate the manifest with (the sample - a substance):
    let the evidenced crime be smuggling; [Can't use a simple if-otherwise sadly]
    if the sample is the pinch of clay:
        let the evidenced crime be terrorism;
    say "You hesitate for a moment. If you contaminate the manifest with [the sample], the customs inspector can't miss it. It'll be clear evidence that the [i]Mekhe-Irrakab[/i] is doing something illegal. Are you sure you want them to see this?";
    if the player consents:
        commence the endgame with the customs inspector seeing the evidenced crime, not witnessed;
    otherwise:
        say "You decide not to reveal this evidence quite yet."
 
Instead of putting a substance on something when the second noun is the manifest or the second noun is the envelope:
    contaminate the manifest with the noun.
 
Definition: something is manifesty if it is the manifest or it is the envelope.
Definition: something is substancey if it is a supply and the output of it is a substance.
 
Instead of inserting a manifesty thing into a substancey thing:
    let the result be the output of the second noun;
    contaminate the manifest with the result.
 
Instead of inserting a manifesty thing into a container that contains a substancey thing (called the sample):
    let the result be the output of the sample;
    contaminate the manifest with the result.
 
First instead of inserting a substance into the envelope:
    contaminate the manifest with the noun.
 
Understand "rub [something preferably held] on [something]" as putting it on.
 
Chapter 4 - Going to Sleep
 
Instead of entering the makeshift bunk: try sleeping.
 
Instead of sleeping when the location is the Passenger Cabin:
    say "You hesitate for a moment. You could just go to sleep, and let this all play out without any further interference. But if you do, you won't have another chance to prove Kiang innocent. Are you sure you want to do this?";
    if the player consents:
        commence the endgame with Kiang seeing murder, not witnessed;
    otherwise:
        say "You decide to remain awake a while longer."
 
Instead of sleeping:
    say "This isn't an ideal place for the crew to find you fast asleep."
 
Volume IV - Debugging and Such
 
Book 0 - Things that have to come at the end
 
Kiang is a familiar analyzed man. [Off-stage]
 
The crew muster is initially {Shimat, Kasap, Ishme, Bashti, Qarrad, Udan, Kiang}. [Easier than forcing it to sort in the right order any other way]
 
Book 1 - Debug Verbs
 
Chapter 1 - Xyzzy
 
Debug-bypassing is an action out of world applying to one visible thing. Understand "xxyzzy [any human]" as debug-bypassing.
 
Carry out debug-bypassing yourself:
    say "You speak the incantation and information appears before you in glowing green letters:[br]XXYZZY ISHME gives you the crowbar[br]XXYZZY QARRAD gives you the toolbox[br]XXYZZY BASHTI unlocks all the doors, including the staircase and the crawl hatches[br]XXYZZY SHIMAT moves her chest out of her cabin[br]XXYZZY KASAP unlocks the spectrometer[br]XXYZZY UDAN gives you all the pieces of evidence[br]XXYZZY KIANG fills out your journal completely[p]".
 
Carry out debug-bypassing Ishme:
    now the player carries the crowbar;
    say "A puff of smoke twists and reshapes into a surprisingly solid crowbar in your hand!".
 
Carry out debug-bypassing Qarrad:
    now the player carries the toolbox;
    now the toolbox is open;
    say "A shimmering portal opens in front of you and a toolbox falls through into your arms, opened by magic!".
 
Carry out debug-bypassing Bashti:
    now every door is unlocked;
    now the tripod is closed;
    say "A series of clicks and clacks resound through the ship as every door comes unlocked at once!".
 
Carry out debug-bypassing Shimat:
    now the metal chest is in the Lower Deck;
    now the metal chest is unlocked;
    say "There's an effervescent sort of sound as the metal chest transforms into shimmering light and reconstitutes, unlocked, in the Lower Deck!".
 
Carry out debug-bypassing Kasap:
    now the flame spectrometer is understood;
    say "Knowledge floods your mind and you suddenly understand how to operate a flame spectrometer!".
 
Carry out debug-bypassing Udan:
    now the player carries the lone cask;
    now the player carries the lone box;
    now the player carries the lone parcel;
    now the player carries the shock stick;
    say "You feel briefly faint, and when you're aware of your surroundings again, you're carrying a lot of evidence!".
 
Carry out debug-bypassing Kiang:
    say "Your tablet floats in the air as sketches of every character are magically filled in! And everyone starts moving around, too.";
    now every human is seen;
    now Shimat is active;
    now Kasap is active;
    now Qarrad is active;
    now Ishme is active;
    now Bashti is active.
 
Understand "xxyzzy" as a mistake ("You intone the magic word of debugging and information floods into your mind: [i]use XXYZZY (PERSON) to bypass the puzzles associated with them and XXYZZY ME to see what exactly this will do[/i].").
 
Understand "xyzzy" as a mistake ("You still haven't gotten the hang of Imperial words. Why does anyone think it's a good idea to have that many consonants all bunched together?"). [Imperial is apparently Hittite]
Understand "plugh" as a mistake ("Imperial words are bad, but Habisshe words are worse. What kind of sound is 'gh', anyway?"). [And Habisshe is Ugaritic]
 
Book 2 - Meta Information
 
Requesting information is an action out of world applying to nothing. Understand "about" and "credits" and "info" and "help" and "hint" as requesting information.
 
Carry out requesting information: say "If you're new to this sort of interactive fiction, type TUTORIAL within the beginning segment for an introduction to the genre. You can also use VERBS or COMMANDS to see a list of commands needed for this game.[p]Detailed hints and a deck plan of the ship are included with the game file. If you're playing online, they're linked at the top of the page.[p]This game was written and designed by Daniel Stelzer, illustrated by Elisabeth Tricou, and tested by Mel Jason, Arthur DiBianca, Aster Fialla, Jade, Max Fog, Ramona Gore, and Lance Cirone."
 
Listing verbs is an action out of world applying to nothing. Understand "verbs" and "commands" as listing verbs.
 
Carry out listing verbs: say "Verbs you'll need in this game:[br]- GO a direction[br]- LOOK[br]- EXAMINE (X) something[br]- TAKE something[br]- DROP something[br]- INVENTORY (I)[br]- PUT something IN or ON something[br]- OPEN something (WITH something)[br]- CLOSE something[br]- PUSH something (in a direction)[br]- PULL something[br]- BREAK or SABOTAGE something[br]- WEAR something[br]- HIDE UNDER/BEHIND/ON something[br]- GIVE or SHOW something TO someone[p]Many more are understood, but only these are needed to complete the game.".
 
Understand "/ [text]" or "* [text]" as a mistake ("(Noted.)").
 
Understand "time" as a mistake ("You're not sure what time it is exactly. But as best you can tell, you only have a few hours until the ship lands."). [Which hopefully conveys that there's no specific time limit in the game]
 
Understand "map" as a mistake ("If you downloaded the game, you'll find a map of the ship in the files. If you're playing it online, there should be a link at the top of the page.").
 
Understand "look around" as looking. [What section was this supposed to go in? I have no idea how it ended up at the end, but the IDE sometimes does this…]