Hadean Lands: HL Game Goals

Copyright 2014-6 by Andrew Plotkin.

This source code is provided for personal, educational use only. The story and text of Hadean Lands belong to me; you may not use them or create derivative works which contain them. However, you have permission to use the programming techniques of this game in your own works, and you may use the source code excluding game text.



Version 1 of HL Game Goals by Andrew Plotkin begins here.
 
Use authorial modesty.
 
 
Chapter - Zones
 
A room-goal can be easterly-zone or westerly-zone. A room-goal is usually westerly-zone.
 
The 2nd-lab-zone is an easterly-zone room-goal. The canon-room is 2nd-Lab.
The lab-crawl-zone is an easterly-zone room-goal. The canon-room is Mech-Crawl.
The herbarium-zone is an easterly-zone room-goal. The canon-room is Herbarium.
The mech-lab-zone is an easterly-zone room-goal. The canon-room is Mech-Lab.
The chem-lab-zone is an easterly-zone room-goal. The canon-room is Chem-Lab.
The opt-lab-zone is an easterly-zone room-goal. The canon-room is Opt-Lab.
The opt-closet-zone is an easterly-zone room-goal. The canon-room is Opt-Closet.
The fire-lab-zone is an easterly-zone room-goal. The canon-room is Fire-Lab.
The safe-store-zone is an easterly-zone room-goal. The canon-room is Safe-Store.
The 3rd-lab-zone is an easterly-zone room-goal. The canon-room is 3rd-Lab.
The lab-hall-zone is an easterly-zone room-goal. The canon-room is Lab-Wing-Hall.
The core-hall-zone is a room-goal. The canon-room is Nave.
The nave-crawl-zone is a room-goal. The canon-room is Nave-Crawl.
The med-wing-zone is a room-goal. The canon-room is Med-Wing.
The cap-quarters-zone is a room-goal. The canon-room is Captain-Quarters.
The rec-quarters-zone is a room-goal. The canon-room is Rector-Quarters.
The arms-quarters-zone is a room-goal. The canon-room is Arms-Quarters.
The dressing-room-zone is a room-goal. The canon-room is Dressing-Room.
The scaphe-bay-zone is a room-goal. The canon-room is Scaphe-Bay.
The scaphe-zone is a room-goal. The canon-room is Exoscaphe.
The scaphe-dome-zone is a room-goal. The canon-room is Scaphe-Dome.
The garden-zone is a room-goal. The canon-room is Garden.
The garden-maze-zone is a room-goal. The canon-room is Garden-Maze-Center.
The observatory-zone is a room-goal. The canon-room is Observatory.
The aithery-zone is a room-goal. The canon-room is Aithery.
The barosy-zone is a room-goal. The canon-room is Barosy.
The birdhouse-zone is a room-goal. The canon-room is Birdhouse.
The basement-zone is a room-goal. The canon-room is Basement.
The mineral-end-zone is a room-goal. The canon-room is Mineral-End.
The deep-stacks-zone is a room-goal. The canon-room is Deep-Stacks.
The chancel-pre1-zone is a room-goal. The canon-room is Charred-End.
The chancel-pre2-zone is a room-goal. The canon-room is Antechamber.
The chancel-zone is a room-goal. The canon-room is Chancel.
The phleg-lab-zone is a room-goal. The canon-room is Phleg-Lab.
The airlock-zone is a room-goal. The canon-room is Airlock.
The outside-zone is a room-goal. The canon-room is Out-Plain.
The out-airlock-zone is a room-goal. The canon-room is Out-Airlock.
The out-chamber-zone is a room-goal. The canon-room is Out-Chamber.
The out-store-zone is a room-goal. The canon-room is Out-Store.
 
Definition: a room-goal is a hadean-zone if it is the outside-zone or it is the out-airlock-zone or it is the out-chamber-zone or it is the out-store-zone.
 
 
Section - Zone Step Rules
 
Zone step rule for 2nd-lab-zone:
    let targetzone be the zone-step-target of goalstate;
    if Syndesis is fixed:
        [mostly, head out the door]
        if targetzone is not lab-crawl-zone and targetzone is not herbarium-zone and targetzone is not mech-lab-zone:
            rule succeeds with result lab-hall-zone;
        [but the named zones fall through...]
    [otherwise, down the hatch]
    if 2nd-hatch is closed:
        require-or-fail the g-2nd-hatch;
    rule succeeds with result lab-crawl-zone.
 
Zone step rule for lab-crawl-zone:
    let targetzone be the zone-step-target of goalstate;
    if targetzone is 2nd-lab-zone:
        if 2nd-hatch is closed:
            require-or-fail the g-2nd-hatch;
        rule succeeds with result targetzone;
    if targetzone is herbarium-zone:
        if herb-hatch is closed:
            require-or-fail the g-herb-hatch;
        rule succeeds with result targetzone;
    if targetzone is chem-lab-zone:
        if chem-hatch is closed:
            require-or-fail the g-chem-hatch;
        rule succeeds with result targetzone;
    [default: towards mech-lab-zone]
    if mech-hatch is closed:
        require-or-fail the g-mech-hatch;
    rule succeeds with result mech-lab-zone.
 
Zone step rule for herbarium-zone:
    [dead end zone]
    let targetzone be the zone-step-target of goalstate;
    if herb-hatch is closed:
        require-or-fail the g-herb-hatch;
    rule succeeds with result lab-crawl-zone.
 
