Section - The Bridge/Stairs
The bridge is a backdrop. It is in Chasm Edge and Chasm Floor. The description is "The [if bridge is lowered]stairs are[otherwise]bridge is[end if] made from a series of wooden planks held into shape by taut ropes at foot and hand height[if location is Chasm Edge and Chasm Edge is westsided and bridge is lowered]. They rise from the floor of the chasm below you to its far side, making them inaccessible from here[end if]." Understand "stairs/staircase/plank/planks" as the bridge. The bridge can be raised or lowered. The bridge is raised. Instead of pulling the bridge when the bridge is raised, say "The bridge is already raised." Instead of pushing the bridge when the bridge is lowered, say "The bridge (or staircase, now) is already down." Instead of pulling or pushing the bridge when location is Chasm Edge and Chasm Edge is westsided, say "You can't see any way to do that from here." The printed name of bridge is "plank [if bridge is raised]bridge[otherwise]staircase[end if]". Instead of entering or crossing the bridge, try entering the chasm. Does the player mean doing something to the bridge: it is likely. Instead of climbing the bridge, try entering the bridge. Instead of touching, pulling, taking, or pushing bridge: say "[if Chasm Edge is westsided and bridge is lowered]You can't reach it from here[otherwise]The planks that form it are held tight by guide ropes[end if].".
Instead of leaping bridge, try entering bridge. Check using bridge: try entering bridge instead.
The posts are a backdrop. They are in Chasm Edge and Chasm Floor. Understand "post" or "hole" or "holes" as posts. The description is "The two posts rise to about waist height. They seem featureless except for a pair of notched holes [if bridge is lowered]on either side[otherwise]which the bridge has snapped into[end if].".
Instead of climbing basic-walls when location is Chasm Edge or location is Chasm Floor: try entering the chasm. Instead of climbing crater proper: say "The walls of the volcano are too crumbly and unstable to climb.".
The bridge ropes are a backdrop. Understand "guide/rope/ropes/taut/handrail/handrails/rail/rails" as bridge ropes. They are in Chasm Edge and Chasm Floor. The description is "The ropes hold the structure together[if bridge has been raised], allow for it to transform between bridge and staircase,[end if] and provide handrails.". Instead of pulling, taking, touching or pushing the ropes, say "[if Chasm Edge is westsided and bridge is lowered and location is Chasm Edge]You can't reach them from here[otherwise]The ropes are held taut by some unseen mechanism[end if].". Instead of entering bridge ropes, try entering bridge. Instead of climbing bridge ropes, say "[if Chasm Edge is westsided and bridge is lowered and location is Chasm Edge]The ropes, like the stairs, run from the floor of the chasm to the opposite side; you can't reach them from here.[otherwise]Easier to just use the [bridgeorstairs].". To say bridgeorstairs: if bridge is lowered, say "stairs"; otherwise say "bridge".
Instead of going northeast when location is Chasm Edge, try entering chasm-ebridge. Instead of going west when location is Chasm Edge, try entering chasm-wbridge. Instead of going up when location is Chasm Floor, try entering chasm-stairs. Instead of going down when location is Chasm Edge, try entering chasm-stairs.
First Instead of entering chasm-stairs when location is Chasm Floor and bridge is raised: say "The wooden planks of the bridge are quite a ways above you, and the walls of the chasm are razor-sharp. You don't see any other way up." First Instead of entering chasm-stairs when location is Chasm Edge and bridge is raised: say "The bridge currently leads across the chasm, the walls of which are too sharp to risk climbing." First instead of entering chasm-ebridge when location is Chasm Edge and Chasm Edge is westsided and bridge is lowered: say "The rough staircase rises from the chasm floor to its far side-- you see no way to access it from here." First Instead of entering chasm-wbridge when location is Chasm Edge and Chasm Edge is eastsided and bridge is lowered: say "The bridge is currently lowered, providing access to the chasm floor but none to its far side." First instead of entering chasm-stairs when location is Chasm Edge and bridge is lowered and Chasm Edge is westsided: say "The rough staircase rises from the chasm floor to its far side-- you see no way to access it from here, and the walls are razor-sharp."
Check jumping when location is Chasm Floor and bridge is raised: say "You jump, hands stretched out above you, but you still can't reach the swaying planks of the bridge." instead.
Chasm Edge is either westsided or eastsided. Chasm Edge is westsided.
Before going from Sloping Meadow to Chasm Edge: now Chasm Edge is westsided; adjust chasm bridges; continue the action. Before going from Chasm Edge to Sloping Meadow: now cross-bridge-bit is true; now Chasm Edge is westsided; adjust chasm bridges; continue the action.
Before going from Rockslide to Chasm Edge: now Chasm Edge is eastsided; adjust chasm bridges; continue the action.
Before going from Chasm Floor to Chasm Edge: now Chasm Edge is eastsided; adjust chasm bridges; continue the action. Before going to Chasm Floor: adjust chasm bridges; continue the action. Before going to Rockslide: adjust chasm bridges; continue the action. Before going to Sloping Meadow: adjust chasm bridges; continue the action. Before going from Chasm Edge to Rockslide when Chasm Edge is westsided: now cross-bridge-bit is true. cross-bridge-bit is a truth state that varies.
To adjust chasm bridges:
if bridge is being debugged, say "// adjust chasm bridges.";
if bridge is lowered and ( Chasm Edge is eastsided or location is regionally in Frozen Hell or location is regionally in Progue's Domain ) :
now chasm-stairs is open;
else:
now chasm-stairs is closed;
if bridge is lowered and Chasm Edge is westsided:
now chasm-ebridge is closed;
else:
now chasm-ebridge is open;
if bridge is lowered and Chasm Edge is eastsided:
now chasm-wbridge is closed;
now chasm-ebridge is open;
else:
now chasm-wbridge is open.
Instead of entering chasm-wbridge when chasm-wbridge is closed: say "The stairs are lowered; you can't get to the west side of the chasm.". Instead of entering chasm-ebridge when chasm-ebridge is closed: say ""
Report going from Chasm Edge to Rockslide: say "You [if cross-bridge-bit is true]cross the plank bridge, using the vine handrails for support, and [end if]clamber up onto a field of shifting boulders kissed with green moss and cyan lichens, until you arrive at a viewpoint."; now cross-bridge-bit is false. Report going from Chasm Edge to Sloping Meadow: say "You [if cross-bridge-bit is true]cross over the plank bridge, using the vine handrails for support, and [end if]curve around the slope of the volcano to the grassy meadow[if a random chance of 2 in 3 succeeds][time-of-day-bit][end if]."; now cross-bridge-bit is false. Report going from Chasm Floor to Chasm Edge: say "You climb the steep plank steps, holding to the taut vine handrails for support, and finally step on to the mossy lava flow at the chasm edge." Report going from Chasm Edge to Chasm Floor: say "You hold the taut vine handrails carefully as you step down the steep plank steps to the smooth floor of the chasm beneath."
To decide whether bridge has power: if the pressure of the related pipe of the bridge pressure gauge is at least the target pressure of the bridge pressure gauge, decide yes; decide no.
Definition: a thing is farsided:
if it is the bridge-control and Chasm Edge is westsided and location is Chasm Edge, decide yes;
if it is the bridge outlet vent and Chasm Edge is westsided and location is Chasm Edge, decide yes;
decide no.
First Instead of doing anything other than examining or examining by name to a farsided thing:
if bridge is raised begin;
if Chasm Edge is westsided, now Chasm Edge is eastsided;
otherwise now Chasm Edge is westsided;
say "(first crossing the bridge)[command clarification break]";
continue the action;
otherwise;
say "You can't reach that from this side of the chasm.";
end if.
To say bridge state:
if bridge is raised, say "[if location is Chasm Floor]Well above your head[otherwise]At your feet[end if], a plank [o]bridge[x] crosses the chasm";
otherwise say "A plank [o]staircase[x] with vine handrails[if location is Chasm Floor] rises [up] from here to the chasm's east side[otherwise if Chasm Edge is eastsided] heads down to the floor of the chasm beneath you[otherwise], inaccessible from here, connects the far side of the chasm to its floor[end if]";
let vol be pressure of the related pipe of the bridge pressure gauge;
if vol > 0, say ", near [if vol > 20]a high-pressure pillar of steam rising[otherwise if vol > 15]gushing torrents of steam rising[otherwise if vol > 10]clouds of steam rising[otherwise if vol > 5]steam puffing[otherwise if vol > 0]tendrils of steam wafting[end if] from an outlet vent [if location is Chasm Floor]in the chasm wall above your head[else]in the ground[end if]";
if location is Chasm Edge and Chasm Edge is eastsided begin; say ". A red [o]handle[x] extrudes from a smoothed tree trunk poking up from a hole in the ground";
otherwise if location is Chasm Floor and Volcano Floor is visited [this is a bit of a cheat, but designed to keep the player from messing with the handle and ruining the red pipe reveal when the adjust the boiler] ; say ". Nearby, a [o]mechanism[x] is visible through a rough window in the chasm wall, connected to a red [o]pipe[x] snaking along the chasm floor, one of several";
end if.
The distant-bridge is minor scenery in Volcano Floor with printed name "[if bridge is raised]bridge[else]staircase[end if] in the chasm". Understand "bridge/stairs/stair/staircase/plank" as distant-bridge. The description is "[if bridge is raised]The distant bridge spans the chasm[else]The distant stairs rise from the floor of the chasm to its eastern side[end if].". The provoke message is "You need to move back towards the [d]chasm[x] to be close enough to interact with it.". Check following distant-bridge: try following bridge instead.