Zone step rule for chem-lab-zone:
    let targetzone be the zone-step-target of goalstate;
    if Syndesis is fixed:
        [mostly, head out the door]
        if targetzone is not lab-crawl-zone and targetzone is not herbarium-zone and targetzone is not mech-lab-zone:
            rule succeeds with result lab-hall-zone;
        if chem-hatch is closed:
            [can't be opened from above, so we *must* go out the door]
            rule succeeds with result lab-hall-zone;
        [but the named zones fall through...]
    [otherwise, down the hatch]
    if chem-hatch is closed:
        require-or-fail the g-chem-hatch;
    rule succeeds with result lab-crawl-zone.
 
Zone step rule for mech-lab-zone:
    let targetzone be the zone-step-target of goalstate;
    if targetzone is 2nd-lab-zone or targetzone is lab-crawl-zone or targetzone is herbarium-zone or targetzone is chem-lab-zone:
        if mech-hatch is closed:
            require-or-fail the g-mech-hatch;
        rule succeeds with result lab-crawl-zone;
    if mech-door is closed:
        require-or-fail the g-mech-door;
    rule succeeds with result lab-hall-zone.
 
Zone step rule for lab-hall-zone:
    let targetzone be the zone-step-target of goalstate;
    if Syndesis is fixed and targetzone is chem-lab-zone:
        [can go through door directly]
        rule succeeds with result chem-lab-zone;
    if Syndesis is fixed and targetzone is 2nd-lab-zone:
        [can go through door directly]
        rule succeeds with result 2nd-lab-zone;
    if targetzone is mech-lab-zone or targetzone is 2nd-lab-zone or targetzone is lab-crawl-zone or targetzone is herbarium-zone or targetzone is chem-lab-zone:
        if Syndesis is fixed and mech-door is dirty:
            [in through the lab door]
            rule succeeds with result 2nd-lab-zone;
        if mech-door is closed:
            require-or-fail the g-mech-door;
        rule succeeds with result mech-lab-zone;
    if targetzone is opt-lab-zone or targetzone is opt-closet-zone:
        if opt-door is closed:
            require-or-fail the g-opt-door;
        rule succeeds with result opt-lab-zone;
    [easy adjacent zones...]
    if targetzone is fire-lab-zone:
        if fire-door is closed:
            require-or-fail the g-fire-door;
        rule succeeds with result targetzone;
    if targetzone is safe-store-zone:
        if store-door is closed:
            require-or-fail the g-store-door;
        rule succeeds with result targetzone;
    if targetzone is 3rd-lab-zone:
        if 3rd-door is closed:
            require-or-fail the g-3rd-door;
        rule succeeds with result targetzone;
    if targetzone is westerly-zone: [including core-hall-zone]
        [This should cover every other zone, really.]
        if hall-door is closed:
            require-or-fail the g-hall-door;
        rule succeeds with result core-hall-zone;
    say "(BUG) Unnamed easterly zone in lab-hall-zone step rule.";
    rule fails.
 
Zone step rule for core-hall-zone:
    let targetzone be the zone-step-target of goalstate;
    if targetzone is easterly-zone: [including lab-hall-zone]
        if hall-door is closed:
            require-or-fail the g-hall-door;
        rule succeeds with result lab-hall-zone;
    if targetzone is dressing-room-zone:
        if marble-door is closed:
            require-or-fail the g-marble-door;
        rule succeeds with result targetzone;
    if targetzone is med-wing-zone:
        require-or-fail the g-in-med-wing;
        rule succeeds with result targetzone;
    if targetzone is cap-quarters-zone:
        require-or-fail the g-capq-door;
        rule succeeds with result targetzone;
    if targetzone is rec-quarters-zone:
        require-or-fail the g-recq-door;
        rule succeeds with result targetzone;
    if targetzone is arms-quarters-zone:
        require-or-fail the g-armsq-door;
        rule succeeds with result targetzone;
    if targetzone is scaphe-bay-zone:
        require-or-fail the g-scaphe-view-window;
        rule succeeds with result targetzone;
    if targetzone is scaphe-zone or targetzone is scaphe-dome-zone:
        if scaphe-port is closed:
            require-or-fail the g-scaphe-port;
        rule succeeds with result scaphe-zone;
    if targetzone is airlock-zone:
        if inner-door is closed:
            require-or-fail the g-airlock-inner-door;
        rule succeeds with result targetzone;
    if targetzone is nave-crawl-zone:
        if initial-marriage is false:
            say "You're not sure how to proceed.";
            rule fails;
        rule succeeds with result targetzone;
    if targetzone is a hadean-zone:
        if Pneuma is fixed and g-airlock-outer-door is ever-done and the atmosphere of the Airlock is not vacuum-atm:
            if inner-door is closed:
                require-or-fail the g-airlock-inner-door;
            rule succeeds with result airlock-zone;
        if g-portico-window is ever-done:
            require-or-fail the g-portico-window;
            rule succeeds with result outside-zone;
        say "You're not sure how to get out there.";
        rule fails;
    if targetzone is observatory-zone or targetzone is aithery-zone:
        if obs-door is locked:
            require-or-fail the g-flood-crawlway;
            [We do the stash-and-runaround trick *if* the player has ever opened the obs-door. They almost certainly have.]
            if g-obs-door is not ever-done:
                say "You swim through the flooded crawlway.";
                perform inventory moisturization in Scaphe-Crawl;
            else:
                let N be the raw contents count of the player;
                if N is zero:
                    say "You swim through the flooded crawlway and then unlock the observatory door from the inside.";
                else:
                    say "You stash your possession[if N is not 1]s[end if], swim through the flooded crawlway, unlock the observatory door from the inside, and then retrieve your possession[if N is not 1]s[end if].";
                now the obs-door is unlocked;
                now the obs-door is open;
            rule succeeds with result observatory-zone;
        [go in through the door]
        rule succeeds with result garden-zone;
    [every other zone...]
    rule succeeds with result garden-zone.
 
Zone step rule for opt-lab-zone:
    let targetzone be the zone-step-target of goalstate;
    if targetzone is opt-closet-zone:
        require-or-fail the g-optcloset-door; [always open, but check syn-gap state]
        rule succeeds with result opt-closet-zone;
    [every other zone...]
    if opt-door is closed:
        require-or-fail the g-opt-door;
    rule succeeds with result lab-hall-zone.
 
Zone step rule for opt-closet-zone:
    [dead end zone]
    let targetzone be the zone-step-target of goalstate;
    require-or-fail the g-optcloset-door; [always open, but check syn-gap state]
    rule succeeds with result opt-lab-zone.
 
Zone step rule for fire-lab-zone:
    [dead end zone]
    let targetzone be the zone-step-target of goalstate;
    if fire-door is closed:
        require-or-fail the g-fire-door;
    rule succeeds with result lab-hall-zone.
 
Zone step rule for safe-store-zone:
    [dead end zone]
    let targetzone be the zone-step-target of goalstate;
    if store-door is closed:
        require-or-fail the g-store-door;
    rule succeeds with result lab-hall-zone.
 
Zone step rule for 3rd-lab-zone:
    [dead end zone]
    let targetzone be the zone-step-target of goalstate;
    if 3rd-door is closed:
        require-or-fail the g-3rd-door;
    rule succeeds with result lab-hall-zone.
 
Zone step rule for cap-quarters-zone:
    [dead end zone]
    let targetzone be the zone-step-target of goalstate;
    if capq-door is closed:
        require-or-fail the g-capq-door;
    rule succeeds with result core-hall-zone.
 
Zone step rule for rec-quarters-zone:
    [dead end zone]
    let targetzone be the zone-step-target of goalstate;
    if recq-door is closed:
        require-or-fail the g-recq-door;
    rule succeeds with result core-hall-zone.
 
Zone step rule for arms-quarters-zone:
    [dead end zone]
    let targetzone be the zone-step-target of goalstate;
    require-or-fail the g-armsq-door; [always open, but check syn-gap state]
    rule succeeds with result core-hall-zone.
 
Zone step rule for dressing-room-zone:
    [dead end zone]
    let targetzone be the zone-step-target of goalstate;
    if marble-door is closed:
        require-or-fail the g-marble-door;
    rule succeeds with result core-hall-zone.
 
Zone step rule for nave-crawl-zone:
    [dead end zone]
    let targetzone be the zone-step-target of goalstate;
    rule succeeds with result core-hall-zone.
 
Zone step rule for med-wing-zone:
    [dead end zone]
    let targetzone be the zone-step-target of goalstate;
    require-or-fail the g-out-med-wing;
    rule succeeds with result core-hall-zone.
 
Zone step rule for scaphe-bay-zone:
    [dead end zone]
    let targetzone be the zone-step-target of goalstate;
    require-or-fail the g-scaphe-view-window;
    rule succeeds with result core-hall-zone.
 
Zone step rule for scaphe-zone:
    let targetzone be the zone-step-target of goalstate;
    if targetzone is scaphe-dome-zone:
        if dome-hatch is closed:
            require-or-fail the g-dome-hatch;
        rule succeeds with result scaphe-dome-zone;
    if scaphe-port is closed:
        require-or-fail the g-scaphe-port;
    rule succeeds with result core-hall-zone.
 
Zone step rule for scaphe-dome-zone:
    [dead end zone]
    let targetzone be the zone-step-target of goalstate;
    if dome-hatch is closed:
        require-or-fail the g-dome-hatch;
    rule succeeds with result scaphe-zone.
 
Zone step rule for airlock-zone:
    let targetzone be the zone-step-target of goalstate;
    if targetzone is a hadean-zone:
        if Pneuma is fixed and g-airlock-outer-door is ever-done:
            if outer-door is closed:
                require-or-fail the g-airlock-outer-door;
            rule succeeds with result outside-zone;
        [...else fall through to core-hall-zone]
    if inner-door is closed:
        require-or-fail the g-airlock-inner-door;
    rule succeeds with result core-hall-zone.
 
Zone step rule for outside-zone:
    let targetzone be the zone-step-target of goalstate;
    if targetzone is out-airlock-zone or targetzone is out-chamber-zone or targetzone is out-store-zone:
        if alien-outer-door is closed:
            require-or-fail the g-alien-outer-door;
            say "You invoke the [em]caudex[/em] pattern to open the outer door.";
        rule succeeds with result out-airlock-zone;
    if Pneuma is fixed and g-airlock-outer-door is ever-done and the atmosphere of the Airlock is vacuum-atm:
        if outer-door is closed:
            require-or-fail the g-airlock-outer-door;
        rule succeeds with result airlock-zone;
    if g-portico-window is ever-done:
        require-or-fail the g-portico-window;
        rule succeeds with result core-hall-zone;
    say "You're not sure how to get in there.";
    rule fails.
 
Zone step rule for out-airlock-zone:
    let targetzone be the zone-step-target of goalstate;
    if targetzone is out-chamber-zone or targetzone is out-store-zone:
        if aither-survival-goal is ever-done:
            [This goal, unusually, is only required if it's known. Otherwise the player can freely get himself killed.]
            if aither-potion-remaining is zero:
                require-or-fail aither-survival-goal;
        [If alien-inner-door is open, but we haven't drunk the aither potion, would this lead to a bad state? It seems to be okay, because going out for the potion involves closing the inner door.]
        if alien-inner-door is closed:
            require-or-fail the g-alien-inner-door;
            say "You invoke the [em]radix[/em] pattern to open the inner door.";
        rule succeeds with result out-chamber-zone;
    if alien-outer-door is closed:
        require-or-fail the g-alien-outer-door;
        say "You invoke the [em]caudex[/em] pattern to open the outer door.";
    rule succeeds with result outside-zone.
 
Zone step rule for out-chamber-zone:
    let targetzone be the zone-step-target of goalstate;
    if targetzone is out-store-zone:
        require-or-fail the g-alien-window;
        rule succeeds with result out-store-zone;
    if alien-inner-door is closed:
        say "(BUG) out-chamber-zone: inner door is closed.";
        rule fails;
    [If we're in the ship, the alien-inner-airlock door must be open.]
    rule succeeds with result out-airlock-zone.
 
Zone step rule for out-store-zone:
    [dead end zone]
    let targetzone be the zone-step-target of goalstate;
    require-or-fail the g-alien-window;
    rule succeeds with result out-chamber-zone.
 
Zone step rule for garden-zone:
    let targetzone be the zone-step-target of goalstate;
    if targetzone is barosy-zone and g-maze-center is bypassed and the g-baros-crawl is ever-done and the key-used of g-baros-door is not baros-key:
        [special case: bypass baros-door through the maze. (Same rules as garden-maze, below.)]
        require-or-fail the g-maze-center;
        rule succeeds with result garden-maze-zone;
    if targetzone is basement-zone or targetzone is barosy-zone or targetzone is phleg-lab-zone or targetzone is mineral-end-zone or targetzone is deep-stacks-zone:
        rule succeeds with result basement-zone;
    if targetzone is garden-maze-zone and g-maze-center is not bypassed and the g-baros-crawl is ever-done and the key-used of g-baros-door is baros-key:
        [special case: bypass maze through the Barosy.]
        rule succeeds with result basement-zone;
    if targetzone is garden-maze-zone:
        require-or-fail the g-maze-center;
        rule succeeds with result garden-maze-zone;
    if targetzone is chancel-pre1-zone or targetzone is chancel-pre2-zone or targetzone is chancel-zone:
        if charred-hall-alight:
            require-or-fail the g-charred-hall;
        if charred-hall-alight: [if still alight...]
            say "You step into the inferno, untouched.";
            perform inventory incineration in in-inferno;
            [### conceivably we should abort the goal here. If depth is > 1?]
        rule succeeds with result chancel-pre1-zone;
    if targetzone is birdhouse-zone:
        if bird-door is closed:
            require-or-fail the g-bird-door;
        rule succeeds with result birdhouse-zone;
    if targetzone is observatory-zone or targetzone is aithery-zone:
        if obs-door is locked:
            [go in through g-flood-crawlway]
            rule succeeds with result core-hall-zone;
        if obs-door is closed:
            require-or-fail the g-obs-door;
        rule succeeds with result observatory-zone;
    [every other zone...]
    rule succeeds with result core-hall-zone.
 
Zone step rule for garden-maze-zone:
    let targetzone be the zone-step-target of goalstate;
    [dead end zone *unless* baros-crawl is open]
    if targetzone is barosy-zone and g-baros-crawl is ever-done:
        require-or-fail the g-baros-crawl;
        rule succeeds with result barosy-zone;
    [the maze is always leavable, so we need no other conditions here.]
    rule succeeds with result garden-zone.
 
Zone step rule for observatory-zone:
    let targetzone be the zone-step-target of goalstate;
    if targetzone is aithery-zone:
        if the counterweight is fastened:
            require-or-fail the g-bridge-ladder;
        rule succeeds with result aithery-zone;
    [every other zone... (we don't try to use the crawlway to exit)]
    if obs-door is closed:
        require-or-fail the g-obs-door;
    rule succeeds with result garden-zone.
 
Zone step rule for aithery-zone:
    [dead end zone]
    let targetzone be the zone-step-target of goalstate;
    if the counterweight is fastened:
        say "(BUG) Got to Aithery with counterweight fastened.";
        rule fails;
    rule succeeds with result observatory-zone.
 
Zone step rule for birdhouse-zone:
    [dead end zone]
    let targetzone be the zone-step-target of goalstate;
    if bird-door is closed:
        require-or-fail the g-bird-door;
    rule succeeds with result garden-zone.
 
Zone step rule for chancel-pre1-zone:
    let targetzone be the zone-step-target of goalstate;
    if targetzone is chancel-pre2-zone or targetzone is chancel-zone:
        if obsidian-door is closed:
            require-or-fail the g-obsidian-door;
        rule succeeds with result chancel-pre2-zone;
    rule succeeds with result garden-zone.
 
Zone step rule for chancel-pre2-zone:
    let targetzone be the zone-step-target of goalstate;
    if targetzone is chancel-zone:
        if ante-door is closed:
            require-or-fail the g-ante-door;
        rule succeeds with result chancel-zone;
    if charred-hall-alight:
        say "(BUG) Got into Antechamber while Burning Hall alight.";
        rule fails;
    rule succeeds with result chancel-pre1-zone.
 
Zone step rule for chancel-zone:
    [dead end zone]
    let targetzone be the zone-step-target of goalstate;
    if ante-door is closed:
        require-or-fail the g-ante-door;
    rule succeeds with result chancel-pre2-zone.
 
Zone step rule for basement-zone:
    let targetzone be the zone-step-target of goalstate;
    if targetzone is garden-maze-zone and g-maze-center is not bypassed and the g-baros-crawl is ever-done and the key-used of g-baros-door is baros-key:
        [special case: bypass maze through the Barosy. Same rules as barosy case.]
        if baros-door is closed:
            require-or-fail the g-baros-door;
        rule succeeds with result barosy-zone;
    if targetzone is barosy-zone and g-maze-center is bypassed and the g-baros-crawl is ever-done and the key-used of g-baros-door is not baros-key:
        [special case: bypass baros-door through the maze.]
        rule succeeds with result garden-zone;
    if targetzone is barosy-zone:
        if baros-door is closed:
            require-or-fail the g-baros-door;
        rule succeeds with result barosy-zone;
    if targetzone is deep-stacks-zone:
        if deep-door is closed:
            require-or-fail the g-deep-door;
        rule succeeds with result deep-stacks-zone;
    if targetzone is phleg-lab-zone:
        if  Baros is not fixed:
            say "(BUG) Trying to reach phleg-lab-zone while gravity is unstable.";
            rule fails;
        rule succeeds with result targetzone;
    if targetzone is mineral-end-zone:
        if  Aistheta is not fixed:
            say "(BUG) Trying to reach mineral-end-zone while direction is unstable.";
            rule fails;
        rule succeeds with result targetzone;
    [every other zone...]
    rule succeeds with result garden-zone.
 
Zone step rule for barosy-zone:
    [dead end zone *unless* the baros-crawl is open]
    let targetzone be the zone-step-target of goalstate;
    if targetzone is garden-maze-zone and g-baros-crawl is ever-done:
        require-or-fail the g-baros-crawl;
        rule succeeds with result garden-maze-zone;
    if baros-door is closed and g-baros-crawl is ever-done:
        [use the crawl and maze-exit to bypass the door]
        require-or-fail the g-baros-crawl;
        rule succeeds with result garden-maze-zone;
    if baros-door is closed:
        require-or-fail the g-baros-door;
    rule succeeds with result basement-zone.
 
Zone step rule for mineral-end-zone:
    [dead end zone]
    let targetzone be the zone-step-target of goalstate;
    rule succeeds with result basement-zone.
 
Zone step rule for deep-stacks-zone:
    [dead end zone]
    let targetzone be the zone-step-target of goalstate;
    if deep-door is closed:
        require-or-fail the g-deep-door;
    rule succeeds with result basement-zone.
 
Zone step rule for phleg-lab-zone:
    [dead end zone]
    let targetzone be the zone-step-target of goalstate;
    rule succeeds with result basement-zone.
 
 
Chapter - Action Goals
 
A door has an action-goal called the opening-goal. The opening-goal of a door is usually impossible-goal.
 
Carry out opening a door (called D):
    let G be the opening-goal of D;
    if G is not impossible-goal:
        now G is ever-done.
 
Carry out closing a door (called D):
    let G be the opening-goal of D;
    if G is not impossible-goal:
        now G is ever-done.
 
The g-2nd-hatch is an action-goal. The short-description is "open the Secondary Lab hatch".
Goal prereqs rule for g-2nd-hatch:
    if the 2nd-hatch is dirty:
        require-or-fail the unrust-steel-inscription;
        require-or-fail the steel-bolt;
    if goalstate is not hypothetical:
        if the current zone is 2nd-lab-zone:
            require-or-fail the 2nd-Lab;
        else:
            require-or-fail the 2nd-Crawl;
        if the 2nd-hatch is dirty:
            now the 2nd-hatch is clean;
            uninscribe the steel-bolt;
            say "You lay the steel bolt on the hatch.";
        now the 2nd-hatch is ever-tried;
        now the 2nd-hatch is open;
        [don't auto-drop the steel-bolt -- nostalgia]
    rule succeeds.
 
The g-mech-hatch is an action-goal. The short-description is "open the Mechanica Lab hatch".
Goal prereqs rule for g-mech-hatch:
    if the mech-hatch is dirty:
        require-or-fail the super-unrust-steel-inscription;
        require-or-fail the steel-bolt;
    if goalstate is not hypothetical:
        if the current zone is mech-lab-zone:
            [the above condition might need to be fancier for wacky syn-fixed start cases?]
            require-or-fail the Mech-Lab;
        else:
            require-or-fail the Mech-Crawl;
        if the mech-hatch is dirty:
            now the mech-hatch is clean;
            uninscribe the steel-bolt;
            say "You lay the steel bolt on the hatch.";
        now the mech-hatch is open;
        [don't auto-drop the steel-bolt -- nostalgia]
    rule succeeds.
 
The g-herb-hatch is an action-goal. The short-description is "open the Herbarium hatch".
Goal prereqs rule for g-herb-hatch:
    if goalstate is not hypothetical:
        now the herb-hatch is open;
    rule succeeds.
 
The g-chem-hatch is an action-goal. The short-description is "open the Chem Lab hatch".
Goal prereqs rule for g-chem-hatch:
    [pure knowledge]
    if goalstate is not hypothetical:
        if the chem-hatch is locked:
            [can only be unlocked from below]
            require-or-fail the Chem-Crawl;
            now the chem-hatch is unlocked;
            now the lock-counter of the chem-hatch is zero;
            say "You recall the combination, and unlock the hatch.";
        now the chem-hatch is open;
    rule succeeds.
 
The g-gold-cabinet is an action-goal. The short-description is "open the Materials Store cabinet".
The g-gold-cabinet has a thing called the tool-used. The tool-used is no-thing. [any alchemy seal]
Goal prereqs rule for g-gold-cabinet:
    let T be the tool-used of g-gold-cabinet;
    [We used to assume the rutilum-seal, but it turns out you can use a lead seal without ever discovering the rutilum one.]
    let drop-seal be false; [In theory this goal is only called if the cabinet is locked. But we'll be careful about auto-drop anyway.]
    if the gold-cabinet is locked:
        if T is not a metal-seal:
            if goalstate is not hypothetical:
                say "You are not sure how to proceed.";
            rule fails;
        [Preflight the mech-door. This is a hack to prevent a double-lock on the chem-lab goal.]
        if mech-door is closed and g-mech-door is ever-done:
            require-or-fail the g-mech-door;
        if the player does not carry T:
            now drop-seal is true;
        require-or-fail T;
    if goalstate is not hypothetical:
        require-or-fail the Mech-Store;
        if the gold-cabinet is locked:
            now the gold-cabinet is unlocked;
        if the gold-cabinet is closed:
            now the gold-cabinet is open;
        auto-drop the T if drop-seal;
    rule succeeds.
 
The g-mech-cabinet is an action-goal. The short-description is "open the Mechanica Lab cabinet".
The g-mech-cabinet has a thing called the tool-used. The tool-used is no-thing. [brass-pin or steel-bolt]
Goal prereqs rule for g-mech-cabinet:
    let T be the tool-used of g-mech-cabinet;
    if the mech-cabinet is dirty:
        if T is brass-pin:
            require-or-fail the gen-unrust-brass-inscription;
        else if T is steel-bolt:
            require-or-fail the gen-unrust-steel-inscription;
        else:
            if goalstate is not hypothetical:
                say "You are not sure how to proceed.";
            rule fails;
    if goalstate is not hypothetical:
        require-or-fail the Mech-Lab;
        if the mech-cabinet is dirty:
            uninscribe T;
            now the mech-cabinet is clean;
        if the mech-cabinet is closed:
            now the mech-cabinet is open;
        [don't auto-drop T -- nostalgia]
    rule succeeds.
 
The g-mech-door is an action-goal. The short-description is "open the Mechanica Lab door".
Goal prereqs rule for g-mech-door:
    if the mech-door is dirty:
        require-or-fail the fungicide;
    if goalstate is not hypothetical:
        let Z be the current zone;
        if Z is mech-lab-zone or Z is lab-crawl-zone or Z is herbarium-zone or Z is 2nd-lab-zone or Z is chem-lab-zone:
            require-or-fail the Mech-Lab;
        else:
            require-or-fail the Lab-Hall-SW;
        if the mech-door is dirty:
            retire the fungicide by applying to mech-door;
            now the mech-door is not dirty;
            say "You apply the fungicide to the Mech Lab door.";
        now the mech-door is open;
    rule succeeds.
 
The g-opt-door is an action-goal. The short-description is "open the Opticks Lab door".
Goal prereqs rule for g-opt-door:
    if goalstate is not hypothetical:
        now the opt-door is open;
    rule succeeds.
 
The g-optcloset-door is an action-goal. The short-description is "open the Opticks closet door".
Goal prereqs rule for g-optcloset-door:
    if Syndesis is not fixed:
        if goalstate is not hypothetical:
            say "The Opticks closet door is fracture-blocked.";
        rule fails;
    rule succeeds.
 
The g-fire-door is an action-goal. The short-description is "open the Pyrics Lab door".
Goal prereqs rule for g-fire-door:
    if goalstate is not hypothetical:
        now the fire-door is open;
    rule succeeds.
 
The g-store-door is an action-goal. The short-description is "open the Main Store door".
Goal prereqs rule for g-store-door:
    if goalstate is not hypothetical:
        now the store-door is open;
    rule succeeds.
 
The g-store-safe is an action-goal. The short-description is "open the Main Store safe".
Goal prereqs rule for g-store-safe:
    [pure knowledge]
    if goalstate is not hypothetical:
        require-or-fail the Safe-Store;
        if the store-safe is locked:
            now the store-safe is unlocked;
            now the lock-counter of the store-safe is zero;
            say "You recall the combination, and unlock the safe.";
        now the store-safe is open;
    rule succeeds.
 
The g-nook-cabinet is an action-goal. The short-description is "open the lead compartment".
Goal prereqs rule for g-nook-cabinet:
    if the symbol-type of the nook-cabinet is not gossamerity-symbol:
        require-or-fail lead-light-either-inscription;
        unless a pebble (called ET) symbol-matches gossamerity-symbol:
            say "(BUG) required lead-light-inscription, but no ET!";
            rule fails;
        require-or-fail ET;
    if goalstate is not hypothetical:
        require-or-fail the Safe-Nook;
        if the symbol-type of the nook-cabinet is not gossamerity-symbol:
            if ET is nothing:
                say "(BUG) required lead-light-inscription, but no ET!";
                rule fails;
            uninscribe ET;
            [No auto-drop -- info-cabinet is an terminal goal.]
            now the symbol-type of the nook-cabinet is gossamerity-symbol;
        if the nook-cabinet is closed:
            now the nook-cabinet is open;
    rule succeeds.
 
The g-3rd-door is an action-goal. The short-description is "open the Tertiary Lab door".
Goal prereqs rule for g-3rd-door:
    if the 3rd-door is locked:
        require-or-fail the 3rd-key;
    if goalstate is not hypothetical:
        if the current zone is 3rd-lab-zone:
            require-or-fail the 3rd-Lab;
        else:
            require-or-fail the Lab-Hall-NE;
        now the 3rd-door is unlocked;
        now the 3rd-door is open;
    rule succeeds.
 
The g-hall-door is an action-goal. The short-description is "open the fire door".
Goal prereqs rule for g-hall-door:
    if the hall-door is locked:
        require-or-fail the hall-key;
    if goalstate is not hypothetical:
        if the current zone is easterly-zone:
            require-or-fail the Lab-Wing-Hall;
        else:
            require-or-fail the East-Side-Hall;
        now the hall-door is unlocked;
        now the hall-door is open;
    rule succeeds.
 
The g-junior-fuse-cabinet is an action-goal. The short-description is "open the Junior Quarters locker".
The g-junior-fuse-cabinet has a thing called the tool-used. The tool-used is no-thing. [phlo-gold, phlo-electrum, or scalpel]
The g-junior-fuse-cabinet has a thing called the fire-source-used. The fire-source-used of g-junior-fuse-cabinet is the phlo-gold. [Yes, this is redundant.]
Goal prereqs rule for g-junior-fuse-cabinet:
    let T be the tool-used of g-junior-fuse-cabinet;
    if T is the scalpel:
        require-or-fail the scalpel;
        if goalstate is not hypothetical:
            require-or-fail the Junior-Quarters;
            if the junior-fuse-cabinet is dirty:
                now the junior-fuse-cabinet is clean;
                say "You cut away the white-fuse with the scalpel.";
            if the junior-fuse-cabinet is closed:
                now the junior-fuse-cabinet is open;
        [No auto-drop -- info-cabinet is an terminal goal.]
        rule succeeds;
    else if T is phlo-gold or T is phlo-electrum:
        let F be the el-fire-source for g-junior-fuse-cabinet;
        if F is nothing:
            rule fails;
        if goalstate is not hypothetical:
            require-or-fail the Junior-Quarters;
            if the junior-fuse-cabinet is dirty:
                now the junior-fuse-cabinet is clean;
                say "You burn away the white-fuse with [the F].";
            if the junior-fuse-cabinet is closed:
                now the junior-fuse-cabinet is open;
        [No auto-drop -- info-cabinet is an terminal goal.]
        rule succeeds;
    else:
        if goalstate is not hypothetical:
            say "You're not sure how to remove the white-fuse.";
        rule fails.
 
The g-scaphe-fuse-cabinet is an action-goal. The short-description is "open the Exoscaphe cabinet".
The g-scaphe-fuse-cabinet has a thing called the tool-used. The tool-used is no-thing. [phlo-gold, phlo-electrum, or scalpel]
The g-scaphe-fuse-cabinet has a thing called the fire-source-used. The fire-source-used of g-scaphe-fuse-cabinet is the phlo-gold. [Yes, this is redundant.]
Goal prereqs rule for g-scaphe-fuse-cabinet:
    let T be the tool-used of g-scaphe-fuse-cabinet;
    if T is the scalpel:
        require-or-fail the scalpel;
        if goalstate is not hypothetical:
            require-or-fail the Exoscaphe;
            if the scaphe-fuse-cabinet is dirty:
                now the scaphe-fuse-cabinet is clean;
                say "You cut away the white-fuse with the scalpel.";
            if the scaphe-fuse-cabinet is closed:
                now the scaphe-fuse-cabinet is open;
        rule succeeds;
    else if T is phlo-gold or T is phlo-electrum:
        let F be the el-fire-source for g-scaphe-fuse-cabinet;
        if F is nothing:
            rule fails;
        if goalstate is not hypothetical:
            require-or-fail the Exoscaphe;
            if the scaphe-fuse-cabinet is dirty:
                now the scaphe-fuse-cabinet is clean;
                say "You burn away the white-fuse with [the F].";
            if the scaphe-fuse-cabinet is closed:
                now the scaphe-fuse-cabinet is open;
        rule succeeds;
    else:
        if goalstate is not hypothetical:
            say "You're not sure how to remove the white-fuse.";
        rule fails.
 
The g-deck-cabinet is an action-goal. The short-description is "open the Deck Suite cabinet".
Goal prereqs rule for g-deck-cabinet:
    let drop-seal be false; [In theory this goal is only called if the cabinet is locked. But we'll be careful about auto-drop anyway.]
    if the deck-cabinet is locked:
        [Assume the player wants the lead seal here.]
        if the player does not carry the aith-lead-seal:
            now drop-seal is true;
        require-or-fail the aith-lead-seal;
    if goalstate is not hypothetical:
        require-or-fail the Deck-Suite;
        if the deck-cabinet is locked:
            now the deck-cabinet is unlocked;
        if the deck-cabinet is closed:
            now the deck-cabinet is open;
        auto-drop the aith-lead-seal if drop-seal;
    rule succeeds.
 
The g-capq-cabinet is an action-goal. The short-description is "open the High Tower cabinet".
Goal prereqs rule for g-capq-cabinet:
    if the capq-cabinet is locked:
        require-or-fail the dispersal-brush;
    if goalstate is not hypothetical:
        require-or-fail the Captain-Quarters;
        if the capq-cabinet is locked:
            now the capq-cabinet is unlocked;
        if the capq-cabinet is closed:
            now the capq-cabinet is open;
    rule succeeds.
 
The g-capq-door is an action-goal. The short-description is "open the High Tower door".
Goal prereqs rule for g-capq-door:
    if goalstate is not hypothetical:
        now the capq-door is open;
    rule succeeds.
 
The g-recq-door is an action-goal. The short-description is "open the Rector Quarters door".
Goal prereqs rule for g-recq-door:
    if goalstate is not hypothetical:
        now the recq-door is open;
    rule succeeds.
 
The g-armsq-door is an action-goal. The short-description is "open the Master-at-Arms Quarters door".
Goal prereqs rule for g-armsq-door:
    if Syndesis is not fixed:
        if goalstate is not hypothetical:
            say "The Master-at-Arms's door is fracture-blocked.";
        rule fails;
    rule succeeds.
 
The g-marble-door is an action-goal. The short-description is "open the marble door".
Goal prereqs rule for g-marble-door:
    if the marble-door is locked:
        require-or-fail the marble-solvent;
    if goalstate is not hypothetical:
        if the current zone is dressing-room-zone:
            require-or-fail the Dressing-Room;
        else:
            require-or-fail the Scaphe-View-North;
        if the marble-door is locked:
            retire the marble-solvent by applying to marble-door;
            now the marble-door is unlocked;
            say "You apply the marble solvent to the marble door.";
        now the marble-door is open;
    rule succeeds.
 
The g-obsidian-door is an action-goal. The short-description is "open the obsidian door".
Goal prereqs rule for g-obsidian-door:
    if the obsidian-door is locked:
        require-or-fail the obsidian-solvent;
    if goalstate is not hypothetical:
        require-or-fail the Charred-End;
        if the obsidian-door is locked:
            if the player does not carry the obsidian-solvent: [repeat check, because the Charred-End may have ruined it!]
                say "Without [the obsidian-solvent], you cannot continue.";
                rule fails;
            retire the obsidian-solvent by applying to obsidian-door;
            now the obsidian-door is unlocked;
            say "You apply the obsidian solvent to the obsidian door.";
        now the obsidian-door is open;
    rule succeeds.
 
The g-med-gunk-cabinet is an action-goal. The short-description is "open the Medical Hall cabinet".
The g-med-gunk-cabinet has a thing called the tool-used. The tool-used is no-thing. [el-water, bamuriatic, or a bubble]
Goal prereqs rule for g-med-gunk-cabinet:
    let T be the tool-used of g-med-gunk-cabinet;
    if T is el-water:
        require-or-fail the el-water;
        if goalstate is not hypothetical:
            require-or-fail the Med-Wing-Hall;
            if the med-gunk-cabinet is dirty:
                now the med-gunk-cabinet is clean;
                retire the el-water by applying to the med-gunk-cabinet;
                say "You clean off the cabinet with the elemental water.";
            if the med-gunk-cabinet is closed:
                now the med-gunk-cabinet is open;
        rule succeeds;
    else if T is bamuriatic acid:
        require-or-fail the bamuriatic acid;
        if goalstate is not hypothetical:
            require-or-fail the Med-Wing-Hall;
            if the med-gunk-cabinet is dirty:
                now the med-gunk-cabinet is clean;
                retire the bamuriatic acid by applying to the med-gunk-cabinet;
                say "You clean off the cabinet with the bamuriatic acid.";
            if the med-gunk-cabinet is closed:
                now the med-gunk-cabinet is open;
        rule succeeds;
    else if T is dusty-bubble or T is scratched-bubble:
        require-or-fail the el-air-goal;
        if goalstate is not hypothetical:
            require-or-fail the Med-Wing-Hall;
            if the med-gunk-cabinet is dirty:
                now the med-gunk-cabinet is clean;
                resolve the el-air-goal;
                say "You clean off the cabinet with the elemental air.";
            if the med-gunk-cabinet is closed:
                now the med-gunk-cabinet is open;
        rule succeeds;
    else:
        if goalstate is not hypothetical:
            say "You're not sure how to clean the cabinet.";
        rule fails.
 
The g-in-med-wing is an action-goal. The short-description is "pass the aura cloud in".
The g-in-med-wing has a symbol-type.
Goal prereqs rule for g-in-med-wing:
    [### We could accept either symbol, if currently inscribed, even if the other symbol were preferred. But then we'd have to separately track which symbol is known to work for entry.]
    if the symbol-type of g-in-med-wing is impermeability-symbol:
        require-or-fail the aura-toughen-inscription;
        unless a quartz-prism (called ET) symbol-matches impermeability-symbol:
            say "(BUG) required aura-toughen-inscription, but no ET!";
            rule fails;
        require-or-fail the Med-Wing-Hall;
        if goalstate is not hypothetical:
            say "You apply the [impermeability-symbol] symbol to yourself and stride through the cloud.";
            now the aura-mod-type is no-symbol;
            now the aura-mod-time is zero;
            uninscribe ET;
    else if the symbol-type of g-in-med-wing is invisibility-symbol:
        require-or-fail the aura-invisibility-inscription;
        unless a quartz-prism (called ET) symbol-matches invisibility-symbol:
            say "(BUG) required aura-invisibility-inscription, but no ET!";
            rule fails;
        require-or-fail the Med-Wing-Hall;
        if goalstate is not hypothetical:
            say "You apply the [invisibility-symbol] symbol to yourself and duck through the cloud.";
            now the aura-mod-type is no-symbol;
            now the aura-mod-time is zero;
            uninscribe ET;
    else:
        if goalstate is not hypothetical:
            say "You're not sure how to pass through the cloud.";
        rule fails;
    now the aura-cloud is ever-tried;
    rule succeeds.
 
The g-out-med-wing is an action-goal. The short-description is "pass the aura cloud out".
Goal prereqs rule for g-out-med-wing:
    if the miasma-gong is not charged:
        require-or-fail the scalpel;
        require-or-fail the scalpel-inscription;
        require-or-fail Med-Wing;
        if goalstate is not hypothetical:
            say "You strike the gong and wave the scalpel.";
    if goalstate is not hypothetical:
        now the ring-time of the miasma-gong is zero;
        now the miasma-gong is uncharged;
        now the aura-cloud is ever-tried;
    rule succeeds.
 
The g-flood-crawlway is an action-goal. The short-description is "pass the flooded crawlway".
Goal prereqs rule for g-flood-crawlway:
    if breath-potion-remaining is zero:
        require-or-fail the breath-holding;
        if goalstate is not hypothetical:
            say "You drink [the breath-holding].";
            retire the breath-holding by drinking;
            now the breath-potion-remaining is one;   [short duration]
    require-or-fail the Scaphe-View;
    [swimming through the passage will be handled by the zone step rule.]
    rule succeeds.
 
The g-obs-door is an action-goal. The short-description is "open the painted door".
Goal prereqs rule for g-obs-door:
    if the current zone is not observatory-zone:
        if the obs-door is locked:
            if goalstate is not hypothetical:
                say "You're not sure how to open the painted door from this side.";
            rule fails;
        if goalstate is not hypothetical:
            say "You open the painted door.";
            now the obs-door is open;
    else:
        if goalstate is not hypothetical:
            say "You [if the obs-door is locked]unlock[else]open[end if] the painted door.";
            now the obs-door is unlocked;
            now the obs-door is open;
    rule succeeds.
 
The g-bridge-ladder is an action-goal. The short-description is "lower the Aithery bridge ladder".
The g-bridge-ladder has a symbol-type.
Goal prereqs rule for g-bridge-ladder:
    [If we've used the weight to get the chime, the symbol will probably be ponderosity; no special case needed.]
    if the symbol-type of g-bridge-ladder is ponderosity-symbol:
        require-or-fail the lead-heavy-inscription;
        unless a pebble (called ET) symbol-matches ponderosity-symbol:
            say "(BUG) required lead-heavy-inscription, but no ET!";
            rule fails;
        require-or-fail ET;
        require-or-fail the Observatory;
        if goalstate is not hypothetical:
            say "You apply the [ponderosity-symbol] symbol to the counterweight, breaking the cable.";
            uninscribe ET;
            now the symbol-type of the counterweight is ponderosity-symbol;
            now the counterweight is unfastened;
            now the bridge-cable is off-stage;
            auto-drop ET;
    else if the symbol-type of g-bridge-ladder is gossamerity-symbol:
        require-or-fail the lead-light-either-inscription;
        unless a pebble (called ET) symbol-matches gossamerity-symbol:
            say "(BUG) required lead-light-inscription, but no ET!";
            rule fails;
        require-or-fail ET;
        require-or-fail the dispersal-brush noting had-brush;
        require-or-fail the Observatory;
        if goalstate is not hypothetical:
            say "You apply the [gossamerity-symbol] symbol to the counterweight, followed by the dispersal brush, thus breaking the cable.";
            uninscribe ET;
            now the symbol-type of the counterweight is no-symbol;
            now the counterweight is unfastened;
            now the bridge-cable is off-stage;
            auto-drop ET;
            auto-drop the dispersal-brush unless had-brush;
    else:
        if goalstate is not hypothetical:
            say "You're not sure how to lower the ladder.";
        rule fails;
    rule succeeds.
 
The g-bird-door is an action-goal. The short-description is "open the engraved door".
The g-bird-door has a symbol-type.
Goal prereqs rule for g-bird-door:
    if the symbol-type of g-bird-door is invisibility-symbol:
        require-or-fail the aura-invisibility-inscription;
        unless a quartz-prism (called ET) symbol-matches invisibility-symbol:
            say "(BUG) required aura-invisibility-inscription, but no ET!";
            rule fails;
        require-or-fail ET;
        if the current zone is birdhouse-zone:
            require-or-fail the Birdhouse;
        else:
            require-or-fail the Grand-Stair;
        if goalstate is not hypothetical:
            say "You apply the [invisibility-symbol] symbol to yourself and open the door.";
            now the aura-mod-type is no-symbol;
            now the aura-mod-time is zero;
            uninscribe ET;
            auto-drop ET;
            now the bird-door is open;
    else if the symbol-type of g-bird-door is imitation-symbol:
        require-or-fail the aura-imi-either-inscription;
        unless a quartz-or-jade inscribable (called ET1) symbol-matches imitation-symbol:
            say "(BUG) required aura-imi-either-inscription, but no ET!";
            rule fails;
        require-or-fail ET1;
        require-or-fail the aura-imitation-persona-charge;
        unless a quartz-or-jade inscribable (called ET) is fully-imitation-charged:
            say "(BUG) required aura-imitation-persona-charge, but no ET is charged!";
            rule fails;
        require-or-fail ET;
        if the current zone is birdhouse-zone:
            require-or-fail the Birdhouse;
        else:
            require-or-fail the Grand-Stair;
        if goalstate is not hypothetical:
            if the persona of ET is not high-rank:
                say "You apply the [imitation-symbol] symbol to yourself, but the door will not open.";
                now the aura-mod-type is no-symbol;
                now the aura-mod-time is zero;
                uninscribe ET;
                rule fails;
            say "You apply the [imitation-symbol] symbol to yourself and open the door.";
            now the persona of aura-imitation-persona-charge is the persona of ET;
            now the aura-mod-type is no-symbol;
            now the aura-mod-time is zero;
            uninscribe ET;
            auto-drop ET;
            now the bird-door is open;
    else:
        if goalstate is not hypothetical:
            say "You're not sure how to open the engraved door.";
        rule fails;
    now the bird-door is ever-tried;
    rule succeeds.
 
The g-ante-door is an action-goal. The short-description is "open the Chancel gate".
Goal prereqs rule for g-ante-door:
    require-or-fail the aura-imi-either-inscription;
    unless a quartz-or-jade inscribable (called ET1) symbol-matches imitation-symbol:
        say "(BUG) required aura-imi-either-inscription, but no ET!";
        rule fails;
    require-or-fail ET1;
    require-or-fail the aura-imitation-persona-charge;
    unless a quartz-or-jade inscribable (called ET) is fully-imitation-charged:
        say "(BUG) required aura-imitation-persona-charge, but no ET is charged!";
        rule fails;
    require-or-fail ET;
    if the current zone is chancel-zone:
        require-or-fail the Chancel;
    else:
        require-or-fail the Antechamber;
    if goalstate is not hypothetical:
        if the persona of ET is not high-rank:
            say "You apply the [imitation-symbol] symbol to yourself, but the gate will not open.";
            now the aura-mod-type is no-symbol;
            now the aura-mod-time is zero;
            uninscribe ET;
            rule fails;
        say "You apply the [imitation-symbol] symbol to yourself and open the gate.";
        now the persona of aura-imitation-persona-charge is the persona of ET;
        now the aura-mod-type is no-symbol;
        now the aura-mod-time is zero;
        uninscribe ET;
        auto-drop ET;
        now the ante-door is open;
    now the ante-door is ever-tried;
    rule succeeds.
 
The g-baros-door is an action-goal. The short-description is "open the iron gate".
The g-baros-door has a thing called the key-used. The key-used is no-thing. [baros-key or clock-tincture]
Goal prereqs rule for g-baros-door when the key-used of g-baros-door is clock-tincture:
    if the baros-door is locked:
        require-or-fail the clock-tincture;
    if goalstate is not hypothetical:
        if the current zone is barosy-zone:
            require-or-fail the Barosy;
        else:
            require-or-fail the Basement;
        if the baros-door is locked:
            retire the clock-tincture by applying to baros-door;
            now the baros-door is unlocked;
            say "You apply the clock tincture to the iron gate.";
        now the baros-door is open;
    rule succeeds.
Goal prereqs rule for g-baros-door when the key-used of g-baros-door is baros-key:
    if the baros-door is locked:
        require-or-fail the baros-key;
    if goalstate is not hypothetical:
        if the current zone is barosy-zone:
            require-or-fail the Barosy;
        else:
            require-or-fail the Basement;
        now the baros-door is unlocked;
        now the baros-door is open;
        [No auto-drop -- key]
    rule succeeds.
Goal prereqs rule for g-baros-door:
    if goalstate is not hypothetical:
        say "You're not sure how to unlock the gate.";
    rule fails.
 
The g-baros-crawl is an action-goal. The short-description is "pass the Barosy crevice".
Goal prereqs rule for g-baros-crawl:
    if Baros is not fixed:
        if goalstate is not hypothetical:
            say "You're not sure how to proceed through the crevice.";
        rule fails;
    if goalstate is not hypothetical:
        say "You crawl through the Barosy crevice.";
    rule succeeds.
 
The g-portico-window is an action-goal. The short-description is "pass through the portico window".
Understand "g-p-window" as g-portico-window.
Goal prereqs rule for g-portico-window:
    if the current zone is not a hadean-zone:
        if the vacuum-potion-remaining is zero:
            require-or-fail the vacuum-protection;
            if goalstate is not hypothetical:
                say "You drink [the vacuum-protection].";
                retire the vacuum-protection by drinking;
                now the vacuum-potion-remaining is 1; [no timer]
    if the F-sharp-chime is not part of the p-window:
        require-or-fail the glass-pass-inscription;
        require-or-fail the F-sharp-chime;
        if the current zone is a hadean-zone:
            require-or-fail the Out-Plain;
        else:
            require-or-fail the Portico;
        if goalstate is not hypothetical:
            say "You strike [the F-sharp-chime] and set it into the window.";
            now the ring-time of F-sharp-chime is 2;
            now F-sharp-chime is part of the p-window;
    if the current zone is a hadean-zone:
        require-or-fail the Out-Plain;
    else:
        require-or-fail the Portico;
    if goalstate is not hypothetical:
        say "You push through the glass.";
        if the current zone is not a hadean-zone:
            perform inventory vacuumization in the Out-Plain;
    rule succeeds.
 
The g-scaphe-view-window is an action-goal. The short-description is "pass through the arcade window".
The g-scaphe-view-window can be bypassed. [only after Pneuma fixed]
Understand "g-sv-window" as g-scaphe-view-window.
Goal prereqs rule for g-scaphe-view-window:
    if the current zone is not scaphe-bay-zone and the atmosphere of the Scaphe-Bay is vacuum-atm and Pneuma is fixed and g-scaphe-view-window is bypassed:
        require-or-fail the Scaphe-View;
        if goalstate is not hypothetical:
            now the sv-valve is open;
            now the atmosphere of Scaphe-Bay is normal-atm;
            now the atmosphere of Scaphe-Dome is normal-atm;
            say "You repressurize the Exoscaphe Bay.";
    if the current zone is not scaphe-bay-zone and the atmosphere of the Scaphe-Bay is vacuum-atm:
        if the vacuum-potion-remaining is zero:
            require-or-fail the vacuum-protection;
            if goalstate is not hypothetical:
                say "You drink [the vacuum-protection].";
                retire the vacuum-protection by drinking;
                now the vacuum-potion-remaining is 1; [no timer]
    if the F-sharp-chime is not part of the sv-window:
        require-or-fail the glass-pass-inscription;
        require-or-fail the F-sharp-chime;
        if the current zone is not scaphe-bay-zone:
            require-or-fail the Scaphe-View-North;
        if goalstate is not hypothetical:
            say "You strike [the F-sharp-chime] and set it into the window.";
            now the ring-time of F-sharp-chime is 2;
            now F-sharp-chime is part of the sv-window;
    if the current zone is not scaphe-bay-zone:
        require-or-fail the Scaphe-View-North;
    if goalstate is not hypothetical:
        say "You push through the glass.";
        if the current zone is not scaphe-bay-zone and the atmosphere of the Scaphe-Bay is vacuum-atm:
            perform inventory vacuumization in the Scaphe-Bay;
        if the atmosphere of the Scaphe-Bay is normal-atm:
            now g-scaphe-view-window is bypassed;
    rule succeeds.
 
The g-scaphe-port is an action-goal. The short-description is "open the exoscaphe portal".
Goal prereqs rule for g-scaphe-port:
    if the atmosphere of the Exoscaphe is not normal-atm:
        if goalstate is not hypothetical:
            say "The exoscaphe portal cannot be opened.";
        rule fails;
    if goalstate is not hypothetical:
        if the scaphe-port is shifted:
            now the scaphe-port is not shifted;
            say "There is a brief hiss as you open the exoscaphe portal.";
        now the scaphe-port is open;
    rule succeeds.
 
The g-dome-hatch is an action-goal. The short-description is "open the scaphe dome hatch".
The g-dome-hatch can be bypassed. [only after Pneuma fixed]
Goal prereqs rule for g-dome-hatch:
    if the atmosphere of the Scaphe-Dome is vacuum-atm and the atmosphere of the Exoscaphe is normal-atm and Pneuma is fixed and g-dome-hatch is bypassed:
        require-or-fail the Scaphe-View;
        if goalstate is not hypothetical:
            now the sv-valve is open;
            now the atmosphere of Scaphe-Bay is normal-atm;
            now the atmosphere of Scaphe-Dome is normal-atm;
            say "You repressurize the Exoscaphe Bay.";
    if the atmosphere of the Scaphe-Dome is vacuum-atm and the atmosphere of the Exoscaphe is normal-atm:
        if the vacuum-potion-remaining is zero:
            require-or-fail the vacuum-protection;
            if goalstate is not hypothetical:
                say "You drink [the vacuum-protection].";
                retire the vacuum-protection by drinking;
                now the vacuum-potion-remaining is 1; [no timer]
        require-or-fail the Exoscaphe;
        if goalstate is not hypothetical:
            let portcloseflag be whether or not the scaphe-port is open;
            now the scaphe-port is closed;
            now the atmosphere of Exoscaphe is vacuum-atm;
            say "You[if portcloseflag is true] close the portal and[end if] depressurize the exoscaphe.";
            perform room vacuumization in the Exoscaphe;
    if the atmosphere of the Exoscaphe is not the atmosphere of the Scaphe-Dome:
        if goalstate is not hypothetical:
            say "The dome hatch cannot be opened.";
        rule fails;
    if goalstate is not hypothetical:
        if the atmosphere of the Exoscaphe is normal-atm and the atmosphere of the Scaphe-Dome is normal-atm:
            now g-dome-hatch is bypassed;
        now the dome-hatch is open;
    rule succeeds.
 
The g-airlock-inner-door is an action-goal. The short-description is "open the airlock inner door".
Understand "g-inner-door" as g-airlock-inner-door.
Goal prereqs rule for g-airlock-inner-door:
    if the atmosphere of the Airlock is vacuum-atm and Pneuma is fixed and the current zone is airlock-zone:
        if goalstate is not hypothetical:
            let portcloseflag be whether or not the outer-door is open;
            now the outer-door is closed;
            now the atmosphere of Airlock is normal-atm;
            say "You[if portcloseflag is true] close the outer door and[end if] pressurize the airlock.";
    if the atmosphere of the Airlock is vacuum-atm:
        if goalstate is not hypothetical:
            say "The airlock inner door cannot be opened.";
        rule fails;
    if goalstate is not hypothetical:
        now the inner-door is open;
    rule succeeds.
 
The g-airlock-outer-door is an action-goal. The short-description is "open the airlock outer door".
Understand "g-outer-door" as g-airlock-outer-door.
Goal prereqs rule for g-airlock-outer-door:
    if the atmosphere of the Airlock is not vacuum-atm and Pneuma is fixed and the current zone is airlock-zone:
        if the vacuum-potion-remaining is zero:
            require-or-fail the vacuum-protection;
            if goalstate is not hypothetical:
                say "You drink [the vacuum-protection].";
                retire the vacuum-protection by drinking;
                now the vacuum-potion-remaining is 1; [no timer]
        require-or-fail the Airlock;
        if goalstate is not hypothetical:
            let portcloseflag be whether or not the inner-door is open;
            now the inner-door is closed;
            now the atmosphere of Airlock is vacuum-atm;
            say "You[if portcloseflag is true] close the inner door and[end if] depressurize the airlock.";
            perform room vacuumization in the Airlock;
    if the atmosphere of the Airlock is not vacuum-atm:
        if goalstate is not hypothetical:
            say "The airlock outer door cannot be opened.";
        rule fails;
    if goalstate is not hypothetical:
        now the outer-door is open;
    rule succeeds.
 
The g-maze-center is an action-goal. The short-description is "pass through the garden maze".
The g-maze-center can be bypassed. [only after Aistheta fixed]
Goal prereqs rule for g-maze-center:
    if Aistheta is fixed and g-maze-center is not bypassed:
        [Fail in a way that lets the player know that the maze has changed.]
        require-or-fail the centrality-lodestone;
        if goalstate is not hypothetical:
            require-or-fail the Garden;
            now the player is in Garden-Maze-Lost;
            say "[line break]You stop. It looks like you won't need the lodestone any more, after all.[para]";
        rule fails;
    if Aistheta is not fixed:
        require-or-fail the centrality-lodestone;
    require-or-fail the Garden;
    [No auto-drop; the lodestone may be needed again.]
    rule succeeds.
 
The g-charred-hall is an action-goal. The short-description is "pass through the burning hall".
The g-charred-hall has a thing called the tool-used. The tool-used is no-thing. [fire-resistance or fire-sucker]
Goal prereqs rule for g-charred-hall when the tool-used of g-charred-hall is fire-resistance:
    if the player carries fire-sucker:
        [This avoids the confusing case of solving via fire-resistance and thus wasting the fire-sucker.]
        if goalstate is not hypothetical:
            say "Surely it would make sense to use [the fire-sucker] first.";
        rule fails;
    if not currently fireproof or fire-potion-remaining < 3:
        require-or-fail the fire-resistance;
        require-or-fail the Charred-Hall;
        if goalstate is not hypothetical:
            say "You drink [the fire-resistance].";
            retire the fire-resistance by drinking;
            now the fire-potion-remaining is ten;   [normal duration]
    rule succeeds.
Goal prereqs rule for g-charred-hall when the tool-used of g-charred-hall is fire-sucker:
    require-or-fail the fire-sucker;
    require-or-fail the Charred-Hall;
    if goalstate is not hypothetical:
        say "You extinguish the fire with [the fire-sucker].";
        retire the fire-sucker by applying to the out-inferno;
        now the in-inferno is off-stage;
        now the out-inferno is off-stage;
        now the atmosphere of Charred-End is normal-atm;
    rule succeeds.
Goal prereqs rule for g-charred-hall:
    if goalstate is not hypothetical:
        say "You're not sure how to get through the inferno.";
    rule fails.
 
The g-alien-outer-door is an action-goal. The short-description is "open the alien outer door".
Understand "g-a-outer-door" as g-alien-outer-door.
Goal prereqs rule for g-alien-outer-door:
    if the ship-circle is in Out-Ship and the mercury is not part of the ship-circle:
        require-or-fail the mercury;
        require-or-fail the Out-Ship;
        if goalstate is not hypothetical:
            say "You apply the mercury to the circular arc.";
            now the mercury is handled;
            now the mercury is part of the ship-circle;
    if the ship-circle is not in Out-Ship and the current zone is not out-airlock-zone:
        say "The quicksilver circle is gone, so you cannot open the outer door.";
        rule fails;
    if the mercury is not part of the ship-circle:
        say "(BUG) alien-outer-door: mercury is not part of the ship-circle.";
        rule fails;
    if goalstate is not hypothetical:
        now the alien-outer-door is open;
        now the alien-inner-door is closed;
        now the ship-circle is off-stage;
        now the mercury is handled;
        retire the mercury with explanation "[The mercury] disappeared into the wreck";
    rule succeeds.
 
The g-alien-inner-door is an action-goal. The short-description is "open the alien inner door".
Understand "g-a-inner-door" as g-alien-inner-door.
Goal prereqs rule for g-alien-inner-door:
    if aither-survival-goal is ever-done:
        [This goal, unusually, is only required if it's known. Otherwise the player can freely get himself killed.]
        if aither-potion-remaining is zero:
            require-or-fail aither-survival-goal;
    if the current zone is out-chamber-zone or the current zone is out-store-zone:
        require-or-fail the Out-Chamber;
    else:
        require-or-fail the Out-Airlock;
    if goalstate is not hypothetical:
        now the alien-inner-door is open;
        now the alien-outer-door is closed;
    rule succeeds.
 
The g-alien-window is an action-goal. The short-description is "pass through the alien window".
The g-alien-window has a symbol-type.
Understand "g-a-window" as g-alien-window.
Goal prereqs rule for g-alien-window:
    if the a-window is clean and the F-sharp-chime is not part of the a-window:
        if the symbol-type of g-alien-window is permeability-symbol:
            require-or-fail the glass-pass-inscription;
            require-or-fail the F-sharp-chime;
            if the current zone is out-store-zone:
                require-or-fail the Out-Store;
            else:
                require-or-fail the Out-Hall;
            if goalstate is not hypothetical:
                say "You strike [the F-sharp-chime] and set it into the window.";
                now the ring-time of F-sharp-chime is 2;
                now F-sharp-chime is part of the a-window;
        else if the symbol-type of g-alien-window is decoherence-symbol:
            require-or-fail the glass-destroy-inscription;
            require-or-fail the F-sharp-chime;
            if the current zone is out-store-zone:
                require-or-fail the Out-Store;
            else:
                require-or-fail the Out-Hall;
            if goalstate is not hypothetical:
                say "You strike [the F-sharp-chime] and shatter the window.";
                now the a-window is dirty;
                uninscribe the F-sharp-chime;
                retire the F-sharp-chime by manual destruction in the a-window;
        else:
            if goalstate is not hypothetical:
                say "You're not sure how to get through the window.";
            rule fails;
    if the current zone is out-store-zone:
        require-or-fail the Out-Store;
    else:
        require-or-fail the Out-Hall;
    if goalstate is not hypothetical:
        if the a-window is clean:
            say "You push through the glass.";
        else:
            say "You climb through the broken window.";
    rule succeeds.
 
The billet-creation is an action-goal. The short-description is "create the ephemeris billet".
The billet-creation can be correct or incorrect. The billet-creation is incorrect.
The creation-action of the mark-tin-slip is billet-creation.
 
Goal prereqs rule for billet-creation:
    if the blank-tin-slip is not in the calc-slot:
        require-or-fail the blank-tin-slip;
    require-or-fail the Obs-Nook;
    if goalstate is not hypothetical:
        retire the blank-tin-slip by transformation into the mark-tin-slip;
        now the mark-tin-slip is unruined;
        now the lock-counter of the calculator is zero;
        if billet-creation is correct:
            set the calculator symbols correctly;
            now mark-tin-slip is correct;
        else:
            set the calculator symbols randomly;
            now mark-tin-slip is incorrect;
        now the player carries the mark-tin-slip;
        set pronouns from the mark-tin-slip;
        say "[if mark-tin-slip is incorrect]You spin the spheres to a random position, and run the tin slip through[else]You set the spheres to the coordinates you remember, and run the tin slip through[end if].";
    rule succeeds.
 
The g-tilt-slab is an action-goal. The short-description is "retrieve the F chime from the slab".
The g-tilt-slab has a thing called the tool-used. The tool-used is no-thing. [counterweight or B-chime]
 
Goal prereqs rule for g-tilt-slab when the tool-used of g-tilt-slab is the B-chime:
    if F-sharp-chime is not part of the tilt-slab:
        say "(BUG) Trying g-tilt-slab, but the F chime is no longer on the slab.";
        rule fails;
    let had-B-chime be whether or not the player carries the B-chime;
    require-or-fail bronze-magnet-inscription;
    require-or-fail B-chime;
    require-or-fail Chasm-Slab;
    if goalstate is not hypothetical:
        say "You use the B chime to attract [the F-sharp-chime].";
        uninscribe the B-chime;
        now the player carries the F-sharp-chime;
        auto-drop the B-chime unless had-B-chime;
    rule succeeds.
 
Goal prereqs rule for g-tilt-slab when the tool-used of g-tilt-slab is the counterweight:
    if F-sharp-chime is not part of the tilt-slab:
        say "(BUG) Trying g-tilt-slab, but the F chime is no longer on the slab.";
        rule fails;
    if the counterweight is fastened:
        now the symbol-type of g-bridge-ladder is ponderosity-symbol;
        require-or-fail g-bridge-ladder;
    if the counterweight is fastened:
        say "(BUG) Trying g-tilt-slab, but the counterweight is still fastened.";
        rule fails;
    if the counterweight is on the tilt-slab:
        [Shortcut path...]
        if the symbol-type of the counterweight is gossamerity-symbol:
            require-or-fail the dispersal-brush noting had-brush1;
            require-or-fail the Chasm-Slab;
            if goalstate is not hypothetical:
                now the symbol-type of the counterweight is no-symbol;
                say "You remove the gossamerity symbol from the weight.";
                auto-drop the dispersal-brush unless had-brush1;
        if goalstate is not hypothetical:
            say "With the slab counterweighted, you retrieve [the F-sharp-chime].";
            now the player carries the F-sharp-chime;
        rule succeeds;
    [Long-way path...]
    if the symbol-type of the counterweight is not gossamerity-symbol:
        require-or-fail the lead-light-either-inscription;
        unless a pebble (called ET) symbol-matches gossamerity-symbol:
            say "(BUG) required lead-light-inscription, but no ET!";
            rule fails;
        require-or-fail ET;
        if the counterweight is off-stage:
            if goalstate is not hypothetical:
                say "The counterweight is gone."; [Where? Never mind, this is a corner case.]
            rule fails;
        require-or-fail the location of the counterweight;
        if goalstate is not hypothetical:
            say "You apply the [gossamerity-symbol] symbol to the counterweight, and pick it up.";
            uninscribe ET;
            auto-drop ET;
            now the symbol-type of the counterweight is gossamerity-symbol;
    if the symbol-type of the counterweight is not gossamerity-symbol:
        say "(BUG) Trying g-tilt-slab, but the counterweight is still not light.";
        rule fails;
    require-or-fail the counterweight;
    require-or-fail the dispersal-brush noting had-brush2;
    require-or-fail the Chasm-Slab;
    if goalstate is not hypothetical:
        say "You use the counterweight to retrieve [the F-sharp-chime].";
        now the counterweight is on the tilt-slab;
        now the symbol-type of the counterweight is no-symbol;
        now the player carries the F-sharp-chime;
        auto-drop the dispersal-brush unless had-brush2;
    rule succeeds.
 
Goal prereqs rule for g-tilt-slab:
    if goalstate is not hypothetical:
        say "You're not sure how to retrieve the F chime.";
    rule fails.
 
The g-deep-door is an action-goal. The short-description is "open the Deep Stacks door".
Goal prereqs rule for g-deep-door:
    let drop-seal be false; [In theory this goal is only called if the door is locked. But we'll be careful about auto-drop anyway.]
    if the deep-door is locked:
        [Assume the player always wants lead. This is wrong if the lead has been turned into white-amalgam. But, whatever.]
        if the player does not carry the vent-lead-seal:
            now drop-seal is true;
        require-or-fail the vent-lead-seal;
    if goalstate is not hypothetical:
        if the current zone is deep-stacks-zone:
            require-or-fail the Deep-Stacks;
        else:
            require-or-fail the Chasm-S;
        now the deep-door is unlocked;
        now the deep-door is open;
        auto-drop the vent-lead-seal if drop-seal;
    rule succeeds.
 
[Goal defined way up at the top.]
The ignite-goal has a truth state called the auto-drop-lighter.
[Immediately after requiring this goal, check the auto-drop-lighter flag to decide if it's appropriate to auto-drop the lighter afterwards. (False if we were carrying it to begin with, or if it isn't used at all.) This flag may be overwritten soon, so grab it right away.]
Goal prereqs rule for ignite-goal:
    now the auto-drop-lighter of ignite-goal is false;
    if the torch-lighter is ever-seen and the torch-lighter is on-stage:
        [The easy way.]
        require-or-fail the torch-lighter noting had-lighter;
        if had-lighter is false:
            now the auto-drop-lighter of ignite-goal is true;
        rule succeeds;
    require-or-fail the cedar;
    require-or-fail the Fire-Lab;
    if goalstate is not hypothetical:
        if the cedar is not alight:
            say "You ignite the cedar splint.";
        [assume it will burn up very soon]
        now the cedar is not alight;
        retire the cedar by burning out;
        update fire consumption;
    rule succeeds.
 
 
Section - Loc-Specific Supply Goals
 
The coral-creation is an ever-done supply-action-goal. The short-description is "acquire some coral".
The creation-target is the coral-outcrop.
The creation-action of the coral is coral-creation.
 
Goal prereqs rule for coral-creation:
    require-or-fail the location of the coral-outcrop;
    if the coral-outcrop is shifted:
        if goalstate is not hypothetical:
            say "You cannot remove any more coral from the outcrop.";
        rule fails;
    if goalstate is not hypothetical:
        now the coral-outcrop is shifted;
        now the player carries the coral;
        set pronouns from the coral;
        say "You take a small chunk of coral.";
    rule succeeds.
 
The ash-creation is an ever-done supply-action-goal. The short-description is "acquire some ash".
The creation-target is the ash-west.
The creation-action of the ash is ash-creation.
 
Goal prereqs rule for ash-creation:
    require-or-fail the location of the ash-west;
    if goalstate is not hypothetical:
        now the player carries the ash;
        set pronouns from the ash;
        say "You scrape up a pinch of ash.";
    rule succeeds.
 
The dust-creation is an ever-done supply-action-goal. The short-description is "acquire some Hadean dust".
The creation-target is the out-dust-1.
The creation-action of the grey-dust is dust-creation.
 
Goal prereqs rule for dust-creation:
    require-or-fail the location of the out-dust-1;
    if goalstate is not hypothetical:
        now the player carries the grey-dust;
        set pronouns from the grey-dust;
        say "You scrape up a pinch of dust.";
    rule succeeds.
 
 
Section - Goal Pickup Rules
 
Goal pickup rule for a thing (called G) when the pickup-holder of goalstate is the store-safe (this is the store-safe pickup rule):
    if the store-safe is locked and g-store-safe is ever-done:
        require-or-fail the g-store-safe;
    if the store-safe is locked:
        if goalstate is not hypothetical:
            say "[The G] is locked in the safe.";
        rule fails;
    if the store-safe is closed:
        if goalstate is not hypothetical:
            now the store-safe is open;
            say "You open the safe.";
    if goalstate is not hypothetical:
        say "You take [the G] from [the store-safe].";
        now the player carries G;
    rule succeeds.
 
Goal pickup rule for a thing (called G) when the pickup-holder of goalstate is the gold-cabinet (this is the gold-cabinet pickup rule):
    if the gold-cabinet is locked and g-gold-cabinet is ever-done:
        require-or-fail the g-gold-cabinet;
    if the gold-cabinet is locked:
        if goalstate is not hypothetical:
            say "[The G] is locked in the cabinet.";
        rule fails;
    if the gold-cabinet is closed:
        if goalstate is not hypothetical:
            now the gold-cabinet is open;
            say "You open the cabinet.";
    if goalstate is not hypothetical:
        say "You take [the G] from the cabinet.";
        now the player carries G;
    rule succeeds.
 
[I'm skipping goal pickup rules for info-only cabinets. In theory the player could lock an object in there, but eh.]
 
Goal pickup rule for a thing (called G) when the pickup-holder of goalstate is the fake-lab-door:
    if the fake-lab-door is closed:
        if goalstate is not hypothetical:
            now the fake-lab-door is open;
            say "You open the lab door.";
    if goalstate is not hypothetical:
        say "You pick up [the G].";
        now the player carries G;
    rule succeeds.
 
[Not bothering with goal pickup rules for other standard-cabinets. Not worth the nuisance, and they usually won't have anything substantial inside.]
 
Goal pickup rule for the el-earth when the pickup-holder of goalstate is the glass-heap (this is the glass-heap pickup rule):
    require-or-fail the el-earth-location;
    rule succeeds.
 
The scaphe-crawl-stretch rule is listed before the give-up-on-stretch pickup rule in the goal pickup rules.
Goal pickup rule for a thing (called G) when the pickup-stretch-room of goalstate is Scaphe-Crawl and the pickup-room of goalstate is Scaphe-View (this is the scaphe-crawl-stretch rule):
    if goalstate is not hypothetical:
        say "You set aside your possessions for a moment and dive for [the G].";
        now the player carries G;
    rule succeeds.
 
The obs-crawl-stretch rule is listed before the give-up-on-stretch pickup rule in the goal pickup rules.
Goal pickup rule for a thing (called G) when the pickup-stretch-room of goalstate is Obs-Crawl and the pickup-room of goalstate is Observatory (this is the obs-crawl-stretch rule):
    if goalstate is not hypothetical:
        say "You set aside your possessions for a moment and dive for [the G].";
        now the player carries G;
    rule succeeds.
 
The garden-pool-stretch rule is listed before the give-up-on-stretch pickup rule in the goal pickup rules.
Goal pickup rule for a thing (called G) when the pickup-stretch-room of goalstate is Garden-Pool and the pickup-room of goalstate is Garden (this is the garden-pool-stretch rule):
    if goalstate is not hypothetical:
        say "You set aside your possessions for a moment and dive for [the G].";
        now the player carries G;
    rule succeeds.
 
Goal pickup rule for the F-sharp-chime when the pickup-holder of goalstate is the tilt-slab and the F-sharp-chime is part of the tilt-slab (this is the F-slab pickup rule):
    require-or-fail the g-tilt-slab;
    rule succeeds.
 
 
HL Game Goals ends here.