# Adventure770 -- Copyleft Mike Arnautov 1984-2017.
#
# The following acode procedures are associated with
# individual places.
#
#=====================================================================
#
at road
   iflt stage, adventuring
      set stage, adventuring
   fin
   call by.house.actions
   respond grass, attention.to.detail, grass
   ifeq status, 1
      or
   ifkey door
      and
   ifany lock, unlock, close, open
      quip wellhouse.no.door
   fin
   ifkey drink    # In case he said "drink stream"
      proceed
   fin
   ifany door, doorway
      ifany in, walk
         set arg1, house
         set status, 1
      else
         respond door, doorway, no.door, in
      fin
   fin
   ifkey dirt
      call handle.dirt
   fin
   ifkey look
      respond pipe, water.pipes
      respond path, path.info
      respond road, track, road.info
      respond hill, hill.info
      respond gully, streambed, its.a.gully
      respond stream bubbly.stream, south
      proceed
   fin
   respond pine, tree, fir, no.handy.them, tree
   ifkey gully
      ifeq status, 1
         quip its.a.gully
      fin
      quip pardon?
   fin
   ifkey cross
      respond road, track, no.cross.road
      call cross
   fin
   ifkey in
      ifany in, house
         set status, 1
      otherwise
      ifgt status, 1
         respond stream, water, too.little.water
         quip no.understand
      fin
   fin
   ifkey go
      or
   ifeq status, 1
      ifeq stage, mirror.world
         smove valley, forest.4, something.strange
         smove depression, grate, dark.forest, something.strange
         smove slit, dark.forest, something.strange
         smove hill, building, something.strange
         smove ravine, dark.forest, something.strange
         smove view, dark.forest, something.strange
      fin
      ifhave sunstone
         ifkey view
            ifeq sunstone, 6
               say sunstone.stops.you, west
               move ravine
            fin
            lda direction, nw
         fin
         ifany road, up, track, hill
            lda direction, west
         otherwise
         ifany enter, building
            lda direction, east
         otherwise
         ifany downstream, gully, stream, down, valley, depression
            lda direction, south
         otherwise
         ifany path
            lda direction, nw
         fin
         call consult.sunstone, direction
      fin
      move enter, east, building, building
      move road, track, west, up, hill, hill
      move downstream, stream, gully, south, down, valley, valley
      move depression, grate, depression
      move slit, slit
      move ravine, ravine
      move view, stupendous.view
      move north, forest.4
      move ne, north.of.building
      move se, south.of.building
      move sw, forest.14
      move nw, path, path
      respond pipe, upstream, pipe.too.narrow, 1
   fin
   ifany pipe, wall, streambed
      flag context, arg2.here
   fin
#
#=====================================================================
#
at hill
   call in.forest.actions
   respond grass, attention.to.detail, grass
   ifany tower, mountain, thicket, haze
      ifkey look
         respond tower, too.far.to.see, tower
         respond mountain, distant.mountains
         respond thicket, is.thicket
         respond haze, far.haze
      fin
      ifany thicket, tower
         ifgt status, 1
            and
            not
         ifkey go
            quip no.understand
         fin
      else
         quip pardon?
      fin
   fin
   ifkey dirt
      call handle.dirt
   fin
   ifkey dirt
      call handle.dirt
   fin
   ifkey look
      ifany track, road
         quip its.just.a, track
      fin
      respond hill, hill.info
      respond building, too.far.to.see, building
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany track, road
         call follow.it, track, west, road, east
      otherwise
      ifkey forest
         chance 50
            lda direction, ne
         else
            lda direction, south
         fin
         set arg1, direction
      fin
      ifeq stage, mirror.world
         smove building, road, track, something.strange
         smove valley, forest.2, something.strange
         smove tower, north.of.building, something.strange
      fin
      ifhave sunstone
         ifkey tower
            ifeq sunstone, 4
               or
            ifeq sunstone, 5
               say sunstone.stops.you, sw
               move track
            fin
         fin
      fin
         ifany road, down, building
            lda direction, east
         otherwise
         ifany track, tower
            lda direction, west
         otherwise
         ifkey path
            lda direction, north
         otherwise
         ifkey valley
            lda direction, se
         fin
         call consult.sunstone, direction
      fin
      move building, down, east, road
      move north, path, path
      move ne, forest, forest.4
      move se, valley, valley
      move south, forest.14
      move sw, dark.forest
      move nw, forest.2
      move west, track, track
      move thicket, dark.forest
      ifkey tower
         ifhave bust
            move garden.s
         else
            move outside.gates
      fin
   fin
#
#=====================================================================
#
at building
   call house.inventory, 0       # Check the treasure collection
   ifkey go
   else
      respond door, doorway, no.door, out
   fin
   ifkey spring
      ifkey drink
         call drink
      fin
      quip spring.is.water
   fin
   respond well, wellhouse.you.dummy
   ifeq status, 1
      or
   ifkey door
      and
   ifany lock, unlock, close, open
      quip wellhouse.no.door
   fin
   call default.read, poster
   ifany poster, note, notice, words, message, words
      ifany read, look
         call look
      fin
      ifgt status, 1
         quip leave.poster.alone
      fin
   fin
   ifkey roof
      fakecom roof, ceiling
   fin
   ifany bricks, wall, ceiling
      ifkey look
         respond bricks, house.bricks
         respond wall, building.wall
         proceed
      fin
      respond bricks, wall, house.bricks
      flag context, arg2.here
      proceed
   fin
   ifkey look
      respond roof, house.ceiling 
      respond corner, wall.corners, 1
      respond pipe, water.pipes
      respond stream, stream.flows.out
      respond building, house.info
      respond out, doorway, too.bright.outside
      proceed
   fin
   ifany drop, throw
      ifeq status, 1
         default inhand
      fin
      ifkey tusk
         and
         not
      ifflag tusk, valued
         drop tusk
         flag tusk, valued
         set tusk, 1
         quip tusk.quip, arg2
      fin
      ifkey rug
         and 
      ifhave rug
         and
         not
      ifflag rug, valued
         drop rug
         quip must.value.rug, arg2
      fin
   fin
   ifeq stage, mirror.world
      respond out, east, road, wall.there
   fin
   ifany road, out, west
      call try.dir, west, road
   fin
   ifkey go, building
      quip already.inside, building
   fin
   ifany in
      ifkey building
         or
      ifeq status, 1
         quip already.inside, building
      fin
   fin
   ifany xyzzy, plugh
      and
   iflt  stage, exits.barred      # Is the cave open?
      set cave.entered, 1
      smove xyzzy, debris, foof
      smove plugh, y2, foof
   fin
   ifkey stream, drink
      call drink
   fin
   respond pipe, stream, downstream, pipe.too.narrow, 0
   ifany note, notice, message, words, corner, streambed, wall
      flag context, arg2.here
   fin
#
#=====================================================================
#
at valley
   call in.valley.actions
   ifkey look
      respond stream, its.tears.are.wet, stream
      ifkey valley
         set status, 1
      fin
      proceed
   fin
   ifkey drink    # Cater for "drink stream"
      call drink
   fin
   ifany in, go
      and
   ifkey water
      or
   ifkey in, stream
      quip too.little.water
   fin
   ifkey go
      or
   ifeq status, 1
      ifkey stream
         call follow.it, road, north, slit, south
      otherwise
      ifany up, forest
         chance 50
            lda arg1, west
         else
            lda arg1, east
         fin
         ifhave sunstone
            set direction, arg1
         fin
      fin
      ifeq stage, mirror.world
         smove  road, building, slit, something.strange
         smove  slit, road, something.strange
         smove  depression, forest.4, something.strange
      fin
      ifhave sunstone
         ifany upstream, road, building
            lda direction, north
         otherwise
         ifany down, downstream, slit, depression
            lda direction, south
         fin
         ifkey forest
            lda direction, west
         fin
         call consult.sunstone, direction
      fin
      move upstream, north, road, building, road
      move depression, depression
      move nw, hill
      move east, south.of.building
      move se, forest.18
      move sw, forest.15
      move west, forest.14
      move south, down, downstream, slit
      ifkey ne
         chance 50
            move road
         fin
         move south.of.building
      fin
   fin
   ifkey streambed
      flag context, arg2.here
   fin
#=====================================================================
#
at slit
   ifkey look
      respond streambed, shallow.streambed
      respond stream, its.tears.are.wet, stream
      respond slit, look.slit
      respond valley, green.valley, 0
      proceed
   fin
   ifany in, go
      and
   ifkey water
      or
   ifkey in, stream
      quip too.little.water
   fin
   ifkey slit
      and
   ifany down, in
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifkey up
         chance 50
            lda arg1, west
         else
            lda arg1, east
         fin
         ifhave sunstone
            set direction, arg1
         fin
      otherwise
      ifkey stream
         and
      ifeq stage, adventuring
         lda arg1, north
         ifhave sunstone
            set direction, arg1
         fin
      otherwise
      ifkey rock
         lda arg1, south
         ifhave sunstone
            set direction, arg1
         fin
      fin
      ifeq stage, mirror.world
         smove  road, end.of.valley, something.strange
         smove  depression, valley, something.strange
         smove  valley, depression, something.strange
      fin
      ifhave sunstone
         ifany downstream, bed, depression
            lda direction, south
         otherwise
         ifany valley, upstream, building
            lda direction, north
         fin
         call consult.sunstone, direction
      fin
      move building, road, road
      move upstream, north, valley, valley
      move downstream, bed, south, depression, depression
      move ne, south.of.building
      move east, forest.18
      move se, forest.19
      move sw, forest.16
      move west, forest, forest.15
      move nw, forest.14
      ifany slit, stream, down, enter
         ifeq slit,0
            quip slit.too.narrow
         fin
         say down.the.slit
         goto wrong.venue
         unflag status, moved
         quit
      fin
   fin
   ifkey streambed
      flag context, arg2.here
   fin
#
#=====================================================================
#
at depression
   respond grass, attention.to.detail, grass
   ifkey look
      respond streambed, dry.streambed
      respond dirt, ground, its.dirt
      respond depression, look.depression
      respond concrete, crumbly.concrete
      respond rock, bed, no.look.rock
      respond down, in, dark.there, down
      proceed
   fin
   ifkey concrete
      respond break, not.a.hope
      ifany dig, dynamite
         proceed
      fin
      flag context, arg2.here
      proceed
   fin
   ifany bed, rock
      ifkey dig
         proceed
      fin
      ifkey bed
         and
      ifeq status, 1
      else
         quip no.understand
      fin
   fin
   ifkey dirt
      call handle.dirt
   fin
   ifkey grate
      and
   ifany go, in, down
      set status, 1
      fakearg go, in
   fin
   respond stream, downstream, i.dont.see, stream
   ifkey go
      or
   ifeq status, 1
      ifkey up
         chance 50
            lda arg1, east
         else
            lda arg1, west
         fin
      fin
      ifeq stage, mirror.world
         smove road, end.of.valley, something.strange
         smove valley, end.of.valley, something.strange
         smove slit, end.of.valley, something.strange
      fin
      ifhave sunstone
         ifany bed, stream, upstream, slit, valley, building
            lda direction, north
         fin
         call consult.sunstone, direction
      fin
      move ne, forest.18
      move east, forest.19
      move se, forest.20
      move south, end.of.valley
      move sw, forest.17
      move west, forest, forest.16
      move nw, forest.15
      move north, stream, upstream, slit, slit
      move valley, valley
      move road, building, road
      ifany in, down
         ifeq grate, unlocked
            set cave.entered, 1
            move in.cave
         fin
         quip cant.pass.grate
      fin
   fin
   ifkey streambed
      flag context, arg2.here
   fin
#
#=====================================================================
#
at in.cave
   ifkey go, grate
      fakearg go, out
   fin
   ifkey crawl
      and
   ifany in, out
      set status, 1
   fin
   ifkey out, grate
      set status, 1
   fin
   ifkey look
      respond crawl, low.crawl
      respond cobbles, just.them, cobbles
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany up, out, leave, surface
         ifeq grate, unlocked
            move depression
         fin
         quip cant.pass.grate
      fin
      move crawl, cobbles, in, west, cobbles
      move pit, pit
      move out, debris, debris
   fin
   ifany crawl, cobbles
      flag context, arg2.here
   fin
#
#=====================================================================
#
at cobbles
   ifkey look
      respond cobbles, just.them, cobbles
      respond light, looks.like.daylight
      respond passage, tunnel, corridor, is.passage, 0
      proceed
   fin
   ifkey go, light
      move in.cave
   fin
   ifkey go
      or
   ifeq status, 1
      ifany passage, crawl
         call follow.it in.cave, east, debris, west
      fin
      move out, surface, entrance, east, in.cave
      move inward, dark, west, debris, debris
      move pit, pit
   fin
   ifany cobbles, crawl
      flag context, arg2.here
   fin
#
#=====================================================================
#
at debris
   call default.read, note
   ifany note, notice, words, inscription, message
      respond get, pull, leave.it.alone, note
      respond look, read, debris.note
   fin
   ifkey look
      respond debris, mud, no.future.in.it, arg2
      respond passage, tunnel, corridor, is.passage, 0
      respond canyon, is.canyon, 0
      proceed
   fin
   ifkey say xyzzy
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move entrance, in.cave
      move out, cobbles, passage, low, east, cobbles
      move canyon, inward, up, west, canyon
      move pit, pit
      ifeq grate, unlocked
         move depression, depression
      else
         smove depression, in.cave, cant.pass.grate
      fin
      ifkey xyzzy
         ifgt stage, closing.soon
            or
         ifflag admin, nomagic
            flag admin, panicked
            quip exit.closed
         fin
         smove building, foof
      fin
   fin
   ifany note, notice, words, message, inscription
      flag context, arg2.here
   fin
#
#=====================================================================
#
at canyon
   ifkey look, canyon
      set status, 1
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move entrance, in.cave
      move down, out, east, debris, debris
      move inward, up, west, bird.chamber
      move pit, pit
      ifkey canyon
         call follow.it, debris, east, bird.chamber, west
      fin
      ifeq grate, unlocked
         move depression, depression
      else
         smove depression, in.cave, cant.pass.grate
      fin
   fin
   ifany canyon
      flag context, arg2.here
   fin
#
#=====================================================================
#
at bird.chamber
   ifkey look
      ifkey chamber
         set status, 1
      fin
      respond canyon, is.canyon, 1
      respond passage, tunnel, corridor, is.passage, 1
      respond walls, stone, river, orange.walls
      respond formations, flow, stone.rivers
      proceed
   fin
   ifhere bird
      flag here, hintable
   fin
   ifkey go
      or
   ifeq status, 1
      move entrance, in.cave
      move debris, debris
      move out, canyon, east, canyon
      move in, passage, pit, west, pit
      ifeq grate, unlocked
         move depression, depression
      else
         smove depression, in.cave, cant.pass.grate
      fin
   fin
   ifany chamber, canyon, passage, walls, stone, river
      flag context, arg2.here
   fin
#
#=====================================================================
#
at pit
   ifeq nugget.room, 0
      and
      not
   ifhave nugget
      apport steps, pit
   else
      apport steps, limbo
   fin
   ifkey look
      respond west, crack, crack.info
      respond wall, cracked.wall, west
      respond down, pit, no.see.down.there, 1
      ifkey steps
         and
      ifhere steps
         quip dome.steps
      fin
      proceed
   fin
   ifkey go, on
      quip crack.too.small
   fin
   ifkey down
      and
   ifany steps, pit, climb
      or
   ifkey in, crack
      set status, 1
   fin
   ifany go, jump
      or
   ifeq status, 1
      move entrance, in.cave
      move debris, debris
      move passage, east, bird.chamber
      ifeq grate, unlocked
         move depression, depression
      else
         smove depression, in.cave, cant.pass.grate
      fin
      respond west, crack, crack.too.small
      ifany down, pit, steps
         ifhere steps
            move mists
         fin
         say broken.neck
         goto mists
         call coroner
      fin
      ifkey jump
         goto mists
         call splatter
      fin
   fin
   ifany crack, pit, steps
      flag context, arg2.here
   fin
   lda throw.here, mists
   lda throw.text, throw.pit
#
#=====================================================================
#
at mists
   ifeq stage, closing.soon
      call closing.time
   fin
   apport steps, limbo
   ifkey look
      ifkey hall
         set status, 1
      fin
      ifkey dome
         say dome.state
         quip blank
      fin
      ifkey steps
         and
      ifeq mists, steps.present
         quip dome.steps
      fin
      respond crack, passage, dark.exit, arg2
      respond staircase, mists.stairs
      respond wall, cracked.wall, east
      proceed
   fin
   ifany climb, up
      and
   ifany pit, dome, passage, steps
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move south, passage, nugget.room
      move east, crack, sandstone
      move forward, hall, west, east.of.fissure
      move down, staircase, north, mtking
      move y2, jumble
      ifany climb, up, pit, dome, steps
         ifeq mists, steps.present
            move pit
         fin
         quip dome.unclimbable
      fin
   fin
   ifany passage, tunnel, corridor, crack, staircase, steps
      flag context, arg2.here
   fin
   set throw.it, true
   lda throw.text, up.the.dome
   lda throw.here, pit
#
#=====================================================================
#
at east.of.fissure
   ifany bridge, arch
      ifeq fissure, 1
         apport bridge, here
      else
         quip i.dont.see, bridge
      fin
   fin
   ifkey look
      respond down, bank, no.see.down.there, 1
      ifany bridge, arch
         call look.bridge
      fin
      ifkey hall
         set status, 1
      fin
      proceed
   fin
   ifkey jump
      ifeq status, 1
         or
      ifany across, fissure, down
         ifeq fissure, 1
            quip try.the.bridge
         fin
         goto cavern
         call splatter
      fin
      proceed
   fin
   lda throw.here, cavern
   lda throw.text, throw.fissure
   ifkey cross
      and
   ifany bridge, arch, fissure
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move east, hall, mists
      ifany forward, cross, bridge, arch, west
         ifeq fissure, 0
            quip no.way.across
         fin
         smove west.of.fissure, it.plays.a.tune
      fin
      respond bank, you.are.there
   fin
   ifany fissure, mist, hall, bank
      flag context, arg2.here
   fin
#
#=====================================================================
#
at nugget.room
   call default.read, note
   ifany note, notice, words, inscription, message
      respond look, read, nugget.room.note, nugget.room
      flag context, arg2.here
      proceed
   fin
   ifkey look
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move north, out, hall, mists
   fin
   ifany note, notice, words, inscription, message
      flag context, arg2.here
   fin
#
#=====================================================================
#
at mtking
   ifkey look
      ifkey hall
         set status, 1
      fin
      respond passage, tunnel, corridor, dark.exits, passage
      proceed
   fin
   set place.ptr, 0
   ifkey steps
      and
   ifany up, climb
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifany steps, up, east
         lda place.ptr, mists
      fin
      respond passage, tunnel, corridor, too.many.exits, passage
      ifkey north
         lda place.ptr, low.n/s.passage
      otherwise
      ifkey sw
         chance 66
            lda place.ptr, secret.e/w.canyon
         else
            ifnear snake, 0
               quip sleepy.blocks.way, sw
            fin
            ifnear snake, 1
               ifis snake.exit, secret.e/w.canyon
                  set place.ptr, snake.exit
               else
                  quip snake.blocks.way
               fin
            else
               flag status, moved
               quip still.where.you.were
            fin
         fin
      otherwise
      ifkey secret
         lda place.ptr, secret.e/w.canyon
      otherwise
      ifkey south
         lda place.ptr, south.side.chamber
      otherwise
      ifkey west
         lda place.ptr, west.side.chamber
      otherwise
      ifkey down
         lda place.ptr, vault
      otherwise
      ifkey se
         lda place.ptr, morion
      otherwise
      ifkey nw
         lda place.ptr, division.in.passage
      otherwise
      ifkey ne
         lda place.ptr, wide.n/s.corridor
      fin
      ifeq place.ptr, 0
         proceed
      fin
      ifnear snake
         and
         not
      ifeq place.ptr, snake.exit
         call sneaks.die
         ifeq snake, 0                 # If snake sleepy 
            ifany ne, se, south, nw    # Dead end directions
               ifinrange arg1, first.direction, last.direction
                  quip sleepy.blocks.way, arg1
               else
                  quip sleepy.blocks.way, arg2
               fin
            else
               set snake, 1            # Wake it up
               say snake.misses, snake
            fin
         else
            quip snake.blocks.way
         fin
      fin
      move place.ptr
   fin
   ifany passage, tunnel, corridor, steps, hall
      flag context, arg2.here
   fin
#
#=====================================================================
#
at west.pit.end
   ifkey look
      respond down, pit, pit.view, plant
      respond hole, its.a.hole
      ifgt plant, 1
         respond plant, its.a.plant, plant
      fin
      proceed
   fin
   ifkey hole
      ifany go, enter, climb
         ifeq plant, gigantic
            lda  arg1, climb
         else
            quip too.far.up, hole
         fin
      else
         flag context, arg2.here
         proceed
      fin
   fin
   ifkey climb
      ifeq status, 1
         or
      ifany up, hole
         ifeq  plant, gigantic
            set nobody.answers, 0
            smove narrow.corridor, up.the.plant.you.go
         fin
         quip too.far.up, hole
      otherwise
      ifkey plant
         ifeq plant, stunted
            respond plant, i.dont.see, arg2
         otherwise
         ifeq plant, grown
            smove west.pit, down.the.plant.you.go
         else
            set nobody.answers, 0
            smove narrow.corridor, up.the.plant.you.go
         fin
      fin
      respond wall, too.far.up, hole         
   fin
   ifkey down, pit
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move east, cross, east.pit.end
      move west, slab, slab
      move down, pit, west.pit
   fin
   ifkey plant
      and
   ifgt plant, 1
      flag context, arg2.here
   fin
   lda throw.here, west.pit
   lda throw.text, throw.pit
#
#=====================================================================
#
at east.pit
   ifkey look
      respond pool, oil, corner, looks.greasy
      ifkey pit
         set status, 1
      fin
      proceed
   fin
   ifkey climb
      ifany up, out, wall, pit
         set status, 1
      fin
   fin
   ifany go, pit
      or
   ifeq status, 1
      respond pit, you.are.there
      move climb, up, out, east.pit.end
   fin
#
#=====================================================================
#
at west.pit
   ifkey look
      respond hole, its.a.hole
      proceed
   fin
   ifkey hole
      ifany up, go, in
         lda arg1, climb
      otherwise
      ifkey climb
         or
      ifeq status, 1
      else
         flag context, arg2.here
         proceed
      fin
   fin
   ifany go, pit
      or
   ifeq status, 1
      move up, out, west.pit.end
   fin
   ifkey climb
      ifkey hole
         or
      ifeq status, 1
         iflt plant, gigantic
            quip too.far.up, hole
         fin
         lda arg2, plant
      fin
      move wall, pit, out, west.pit.end
      ifkey plant
         ifeq plant, stunted
            quip plant.not.climbable
         fin
         ifeq plant, grown
            smove west.pit.end, plant.too.short
         fin
         set nobody.answers, 0
         smove narrow.corridor, up.the.plant.you.go
      else
         quip hah!
      fin
   fin
   set vessel, none
   ifany pour, spill
      ifeq status, 1
         set vessel, none
         call find.water, false
         ifgt vessel, none
            call water.beanstalk
         fin
      fin
      ifkey water
        call water.beanstalk
      fin
   fin
   ifkey water, beanstalk
        call water.beanstalk
   fin
   ifany empty, pour
      ifkey bucket
         and
      ifnear bucket, full.of.dung
         call feed.beanstalk
      fin
      ifany bucket, bottle, flask
         and
      ifnear arg2
         set vessel, arg2
         eval object.state, vessel
         ifeq object.state, full.of.water
            call water.beanstalk
         fin
      fin
   fin
   ifkey plant
      ifkey water
         call water.beanstalk
      fin
      respond feed, fertiliser, plant.not.hungry
      respond get, pull, roots.too.deep, plant
   fin
   ifkey packet
      and
   ifany open, tear, spill, scatter
      ifnear packet
         quip plant.not.hungry
      fin
      call bail.out
   fin
   ifkey foliage
      flag context, arg2.here
   fin
#
#=====================================================================
#
at west.of.fissure
   ifany bridge, arch
      ifeq fissure, 1
         apport bridge, here
      else
         quip i.dont.see, bridge
      fin
   fin
   ifkey look
      respond down, bank, no.see.down.there, 1
      respond mist, this.is.mist
      ifany bridge, arch
         call look.bridge
      fin
      ifkey hall
         set status, 1
      fin
      respond crawl, dark.exit, crawl
      proceed
   fin
   ifkey jump
      ifeq status, 1
         or
      ifany across, fissure, down
         ifeq fissure, 1
            quip try.the.bridge
         fin
         goto cavern
         call splatter
      fin
      proceed
   fin
   lda throw.here, cavern
   lda throw.text, throw.fissure
   ifkey cross
      and
   ifany bridge, fissure, arch
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move west, west.end.of.mists
      ifkey jump
         ifeq fissure, 1
            quip try.the.bridge
         fin
         goto cavern
         call splatter
      fin
      ifkey north
         smove west.end.of.mists, crawled.back.to.mists
      fin
      ifkey hall
         ifis there, east.of.fissure
            lda arg2, east
         else
            lda arg2, west
         fin
      fin
      ifany cross, bridge, arch, east
         ifeq fissure, 0
            quip no.way.across
         fin
         smove east.of.fissure, it.plays.a.tune
      fin
      respond bank, you.are.there
   fin
   ifany fissure, mist, hall, bank
      flag context, arg2.here
   fin
#
#=====================================================================
#
at low.n/s.passage
   ifeq stage, closing.soon
      call closing.time
   fin
   ifkey look
      respond hole, no.see.down.there, 0
      respond passage, tunnel, corridor, dark.exits, passage
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move south, out, hall, mtking
      move north, y2, y2
      move down, hole, dirty
      move hole, dirty
      ifany tunnel, passage, corridor
         call follow.it, y2, north, mtking, south
      fin
   fin
   lda throw.here, dirty
   lda throw.text, throw.hole
   ifany passage, tunnel, corridor, hole
      flag context, arg2.here
   fin
#
#=====================================================================
#
at south.side.chamber
   ifkey look
      respond shaft, dark.way, shaft
      ifany steps, stairs
         say spiral.stair
         quip blank
      fin
      ifkey chamber
         set status, 1
      fin
      proceed
   fin
   ifany down, steps, stairs
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move north, out, hall, mtking
      move down, steps, stairs, shaft, half.stairs
      respond chamber, you.are.there
   fin
   ifany steps, stairs, chamber
      flag context, arg2.here
   fin
#
#=====================================================================
#
at west.side.chamber
   ifkey look
      ifkey chamber
         set status, 1
      fin
      respond passage, tunnel, corridor, dark.exit, passage
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move east, out, hall, mtking
      move west, up, passage, crossover
      respond chamber, you.are.there
   fin
   ifany chamber, passage
      flag context, arg2.here
   fin
#
#=====================================================================
#
at y2
   unflag east.window, no.dwarf
   ifkey look
      respond passage, tunnel, corridor, dark.exits, passage
      respond wall, jumble, all.broken.up
      respond y2, rock, surveyors.mark
      proceed
   fin
   ifany plugh, plover
      ifeq status, 2
         and
         not
      ifkey say
         proceed
      fin
      ifkey plover
         unflag plover, hintable
         unflag alcove, hintable
         unflag dark, hintable
         move plover
      fin
      ifgt stage, closing.soon
         or
      ifflag admin, nomagic
         flag admin, panicked
         quip exit.closed
      fin
      smove building, foof
   fin
   ifkey go
      or
   ifeq status, 1
      move south, low.n/s.passage
      move east, wall, jumble, jumble
      move west, east.window
      ifany tunnel, passage, corridor
         call follow.it, east.window, west, low.n/s.passage, east
      fin
   fin
   ifany passage, tunnel, corridor, jumble, wall, rock, y2
      flag context, arg2.here
   fin
#
#=====================================================================
#
at jumble
   ifkey look
      ifkey jumble
         set status, 1
      fin
      respond crack, large.n.small
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move down, y2, y2
      move up, mists
      respond n, ne, e, se, s, sw, w, nw, lost.in.jumble
   fin
   ifany crack, jumble
      flag context, arg2.here
   fin
#
#=====================================================================
#
at east.window
   ifeq stage, closing.soon
      call closing.time
   fin
   call fake.window
   ifkey look
      respond me, its.you
      respond pit, huge.pit
      respond mist, this.is.mist
      respond marks, dust, cant.tell
      respond floor, misty.floor
      respond passage, tunnel, corridor, dark.exit, passage
      proceed
   fin
   ifkey climb
      and
   ifany down, pit
      quip climbing.out.risky
   fin
   ifany go, jump
      and
   ifany pit, window
      say broken.neck
      goto mirror.canyon
      call coroner
   fin
   ifkey go
      or
   ifeq status, 1
      move east, passage, tunnel, corridor, y2, y2
   fin
   ifany pit, mist, marks, dust, passage, tunnel, corridor
      flag context, arg2.here
   fin
   lda throw.here, mirror.canyon
   lda throw.text, throw.pit
#
#=====================================================================
#
at dirty
   ifkey look
      respond crawl, passage, dark.exit, arg2
      respond up, hole, no.see.up.there
      respond dirt, dirty.place
      proceed
   fin
   ifkey up, hole
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move east, crawl, brink
      move up, hole, low.n/s.passage
      move west, passage, dusty
      move bedquilt, bedquilt
   fin
   ifany crawl, passage, hole, dirt
      flag context, arg2.here
   fin
#
#=====================================================================
#
at brink
   ifkey look
      ifkey brink
         set status, 1
      fin
      respond down, pit, stream.in.pit
      respond crawl, dark.exit, crawl
      proceed
   fin
   ifkey climb
      and
   ifany pit, down
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move west, crawl, dirty
      move down, climb, pit, streampit
   fin
   ifany brink, pit, crawl
      flag context, arg2.here
   fin
   lda throw.here, streampit
   lda throw.text, throw.pit
#
#=====================================================================
#
at streampit
   respond slit, slits, slits.too.narrow
   ifkey drink, stream
      proceed
   fin
   ifkey look
      respond stream, its.tears.are.wet, stream
      proceed
   fin
   ifany cross, stream, climb, out
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move up, out, climb, brink
      respond stream, down, upstream, downstream, slits.too.narrow
      respond cross, stream, stream.crossed
   fin
#
#=====================================================================
#
at dusty
   ifkey look
      respond passage, tunnel, corridor dark.exit, passage
      respond hole, no.see.down.there, 0
      respond dust, rock, dusty.place
      respond crack, useless.cracks
      proceed
   fin
   ifkey down, hole
      or
   ifkey go
      or
   ifeq status, 1
      move east, passage, dirty
      move down, hole, complex
      move bedquilt, bedquilt
      respond crack, useless.cracks
   fin
   ifany dust, rock, hole, passage, crack
      flag context, arg2.here
   fin
   lda throw.here, complex
   lda throw.text, throw.hole
#
#=====================================================================
#
at west.end.of.mists
   ifkey look
      ifkey hall
         set status, 1
      fin
      respond crawl, passage, dark.exit, arg2
      proceed
   fin
   ifkey climb, up
      or
   ifkey go
      or
   ifeq status, 1
      move south, up, passage, climb, mazea.42
      move east, west.of.fissure
      move west, crawl, hall, long.hall.east
      smove north, west.of.fissure, crawled.back.to.mists
   fin
   ifany hall, passage, crawl
      flag context, arg2.here
   fin
#
#=====================================================================
#
at mazea.42
   ifkey go
      or
   ifeq status, 1
      move up, west.end.of.mists
      move north, mazea.42
      move east, mazea.43
      move south, mazea.45
      move west, mazea.80
   fin
#
#=====================================================================
#
at mazea.43
   ifkey go
      or
   ifeq status, 1
      move west, mazea.42
      move south, mazea.44
      move east, mazea.45
   fin
#
#=====================================================================
#
at mazea.44
   ifkey go
      or
   ifeq status, 1
      move east, mazea.43
      move down, mazea.48
      move south, mazea.50
      move north, mazea.82
   fin
#
#=====================================================================
#
at mazea.45
   ifkey go
      or
   ifeq status, 1
      move west, mazea.42
      move north, mazea.43
      move east, mazea.46
      move south, mazea.47
      move up, down, mazea.87
      move down, mazea.87
   fin
#
#=====================================================================
#
at mazea.46
   ifkey go
      or
   ifeq status, 1
      move out, west, mazea.45
   fin
#
#=====================================================================
#
at mazea.47
   ifkey go
      or
   ifeq status, 1
      move out, east, mazea.45
   fin
#
#=====================================================================
#
at mazea.48
   ifkey go
      or
   ifeq status, 1
      move out, up, mazea.44
   fin
#
#=====================================================================
#
at mazea.49
   ifkey go
      or
   ifeq status, 1
      move east, mazea.50
      move west, mazea.51
   fin
#
#=====================================================================
#
at mazea.50
   ifkey go
      or
   ifeq status, 1
      move east, mazea.44
      move west, mazea.49
      move down, mazea.51
      move south, mazea.52
   fin
#
#=====================================================================
#
at mazea.51
   ifkey go
      or
   ifeq status, 1
      move west, mazea.49
      move up, mazea.50
      move east, mazea.52
      move south, mazea.53
   fin
#
#=====================================================================
#
at mazea.52
   ifkey go
      or
   ifeq status, 1
      move west, mazea.50
      move east, mazea.51
      move south, mazea.52
      move up, mazea.53
      move north, mazea.55
      move down, mazea.86
   fin
#
#=====================================================================
#
at mazea.53
   ifkey go
      or
   ifeq status, 1
      move west, mazea.51
      move north, mazea.52
      move south, mazea.54
   fin
#
#=====================================================================
#
at mazea.54
   ifkey go
      or
   ifeq status, 1
      move out, west, mazea.53
   fin
#
#=====================================================================
#
at mazea.55
   ifkey go
      or
   ifeq status, 1
      move west, mazea.52
      move north, mazea.55
      move down, mazea.56
      move east, mazea.by.pit
   fin
#
#=====================================================================
#
at mazea.56
   ifkey go
      or
   ifeq status, 1
      move out, up, mazea.55
   fin
#
#=====================================================================
#
at mazea.by.pit
   ifkey look
      respond down, pit, no.see.down.there, 0
      respond column, stalactite, wall, orange.column
      respond brink, orange.brink
      proceed
   fin
   ifany climb, down
      and
   ifany column, stalactite
      or
   ifkey go
      or
   ifeq status, 1
      move down, climb, bird.chamber
      move west, mazea.55
      move south, mazea.58
      move north, mazea.83
      move east, mazea.84
   fin
   respond column, hah!
   ifany column, stalactite, wall, brink
      flag context, arg2.here
   fin
   lda throw.here, bird.chamber
   lda throw.text, throw.pit
#
#=====================================================================
#
at mazea.58
   ifkey go
      or
   ifeq status, 1
      move out, east, mazea.by.pit
   fin
#
#=====================================================================
#
at long.hall.east
   ifkey look
      ifkey hall
         set status, 1
      fin
      respond crawl, hole, dark.exit, arg2
      proceed
   fin
   ifkey crawl, up
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move east, up, crawl, west.end.of.mists
      move west, hall, long.hall.west
      move north, down, hole, crossover
   fin
   ifany hall, crawl, hole
      flag context, arg2.here
   fin
#
#=====================================================================
#
at long.hall.west
   ifkey look
      ifkey hall
         set status, 1
      fin
      respond passage, tunnel, corridor, ns.passage
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move east, hall, long.hall.east
      move north, crossover
      move south, mazed.107
      respond passage, tunnel, corridor, need.a.direction
   fin
   ifany passage, tunnel, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at crossover
   ifkey look
      respond passage, tunnel, corridor, dark.exits, passage
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move west, long.hall.east
      move north, dead.end.1
      move east, west.side.chamber
      move south, long.hall.west
      respond passage, tunnel, corridor, too.many.exits, passage
   fin
   ifany passage, tunnel, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at dead.end.1
   ifkey look
      respond crawl, dark.exit, crawl
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move out, crawl, south, crossover
   fin
   ifany crawl
      flag context, arg2.here
   fin
#
#=====================================================================
#
at complex
   ifkey look
      respond crawl, dark.exit, crawl
      respond passage, tunnel, corridor, dark.exits, passage
      respond up, no.see.up.there
      proceed
   fin
   ifkey climb, up
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move up, climb, dusty
      move west, bedquilt, bedquilt
      move north, shell, shell
      move east, crawl, anteroom
      ifany tunnel, passage, corridor
         call follow.it, bedquilt, west, shell, north
      fin
   fin
   ifany crawl, passage
      flag context, arg2.here
   fin
#
#=====================================================================
#
at bedquilt
   local temp.val
#
   ifkey look
      ifkey bedquilt
         set status, 1
      fin
      respond passage, tunnel, corridor, dark.exits, passage
      respond hole, useful.holes, 0
      proceed
   fin
   ifkey climb
      and
   ifany up, hole
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move east, complex
      move west, swiss
      move slab, slab
      respond bedquilt, you.are.there
      ifany tunnel, passage, corridor
         call follow.it, swiss, west, complex, east
      fin
      ifkey nw
         chance 50
            quip still.where.you.were
         fin
         move oriental
      fin
      ifkey hole
         choose temp.val, 0, 3
         ifeq temp.val, 0
            lda arg1, north
         otherwise
         ifeq temp.val, 1
            lda arg1, south
         otherwise
         ifeq temp.val, 2
            lda arg1, up
         else
            lda arg1, down
         fin
      fin
      ifany north, south, up, down
         chance    65
            quip crawl.caved.in
         fin
         move down, anteroom
         chance 75
            move north, low
            move up, dusty
            move south, slab
         else
            move north, junction
            move up, secret.n/s.canyon.2
            move south, tall.e/w.canyon
         fin
      fin
   fin
   ifany bedquilt, passage, hole
      flag context, arg2.here
   fin
#
#=====================================================================
#
at swiss
   local temp.val
#
   ifkey look
      respond block, bedrock.block
      respond passage, tunnel, corridor, dark.exits, passage
      respond wall, hole, useful.holes, 1
      proceed
   fin
   ifkey climb, hole
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifkey hole
         choose temp.val, 0, 4
         ifeq temp.val, 0
            lda arg1, canyon
         otherwise
         ifeq temp.val, 1
            lda arg1, south
         else
            quip still.where.you.were
         fin
      fin
      respond passage, tunnel, corridor, out, too.many.exits, passage
      move ne, bedquilt
      move west, east.pit.end
      move canyon, tall.e/w.canyon
      move east, soft, soft
      move nw, oriental, oriental
      ifkey south
         chance 33
            move south, tall.e/w.canyon
         else
            quip still.where.you.were
         fin
      fin
   fin
   ifany block, passage, wall, hole
      flag context, arg2.here
   fin
#
#=====================================================================
#
at east.pit.end
   ifkey look
      respond passage, tunnel, corridor, dark.exits, passage
      respond down, pit, pit.view, 0
      respond path, pit.path
      respond opening, hole, lotsa.holes
      respond slab, floor, thin.slabs
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move east, swiss
      move west, cross, path, west.pit.end
      move down, pit, east.pit
      respond opening, hole, no.way.there
      ifany tunnel, passage, corridor
         call follow.it, swiss, east, west.pit.end, west
      fin
   fin
   ifany path, passage, pit, opening, hole, slab, path
      flag context, arg2.here
   fin
   lda throw.here, east.pit
   lda throw.text, throw.pit
#
#=====================================================================
#
at slab
   ifkey look
      ifkey chamber
         set status, 1
      fin
      respond slab, slab.info
      respond ceiling, up, its.a.ceiling, c.slab.room
      respond hole, no.see.up.there
      respond passage, tunnel, corridor, dark.exits, passage
      respond wall, may.climb.wall
      respond boulder, boulders.block
      proceed
   fin
   ifany climb, up
      and
   ifany hole, wall
      or
   ifkey climb, up
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move south, west.pit.end
      move up, climb, secret.n/s.canyon.1
      move north, bedquilt, bedquilt
      move bedquilt, bedquilt
      respond east, west, boulders, boulders.block
      respond slab, you.are.there
      ifany tunnel, passage, corridor
         call follow.it, bedquilt, north, west.pit.end, south
      fin
   fin
   ifany passage, tunnel, corridor, ceiling, hole, boulder, stones, wall, slab
      flag context, arg2.here
   fin
#
#=====================================================================
#
at secret.n/s.canyon.1
   ifkey look
      ifkey canyon
         set status, 1
      fin
      respond down, no.see.down.there, 0
   fin
   ifkey climb, down
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move down, slab, slab
      move north, mirror, mirror.canyon
      move reservoir, reservoir
      move south, secret.n/e.canyon.1
      ifkey canyon
         call follow.it, mirror.canyon, north, secret.n/e.canyon.1, south
      fin
   fin
   ifany canyon
      flag context, arg2.here
   fin
   lda throw.here, slab
   lda throw.text, throw.room
#
#=====================================================================
#
at secret.n/s.canyon.2
   ifkey look
      ifkey canyon
         set status, 1
      fin
      respond down, passage, no.see.down.there, 0
   fin
   ifkey climb, down
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move north, junction
      move down, passage, bedquilt
      move south, top.of.stalactite
      ifkey canyon
         call follow.it, junction, n, top.of.stalactite, s
      fin
   fin
   ifany canyon, passage
      flag context, arg2.here
   fin
   lda throw.here, bedquilt
   lda throw.text, throw.room
#
#=====================================================================
#
at junction
   unflag west.window, no.dwarf
   ifkey look
      ifkey junction
         set status, 1
      fin
      respond canyon, dark.exits, canyon
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move se, bedquilt
      move south, secret.n/s.canyon.2
      move north, west.window
      respond canyon, too.many.exits, canyon
      respond junction, you.are.there
   fin
   ifany canyon
      flag context, arg2.here
   fin
#
#=====================================================================
#
at low
   ifkey look
      respond crawl, dark.exits, crawl
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move bedquilt, bedquilt
      move sw, sloping
      move north, dead.end.2
      move se, oriental, oriental
      respond crawl, too.many.exits, crawl
   fin
   ifany crawl
      flag context, arg2.here
   fin
#
#=====================================================================
#
at dead.end.2
   ifkey go
      or
   ifeq status, 1
      move south, out, crawl, low
   fin
#
#=====================================================================
#
at secret.e/w.canyon
   local west.room
#
   ifkey look
      ifkey canyon
         set status, 1
      fin
      proceed
   fin
   ifkey climb, down
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move east, mtking
      move down, wide.n/s.canyon
      ifkey west
         ifeq dragon, on.rug      # If it's alive...
            move secret.n/e.canyon.2
         fin
         move secret.n/e.canyon.1
      fin
      ifkey canyon
         ifeq dragon, on.rug
            lda west.room, secret.n/e.canyon.2
         else
            lda west.room, secret.n/e.canyon.1
         fin
         call follow.it, west.room, west, mtking, east
      fin
   fin
   ifany canyon
      flag context, arg2.here
   fin
   lda throw.here, wide.n/s.canyon
   lda throw.text, throw.canyon
#
#=====================================================================
#
at wide.n/s.canyon
   ifkey look
      ifkey canyon
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move south, tight.dead.end
      move north, tall.e/w.canyon
      ifkey canyon
         call follow.it, tight.dead.end, s, tall.e/w.canyon, n
      fin
   fin
   ifany canyon
      flag context, arg2.here
   fin
#
#=====================================================================
#
at tight.dead.end
   ifkey look, canyon
      set status, 1
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move out, north, canyon, wide.n/s.canyon
   fin
   ifany canyon
      flag context, arg2.here
   fin
#
#=====================================================================
#
at tall.e/w.canyon
   ifkey look
      ifkey canyon
         set status, 1
      fin
      respond crawl, dark.exit, crawl
      respond in, arch, light, entrance, cant.see.in
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move east, wide.n/s.canyon
      move west, dead.end.3
      move north, crawl, swiss
      move south, in, arch, valuers
      ifkey go, light
         move valuers
      fin
      ifkey canyon
         call follow.it, dead.end.3, west, wide.n/s.canyon, e
      fin
   fin
   ifany canyon, crawl, entrance, arch
      flag context, arg2.here
   fin
#
#=====================================================================
#
at valuers
   call default.read, sign
   ifany note, notice, message, sign, words, inscription
      respond look, read, valuers.note
      respond get, leave.it.alone, note
      flag context, arg2.here
      proceed
   fin
   ifkey ring
       and
   ifeq status, 1
       set status,2
       lda arg2, bell-pull
   fin
   ifkey bell-pull
      and
      not
   ifnear bell-pull
      apport bell-pull, here
      add rug.doesnt.fit, 1
      say bell.spotted
   fin
   ifkey look
      respond niche, deep.niche
      respond dust, disturbed.dust
      respond arch, dark.arch
      proceed
   fin
   ifkey in
      ifkey niche
         or
      ifeq status, 1
         quip no.value.self
      fin
   fin
   ifkey drop
      and
   ifeq status, 2
      ifhave arg2
      else
         quip you.dont.have, arg2
      fin
      ifkey rug
         apport bell-pull, here
         quip rug.doesnt.fit
      fin
      set valuation.outcome,0
      ifkey tusk
         say tusk.in.niche
      else
         ifkey cage
            and
         ifhave bird
            say caged.bird.in.niche
            set valuation.outcome, 1
         else
            ifkey bird
               drop bird
               set bird, freed
               quip no.value.bird
            fin
            ifkey starstone
               ifeq starstone, quiescent
                  say starstone.in.niche
               else
                  say starstone2.in.niche
               fin
            else
               ifkey vase
                  say vase.in.niche
               else
                  say put.in.niche, arg2
               fin
            fin
         fin
      fin
      ifkey cage
         and
      ifhave bird
         apport bird, bird.chamber
         set bird, freed
      fin
      ifkey tusk
         flag tusk, valued
      fin
      ifany drachma, obolus, magazines
         set valuation.result, just.about.valuable
      else
         ifany vase, pottery
            set valuation.result, had.been.valuable
         else
            ifflag arg2, valued
               ifany crown, nest, trident, rug, ring, orb, chalice
                  or
               ifany starstone, sunstone, fangs, thurible, bust
                  set valuation.result valuable.and.useful
               else
                  set valuation.result, was.valuable
               fin
            else
               ifany clam, spoon, wrapper
                  set valuation.result, not.valuable.or.useful
               else
                  set valuation.result was.not.valuable
               fin
            fin
         fin
      fin
      apport arg2, ylem     # Destroy the object
      ifany bottle, flask, bucket
         deposit arg2, emptied
      fin
      say valuation.in.progress
      quip valuation.result
   fin
   ifany ring, pull
      ifeq status, 1
         or
      ifkey bell
         or
      ifis arg2, pull      # Allow for "pull pull"
         ifhere bell-pull
         else
            quip i.dont.see, bell-pull
         fin
         ifnear rug
            ifflag rug, valued
               quip already.valued.rug
            fin
            ifflag mustafa, seen
               say mustafa.he.come, 1
            else
               flag mustafa, seen
               say mustafa.he.come, 0
            fin
            ifnear box
               apport box, ylem
               flag rug, valued
               set rug.value, 1
               set rug.shreak, 1
               ifflag rug, special1
                  quip rug.valuable, 1
               else
                  quip rug.valuable, 0
               fin
            fin
            quip persian.rubbish
         else
            quip bring.rug, 1
         fin
      fin
   fin
   ifkey go
      or
   ifeq status, 1
      move north, out, tall.e/w.canyon
   fin
   ifany note, notice, message, sign, words, inscription, niche, bell
      flag context, arg2.here
   fin
#
#=====================================================================
#
at dead.end.3
   call default.read, words
   ifany words, inscription, note, message, notice
      respond look, read, jerry.words
      flag context, arg2.here
      proceed
   fin
   ifkey look
      respond boulders, mass.of.boulders
      proceed
   fin
   respond climb, no.point.in.that
   ifkey go
      or
   ifeq status, 1
      move south, out, tall.e/w.canyon
   fin
   ifany boulders, stones, words, inscription, note, message, notice
      flag context, arg2.here
   fin
#
#=====================================================================
#
at mazea.80
   ifkey go
      or
   ifeq status, 1
      move north, mazea.42
      move west, south, mazea.80
      move east, mazea.81
   fin
#
#=====================================================================
#
at mazea.81
   ifkey go
      or
   ifeq status, 1
      move west, out, mazea.80
   fin
#
#=====================================================================
#
at mazea.82
   ifkey go
      or
   ifeq status, 1
      move out, south, mazea.44
   fin
#
#=====================================================================
#
at mazea.83
   ifkey go
      or
   ifeq status, 1
      move south, mazea.by.pit
      move east, mazea.84
      move west, mazea.85
   fin
#
#=====================================================================
#
at mazea.84
   ifkey go
      or
   ifeq status, 1
      move north, mazea.by.pit
      move west, mazea.83
      move nw, mazea.114
   fin
#
#=====================================================================
#
at mazea.85
   ifkey go
      or
   ifeq status, 1
      move out, east, mazea.83
   fin
#
#=====================================================================
#
at mazea.86
   ifkey go
      or
   ifeq status, 1
      move out, up, mazea.52
   fin
#
#=====================================================================
#
at mazea.87
   ifkey go
      or
   ifeq status, 1
      move up, down, mazea.45
   fin
#
#=====================================================================
#
at narrow.corridor
   set its.a.hole, 1    # Skip the quip, if not uttered yet.
   ifkey look
      respond plant, leaves, hole, beanstalk.leaves
      respond tunnel, passage, corridor, dark.exit, corridor
      proceed
   fin
   ifkey jump
      goto west.pit
      call splatter
   fin
   ifkey climb, down
      or
   ifkey go
      or
   ifeq status, 1
      move east, plant, down, climb, hole, west.pit
      move west, corridor, giant.room
   fin
   ifany tunnel, passage, corridor, plant, leaves, hole
      flag context, arg2.here
   fin
#
#=====================================================================
#
at incline
   ifkey look
      respond down, no.see.down.there, 0
      respond passage, tunnel, corridor, dark.exit, passage
      respond incline, steep.incline
      proceed
   fin
   ifkey climb, down
      or
   ifkey go
      or
   ifeq status, 1
      move north, cavern, passage, cavern
      smove down, climb, incline, low, oof
   fin
   ifany passage, tunnel, corridor, incline
      flag context, arg2.here
   fin
   lda throw.here, low
   lda throw.text, throw.room
#
#=====================================================================
#
at giant.room
   call default.read, inscription
   ifany inscription, note, notice, message, words
      respond read, look, fee...foo
   fin
   ifkey look
      respond ceiling, up, its.a.ceiling, c.giant.room
      respond passage, tunnel, corridor, dark.exits, passage
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move south, corridor, narrow.corridor
      move east, irregular.tunnel
      move north, immense.n/s.passages
      respond passage, tunnel, corridor, too.many.exits, passage
   fin
   ifany ceiling, note, notice, message, inscription, words
      flag context, arg2.here
   fin
   ifany tunnel, passage, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at immense.n/s.passages
   ifkey look
      respond passage, tunnel, corridor, dark.exit, passage
      proceed
   fin
   set vessel, none
   ifkey door
      ifkey oil
         call oil.door
      fin
      ifkey water
         call water.door
      fin
   fin
   ifkey pour
      ifkey oil
         call oil.door
      fin
      ifeq status, 1
         set vessel none
         call find.water, false
         ifgt vessel, none
            call oil.door
         fin
         call find.oil, false
         ifgt vessel, none
            call water.door
         fin
      fin
   fin
   ifkey empty
      ifany flask, bottle, bucket
         set vessel, arg2
         eval object.state, vessel
         ifeq object.state, full.of.oil
            call oil.door
         fin
         ifeq object.state, full.of.water
            call water.door
         fin
         ifeq object.state, full.of.champagne
            call dispose.liquid
            quip champagne.has.no.effect
         fin
         ifeq object.state, full.of.dung
            call empty.vessel
         fin
      fin
   fin
   ifkey go
      or
   ifeq status, 1
      move south, passage, giant.room
      ifany north, enter, cavern, door
         ifeq door, rusty
            quip door.needs.oil
         fin
         move cavern
      fin
   fin
   ifany passage, tunnel, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at cavern
   ifkey look
      respond waterfall, cavern.stream, 1
      respond stream, cavern.stream, 0
      respond whirlpool, cavern.stream, 2
      respond passage, tunnel, corridor, dark.exits, passage
      respond hole, large.hole
   fin
   lda throw.here, ylem
   lda throw.text, throw.whirlpool
   ifany jump, go, in
      and
   ifany down, whirlpool
      set status, 1
   fin
   ifkey jump
      and
   ifany down, in
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move south, out, immense.n/s.passages
      move west, incline, incline
      ifany tunnel, passage, corridor
         call follow.it, immense.n/s.passages, south, incline, west
      fin
      ifany jump, down, whirlpool, hole      # Jumping into whirlpool
         ifflag reservoir.north, been.here
            set status, 0
            call whirlpool.dive
         fin
         lda text.ptr, whirlpool?
         save command, text.ptr
         set context, q.whirlpool
         quip text.ptr
      fin
   fin
   ifany waterfall, 
      flag context, arg2.distant
   fin
   ifany  passage, hole, stream, whirlpool
      flag context, arg2.here
   fin
#
#=====================================================================
#
at soft
   ifkey rug
      and
      not
   ifnear rug
      fakearg rug, moss
   fin
   ifkey look
      respond ceiling, up, its.a.ceiling, c.soft
      respond walls, curtained.walls
      respond carpet, moss, just.a.fixture, arg2
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move east, bare.cavern
      move se, curtain.entrance
      move west, out, swiss, swiss
      respond north, south, sw, nw, ne, solid.rock
   fin
   ifany moss, carpet
      flag context, arg2.here
   fin
#
#=====================================================================
#
at oriental
   respond wall, drawings, oriental.drawing  # *Any* reference!
   ifkey look
      respond crawl, passage, dark.exit, arg2
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move se, swiss
      move west, crawl, low
      move north, passage, up, cavern, misty
   fin
   ifany passage, tunnel, corridor, crawl
      flag context, arg2.here
   fin
#
#=====================================================================
#
at misty
   ifkey look
      respond down, no.see.down.there, 1
      respond ceiling, up, its.a.ceiling, c.misty
      respond fissure, no.see.up.there
      respond mist, this.is.mist
      respond path, misty.path
      ifkey cavern
         set status, 1
      fin
      proceed
   fin
   ifkey climb, fissure
      or
   ifany jump, down
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifkey jump
         goto cavern
         call splatter
      fin
      move south, oriental, oriental
      move west, alcove
      respond cavern, you.are.there
      respond fissure, cant.fly
      ifkey path
         call follow.it, alcove, west, oriental, east
      fin
   fin
   lda throw.text, throw.cavern
   lda throw.here, cavern
   ifany ceiling, mist, fissure, path, cavern
      flag context, arg2.here
   fin
#
#=====================================================================
#
at alcove
   local carried
#
   ifkey look
      ifkey alcove
         set status, 1
      fin
      respond tunnel, passage, corridor, light, plover.light, tunnel
      respond path, plover.path
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move nw, path, cavern, misty
      respond alcove, you.are.there
      ifany east, tunnel, passage, plover
         set  carried, invct
         ifhave emerald
            sub carried, 1
         fin
         ifhave pyramid
            sub carried, 1
         fin
         ifeq carried, 0
            move plover
         fin
         itobj obj.ptr
            ifhave obj.ptr
               and
               not
            ifflag obj.ptr, freebie
               quip something.doesnt.fit
            fin
         fin
         move plover
      fin
   fin
   ifany tunnel, passage, corridor, path, alcove
      flag context, arg2.here
   fin
#
#=====================================================================
#
at plover
   local carried
#
   ifkey look
      ifkey chamber
         set status, 1
      fin
      respond tunnel, passage, corridor, dark.exit, arg2
      respond light, source.not.seen
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move ne, dark, in, dark
      ifkey plover
         ifhave emerald
            drop  emerald
            say something.drops
         fin
         move y2
      fin
      ifany west, out, passage, alcove
         set  carried, invct
         ifhave emerald
            sub carried, 1
         fin
         ifhave pyramid
            sub carried, 1
         fin
         ifeq carried, 0
            move alcove
         fin
         itobj obj.ptr
            ifhave obj.ptr
               and
               not
            ifflag obj.ptr, freebie
               quip something.doesnt.fit
            fin
         fin
         move alcove
      fin
   fin
   ifany chamber, tunnel, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at dark
   call default.read, tablet
   ifany stone, tablet, note, notice, message, inscription, words
      respond pull, get, remove, leave.it.alone, tablet
      respond read, look, dark.room
      quip just.a.fixture, tablet
   fin
   ifkey look
      respond light, corridor, plover.light, corridor
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move south, out, corridor, plover, plover
      ifkey go, light
         move plover
      fin
   fin
   ifany tunnel, passage, corridor, stone, tablet, note, notice, words
      or
   ifany message, inscription
      flag context, arg2.here
   fin
#
#=====================================================================
#
at arched
   ifkey look
      ifany hall, arched, arch
         set status, 1
      fin
      respond passage, tunnel, corridor, dark.exits, passage
      respond coral, its.coral
      proceed
   fin
   ifkey get, coral
      quip not.required
   fin
   ifkey go
      or
   ifeq status, 1
      move down, se, shell, shell
      move east, up, arched.corridor.1
      ifany tunnel, passage, corridor
         call follow.it, shell, se, arched.corridor.1, east
      fin
      respond arched, hall, you.are.there
   fin
   ifany passage, tunnel, corridor, arched, hall, arch, coral
      flag context, arg2.here
   fin
#
#=====================================================================
#
at shell
   ifkey look
      respond passage, tunnel, corridor, dark.exits, passage
      respond stone, rock, wall, floor, sedimentary.rock
      respond shell, shells, its.shells
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move up, west, hall, arched
      move down, corridor, ragged.corridor
      respond passage, tunnel, corridor, too.many.exits, passage
      ifany south, complex
         ifhave clam
            quip bivalve.too.big, clam
         fin
         ifhave oyster
            quip bivalve.too.big, oyster
         fin
         move complex
      fin
   fin
   ifany passage, tunnel, corridor, stone, shell, rock, wall, floor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at ragged.corridor
   ifkey look
      ifany tunnel, passage, corridor
         set status, 1
      fin
      respond wall, sharp.walls
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move up, shell, shell
      move down, culdesac
      ifany tunnel, passage, corridor
         call follow.it, shell, up, culdesac, down
      fin
   fin
   ifany wall, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at culdesac
   ifkey go
      or
   ifeq status, 1
      move up, out, corridor, ragged.corridor
      move shell, shell
   fin
   ifany tunnel, corridor, passage
      flag context, arg2.here
   fin
#
#=====================================================================
#
at anteroom
   call default.read, sign
   call fake.note same.as.before, sign
   ifkey look
      ifkey anteroom
         set status, 1
      fin
      respond passage, tunnel, corridor, dark.exits, passage
      respond remnants, digging.remnants
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move ne, unsafe
      move south, chapel
      move up, complex
      move west, bedquilt
      move east, witts.end
      respond anteroom, you.are.there
      respond passage, tunnel, corridor, too.many.exits, passage
   fin
   ifany passage, tunnel, corridor, anteroom, remnants
      flag context, arg2.here
   fin
#
#=====================================================================
#
at mazed.107
   ifkey look
      respond passage, tunnel, corridor, mazed.passages
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move south, mazed.131
      move sw, mazed.132
      move ne, mazed.133
      move se, mazed.134
      move up, mazed.135
      move nw, mazed.136
      move east, mazed.137
      move west, mazed.138
      move north, mazed.139
      move down, long.hall.west
      respond tunnel, passage, corridor, too.many.exits, passage
   fin
   ifany tunnel, passage, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at witts.end
   ifle stuck, 0
      set stuck, 65
   fin
   ifkey look
      respond passage, tunnel, corridor, dark.exits, passage
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond passage, tunnel, corridor, too.many.exits, passage
      ifkey  west
         move witts.end
      fin
      ifany north, south, east, up, down, ne, nw, se, sw
         chance stuck
            sub stuck, 5
            move witts.end
         fin
         move anteroom
      fin
   fin
   ifany passage, tunnel, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at mirror.canyon
   ifkey look
      ifkey canyon
         set status, 1
      fin
      respond mirror, edge.on.mirror
      respond window, windows.too.high.to.see
      respond mist, this.is.mist
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move south, secret.n/s.canyon.1
      move north, mist, reservoir, reservoir
      ifkey canyon
         call follow.it, reservoir, north, secret.n/s.canyon.1, south
      fin
   fin
   respond mirror, window, too.far.up, mirror
   ifany canyon, mist
      flag context, arg2.here
   fin
#
#=====================================================================
#
at west.window
   call fake.window
   ifkey look
      respond me, its.you
      respond pit, huge.pit
      respond mist, this.is.mist
      respond marks, dust, cant.tell
      respond floor, misty.floor
      respond passage, tunnel, corridor, dark.exit, passage
      proceed
   fin
   ifkey climb
      and
   ifany down, pit
      quip climbing.out.risky
   fin
   ifany go, jump
      and
   ifany pit, window
      say broken.neck
      goto mirror.canyon
      call coroner
   fin
   ifkey go
      or
   ifeq status, 1
      move west, passage, tunnel, corridor, junction
   fin
   ifany pit, mist, marks, dust, passage, tunnel, corridor
      flag context, arg2.here
   fin
   lda throw.here, mirror.canyon
   lda throw.text, throw.pit
#
#=====================================================================
#
at top.of.stalactite
   ifkey look
      respond floor, cant.see.much, floor
      respond ceiling, roof, stalactite.roof
      respond stalactite, stalactite.in.maze
      proceed
   fin
   ifany jump, climb
      ifany down, stalactite
         or
      ifeq status, 1
         move mazea.50
      fin
   fin
   ifkey go
      or
   ifeq status, 1
      move north, secret.n/s.canyon.2
      ifany down, stalactite
         chance 67
            chance 50
               move mazea.53
            fin
            move mazea.45
         else
            move mazea.50
         fin
      fin
   fin
   ifany stalactite
      flag context, arg2.here
   fin
   lda throw.text, throw.room
   lda throw.here, mazea.53
#
#=====================================================================
#
at mazed.112
   ifkey look
      respond passage, tunnel, corridor, mazed.passages
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move sw, mazed.131
      move north, mazed.132
      move east, mazed.133
      move nw, mazed.134
      move se, mazed.135
      move ne, mazed.136
      move west, mazed.137
      move down, mazed.138
      move up, mazed.139
      move south, mazed.140
      respond passage, tunnel, corridor, too.many.exits, passage
   fin
   ifany passage, tunnel, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at reservoir
   ifkey look
      respond hole, stream, stream.hole
      respond mist, this.is.mist
      respond reservoir, reservoir.info
      respond passage, tunnel, corridor, reservoir.passages, 0
      respond causeway, cant.see.properly, causeway
      proceed
   fin
   ifany in, swim, cross
      and
   ifany water, reservoir
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      respond cross, water, reservoir, stream, hole, north, swim, cant.swim
      move south, mirror, passage, mirror.canyon
      move west, causeway, causeway
   fin
   ifany hole, stream, mist, causeway
      flag context, arg2.distant
   fin
   ifany reservoir, passage
      flag context, arg2.here
   fin
   lda throw.text, throw.reservoir
   lda throw.here, ylem
#
#=====================================================================
#
at reservoir.north
   ifkey look
      respond hole, stream, stream.hole
      respond mist, this.is.mist
      respond reservoir, reservoir.info
      respond passage, tunnel, corridor, reservoir.passages, 1
      respond tracks, ground, darwins.tracks
      proceed
   fin
   ifkey gong
      respond get, too.large.to.carry, gong
      ifkey ring
         call hit
      fin
   fin
   ifkey read
      and
   ifnear darwin
      respond message, inscription, back, darwin, darwin.invite
   fin
   ifany in, swim, cross
      and
   ifany water, reservoir
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move north, passage, chamber
      move balcony, balcony
      respond swim, tracks, cant.swim
      ifany water, reservoir, south, cross
         ifnear turtle
            apport turtle, limbo
            smove reservoir, turtle.back
         fin
         quip cant.swim
      fin
   fin
   ifany hole, stream, reservoir, mist, tracks, passage, tunnel, corridor
      flag context, arg2.here
   fin
   lda throw.text, throw.reservoir
   lda throw.here, ylem
#
#=====================================================================
#
at chamber
   ifkey look
      respond mist, this.is.mist
      respond wall, warm.wall
      respond passage, tunnel, corridor, dark.exits, passage
      ifkey chamber
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move south, reservoir, reservoir.north
      move northeast, balcony, balcony
      respond chamber, you.are.there
      ifany tunnel, passage, corridor
         call follow.it, balcony, ne, reservoir.north, south
      fin
   fin
   ifany mist, wall, passage, chamber
      flag context, arg2.here
   fin
#
#=====================================================================
#
at balcony
   call default.read, plaque
   ifany plaque, words, inscription, message, note, notice
      respond look, read, balcony.plaque
      respond get, pull, remove, leave.it.alone, plaque
      ifeq status, 1
         flag status, pls.clarify
         quip do.what?, plaque
      fin
      quip leave.it.alone, plaque
   fin
   ifany pool, slit, stream, gap
      respond look, too.far.to.see, arg2
      quip no.way.there
   fin
   ifkey jump
      ifany down, in
         or
      ifeq status, 1
         goto ylem
         call splatter
      fin
   fin
   ifkey look
      ifkey chamber
         set status, 1
      fin
      respond tunnel, passage, corridor, dark.exit, tunnel
      respond balcony, this.is.balcony
      respond balustrade, this.is.balustrade
      respond torches, walls, balcony.torches
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move west, out, tunnel, passage, chamber, chamber
      move reservoir, reservoir.north
      respond balcony, you.are.there
   fin
   ifany gap, stream, pool, balcony, torches, walls, balustrade
      flag context, arg2.distant
   fin
   ifany plaque, words, inscription, message, note, notice, chamber, tunnel
      flag context, arg2.here
   fin
   lda throw.text, throw.room
   lda throw.here, ylem
#
#=====================================================================
#
at mazea.114
   ifkey go
      or
   ifeq status, 1
      move se, out, mazea.84
   fin
#
#=====================================================================
#
at sw.of.chasm
   ifkey bridge
      apport bridge, here
   fin
   lda throw.text, throw.chasm
   lda throw.here, ylem
   ifeq chasm, bridged
      call default.read, sign
   else
      call default.read, notice
   fin
   call fake.note, same.as.before, arg2
   ifkey look
      respond path, corridor, dark.exit, corridor
      proceed
   fin
   ifeq chasm, bridged
      ifkey throw
         ifeq status, 1
            or
         ifnear troll2
            proceed
         fin
         ifany axe, sword
            ifhave arg2
               drop arg2
               quip el.cheapo, arg2
            fin
            proceed
         fin
         ifflag arg2, object
            ifflag arg2, valued
               ifhave arg2
                  ifkey nest
                     ifflag troll, special1
                        set troll, wants.treasure
                        apport nest, ylem   # Destroy eggs
                        flag nest, special2 # They won't come back!
                        quip fool.me.once
                     fin
                     flag nest, special1    # Note that troll's got them
                  fin
                  call check.wearing
                  set troll, bought.off
                  apport troll, limbo
                  apport troll2, sw.of.chasm
                  apport arg2, ylem
                  quip bought.him.off, arg2
               fin
            fin
         fin
      fin
   fin
   ifkey jump
      ifkey cross
         or
      ifeq status, 1
         and
      ifeq chasm, bridged
         quip try.the.bridge
      fin
      goto ylem
      call splatter
   fin
   ifkey cross, bridge
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move sw, down, sloping, corridor, sloping
      ifany cross, bridge, ne
         ifgt chasm, bridged
            quip no.bridge
         fin
         ifhave mask, worn
            iflt troll, scared.off
               say troll.zorro
            fin
            move ne.of.chasm
         fin
         ifeq troll, wants.treasure
            ifnear troll2
               apport troll2, limbo
               apport troll, here
               quip troll.wants.treasure
            fin
            quip troll.blocks.way
         fin
         ifeq troll, will.be.back
            set troll, wants.treasure
            apport  troll, sw.of.chasm
            flag troll, schizoid
            apport troll2, limbo
            quip troll.wants.treasure
         fin
         ifeq troll, bought.off
            set troll, will.be.back
         fin
         move ne.of.chasm
      fin
   fin
   ifkey notice, note, inscription, message, words, sign
      or
   ifany tunnel, passage, corridor, path
      flag context, arg2.here
   fin
#
#=====================================================================
#
at sloping
   ifkey look
      ifany tunnel, passage, corridor
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move down, sw, out, low, low
      ifany up, ne, chasm
         ifloc troll, sw.of.chasm
            apport troll, limbo
            apport troll2, sw.of.chasm
         fin
         move sw.of.chasm
      fin
      ifany tunnel, passage, corridor
         call follow.it, sw.of.chasm, ne, low, sw
      fin
   fin
   ifany tunnel, passage, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at secret.n/e.canyon.1
   ifkey carcass
      and
   ifnear dragon
      and
   ifgt dragon, on.rug
      fakearg carcass, dragon
   fin
   ifkey rug
      and
   ifeq dragon, on.rug
      respond look, rug.under.dragon
      respond get, pull, roll, wash, fly, dragon.guards.rug
   fin
   ifkey look
      ifkey canyon
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move north, out, secret.n/s.canyon.1
      ifany forward, east
         ifeq dragon, on.rug
            call sneaks.die
            quip dragon.blocks.way
         fin
         move secret.e/w.canyon
      fin
      ifkey canyon
         ifeq dragon, on.rug
            move there
         fin
         call follow.it, secret.n/s.canyon.1, n, secret.e/w.canyon, e
      fin
   fin
   ifany canyon
      flag context, arg2.here
   fin
#
#=====================================================================
#
at secret.n/e.canyon.2
   ifkey rug
      and
   ifeq dragon, on.rug
      respond look, rug.under.dragon
      respond get, pull, roll, wash, fly, dragon.guards.rug
   fin
   ifkey look
      ifkey canyon
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move east, out, secret.e/w.canyon
      ifany forward, north
         ifeq dragon, on.rug
            call sneaks.die
            quip dragon.blocks.way
         fin
         move secret.n/s.canyon.1
      fin
      ifkey canyon
         ifeq dragon, on.rug
            move there
         fin
         call follow.it, secret.n/s.canyon.1, n, secret.e/w.canyon, e
      fin
   fin
   ifany canyon
      flag context, arg2.here
   fin
#
#=====================================================================
#
at ne.of.chasm
   ifkey bridge
      apport bridge, here
   fin
   ifeq chasm, bridged
      call default.read, sign
   else
      call default.read, notice
   fin
   call fake.note, nothing.more.to.read, arg2
   ifkey look
      respond path, nothing.special, path
      proceed
   fin
   lda throw.text, throw.chasm
   lda throw.here, ylem
   ifany drop, throw, free
      and
   ifkey bear
      ifhave bear
         and
      ifnear troll
         set troll, scared.off
         apport troll, ylem
         apport troll2, sw.of.chasm
         drop bear
         say freed.bear
         quip bear.chases.troll
      fin
   fin
   ifkey throw
      and
   ifeq chasm, bridged
      ifeq status, 1
         or
      ifnear troll2
         proceed
      fin
      ifany axe, sword
         ifhave arg2
            drop arg2
            quip el.cheapo, arg2
         fin
         proceed
      fin
      ifflag arg2, object
         ifflag arg2, valued
            ifhave arg2
               ifkey nest
                  ifflag troll, special1
                     set troll, wants.treasure
                     apport nest, ylem  # Destroy eggs
                     flag nest, special2 # They won't come back
                     quip fool.me.once
                  fin
                  flag nest, special1    # Note that troll's got them
               fin
               set troll, bought.off
               apport troll, limbo
               apport troll2, sw.of.chasm
               apport arg2, ylem
               quip bought.him.off, arg2
            fin
         fin
      fin
   fin
   ifkey jump
      ifkey cross
         or
      ifeq status, 1
         and
      ifeq chasm, bridged
         quip try.the.bridge
      fin
      goto ylem
      call splatter
   fin
   ifkey cross, bridge
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move ne, path, corridor, corridor
      move fork, fork
      move view, breathtaker
      move barren, barren
      ifany cross, bridge, sw
         ifgt chasm, bridged
            quip no.bridge
         fin
         ifhave mask, worn
            iflt troll scared.off
               say troll.zorro
            fin
            move sw.of.chasm
         fin
         ifeq troll, wants.treasure
            ifnear troll2
               apport troll, sw.of.chasm
               apport troll2, limbo
               quip troll.wants.treasure
            fin
            quip troll.blocks.way
         fin
         ifeq troll, will.be.back
            ifhere bear
               set troll, scared.off
               apport troll, ylem
               quip bear.spots.troll
            fin
            set troll, wants.treasure
            apport  troll, sw.of.chasm
            flag troll, schizoid
            apport troll2, limbo
            quip troll.wants.treasure
         fin
         ifeq troll, bought.off
            set troll, will.be.back
         fin
         ifhave bear
            say bear.wrecks.bridge
            set chasm, bridge.wrecked
            apport troll2, limbo
            goto ylem
            call coroner
         fin
         ifeq troll, scared.off
            and
         ifflag troll, special1      # Already stole eggs back?
            ifnear bear
               get bear
               set chasm, bridge.wrecked
               say trolls.revenge, 0
            else
               set chasm, bridge.burned
               say trolls.revenge, 1
            fin
            apport troll2, limbo
            goto ylem
            call coroner
         fin
         move sw.of.chasm
      fin
   fin
   ifany path
      flag context, arg2.here
   fin
   ifany notice, note, inscription, message, words, sign
      flag context, arg2.here
   fin
#
#=====================================================================
#
at corridor
   ifkey look
      ifany tunnel, passage, corridor
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany west, chasm
         ifloc troll, sw.of.chasm
            apport troll, limbo
            apport troll2, sw.of.chasm
         fin
         move ne.of.chasm
      fin
      move east, fork, fork
      move view, breathtaker
      move barren, barren
      ifany tunnel, passage, corridor
         call follow.it, ne.of.chasm, west, fork, east
      fin
   fin
   ifany tunnel, passage, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at fork
   ifkey look
      respond fork, dark.exits, corridor
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move chasm, ne.of.chasm
      move west, corridor, corridor
      move ne, warmjunctn
      move se, down, limestone
      move view, breathtaker
      move barren, barren
      respond tunnel, passage, corridor, fork, too.many.exits, corridor
   fin
   ifany tunnel, passage, corridor, fork
      flag context, arg2.here
   fin
#
#=====================================================================
#
at warmjunctn
   ifkey look
      ifkey junction
         set status, 1
      fin
      respond passage, tunnel, corridor, crawl, dark.exit, arg2
      respond wall, warm.wall
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move south, fork, passage, fork
      move north, view, breathtaker
      move east, crawl, boulder.chamber
   fin
   ifany junction, passage, crawl
      flag context, arg2.here
   fin
#
#=====================================================================
#
at breathtaker
   ifany bridge, arch
      and
   ifeq volcano, 2
      apport bridge, here
   fin
   ifkey look
      respond roof, ceiling, formations, alabaster, alabaster.formations
      respond shadows, wall, shadows, no.apparitions
      respond volcano, gorge, volcano.sight
      respond fountains, flow, molten.lava
      respond passage, tunnel, corridor, dark.exit, passage
      respond entrance, valley, cant.see.much, valley
      respond glow, lava, river, fire, lava.glows
      respond island, lake, geyser, hellish.scene
      respond ash, floating.ash
      proceed
   fin
   ifkey volcano
      respond listen, volcano.roar
      flag context, arg2.distant
      proceed
   fin
   ifkey jump, up
      quip you.jump
   fin
   ifkey cross
      and
   ifany bridge, arch, gorge
      or
   ifkey jump
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move south, out, passage, warmjunctn
      move fork, fork
      ifkey jump
         goto ylem
         call splatter            # Let him plummet to a painful death
      fin
      ifany valley, cross, bridge, north, arch
         ifeq volcano, 0
            quip no.arch
         fin
         say hungry.fumes
         ifhave ring, worn
            ifhave bear
               say burn.bear
               apport bear, ylem
            else
                 not
               ifflag faces, been.here
                  unflag breathtaker, hintable
               fin
               say fumes.miss
          fin
            move faces
         fin
         ifhave bear
            say burn.both
         else
            say fumes.burn
         fin
         ifhave ring
            say wear.ring.perhaps?
         fin
         goto ylem
         call coroner
      fin
   fin
   ifany volcano, passage, gorge, river, fire, shadows, roof, ceiling
      flag context, arg2.distant
   fin
   ifany alabaster, formations, wall, entrance
      flag context, arg2.here
   fin
   ifany geyser, lake, island, ash, valley, fountains
      flag context, arg2.distant
   fin
   lda throw.text, throw.gorge
   lda throw.here, ylem
#
#=====================================================================
#
at boulder.chamber
   ifkey look
      respond crawl, dark.exit, crawl
      respond wall, warm.walls
      respond boulder, chamber.boulders
      ifkey chamber
         set status, 1
      fin
      proceed
   fin
   ifkey crawl, out
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move west, out, crawl, warmjunctn
      move fork, fork
      move view, breathtaker
      respond chamber, you.are.there
   fin
   ifany boulders, stones, chamber, wall
      flag context, arg2.here
   fin
#
#=====================================================================
#
at limestone
   ifkey look
      respond wall, limestone, formations, odd.formations
      ifany tunnel, passage, corridor
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move north, up, fork, fork
      move south, down, barren, barren
      move view, breathtaker
      ifany tunnel, passage, corridor
         call follow.it, barren, south, fork, north
      fin
   fin
   ifany passage, tunnel, corridor, limestone, formations
      flag context, arg2.here
   fin
#
#=====================================================================
#
at barren
   flag bear, seen    # Allow references to the bear
   call default.read, sign
   call fake.note, same.as.before, sign
   ifkey look
      respond in, entrance, east, dark.there, in
      respond passage, tunnel, corridor, dark.exit, passage
      respond limestone, its.a.mineral, limestone
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move west, up, passage, limestone, limestone
      move fork, fork
      move east, in, barren, bear, bear.room
      move view, breathtaker
   fin
   ifany entrance, limestone, passage
      flag context, arg2.here
   fin
#
#=====================================================================
#
at bear.room
   ifkey look
      respond marks, dust, cant.tell
      respond exit, dark.there, out
   fin
   ifkey go
      or
   ifeq status, 1
      move west, out, barren
      move fork, fork
      move view, breathtaker
   fin
   ifkey get
      ifeq status, 1
         default portable
      fin
      ifkey axe
         and
      ifhere axe
         quip bear.guards.axe, arg2
      fin
   fin
   ifany marks, dust, exit
      flag context, arg2.here
   fin
#
#=====================================================================
#
at mazed.131
   ifkey look
      respond passage, tunnel, corridor, mazed.passages
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move west, mazed.107
      move se, mazed.132
      move nw, mazed.133
      move sw, mazed.134
      move ne, mazed.135
      move up, mazed.136
      move down, mazed.137
      move north, mazed.138
      move south, mazed.139
      move east, mazed.112
      respond passage, tunnel, corridor, too.many.exits, passage
   fin
   ifany passage, tunnel, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at mazed.132
   ifkey look
      respond passage, tunnel, corridor, mazed.passages
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move nw, mazed.107
      move up, mazed.131
      move north, mazed.133
      move south, mazed.134
      move west, mazed.135
      move sw, mazed.136
      move ne, mazed.137
      move east, mazed.138
      move down, mazed.139
      move se, mazed.112
      respond passage, tunnel, corridor, too.many.exits, passage
   fin
   ifany passage, tunnel, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at mazed.133
   ifkey look
      respond passage, tunnel, corridor, mazed.passages
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move up, mazed.107
      move down, mazed.131
      move west, mazed.132
      move ne, mazed.134
      move sw, mazed.135
      move east, mazed.136
      move north, mazed.137
      move nw, mazed.138
      move se, mazed.139
      move south, mazed.112
      respond passage, tunnel, corridor, too.many.exits, passage
   fin
   ifany passage, tunnel, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at mazed.134
   ifkey look
      respond passage, tunnel, corridor, mazed.passages
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move ne, mazed.107
      move north, mazed.131
      move nw, mazed.132
      move se, mazed.133
      move east, mazed.135
      move down, mazed.136
      move south, mazed.137
      move up, mazed.138
      move west, mazed.139
      move sw, mazed.112
      respond passage, tunnel, corridor, too.many.exits, passage
   fin
   ifany passage, tunnel, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at mazed.135
   ifkey look
      respond passage, tunnel, corridor, mazed.passages
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move north, mazed.107
      move se, mazed.131
      move down, mazed.132
      move south, mazed.133
      move east, mazed.134
      move west, mazed.136
      move sw, mazed.137
      move ne, mazed.138
      move nw, mazed.139
      move up, mazed.112
      respond passage, tunnel, corridor, too.many.exits, passage
   fin
   ifany passage, tunnel, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at mazed.136
   ifkey look
      respond passage, tunnel, corridor, mazed.passages
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move east, mazed.107
      move west, mazed.131
      move up, mazed.132
      move sw, mazed.133
      move down, mazed.134
      move south, mazed.135
      move nw, mazed.137
      move se, mazed.138
      move ne, mazed.139
      move north, mazed.112
      respond passage, tunnel, corridor, too.many.exits, passage
   fin
   ifany passage, tunnel, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at mazed.137
   ifkey look
      respond passage, tunnel, corridor, mazed.passages
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move se, mazed.107
      move ne, mazed.131
      move south, mazed.132
      move down, mazed.133
      move up, mazed.134
      move nw, mazed.135
      move north, mazed.136
      move sw, mazed.138
      move east, mazed.139
      move west, mazed.112
      respond passage, tunnel, corridor, too.many.exits, passage
   fin
   ifany passage, tunnel, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at mazed.138
   ifkey look
      respond passage, tunnel, corridor, mazed.passages
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move down, mazed.107
      move east, mazed.131
      move ne, mazed.132
      move up, mazed.133
      move west, mazed.134
      move north, mazed.135
      move south, mazed.136
      move se, mazed.137
      move sw, mazed.139
      move nw, mazed.112
      respond passage, tunnel, corridor, too.many.exits, passage
   fin
   ifany passage, tunnel, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at mazed.139
   ifkey look
      respond passage, tunnel, corridor, mazed.passages
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move sw, mazed.107
      move nw, mazed.131
      move east, mazed.132
      move west, mazed.133
      move north, mazed.134
      move down, mazed.135
      move se, mazed.136
      move up, mazed.137
      move south, mazed.138
      move ne, mazed.112
      respond passage, tunnel, corridor, too.many.exits, passage
   fin
   ifany passage, tunnel, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at mazed.140
   call default.read, instructions
   ifany instructions, note, inscription, notice, words, message
      and
   ifany read, look
      say vending.info
      quip no.change
   fin
   ifkey look
      respond tray, its.a.tray
      respond slot, its.a.slot
      respond passage, tunnel, corridor, dark.exit, passage
      proceed
   fin
   ifkey drop
      and
   ifany coins, drachma, obolus, bag
      and
   ifhave arg2
      drop arg2
      respond obolus, drachma, coin.no.good, arg2
      respond bag, not.legal.tender
      apport coins, ylem
      apport batteries, here
      flag batteries, seen
      set machine, 1
      quip bought.batteries
   fin
   ifkey go
      or
   ifeq status, 1
      move north, out, passage, tunnel, corridor, mazed.112
   fin
   ifany instructions, note, inscription, notice, words, message
      or
   ifany passage, tunnel, corridor, tray, slot
      flag context, arg2.here
   fin
#
#=====================================================================
#
at limbo
   ifkey go
      or
   ifeq status, 1
      move out, building        # Kludge to get out of here if needed
   fin
#
#=====================================================================
#
at sandstone
   call default.read, plaque
   ifany plaque, note, notice, message, words, inscription
      and
   ifany read, look
      quip plaque.info
   fin
   ifkey look
      respond steps, well.worn.steps
      respond sandstone, wall, red.sandstone
      respond rock, just.a.fixture, rock
      respond opening, to.mists
      ifkey chamber
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move down, steps, cubicle
      move west, out, hall, opening, mists, mists
   fin
   ifany plaque, note, notice, message, words, inscription
      or
   ifany chamber, steps, rock, wall, sandstone, opening
      flag context, arg2.here
   fin
#
#=====================================================================
#
at morion
   ifkey look
      respond quartz, wall, crystal.walls
      respond passage, corridor, tunnel, dark.exit, passage
      ifkey teeth
         and
         not
      ifnear teeth
         quip teeth.like.crystals
      fin
      ifany crystal, crystals
         and
         not
      ifnear crystal
         quip teeth.like.crystals
      fin
      proceed
   fin
#   ifkey get, quartz
#      quip no.pick.up, quartz
#   fin
   ifkey go
      or
   ifeq status, 1
      move north, out, passage, corridor, tunnel, hall, mtking
   fin
   ifany passage, corridor, tunnel, crystals, quartz
      flag context, arg2.here
   fin
#
#=====================================================================
#
at vault
   fakecom door, safe
   ifkey look
      respond ceiling, vault, up, its.a.ceiling, c.vault
      respond exit, passage, tunnel, dark.exit, tunnel
      proceed
   fin
   ifany in, out
      and
   ifkey safe
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifkey in
         ifeq safe, unlocked
            set safe.exit, here
            move insafe
         fin
         quip cant.enter.safe
      fin
      ifany up, out, tunnel, passage, north
         ifeq safe, unlocked
            quip safe.blocks
         fin
         move mtking
      fin
   fin
   ifany vault, tunnel, passage, exit
      flag context, arg2.here
   fin
#
#=====================================================================
#
at insafe                    # Inside the safe - strange stuff happens here!
   fakecom door, safe
   ifkey close
      and
   ifeq status, 1
      set status, 2
      lda arg2, safe
   fin
   ifkey safe
      ifkey out
         set status, 1
      else
         ifeq status, 1
            flag status, pls.clarify
            quip do.what?, safe
         fin
         respond close, no.handle
         respond open, already.open, arg2
         respond look, insafe.info
         flag context, arg2.here
         proceed
      fin
   fin
   ifkey look
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move out, safe.exit       # Way out was set when you came in
   fin
#
#=====================================================================
#
at wide.n/s.corridor
   ifkey look
      ifany tunnel, passage, corridor
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move south, mtking
      move north, wide.e/w.corridor
      ifany tunnel, passage, corridor
         call follow.it, mtking, south, wide.e/w.corridor, north
      fin
   fin
   ifany tunnel, passage, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at wide.e/w.corridor
   ifkey look
      ifkey bend
         set status, 1
      fin
      respond tunnel, passage, corridor, dark.exits, corridor
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move south, sw, west, wide.n/s.corridor
      move north, ne, east, toolroom
      ifany tunnel, passage, corridor
         call follow.it, toolroom, east, wide.n/s.corridor, west
      fin
   fin
   ifany tunnel, passage, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at toolroom
   ifkey look
      respond ceiling, up, its.a.ceiling, c.toolroom
      respond tunnel, passage, corridor, dark.exit, corridor
      respond wall, words, note, notice, toolroom.notice
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move out, south, corridor, wide.e/w.corridor
   fin
   ifany tunnel, passage, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at division.in.passage
   ifkey look
      respond passage, corridor, tunnel, dark.exits, passage
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move south, mtking
      move north, spherical
      move east, cubicle
      respond passage, tunnel, corridor, need.a.direction
   fin
   ifany corridor, passage, tunnel
      flag context, arg2.here
   fin
#
#=====================================================================
#
at cubicle
   ifkey look
      respond steps, well.worn.steps
      respond wall, sandstone, red.sandstone
      respond doorway, its.just.a, doorway
      respond tunnel, passage, corridor, dark.exit, passage
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move up, steps, east, doorway, sandstone
      move south, passage, corridor, out, division.in.passage
   fin
   ifany steps, sandstone, doorway, passage, corridor, tunnel
      flag context, arg2.here
   fin
#
#=====================================================================
#
at spherical
   ifkey look
      ifkey chamber
         set status, 1
      fin
      respond passage, tunnel, corridor, dark.exit, passage
      respond wall, glassy.walls
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move out, south, passage, tunnel, corridor, division.in.passage
      respond chamber, you.are.there
   fin
   ifany passage, tunnel, corridor, chamber, wall
      flag context, arg2.here
   fin
#
#=====================================================================
#
at irregular.tunnel
   ifkey look
      respond ceiling, up, its.a.ceiling, c.irregular.tunnel
      respond blockage, partial.blockage
      ifany tunnel, passage, corridor
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move south, giant.room
      move north, blockage, glassy
      ifany tunnel, passage, corridor
         call follow.it, glassy, north, giant.room, south
      fin
   fin
   ifany ceiling, tunnel, blockage
      flag context, arg2.here
   fin
#
#=====================================================================
#
at glassy
   ifkey look
      respond wall, glassy.walls
      respond passage, corridor, tunnel, dark.exits, passage
      proceed
   fin
   ifkey in, lair
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move south, irregular.tunnel
      respond passage, corridor, tunnel, too.many.exits, passage
      ifany north, lair
         ifnear ogre
            call sneaks.die
            quip ogre.blocks.way
         fin
         move lair
      fin
   fin
   ifany passage, corridor, tunnel, wall
      flag context, arg2.here
   fin
#
#=====================================================================
#
at lair
   call default.read, runes
   ifkey runes
      respond look, read, translate, sorcerous.runes
      flag context, arg2.here
      proceed
   fin
   ifkey look
      respond stalactite, light, liquid.light
      respond wall, shadow, shadows, uncast.shadows
      respond passage, tunnel, corridor, dark.exits, passage
      ifkey lair
         set status, 1
      fin
      proceed
   fin
   ifkey climb, stalactite
      quip out.of.reach
   fin
   ifkey go
      or
   ifeq status, 1
      move east, bottomless.brink
      move west, glassy
      ifany passage, tunnel, corridor
         call follow.it, glassy, west, bottomless.brink, east
      fin
      respond lair, you.are.there
   fin
   ifany stalactite
      flag context, arg2.distant
   fin
   ifany passage, tunnel, corridor, lair, wall, shadow, shadows, runes
      flag context, arg2.here
   fin
#
#=====================================================================
#
at bottomless.brink
   ifkey look
      respond pit, down, pit.no.bottom
      respond edge, brink, firm.edge
      respond ledge, pit.ledge, 0
      respond passage, tunnel, corridor, dark.exit, passage
      proceed
   fin
   ifkey jump
      ifany down, pit
         or
      ifeq status, 1
         call plunge
      fin
   fin
   ifkey climb, down
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      respond down,climb, pit.is.bottomless
      move north, passage, lair, lair
      move west, bottomless.brink.south
      move east, bottomless.brink.east
      ifkey ledge
         call follow.it, bottomless.brink.south, w, bottomless.brink.east, e
      fin
   fin
   ifany brink, edge, pit, ledge, passage
      flag context, arg2.here
   fin
   lda throw.text, throw.pit
   lda throw.here, ylem
#
#=====================================================================
#
at bottomless.brink.south
   ifkey look
      respond tunnel, passage, corridor, dark.exit, tunnel
      respond ledge, pit.ledge, 1
      respond slide, rock, rock-slide, not.there.no.more
      respond pit, down, pit, pit.no.bottom
      respond brink, edge, firm.edge
      proceed
   fin
   ifkey jump
      ifany down, pit
         or
      ifeq status, 1
         call plunge
      fin
   fin
   ifkey climb, down
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      respond down, climb, pit.is.bottomless
      move north, ledge, bottomless.brink
      move southeast, tunnel, passage, corridor, ice
   fin
   ifany ledge, tunnel, passage, corridor, brink, edge, pit
      flag context, arg2.here
   fin
   lda throw.text, throw.pit
   lda throw.here, ylem
#
#=====================================================================
#
at ice
   call ice.stuff
   ifkey look
      respond slide, slope, icy.slide
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move northwest, bottomless.brink.south
      smove down, east, slide, maze, slide, oof
   fin
   ifany slide, slope
      flag context, arg2.here
   fin
   lda throw.text, throw.slide
   lda throw.here, slide
#
#=====================================================================
#
at slide
   call ice.stuff
   ifkey look
      respond slide, slope, icy.slide
      proceed
   fin
   ifkey climb
      ifany slide, up
         set status, 1
      fin
   fin
   ifkey go
      or
   ifeq status, 1
      move south, ice.cave.2a
      move northwest, ice.cave.4
      respond slide, out, up, north, climb, slide.slippery
      ifany tunnel, passage, corridor
         call follow.it, ice.cave.2a, south, ice.cave.4, nw
      fin
   fin
   ifany slide, slope
      flag context, arg2.here
   fin
#
#=====================================================================
#
at ice.cave.1
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move west, ice.cave.2
      move north, ice.cave.1a
      ifany passage, tunnel, corridor
         call follow.it, ice.cave.1a, north, ice.cave.2, west
      fin
   fin
#
#=====================================================================
#
at ice.cave.1a
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move south, tunnel, passage, corridor, out, ice.cave.1
   fin
#
#=====================================================================
#
at ice.cave.2
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move east, ice.cave.1
      move west, ice.cave.3
      move north, ice.cave.2a
      respond passage, tunnel, corridor, need.a.direction
   fin
#
#=====================================================================
#
at ice.cave.2a
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move north, slide
      move south, ice.cave.2
      ifany passage, tunnel, corridor
         call follow.it, slide, north, ice.cave.2, south
      fin
   fin
#
#=====================================================================
#
at ice.cave.3
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move east, ice.cave.2
      move north, ice.cave.3a
      ifany passage, tunnel, corridor
         call follow.it, ice.cave.2, east, ice.cave.3a, north
      fin
   fin
#
#=====================================================================
#
at ice.cave.3a
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move south, out, passage, tunnel, corridor, ice.cave.3
   fin
#
#=====================================================================
#
at ice.cave.4
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move east, slide
      move west, ice.cave.5
      ifany passage, tunnel, corridor
         call follow.it, slide, east, ice.cave.5, west
      fin
   fin
#
#=====================================================================
#
at ice.cave.5
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move northeast, ice.cave.4
      move south, ice.cave.6
      ifany passage, tunnel, corridor
         call follow.it, ice.cave.4, ne, ice.cave.6, south
      fin
   fin
#
#=====================================================================
#
at ice.cave.6
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move north, ice.cave.5
      move south, ice.cave.7
      move west, ice.cave.9
      respond passage, tunnel, corridor, need.a.direction
   fin
#
#=====================================================================
#
at ice.cave.7
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move north, out, passage, tunnel, corridor, ice.cave.6
   fin
#
#=====================================================================
#
at ice.cave.8
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move north, out, passage, tunnel, corridor, ice.cave.9
   fin
#
#=====================================================================
#
at ice.cave.9
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move east, ice.cave.6
      move south, ice.cave.8
      move north, ice.cave.10
      respond passage, tunnel, corridor, need.a.direction
   fin
#
#=====================================================================
#
at ice.cave.10
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move south, ice.cave.9
      move northwest, ice.cave.11
      ifany passage, tunnel, corridor
         call follow.it, ice.cave.9, south, ice.cave.11, nw
      fin
   fin
#
#=====================================================================
#
at ice.cave.11
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move east, ice.cave.10
      move west, ice.cave.12
      ifany passage, tunnel, corridor
         call follow.it, ice.cave.10, east, ice.cave.12, west
      fin
   fin
#
#=====================================================================
#
at ice.cave.12
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move northeast, ice.cave.11
      move south, ice.cave.12a
      move west, ice.cave.15
      respond passage, tunnel, corridor, need.a.direction
   fin
#
#=====================================================================
#
at ice.cave.12a
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move north, ice.cave.12
      move south, ice.cave.13
      ifany passage, tunnel, corridor
         call follow.it, ice.cave.12, north, ice.cave.13, south
      fin
   fin
#
#=====================================================================
#
at ice.cave.13
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move north, out, passage, tunnel, corridor, ice.cave.12a
   fin
#
#=====================================================================
#
at ice.cave.14
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move north, out, passage, tunnel, corridor, ice.cave.15a
   fin
#
#=====================================================================
#
at ice.cave.15
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move east, ice.cave.12
      move south, ice.cave.15a
      move northwest, ice.cave.16
      respond passage, tunnel, corridor, need.a.direction
   fin
#
#=====================================================================
#
at ice.cave.15a
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move south, ice.cave.14
      move north, ice.cave.15
      ifany passage, tunnel, corridor
         call follow.it, ice.cave.14, south, ice.cave.15, north
      fin
   fin
#
#=====================================================================
#
at ice.cave.16
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move east, ice.cave.15
      move west, ice.cave.17
      ifany passage, tunnel, corridor
         call follow.it, ice.cave.15, east, ice.cave.17, west
      fin
   fin
#
#=====================================================================
#
at ice.cave.17
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move northeast, ice.cave.16
      move south, ice.cave.18
      ifany passage, tunnel, corridor
         call follow.it, ice.cave.16, ne, ice.cave.18, south
      fin
   fin
#
#=====================================================================
#
at ice.cave.18
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move north, ice.cave.17
      move south, ice.cave.19
      move west, ice.cave.21
      move northwest, ice.cave.22
      respond passage, tunnel, corridor, need.a.direction
   fin
#
#=====================================================================
#
at ice.cave.19
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move north, ice.cave.18
      move west, ice.cave.20
      ifany passage, tunnel, corridor
         call follow.it, ice.cave.18, north, ice.cave.20, west
      fin
   fin
#
#=====================================================================
#
at ice.cave.20
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move east, ice.cave.19
      move north, ice.cave.21
      ifany passage, tunnel, corridor
         call follow.it, ice.cave.19, east, ice.cave.21, north
      fin
   fin
#
#=====================================================================
#
at ice.cave.21
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move east, ice.cave.18
      move south, ice.cave.20
      ifany passage, tunnel, corridor
         call follow.it, ice.cave.18, east, ice.cave.20, south
      fin
   fin
#
#=====================================================================
#
at ice.cave.22
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move southeast, ice.cave.18
      move northwest, ice.cave.23
      ifany passage, tunnel, corridor
         call follow.it, ice.cave.18, se, ice.cave.23, nw
      fin
   fin
#
#=====================================================================
#
at ice.cave.23
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move east, ice.cave.22
      move west, ice.cave.24
      ifany passage, tunnel, corridor
         call follow.it, ice.cave.22, east, ice.cave.24, west
      fin
   fin
#
#=====================================================================
#
at ice.cave.24
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move northeast, ice.cave.23
      move south, ice.cave.25
      move west, ice.cave.29
      respond passage, tunnel, corridor, need.a.direction
   fin
#
#=====================================================================
#
at ice.cave.25
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move north, ice.cave.24
      move south, ice.cave.26
      move west, ice.cave.28
      move northwest, ice.cave.28a
      respond passage, tunnel, corridor, need.a.direction
   fin
#
#=====================================================================
#
at ice.cave.26
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move north, ice.cave.25
      move northwest, ice.cave.27
      ifany passage, tunnel, corridor
         call follow.it, ice.cave.25, north, ice.cave.27, nw
      fin
   fin
#
#=====================================================================
#
at ice.cave.27
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move southeast, ice.cave.26
      move north, ice.cave.28
      ifany passage, tunnel, corridor
         call follow.it, ice.cave.26, se, ice.cave.28, north
      fin
   fin
#
#=====================================================================
#
at ice.cave.28
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move east, ice.cave.25
      move south, ice.cave.27
      ifany passage, tunnel, corridor
         call follow.it, ice.cave.25, east, ice.cave.27, south
      fin
   fin
#
#=====================================================================
#
at ice.cave.28a
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move southeast, ice.cave.25
      move north, ice.cave.29
      ifany passage, tunnel, corridor
         call follow.it, ice.cave.25, se, ice.cave.29, north
      fin
   fin
#
#=====================================================================
#
at ice.cave.29
   call ice.stuff
   ifkey go
      or
   ifeq status, 1
      move east, ice.cave.24
      move south, ice.cave.28a
      move northwest, ice.cave.30
      respond passage, tunnel, corridor, need.a.direction
   fin
#
#=====================================================================
#
at ice.cave.30
   call ice.stuff
   call default.read, words
   ifany note, words, letters, notice, message
      ifany look, read
         quip this.way.out, arg2
      fin
      ifany get, kick, push, pull, break
         quip insubstantial.letters
      fin
   fin
   ifkey look
      ifkey chamber
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move east, out, tunnel, passage, corridor, ice.cave.29
      smove thurb, ice, foof
      respond chamber, you.are.there
   fin
   ifany chamber, tunnel, passage, corridor, note, notice, message
      flag context, arg2.here
   fin
#
#=====================================================================
#
at bottomless.brink.east
   ifkey look
      respond pit, down, pit, pit.no.bottom
      respond brink, edge, firm.edge
      respond ledge, pit.ledge, 2
      respond passage, tunnel, light, corridor, cant.see.much, passage
      respond crack, dark.exit, crack
      proceed
   fin
   ifkey jump
      ifany down, pit
         or
      ifeq status, 1
         call plunge
      fin
   fin
   ifkey climb, down
      set status, 1
   fin
   ifkey go, light
      move bottomless.brink
   fin
   ifkey go
      or
   ifeq status, 1
      respond down, climb, pit.is.bottomless
      move north, ledge, passage, corridor, tunnel, bottomless.brink
      move in, northeast, crack, crack.entry
   fin
   ifany pit, brink, ledge, passage, tunnel, corridor, crack
      flag context, arg2.here
   fin
   lda throw.text, throw.pit
   lda throw.here, ylem
#
#=====================================================================
#
at crack.entry
   ifkey look
      ifkey crack
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move southwest, brink, out, bottomless.brink.east
      move southeast, in, crack.north
      ifkey crack
         call follow.it, crack.north, se, bottomless.brink.east, sw
      fin
   fin
   ifany crack
      flag context, arg2.here
   fin
#
#=====================================================================
#
at crack.north
   ifkey look
      respond passage, tunnel, corridor, crack, dark.exit, arg2
      proceed
   fin
   ifnear slime
      ifkey feed, slime
         or
      ifkey throw, food
         or
      ifkey give, food
         ifnear food
            apport food, limbo
            quip slime.eats
         else
            quip no.food.for.it
         fin
      fin        
   fin
   ifkey go
      or
   ifeq status, 1
      move west, crack, out, crack.entry
      ifany south, in, passage
         ifnear slime
            say slimed
            call coroner
         fin
         move crack.south
      fin
   fin
   ifany crack, passage
      flag context, arg2.here
   fin
#
#=====================================================================
#
at crack.south
   ifkey look
      respond crawl, passage, dark.exit, arg2
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move north, out, passage, crack.north
      move south, in, crawl, small.chamber
   fin
   ifany crawl, passage
      flag context, arg2.here
   fin
#
#=====================================================================
#
at small.chamber
   ifkey look
      respond shelf, casket.shelf
      ifkey chamber
         set status, 1
      fin
      respond crawl, dark.exit, crawl
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move north, out, crawl, crack.south
      respond chamber, you.are.there
   fin
   ifany crawl, chamber
      flag context, arg2.here
   fin
#
#=====================================================================
#
at arched.corridor.1
   ifeq stage, closing.soon
      call closing.time
   fin
   ifkey look
      ifany arched, arch, passage
         set status, 1
      fin
      respond coral, its.coral
      respond patch, sand, quicksand, smooth.patch
      respond debris, fork, blocked.fork
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany passage, coral
         ifis there arched
            lda arg1, east
         else
            lda arg1, west
         fin
      fin
      move west, arched
      ifany east, cross
         ifeq quicksand, 0
            or
         ifhave clam
            or
         ifhave oyster
            or
         ifgt stage, closing.soon
            set quicksand, 0
            say schlurp
            goto ylem
            call coroner
         fin
         set quicksand, 0
         move arched.corridor.2
      fin
      respond fork, blocked.fork
   fin
   ifkey get
      respond sand, coral, not.required
      respond debris, no.future.in.it, debris
   fin
   ifany fork, debris, arch, arched, passage, coral
      flag context, arg2.here
   fin
#
#=====================================================================
#
at arched.corridor.2
   ifkey look
      ifany passage, arch, arched, bend
         set status, 1
      fin
      respond coral, its.coral
      respond patch, sand, quicksand, smooth.patch
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany passage, coral
         ifis there, arched.fork
            lda arg1, west
         else
            lda arg1, north
         fin
      fin
      move north, arched.fork
      ifany west, cross
         ifeq quicksand, 0
            say schlurp
            goto ylem
            call coroner
         fin
         set quicksand, 0
         move arched.corridor.1
      fin
   fin
   ifkey get
      respond sand, coral not.required
   fin
   ifany coral, passage, bend, patch, sand, quicksand, arch, arched
      flag context, arg2.here
   fin
#
#=====================================================================
#
at arched.fork
   ifkey look
      ifany fork, arch, arched
         set status, 1
      fin
      respond passage, tunnel, corridor, dark.exits, passage
      respond coral, its.coral
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move south, arched.corridor.2
      move north, fourier, fourier
      move east, jonah, jonah
      respond passage, tunnel, corridor, coral, too.many.exits, passage
      respond fork, arch, arched, you.are.there
   fin
   ifkey get, coral
      quip not.required
   fin
   ifany passage, tunnel, corridor, fork, arch, arched, coral
      flag context, arg2.here
   fin
#
#=====================================================================
#
at fourier
   ifkey look
      ifany fourier, passage
         set status, 1
      fin
      respond coral, its.coral
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move northwest, arched.fork
      move southwest, rock.shelf
      respond fourier, you.are.there
      ifany passage, coral
         call follow.it, arched.fork, nw, rock.shelf, sw
      fin
   fin
   ifkey get, coral
      respond coral, not.required
   fin
   ifany passage, tunnel, corridor, fourier, coral
      flag context, arg2.here
   fin
#
#=====================================================================
#
at rock.shelf
   respond chalk, no.future.in.it, chalk
   ifkey look
      respond steps, beach.steps
      respond coral, its.coral
      respond passage, tunnel, corridor, dark.way, passage
      respond beach, rocky.beach.view
      respond water, horizon, sea.horizon
      respond shelf, nothing.special, shelf
      respond up, below.cliff, 0
      proceed
   fin
   ifany down, steps
      set status, 1
   otherwise
   ifkey climb
      quip no.climb.cliff
   fin
   ifkey go
      or
   ifeq status, 1
      ifany down, steps, climb, beach, west
         lda direction, west
         call consult.sunstone, direction
      fin
      move east, in, passage, coral, fourier
      move down, west, steps, beach, rocky.beach
   fin
   lda throw.text, throw.beach
   lda throw.here, rocky.beach
   ifkey get, coral
      quip not.required
   fin
   ifany beach, sea, horizon
      flag context, arg2.distant
   fin
   ifany steps, coral, shelf, passage
      flag context, arg2.here
   fin
#
#=====================================================================
#
at rocky.beach
   set dinghy, 1       # Don't repeat the long descripton
   respond planks, wood, boards, no.use.boards
   respond debris, no.future.in.it, debris
   ifkey look
      respond shelf, shelf.from.beach
      respond steps, beach.steps
      respond outcrops, jutting.outcrop
   fin
   ifany shelf, steps, outcrops, stem
      flag context, arg2.here
      proceed
   fin
   ifkey climb, cliff
      quip not.at.cliff.base, 1
   fin
   call beach.stuff
   ifkey up, steps, climb
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifkey beach
         call follow.it, sandy.beach, north, none, none
      fin
      move north, sandy.beach
      ifany up, steps, climb, east
         call try.dir, east, rock.shelf
      fin
   fin
   ifany shelf, steps, outcrops, cliff, chalk
      flag context, arg2.here
   fin
#
#=====================================================================
#
at sandy.beach
   fakecom chalk, cliff      
   respond climb, no.climb.cliff
   call beach.stuff
   ifkey go
      or
   ifeq status, 1
      ifkey beach
         call follow.it, wide.beach, north, rocky.beach, south
      fin
      move north, wide.beach
      move south, rocky.beach
      move ne, beanstalk.bottom
   fin
#
#=====================================================================
#
at wide.beach
   fakecom chalk, cliff
   call beach.stuff
   respond climb, not.at.cliff.base, 0
   ifkey go
      or
   ifeq status, 1
      ifkey beach
         call follow.it, sandy.beach, south, beach.end, north
      fin
      move north, beach.end
      move south, sandy.beach
      move east, beanstalk.bottom
   fin
#
#=====================================================================
#
at beach.end
   respond jumble, no.pass.jumble
   call beach.stuff
   respond climb, no.climb.cliff
   ifkey go
      or
   ifeq status, 1
      ifkey beach
         call follow.it, wide.beach, south, none, none
      fin
      move south, wide.beach
      move se, beanstalk.bottom
   fin
#
#=====================================================================
#
at beanstalk.bottom
   fakearg plant, beanstalk
   set vessel, none
   ifany pour, spill
      set vessel, none
      ifeq status, 1
         call find.water, false
         ifgt vessel, none
            call water.beanstalk
         fin
      fin
      ifkey water
         call water.beanstalk
      fin
   fin
   ifkey water, beanstalk
        call water.beanstalk
   fin
   ifkey empty
      ifkey bucket
         and
      ifnear bucket, full.of.dung
         call feed.beanstalk
      fin
      ifany bucket, bottle, flask
         and
      ifnear arg2
         set vessel, arg2
         eval object.state, vessel
         ifeq object.state, full.of.water
            call water.beanstalk
         fin
      fin
   fin
   ifkey climb
      respond cliff, no.climb.cliff
      ifkey up
         set status, 1
      fin
   fin
   ifkey beanstalk
      ifany feed, fertiliser
         call feed.beanstalk
      fin
      respond get, pull, roots.too.deep, beanstalk
      ifany climb, up
         set status, 1
      fin
   fin
   respond soil, no.get.soil, beanstalk
   ifany open, empty, tear, spill, scatter
      and
   ifkey packet
      and
   ifnear packet
      call feed.beanstalk
   fin
   ifeq status, 1
      and
   ifany packet, feed
      call feed.beanstalk
   fin
   ifkey help
      and
   iflt beanstalk, gigantic
      flag here, hintable
   fin
   ifkey chalk
      respond get, look, no.future.in.it, chalk
      flag context, arg2.here
      proceed
   fin
   ifkey look
      respond cliff, white.cliffs
      respond patch, patch.of.soil, beanstalk
      respond moisture, cliff.moisture
      respond up, below.cliff, beanstalk
      respond vegetation, scruffy.vegetation
      ifgt beanstalk, 0
         respond stem, bean.stem
         respond foliage, dull.stuff, 0
      fin
      proceed
   fin
   ifgt beanstalk, 0
      ifkey chew
         and
      ifany stem, beanstalk
         call chew.stem
      fin
      ifany stem, foliage
         flag context, arg2.here
         proceed
      fin
   fin      
   ifkey go
      or
   ifeq status, 1
      respond cliff, right.next.to.it
      ifany up, climb
         ifeq beanstalk, gigantic
            set beanstalk.middle, 1
            smove beanstalk.middle, up.the.beanstalk
         fin
         ifeq beanstalk, grown
            quip beanstalk.is.hungry
         fin
         quip its.too.small, beanstalk
      fin
      move north, beach.end
      move nw, beach.end
      move west, wide.beach
      ifany sw, beach
         call try.dir, sw, sandy.beach
      fin
      respond south, outcrop.blocks
   fin
#
#=====================================================================
#
at beanstalk.middle
   set beanstalk.middle, 0
   ifkey sapling
      respond look, its.a.sapling
      quip it.is.too.far
   fin
   fakearg plant, beanstalk
   ifkey look
      respond cliff, cliff.geology
      respond ledge, narrow.ledge, north
      respond up, below.cliff, 1
      respond down, foliage.in.the.way
      respond foliage, dull.stuff, 0
      respond stem, bean.stem
      respond sea, horizon, sea.horizon
      respond crack, sapling.crack
      proceed
   fin
   ifkey get
      and
   ifany cliff, rock, stone
      ifhave sunstone
         and
      ifge sunstone, 6
         and
      ifle sunstone, 8
         quip no.hold.cliff, 1
      else
         quip no.hold.cliff, 0
      fin
   fin
   ifkey chew
      and
   ifany stem, beanstalk
      call chew.stem
   fin
   ifany stem, foliage
      flag context, arg2.here
      proceed
   fin
   ifkey beanstalk
      and
   ifany up, down, climb
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move up, climb, beanstalk.top
      move down, beanstalk.bottom
      ifany north, ledge, sapling, cross
         ifhave sunstone
            ifeq sunstone, 6
               or
            ifeq sunstone, 7
               or
            ifeq sunstone, 8
               ifflag beater, seen
                  ifeq sunstone, 8
                     quip sunstone.stops.you, north
                  fin
                  move ledge
               else
                  set context, q.ledge.good
                  quip ledge?
               fin
            fin
         fin
         set context, q.ledge.bad
         quip ledge?
      fin
   fin
   ifany ledge, stem, foliage, beanstalk, cliff
      flag context, arg2.here
   fin
   ifany sea, horizon
      flag context, arg2.distant
   fin
   lda drop.here, beanstalk.bottom
   lda drop.text, down.the.foliage
   set throw.it, true
   set throw.here, drop.here
   set throw.text, drop.text
#
#=====================================================================
#
at ledge
   fakearg plant, beanstalk
   ifkey look
      respond ledge, narrow.ledge, south
      respond cliff, cliff.geology
      respond beanstalk, foliage, bean.from.ledge
      respond down, beach.from.ledge
      respond up, below.cliff, 1
      respond sea, horizon, sea.horizon
      respond crack, sapling.crack
      respond island, island.too.far
      respond mountain, too.far.to.see, mountain
      proceed
   fin
   ifkey get
      and
   ifany cliff, rock, stone
      quip no.hold.cliff, 1
   fin
   ifany beanstalk, foliage
      respond get, no.grab.beanstalk
      flag context, arg2.here
      proceed
   fin
   ifkey sunstone
      and
   ifany drop, throw
      say sapling.fall
      goto beanstalk.bottom
      call splatter
   fin
   ifkey sapling
      ifany cut
         say vandal!
         ifhave axe
            or
         ifhave sword
         else
            append nothing.to.cut.with, 1
         fin
         quit
      fin
      ifkey chew
         ifhave fangs, worn
            quip no.point.in.that
         fin
         quip hah!
      fin
   fin
   ifkey jump
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      smove south, ledge, beanstalk, beanstalk.middle, back.to.beanstalk
      respond north, sapling.blocks
      respond jump, sw, west, nw, sunstone.saves
   fin
   ifany ledge, crack, beanstalk, cliff
      flag context, arg2.here
   fin
   ifany sea, horizon, island
      flag context, arg2.distant
   fin
   lda drop.here, beanstalk.bottom
   lda drop.text, down.to.the.beach
   set throw.it, true
   set throw.here, drop.here
   set throw.text, drop.text
#
#=====================================================================
#
at beanstalk.top
   ifkey giant
      respond look, giants.back
      ifeq status, 1
         quip what.about.them, giant
      fin
      quip no.point.in.that
   fin
   fakearg plant, beanstalk
   respond chalk, no.future.in.it, chalk
   ifkey look
      respond grass, attention.to.detail, grass
      respond banks, banks.too.steep
      respond down, cliff, foliage.in.the.way
      respond foliage, dull.stuff, 0
      respond up, leaves.and.sky
      respond stem, bean.stem
      respond sea, horizon, sea.horizon
      respond, island, island.too.far
      respond mountain, too.far.to.see, mountain
      proceed
   fin
   ifkey chew
      and
   ifany stem, beanstalk
      call chew.stem
   fin
   ifany grass, stem, foliage, cliff, beanstalk
      flag context, arg2.here
      proceed
   fin
   ifany sea, horizon, island, banks
      flag context, arg2.distant
   fin
   ifkey climb
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifany climb, down
         set beanstalk.middle, 2
         move beanstalk.middle
      fin
      respond up, no.climb.further
      ifkey east
         ifeq giant, picnicking
            and
            not
         ifhave mask, worn
            quip giant.might.push
         fin
         move east, stupendous.view
      fin
   fin
   lda drop.here, beanstalk.bottom
   lda drop.text, down.the.foliage
   set throw.it, true
   set throw.here, drop.here
   set throw.text, drop.text
#
#=====================================================================
#
at jonah
   ifkey cage
      and
   ifnear cage
      proceed
   fin
   fakecom cage, wall
   ifkey look
      ifany hall, jonah
         set status, 1
      fin
      respond coral, its.coral
      respond wall, ribs, ribbed.walls
      respond passage, tunnel, corridor, dark.exit, passage
      proceed
   fin 
   ifkey go
      or
   ifeq status, 1
      move south, in, jonah, hall, in.jonah
      move west, out, passage, coral, fork, arched.fork
   fin
   ifany passage, tunnel, corridor, coral, hall, jonah, ribs, wall
      flag context, arg2.here
   fin
#
#=====================================================================
#
at in.jonah
   flag stalactites, seen
   ifkey teeth
      and
   ifnear teeth
      proceed
   fin
   fakecom teeth, stalactite
   ifkey look
      respond wall, ribs, ribbed.walls
      respond darkness, jonah.blackness
      respond stalactites, formations, jonah.teeth
      proceed
   fin
   respond stalactites, formations, jonah.dead.end
   ifkey go
      or
   ifeq status, 1
      move north, out, jonah
   fin
   ifany darkness
      flag context, arg2.here
   fin
#
#=====================================================================
#
at faces
   ifany bridge, arch
      and
   ifeq volcano, 2
      apport bridge, here
   fin
   ifkey look
      respond wall, faces, stone.faces, 0
      respond volcano, gorge, volcano.sight
      respond carving, figure, cant.see.much, figure
      ifkey valley
         set status, 1
      fin
      proceed
   fin
   ifkey volcano
      respond listen, volcano.roar
      flag context, arg2.distant
      proceed
   fin
   ifkey cross
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move north, carving, valley, figure, by.figure
      ifany cross, bridge, arch, gorge, south
         ifeq volcano, 0
            quip no.arch
         fin
         ifhave ring
            ifhave sceptre
               say ghost.bang
               goto ylem
               set volcano, 0
               call coroner
            fin
            move breathtaker
         fin
         say fumes.burn
         goto ylem
         call coroner
      fin
   fin
   ifkey faces
      flag context, arg2.distant
   fin
   ifany valley, carving, figure
      flag context, arg2.here
   fin
   lda throw.text, throw.gorge
   lda throw.here, ylem
#
#=====================================================================
#
at by.figure
   ifeq basilisk, twitching
      or
   ifeq basilisk, petrified.to.south
      sub basilisk, 1
   fin
   ifkey look
      respond feet, stone.feet
      respond wall, rock.wall
      respond faces, stone.faces, 1
      ifkey valley
         set status, 1
      fin
      proceed
   fin
   ifkey climb, wall
      quip rock.wall
   fin
   ifkey go
      or
   ifeq status, 1
      ifeq statue, wall.gone
         move northwest, plain.1
         move north, north.of.basilisk
         move northeast, loopy.passage
      fin
      move south, faces
      respond valley, you.are.there
   fin
   ifany valley, wall, feet
      flag context, arg2.here
   fin
   ifkey faces
      flag context, arg2.distant
   fin
#
#=====================================================================
#
at plain.1
   ifkey look
      respond passage, tunnel, corridor, dark.exit, passage
      proceed
   fin
   ifkey go, on
      move plain.2
   fin
   ifkey go
      or
   ifeq status, 1
      move south, out, passage, by.figure
      ifany north, ne, nw, in
         call phog
         move plain.2
      fin
   fin
   ifany passage, tunnel, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at plain.2
   local dir
#
   ifkey go
      or
   ifeq status, 1
      ifany north, east, south, west, ne, nw, se, sw
         call hide.things
         lda dir, north
         add dir, glow
         sub dir, 1
         ifeq status, 2
            and
         ifeq dir, arg2
            or
         ifeq dir, arg1      # Did he know or just guessed?
            randomise basalt.shelf, 0
            set tube, basalt.shelf
            ifgt tube, 0
               flag tube, lit
            else
               unflag tube, lit
            fin
            call dump.things, plain.3
            move plain.3
         fin
         call phog
         say here
         ifne glow, 0
            say glow
         fin
         quit               # Stumble around in a circle
      fin
   fin
#
#=====================================================================
#
at plain.3
   call phog
   ifkey look
      respond passage, tunnel, corridor, opening, dark.exit, passage
      respond cairn, rock, glowing.caern
      proceed
   fin
   ifkey rock
      respond get, no.get.glowing.rock, 1
      respond move, push, pull, no.get.glowing.rock, 0
   fin
   ifkey go
      or
   ifeq status, 1
      move down, passage, opening, in, nondescript
      ifany north, east, south, west, ne, nw, se, sw
         goto plain.2 
         call phog
         quit
      fin
   fin
   ifany opening, passage, cairn, rock
      flag context, arg2.here
   fin
#
#=====================================================================
#
at nondescript
   ifkey look
      ifkey chamber 
         set status, 1
      fin
      respond passage, tunnel, corridor, crawl, dark.exit, arg2
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move north, crawl, pentagram, pentagram
      move up, passage, south, plain.3
   fin
   ifany chamber, crawl, passage
      flag context, arg2.here
   fin
#
#=====================================================================
#
at pentagram
   ifkey look
      respond crawl, crack, dark.exit, arg2
      respond floor, pentagram, pentagram.info
      proceed
   fin
   ifany open, close
      proceed
   fin
   ifkey drop, flask
      and
   ifhave flask, sealed
      drop  flask
      set flask, in.pentagram
      quip set.flask.down
   fin
   ifany in, pentagram
       and
   ifeq status, 1
        or
   ifkey in, pentagram
      quip no.enter.pentagram
   fin
   ifkey go
      or
   ifeq status, 1
      move west, out, nondescript, nondescript
      move north, crack, chimney, chimney
      respond pentagram, no.enter.pentagram
   fin
   ifany floor, pentagram, crawl, crack
      flag context, arg2.here
   fin
#
#=====================================================================
#
at chimney
   ifkey look
      respond chimney, narrow.chimney, 0
      respond crack, dark.exit, crack
      ifkey bottom
         set status, 1
      fin
      proceed
   fin
   ifkey chimney
      and
   ifany up, climb
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move up, climb, chimney, tube, tube
      move south, crack, pentagram, pentagram
      respond bottom, you.are.there
   fin
   ifany crack, chimney, bottom
      flag context, arg2.here
   fin
#
#=====================================================================
#
at tube
   ifkey look
      respond tube, lava.tube
      respond chimney, narrow.chimney, 1
      respond lava, this.is.lava
      proceed
   fin
   ifkey chimney
      and
   ifany down, climb
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move down, climb, chimney, chimney
      move s, slide, tube, tube.slide
      move nw, basalt.shelf
      ifkey go, light
         and
      ifgt tube, 1
         move, basalt.shelf
      fin
      ifkey tube
         call follow.it, basalt.shelf, nw, tube.slide, south
      fin
   fin
   ifany tube, lava, chimney
      flag context, arg2.here
   fin
   lda throw.text, throw.chimney
   lda throw.here, chimney
#
#=====================================================================
#
at tube.slide
   ifkey look
      respond slide, lava.slide
      respond tube, lava.tube
      respond lava, this.is.lava
      proceed
   fin
   ifkey down, slide
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      smove s, down, slide, plain.1, oof
      move n, chimney, tube, tube
   fin
   ifany slide, tube, lava
      flag context, arg2.here
   fin
   lda throw.text, throw.tube
   lda throw.here, plain.1
#
#=====================================================================
#
at north.of.basilisk
   ifkey look
      ifany tunnel, passage, corridor
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany tunnel, passage, corridor
         ifis there, basilisk.den
            lda arg1, south
         else
            lda arg1, north
         fin
      fin
      move south, by.figure
      ifkey north
         ifeq basilisk, snoring
            or
         ifeq basilisk, petrified
            add basilisk, 1
         fin
         ifeq basilisk, twitching
            say basilisk.grumbles
         fin
         move basilisk.den
      fin
   fin
   ifany passage, tunnel, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at basilisk.den
   ifkey back
      and
   ifis there, north.of.basilisk
      fakecom back, south
   fin
   ifkey look
      respond den, hollow, basilisk.hollow
      ifkey granite
         and
      ifeq basilisk, petrified
         quip just.that, granite
      fin
      ifany tunnel, passage, corridor
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany tunnel, passage, corridor
         ifis there, south.of.basilisk
            lda arg1, north
         else
            lda arg1, south
         fin
      fin
      move north, south.of.basilisk
      ifkey south
         ifeq basilisk, twitching
            or
         ifeq basilisk petrified.to.south
            sub basilisk, 1
         fin
         ifeq basilisk, snoring
            call sneaks.die
            ifhave plate, shiny
               say basilisk.stoned
               set basilisk, petrified
               unflag basilisk.den, hintable
            else
               say petrify.me
               call coroner
            fin
         fin
         move north.of.basilisk
      fin
   fin
   ifany den, passage
      flag context, arg2.here
   fin
#  
#=====================================================================
#
at south.of.basilisk
   ifkey look
      respond steps, well.worn.steps
      ifany tunnel, passage, corridor
         set status, 1
      fin
      proceed
   fin
   ifeq basilisk, snoring
      or
   ifeq basilisk, petrified
      add basilisk, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move north, peelgrunt, peelgrunt
      move south, basilisk.den
      move down, steps, on.steps
      ifany tunnel, passage, corridor
         call follow.it, basilisk.den, south, peelgrunt, north
      fin
   fin
   ifany steps, passage
      flag context, arg2.here
   fin
   lda throw.text, throw.steps
   lda throw.here, on.steps
#
#=====================================================================
#
at peelgrunt
   fakecom door, safe
   ifkey in, safe
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifkey in
         ifeq safe, unlocked
            set safe.exit, here
            move insafe
         fin
         quip cant.enter.safe
      fin
      ifany south, out, fork
         ifeq safe, unlocked
            quip safe.blocks
         fin
         move south.of.basilisk
      fin
   fin
#
#=====================================================================
#
at on.steps
   ifkey look
      respond steps, well.worn.steps
      respond down, depth, pit.view, 0
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move up, south.of.basilisk
      move down, depth, steps, steps.exit
   fin
   ifany steps, depth
      flag context, arg2.here
   fin
   lda throw.text, throw.steps
   lda throw.here, steps.exit
#
#=====================================================================
#
at steps.exit
   ifkey look
      respond steps, well.worn.steps
      respond tunnel, passage, corridor, dark.exit, tunnel
      ifkey landing
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move up, on.steps
      move down, steps, storage
      move north, out, passage, corridor, tunnel, fake.y2
      respond landing, you.are.there
   fin
   ifany steps, passage, corridor, tunnel, landing
      flag context, arg2.here
   fin
   lda throw.text, throw.steps
   lda throw.here, storage
#
#=====================================================================
#
at storage
   ifkey look
      respond steps, well.worn.steps
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move up, steps, steps.exit
   fin
   ifany steps
      flag context, arg2.here
   fin
#
#=====================================================================
#
at fake.y2
   ifkey look
      respond passage, tunnel, corridor, dark.exits, passage
      respond wall, jumble, all.broken.up
      respond rock, y2, surveyors.mark
      proceed
   fin
   ifany plugh, plover
      ifkey say
         or
      ifeq status, 1
         ifflag admin, nomagic
            quip nothing
         fin
         set nobody.answers, 0
         smove platform, foof
      fin
   fin
   ifkey go
      or
   ifeq status, 1
      move south, steps.exit
      move west, catacombs.lobby
      move east, wall, fake.jumble
      ifany tunnel, passage, corridor
         call follow.it, steps.exit, south, catacombs.lobby, west
      fin
   fin
   ifany passage, tunnel, corridor, y2, rock, wall, jumble
      flag context, arg2.here
   fin
#
#=====================================================================
#
at catacombs.lobby
   call default.read, plaque
   ifany plaque, sign, message, note, notice, inscription
      ifany read, look
         quip catacombs.info, 0
      fin
      ifeq status, 1
         flag status, pls.clarify
         quip do.what?, plaque
      fin
      quip leave.it.alone, plaque
   fin
   ifkey look
      respond words, message, note, notice, lobby.words
      respond arch, archway, lobby.archway
      respond exit, dark.exit, exit
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move east, out, fake.y2
      ifany south,arch, archway, in
         ifgt cat.factor, 0
            say hehehe
         fin
         move catacombs.entrance
      fin
   fin
   ifany plaque, sign, message, note, notice, inscription
      flag context, arg2.here
   fin
#
#=====================================================================
#
at fake.jumble
   ifkey look
      ifkey jumble
         set status, 1
      fin
      respond crack, large.n.small
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move west, down, fake.y2
      respond n, ne, e, se, s, sw, nw, lost.in.jumble
   fin
   ifany crack, jumble
      flag context, arg2.here
   fin
#
#=====================================================================
#
at audience
   ifkey look
      respond floor, slab, onyx, audience.floor
      respond marble, walls, audience.walls
      respond pillars, granite, red.pillars
      respond doorway, catacombs, dark.exit, doorway
      respond ceiling, up, its.a.ceiling, c.audience
      respond glow, light, audience.light
      ifany chamber, hall
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move east, audience.east
      move west, out, doorway, catacombs.portal
      respond chamber, hall, you.are.there
   fin
   ifany doorway, ceiling, chamber, hall, pillars, granite
      flag context, arg2.here
   fin
   ifany slab, marble, onyx
      flag context, arg2.here
   fin
#
#=====================================================================
#
at audience.east
   ifkey rod
      and
      not
   ifnear rod
      fakearg rod, rods
   fin
   ifkey bars
      and
      not
   ifnear bars
      fakearg bars, rods
   fin
   ifkey look
      respond dais, audience.dais
      respond metal, bars, rods, audience.throne
      ifkey handholds
         and
      ifhere skeleton
         quip skeleton.hand
      fin
      respond floor, slab, onyx, audience.floor
      respond marble, walls, audience.walls
      respond pillars, granite, red.pillars
      respond ceiling, up, its.a.ceiling, c.audience
      respond glow, light, audience.light
      ifany chamber, hall
         set status, 1
      fin
      proceed
   fin
   ifany skeleton, handholds
      quip bones.ugh
   fin
   ifkey go
      or
   ifeq status, 1
      move west, audience
      respond dais, no.go.dais
      respond chamber, hall, you.are.there
   fin
   ifany ceiling, chamber, hall, pillars, granite, slab, marble, onyx
      flag context, arg2.here
   fin
   ifany dais, metal, rods, bars, handholds
      flag context, arg2.here
   fin
#
#=====================================================================
#
at loopy.passage
   ifkey look
      ifany tunnel, passage, corridor
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move northwest, by.figure
      move north, golden.chamber
      ifany tunnel, passage, corridor
         or
      ifkey go, on
         call follow.it, by.figure, nw, golden.chamber, north
      fin
   fin
   ifany passage, tunnel, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at golden.chamber
   ifkey look
      respond ceiling, up, its.a.ceiling, c.golden.chamber
      respond gold, walls, golden.walls
      ifkey chamber
         set status, 1
      fin
      proceed
   fin
   ifkey get, gold
      quip no.gold.here
   fin
   ifkey go
      or
   ifeq status, 1
      move ne, arabesque, arabesque
      move nw, translucent, translucent
      move south, loopy.passage
      respond chamber, you.are.there
   fin
   ifany chamber
      flag context, arg2.here
   fin
#
#=====================================================================
#
at arabesque
   ifkey look
      respond arabesque, design, figure, figures, wall, arabesque.patterns
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move south, out, golden.chamber
   fin
   ifany arabesque, design, figure, figures, wall
      flag context, arg2.here
   fin
#
#=====================================================================
#
at translucent
   ifkey look
      respond passage, tunnel, corridor, dark.exit, passage
      respond glow, reddish.glow
      respond wall, minerals, translucent.wall
      proceed
   fin
   ifkey taste
      respond wall, minerals, not.salt
   fin
   ifkey go
      or
   ifeq status, 1
      ifany out, east, passage, back
         ifloc goblins, limbo
            apport goblins, here
            set goblins, 0
         fin
         move golden.chamber
      fin
   fin
   ifany passage, tunnel, corridor, glow, wall, minerals
      flag context, arg2.here
   fin
#
#=====================================================================
#
at platform
   ifkey look
      respond volcano, volcano.sight
      respond fountains, flow, molten.lava
      respond glow, lava, river, lava.glows
      ifkey platform
         set status, 1
      fin
      proceed
   fin
   ifkey volcano
      respond listen, volcano.roar
      flag context, arg2.here
      proceed
   fin
   ifkey climb, down
      set status, 1
   fin
   ifkey say
      and
   ifany plugh, plover
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      smove plugh, plover, fake.y2, foof
      ifkey west
         and
      ifflag above.volcano, been.here
         ifhave sunstone
            quip sunstone.no.island
         fin
         smove above.volcano, no.sizzle
      fin
      ifany down, climb, north, south, east, west, northeast
         or
      ifany northwest, southeast, southwest, jump
         say sizzle
         goto ylem
         call coroner
      fin
      respond platform, you.are.there
   fin
   ifany lava, platform, glow, river
      flag context, arg2.here
   fin
   lda throw.text, throw.gorge
   lda throw.here, ylem
#
#=====================================================================
#
at nowhere
   local marker
   local temp.val
#
   ifkey go
      or
   ifeq status, 1
      move north, ne, east, se, south, sw, west, nw, up, down, nowhere
   fin
   ifeq status, 1
      or
   ifany go, get
      and
   ifkey exit
      quip easy.to.say
   fin
   respond walls, no.walls
   ifeq stage, little.joke
      respond help, bad.omen
      respond history, remember, recall, restore, info, introduction, later!
      ifkey contemplate
         set hint.time, 0
         resay lets.start     # Resay allows for "rest and contemplate"
         set result, 1        # Nominate persistent flag
         exec 15, result      # Set it to true
         set vain.contemplation, 1
         goto road
         unflag here, been.here
         flag status, moved
         flag status, fulldisplay
         call describe.here
         unflag status, fulldisplay
         flag context, joke.over
         say btw
         set context, q.intro
         quip instructions?
      fin
      respond think, think.some.more
      respond rest, nearly.right
      proceed
   fin
   respond contemplate, vain.contemplation
   ifany zorton, xyzzy, thurb, snoeze, samoht, plugh, phuggg, noside,
      or
   ifany melenkurion, knerl, klaetu, foo, foe, fie, fee, blerbi, basingstoke
      ifkey say
         set arg1, arg2
         set status, 1
      fin
      set temp.val, arg1
      lda marker, first.magic
      add marker, 1
      sub temp.val, marker
      ifeq temp.val, escape
         or
      ifeq escape, -1
         lda marker, last.magic
         sub marker, 1
         ifeq arg1, marker
            call lets.go.back
         else
            say ok!
            add escape, 1
         fin
      else
         sub temp.val, 1
         ifeq temp.val, escape
            say not.quite
         else
            ifgt escape, 2
               chance 20
                  or
                  not
               ifflag hints, simple.rule
                  say bad.order
                  flag hints, simple.rule
               else
                  say naturally.nothing
               fin
            else
               say nothing
            fin
         fin
         set escape, 0
      fin
      quit
   fin
   ifkey mist
      flag context, arg2.here
   fin
#
#=====================================================================
#
at catacombs.entrance
   ifkey look
      ifkey catacombs
         set status, 1
      fin
      respond tunnel, passage, corridor, dark.exits, tunnel
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany north, ne, east, se, south, sw, west, nw
         call catlogic
      fin
      respond catacombs, you.are.there
      respond tunnel, passage, corridor, too.many.exits, tunnel
   fin
   ifany catacombs, tunnel
      flag context, arg2.here
   fin
#
#=====================================================================
#
at catacombs.2
   ifkey look
      ifkey catacombs
         set status, 1
      fin
      respond tunnel, passage, corridor, dark.exits, tunnel
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany north, ne, east, se, south, sw, west, nw
         call catlogic
      fin
      respond catacombs, you.are.there
      respond tunnel, passage, corridor, too.many.exits, tunnel
   fin
   ifany catacombs, tunnel
      flag context, arg2.here
   fin
#
#=====================================================================
#
at catacombs.3
   ifkey look
      ifkey catacombs
         set status, 1
      fin
      respond tunnel, passage, corridor, dark.exits, tunnel
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany north, ne, east, se, south, sw, west, nw
         call catlogic
      fin
      respond catacombs, you.are.there
      respond tunnel, passage, corridor, too.many.exits, tunnel
   fin
   ifany catacombs, tunnel
      flag context, arg2.here
   fin
#
#=====================================================================
#
at catacombs.4
   ifkey look
      ifkey catacombs
         set status, 1
      fin
      respond tunnel, passage, corridor, dark.exits, tunnel
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany north, ne, east, se, south, sw, west, nw
         call catlogic
      fin
      respond catacombs, you.are.there
      respond tunnel, passage, corridor, too.many.exits, tunnel
   fin
   ifany catacombs, tunnel
      flag context, arg2.here
   fin
#
#=====================================================================
#
at catacombs.5
   ifkey look
      ifkey catacombs
         set status, 1
      fin
      respond tunnel, passage, corridor, dark.exits, tunnel
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany north, ne, east, se, south, sw, west, nw
         call catlogic
      fin
      respond catacombs, you.are.there
      respond tunnel, passage, corridor, too.many.exits, tunnel
   fin
   ifany catacombs, tunnel
      flag context, arg2.here
   fin
#
#=====================================================================
#
at catacombs.6
   ifkey look
      ifkey catacombs
         set status, 1
      fin
      respond tunnel, passage, corridor, dark.exits, tunnel
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany north, ne, east, se, south, sw, west, nw
         call catlogic
      fin
      respond catacombs, you.are.there
      respond tunnel, passage, corridor, too.many.exits, tunnel
   fin
   ifany catacombs, tunnel
      flag context, arg2.here
   fin
#
#=====================================================================
#
at catacombs.7
   ifkey look
      ifkey catacombs
         set status, 1
      fin
      respond tunnel, passage, corridor, dark.exits, tunnel
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany north, ne, east, se, south, sw, west, nw
         call catlogic
      fin
      respond catacombs, you.are.there
      respond tunnel, passage, corridor, too.many.exits, tunnel
   fin
   ifany catacombs, tunnel
      flag context, arg2.here
   fin
#
#=====================================================================
#
at catacombs.8
   ifkey look
      ifkey catacombs
         set status, 1
      fin
      respond tunnel, passage, corridor, dark.exits, tunnel
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany north, ne, east, se, south, sw, west, nw
         call catlogic
      fin
      respond catacombs, you.are.there
      respond tunnel, passage, corridor, too.many.exits, tunnel
   fin
   ifany catacombs, tunnel
      flag context, arg2.here
   fin
#
#=====================================================================
#
at catacombs.9
   ifkey look
      ifkey catacombs
         set status, 1
      fin
      respond tunnel, passage, corridor, dark.exits, tunnel
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany north, ne, east, se, south, sw, west, nw
         call catlogic
      fin
      respond catacombs, you.are.there
      respond tunnel, passage, corridor, too.many.exits, tunnel
   fin
   ifany catacombs, tunnel
      flag context, arg2.here
   fin
#
#=====================================================================
#
at catacombs.10
   ifkey look
      ifkey catacombs
         set status, 1
      fin
      respond tunnel, passage, corridor, dark.exits, tunnel
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany north, ne, east, se, south, sw, west, nw
         call catlogic
      fin
      respond catacombs, you.are.there
      respond tunnel, passage, corridor, too.many.exits, tunnel
   fin
   ifany catacombs, tunnel
      flag context, arg2.here
   fin
#
#=====================================================================
#
at catacombs.11
   ifkey look
      ifkey catacombs
         set status, 1
      fin
      respond tunnel, passage, corridor, dark.exits, tunnel
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany north, ne, east, se, south, sw, west, nw
         call catlogic
      fin
      respond catacombs, you.are.there
      respond tunnel, passage, corridor, too.many.exits, tunnel
   fin
   ifany catacombs, tunnel
      flag context, arg2.here
   fin
#
#=====================================================================
#
at catacombs.12
   ifkey look
      ifkey catacombs
         set status, 1
      fin
      respond tunnel, passage, corridor, dark.exits, tunnel
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany north, ne, east, se, south, sw, west, nw
         call catlogic
      fin
      respond catacombs, you.are.there
      respond tunnel, passage, corridor, too.many.exits, tunnel
   fin
   ifany catacombs, tunnel
      flag context, arg2.here
   fin
#
#=====================================================================
#
at catacombs.13
   ifkey look
      ifkey catacombs
         set status, 1
      fin
      respond tunnel, passage, corridor, dark.exits, tunnel
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany north, ne, east, se, south, sw, west, nw
         call catlogic
      fin
      respond catacombs, you.are.there
      respond tunnel, passage, corridor, too.many.exits, tunnel
   fin
   ifany catacombs, tunnel
      flag context, arg2.here
   fin
#
#=====================================================================
#
at catacombs.portal
   ifkey look
      respond doorway, portal, space, entrance, dark.portal
      respond tunnel, passage, corridor, corridor, dark.exit, tunnel
      respond entrance, dark.exit, entrance
      ifkey catacombs
         set status, 1
      fin
      proceed
   fin
   ifkey in
      and
   ifany portal, doorway, entrance, space
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move west, entrance, new.den
      move in, east, portal, doorway, space, audience
      move catacombs, tunnel, passage, corridor, north, catacombs.13
   fin
   ifany catacombs, portal, corridor, passage, tunnel, space
      flag context, arg2.here
   fin
   ifany doorway, entrance
      flag context, arg2.here
   fin
#
#=====================================================================
#
at new.den
   ifkey swag
      and
   ifeq jewelry, ground.state
      fakearg, swag, jewelry
   fin   
   call default.read, note
   ifany label, inscription, note, notice, words, message
      respond look, read, its.swag
      respond get, leave.it.alone, label
      ifgt status, 1
         flag context, arg2.here
         proceed
      else
         flag status, pls.clarify
         quip do.what?, building
      fin
   fin
   ifkey look
      ifkey shelf
         ifeq jewelry, ground.state
            quip jewelry
         else
            quip its.empty, shelf
         fin
      fin
      ifkey den
         set status, 1
      fin
      ifkey wall
         and
      ifeq mask, ground.state
         quip mask
      fin
      respond exit, doorway, dark.exit, doorway
      respond den, you.are.there
      proceed
   fin
   respond shelf, just.a.fixture, shelf
   ifkey go
      or
   ifeq status, 1
      move east, out, doorway, portal, catacombs.portal
   fin
   ifany label, inscription, note, notice, words, message
      or
   ifany wall, shelf, exit, den
      flag context, arg2.here
   fin
#
#=====================================================================
#
at catacombs.14
   ifkey look
      ifkey catacombs
         set status, 1
      fin
      respond tunnel, passage, corridor, dark.exits, tunnel
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany north, ne, east, se, south, sw, west, nw
         call catlogic
      fin
      respond catacombs, you.are.there
      respond tunnel, passage, corridor, too.many.exits, tunnel
   fin
   ifany catacombs, tunnel
      flag context, arg2.here
   fin
#
#=====================================================================
#
at catacombs.15
   ifkey look
      ifkey catacombs
         set status, 1
      fin
      respond tunnel, passage, corridor, dark.exits, tunnel
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany north, ne, east, se, south, sw, west, nw
         call catlogic
      fin
      respond catacombs, you.are.there
      respond tunnel, passage, corridor, too.many.exits, tunnel
   fin
   ifany catacombs, tunnel
      flag context, arg2.here
   fin
#
#=====================================================================
#
at catacombs.exit
   ifkey look
      ifkey catacombs
         set status, 1
      fin
      respond tunnel, passage, corridor, dark.exits, tunnel
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany north, ne, east, se, south, sw, west, nw
         call catlogic
      fin
      respond catacombs, you.are.there
      respond tunnel, passage, corridor, too.many.exits, tunnel
   fin
   ifany catacombs, tunnel
      flag context, arg2.here
   fin
#
#=====================================================================
#
at rest.area
   ifkey drink
      ifany water, fountain
         or
      ifeq status, 1
         proceed
      fin
   fin
   ifkey look
      respond fountain, just.a.fountain
      respond exit, passage, tunnel, dark.exit, passage
      respond catacombs, i.dont.see, catacombs
      proceed
   fin
   ifkey rest
      and
   ifeq status, 1
      quip you.rest, 0
   fin
   ifkey go
      or
   ifeq status, 1
      move out, passage, tunnel, catacombs, catacombs.entrance
      ifeq status, 2
         and 
      ifeq arg2, rest.exit
         or
      ifeq arg1, rest.exit
         move catacombs.entrance
      fin
   fin
   ifany fountain, exit, passage, tunnel
      flag context, arg2.here
   fin
#
#=====================================================================
#
at half.stairs
   ifkey look
      ifany steps, stairs
         say spiral.stair
         quip blank
      fin
      respond seams, rock, gold, wall, gold.seams
      respond minerals, reflective.minerals
      ifkey shaft
         set status, 1
      fin
      proceed
   fin
   ifkey get, gold
      quip gold.seams
   fin
   ifkey go
      or
   ifeq status, 1
      flag orb, seen                 # He almost certainly will!
      move up, south.side.chamber
      move down, cellar.view
      ifkey steps
         call follow.it, south.side.chamber, up, cellar.view, down
      fin
      respond shaft, you.are.there
   fin
   ifany steps, stairs, minerals, wall, gold, rock, seams, shaft
      flag context, arg2.here
   fin
   lda throw.text, throw.downstairs
   lda throw.here, cellar.view
#
#=====================================================================
#
at cellar.view
   ifkey climb
      ifany steps, stairs, up
         or
      ifeq status, 1
         move half.stairs
      fin
      quip no.climb.portcullis
   fin
   ifkey orb
      and
   ifloc orb, cellar
      respond look, crystal.ball
      quip orb.out.of.reach
   fin
   ifkey portcullis
      ifany oil, look
      else
         quip portcullis.rusty
      fin
   fin
   ifkey look
      ifany steps, stairs
         say spiral.stair
         quip blank
      fin
      respond cellar, cellar.viewing
      respond drain, cant.see.much, drain
      respond bricks, cellar.bricks
      respond slab, cant.see.properly, slab
      proceed
   fin
   respond drain, drain.out.of.reach
   ifkey throw
      and
      not
   ifnear dwarf
      call throw.it.at.orb
   fin
   ifkey go
      or
   ifeq status, 1
      move up, steps, stairs, half.stairs
      respond cellar, in, drain, no.go.portcullis
   fin
   ifany steps, stairs, portcullis, cellar
      flag context, arg2.here
   fin
#
#=====================================================================
#
at chapel
   fakearg steps, stairs
   ifkey look
      respond ceiling, up, its.a.ceiling, c.chapel
      respond beams, chapel.beams, 0
      respond stairs, spiral, column, slab, hole, stone.spiral, 0
      proceed
   fin
   ifkey rope
      respond get, pull, no.use.rope, 0
      respond swing, push, no.use.rope, 1
   fin
   set beams, 0
   ifkey rope
      and
   ifany up, go
      lda arg1, climb
   fin
   ifkey climb
      and
   ifany up, rope
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move climb, beams
      move north, anteroom
      move west, vestry
      move up, top.of.chapel
      move down, hole, crypt
      ifany stairs
         call follow.it, top.of.chapel, up, crypt, down
      fin
   fin
   ifany hole, stairs, steps, slab, spiral, column
      flag context, arg2.here
   fin
   ifany ceiling, beams
      flag context, arg2.distant
   fin
#
#=====================================================================
#
at vestry
   ifkey look
      ifkey chamber
         set status, 1
      fin
      respond ceiling, up, vault, its.a.ceiling, c.vestry
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move east, out, chapel, chapel
   fin
   ifany ceiling, vault
      flag context, arg2.here
   fin
#
#=====================================================================
#
at quarters
   ifkey couch
      respond look, solid.couch
      respond push, pull, lift, couch.too.heavy
      quip just.a.fixture, couch
   fin
   ifkey look
      ifkey eggs
         and
      ifeq giant, blissful
         quip eggs.being.munched
      fin
      respond light, hidden.light
      respond opening, dark.exits, opening
      respond exit, pantry, dark.in.there, pantry
      ifany quarters, chamber
         set status, 1
      fin
      proceed
   fin
   ifeq stage, closing.soon
      call closing.time
   fin
   ifkey go
      or
   ifeq status, 1
      respond quarters, chamber, you.are.there
      move north, dungeon, dungeon
      move south, maze, web.maze.1
      move east, pantry, pantry
   fin
   ifany openings
      flag context, arg2.here
   fin
#
#=====================================================================
#
at beams
   set beams, 1
   ifkey rope
      ifkey look
          describe rope, 1
          quit
      fin            
      respond get, free, no.use.rope, 2
      respond pull, no.use.rope, 3
      respond swing, no.use.rope, 1
   fin
   ifkey look
      ifkey recess
         set status, 1
      fin
      respond ceiling, its.a.ceiling, c.chapel
      respond beams, chapel.beams, 1
      respond wood, beams.wood
      proceed
   fin
   respond recess, you.are.there
   ifkey go
      or
   ifeq status, 1
      move out, climb, down, chapel
   fin
   ifany beams, ceiling
      flag context, arg2.here
   fin
   ifany beams, wood
      flag context, arg2.here
   fin
   lda drop.here, chapel
   lda throw.here, chapel
   set throw.it, true
   lda drop.text, drop.to.darkness
   lda throw.text, drop.to.darkness
#
#=====================================================================
#
at dungeon
   ifany drink, pour
      proceed
   fin
   respond water, water.drops
   ifkey stone
      fakecom stone, flagstones
   fin
   ifkey look, flagstones
      ifflag status, light.here
      else
         quip its.too.dark
      fin
   fin
   ifkey look
      respond stanchions, just.scenery, stanchions
      respond ceiling, up, its.a.ceiling, c.dungeon
      respond rock, impenetrable.rock
      respond passage, tunnel, corridor, dungeon.passage
      respond floor, flagstones, down, flagstone.info, dungeon
      ifkey hole, opening
         and
      ifeq dungeon, flagstone.moved
         quip dark.in.there, hole
      fin
      ifkey dungeon
         set status, 1
      fin
      proceed
   fin
   ifkey flagstones
      ifany lift, pull, move
         say flagstone.lift, dungeon
         ifeq dungeon, flagstone.fixed
         else
            set dungeon, flagstone.moved
            set mouse.time, -1   # Zap the mouse
         fin
         quit
      fin
      flag context, arg2.here
      proceed
   fin
   ifany in, climb
      and
   ifany hole, down
      or
   ifkey climb, in
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move out, south, passage, quarters
      ifany down, in, hole, opening
         and
      ifeq dungeon, flagstone.moved
         move dungeon.exit
      fin
      respond dungeon, you.are.there
   fin
   ifany dungeon, passage
      flag context, arg2.here
   fin
   ifeq dungeon, flagstone.moved
      ifany hole, opening
         flag context, arg2.here
      fin
   fin
   ifany stanchions, passage, dungeon
      flag context, arg2.here
   fin
#
#=====================================================================
#
at web.maze.1
   ifkey look
      respond passage, tunnel, corridor, dark.exits, passage
      ifkey maze
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move pantry, pantry
      move east, web.maze.2
      move west, web.maze.5
      move up, web.maze.6
      move down, web.maze.3
      move north, quarters
      respond maze, you.are.there
   fin
   ifany passage, tunnel, corridor, maze
      flag context, arg2.here
   fin
#
#=====================================================================
#
at web.maze.2
   ifkey look
      respond passage, tunnel, corridor, dark.exits, passage
      ifkey maze
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move north, web.maze.1
      move east, down, web.maze.2
      move west, web.maze.5
      move south, web.maze.3
      move up, web.maze.4
   fin
   ifany passage, tunnel, corridor, maze
      flag context, arg2.here
   fin
#
#=====================================================================
#
at web.maze.3
   ifkey look
      respond passage, tunnel, corridor, dark.exits, passage
      ifkey maze
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move north, web.maze.2
      move east, down, web.maze.3
      move west, web.maze.1
      move south, web.maze.4
      move up, web.maze.5
   fin
   ifany passage, tunnel, corridor, maze
      flag context, arg2.here
   fin
#
#=====================================================================
#
at web.maze.4
   ifkey look
      ifany threads
         ifnear spider
            quip sticky.web
         fin
         quip sticky.web
      fin
      ifany hole, opening
         and
         not
      ifeq web, in.shreds
         ifis arg1, hole
            or
         ifis arg1, opening
            quip i.dont.see, arg1
         else
            quip i.dont.see, arg2
         fin
      fin
      respond passage, tunnel, corridor, dark.exits, passage
      ifany opening, hole
         and
      ifeq web, in.shreds
         quip dark.way, arg2
      fin
      ifkey maze
         set status, 1
      fin
      proceed
   fin
   ifkey throw, axe
      and
   ifhave axe
      and
   ifnear spider
      set axe, by.spider
      drop axe
      quip spider.dodges
   fin
   ifkey get
      ifeq status, 1
         default portable
      fin
      ifkey axe
         and
      ifeq axe, by.spider
         quip no.kill.spider
      fin
   fin
   ifkey documents
      and
   ifeq web, with.documents
      respond look, read, get, pull, push, documents.stuck
      quip hah!
   fin
   ifkey in
      and
   ifany hole, opening
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move north, web.maze.2
      move west, web.maze.6
      move east, web.maze.3
      move up, web.maze.5
      ifany south, in, hole, opening
         call sneaks.die
         ifeq web, with.spider
            quip no.kill.spider
         fin
         ifeq web, with.documents
            quip nasty.web
         fin
         move dank.cave
      fin
   fin
   ifany web, threads
      respond get, pull, no.handle.web
   fin
   respond threads, hah!
   ifany passage, tunnel, corridor, maze, hole, opening
      flag context, arg2.here
   fin
#
#=====================================================================
#
at web.maze.5
   ifkey look
      respond passage, tunnel, corridor, dark.exits, passage
      ifkey maze
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move north, web.maze.6
      move east, web.maze.1
      move west, up, web.maze.5
      move south, web.maze.4
      move down, web.maze.3
   fin
   ifany passage, tunnel, corridor, maze
      flag context, arg2.here
   fin
#
#=====================================================================
#
at web.maze.6
   ifkey look
      respond passage, tunnel, corridor, dark.exits, passage
      ifkey maze
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move west, north, web.maze.5
      move east, web.maze.1
      move south, web.maze.4
      move up, web.maze.5
      move down, web.maze.2
   fin
   ifany passage, tunnel, corridor, maze
      flag context, arg2.here
   fin
#
#=====================================================================
#
at basement
   call default.read, note
   call fake.note, nothing.more.to.read, note
   ifkey counterweights
      respond look, delicate.mechanism
      respond break, push, pull, no.break.mechanism
      flag context, arg2.here
      proceed
   fin
   ifkey slab
      respond look, suspended.slab
      respond pull, push, close, no.move.slab, arg1
      respond break, leave.it.alone, slab
      flag context, arg2.here
      proceed
   fin
   ifkey look
      respond ceiling, up, its.a.ceiling, c.basement
      respond steps, well.worn.steps
      respond opening, hole, dark.exit, opening
      ifkey basement
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move up, steps, curtain.entrance
      smove in, south, opening, hole, cellar, slab.shuts
      respond basement, you.are.there
   fin
   ifany steps, basement, opening, hole
      flag context, arg2.here
   fin
#
#=====================================================================
#
at cellar
   ifkey portcullis
      ifany oil, look
      else
         quip portcullis.rusty
      fin
   fin
   ifkey look
      respond steps, stairs, rusty.staircase
      respond chamber, portcullis.chamber
      respond wall, ceiling, brick.cellar
      respond floor, cellar.floor
      respond bricks, cellar.bricks
      respond slab, cellar.slab
      ifkey cellar
         set status, 1
      fin
      proceed
   fin
   ifkey drain
      and
   ifany down, in
      set status, 1
   fin
   ifkey slab
      respond push, no.push, slab
      respond pull, no.pull, slab
   fin
   ifkey go
      or
   ifeq status, 1
      respond steps, out, chamber, no.go.portcullis
      respond drain, in, down, drain.too.small
      respond cellar, you.are.there
   fin
   ifgt status, 1
      and
   ifflag arg2, object
      and
   ifflag arg2, big
   else
      lda throw.here, sea.view
      lda throw.text, down.the.dshaft
      set throw.it, true
      set drop.here, throw.here
      set drop.text, throw.text
   fin
   ifany steps, portcullis, cellar, drain, bricks, chamber, slab
      flag context, arg2.here
   fin
#
#=====================================================================
#
at curtain.entrance
   ifkey look
      respond steps, well.worn.steps
      respond entrance, curtained.opening, entrance
      respond curtains, its.a.curtain
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move down, basement
      move up, pantry
      move nw, in, soft, entrance, curtains, soft
   fin
   ifany steps, entrance
      flag context, arg2.here
   fin
#
#=====================================================================
#
at causeway.west
   ifkey look
      respond down, bottom, riverbed, streambed, distant.streambed
      respond causeway, stone.causeway
      respond gap, stream, no.stream
      respond mist, this.is.mist
      proceed
   fin
   ifkey jump
      ifany down, stream, streambed, bottom
         or
      ifeq status, 1
         say on.streambed
         goto ylem
         call coroner
      fin
   fin
   ifkey go
      or
   ifeq status, 1
      move east, cross, causeway, causeway
      move west, north, south, nw, sw, swirling.mist
      ifany down, streambed, bottom, gap
         set context, q.streambed
         quip down.to.streambed?
      fin
   fin
   ifany mist, causeway, gap
      flag context, arg2.here
   fin
   ifany bottom, streambed
      flag context, arg2.distant
   fin
#
#=====================================================================
#
at causeway
   ifkey look
      respond down, bottom, streambed, distant.streambed
      respond gap, stream, no.stream
      respond mist, this.is.mist
      respond causeway, stone.causeway
      proceed
   fin
   ifkey jump
      ifeq status, 1
         or
      ifany down, bottom, stream, streambed
         say on.streambed
         goto ylem
         call coroner
      fin
   fin
   ifkey go
      or
   ifeq status, 1
      move west, cross, causeway, causeway.west
      move south, se, east, reservoir, reservoir
      ifany down, streambed, bottom, gap
         set context, q.streambed
         quip down.to.streambed?
      fin
   fin
   ifany mist, causeway, gap
      flag context, arg2.here
   fin
   ifany bottom, streambed
      flag context, arg2.distant
   fin
#
#=====================================================================
#
at tower.base
   ifkey look
      respond wall, stone.wall
      respond steps, well.worn.steps
      respond arch, doorway, arched.doorway
      respond light, daylight, daylight.above
      proceed
   fin
   ifany climb, steps
      and
   ifkey up
      or
   ifkey climb, steps
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move north, out, doorway, arch, top.of.chapel
      ifany up, climb, steps, daylight
         ifhave sunstone
            quip tower.no.sunstone
         fin
         move tower.steps
      fin
   fin
   ifany steps, arch, doorway, daylight
      flag context, arg2.here
   fin
#
#=====================================================================
#
at tower.steps
   ifkey look
      respond wall, stone.wall
      respond steps, well.worn.steps
      proceed
   fin
   ifany climb, steps
      and
   ifany up, down, steps
      or
   ifkey climb, steps 
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move down, tower.base
      move up, climb, tower.lower.window
      ifkey steps
         call follow.it, tower.base, down, tower.lower.window, up
      fin
   fin
   ifany steps
      flag context, arg2.here
   fin
   lda throw.text, throw.downstairs
   set throw.here, here
   sub throw.here, 1
#
#=====================================================================
#
at tower.lower.window
   call fake.window
   ifkey look
      respond wall, stone.wall
      respond steps, well.worn.steps
      respond out, view, lake, meadows, mountains, snow, romantic.view, 0
      proceed
   fin
   ifany climb, steps
       and
   ifany up, down
       or
   ifkey climb, steps
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move down, tower.steps
      move up, climb, landing
      ifkey steps
         call follow.it, tower.steps, down, landing, up
      fin
      respond meadows, mountains, lake, snow, no.way.there
   fin
   ifany steps, view, meadows, mountains, lake, snow
      ifkey steps
         flag context, arg2.here
      else
         flag context, arg2.distant
      fin
   fin
   lda throw.text, throw.downstairs
   lda throw.here, tower.base
#
#=====================================================================
#
at landing
   ifkey look
      respond wall, stone.wall
      respond steps, well.worn.steps
      ifkey landing
         set status, 1
      fin
      proceed
   fin
   ifany climb, steps
      and
   ifany up, down
      or
   ifkey climb, steps
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move down, tower.lower.window
      move up, climb, tower.upper.window
      ifkey steps
         call follow.it, tower.upper.window, up, tower.lower.window, down
      fin
      respond landing, you.are.there
   fin
   ifany steps, landing
      flag context, arg2.here
   fin
   lda throw.text, throw.downstairs
   lda throw.here, tower.base
#
#=====================================================================
#
at tower.upper.window
   call fake.window
   ifkey look
      respond wall, stone.wall
      respond steps, well.worn.steps
      respond out, view, ravine, stream, romantic.view, 1
      proceed
   fin
   ifany climb, steps
      and
   ifany up, down
      or
   ifkey climb, steps
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move down, landing
      move up, climb, tower.upper.landing
      ifkey steps
         call follow.it, tower.upper.landing, up, landing, down
      fin
      respond ravine, stream, no.way.there
   fin
   ifany steps, view, ravine, stream
      ifkey steps
         flag context, arg2.here
      else
         flag context, arg2.distant
      fin
   fin
   lda throw.text, throw.downstairs
   lda throw.here, landing
#
#=====================================================================
#
at tower.upper.landing
   call default.read, notice
   call fake.note, door.notice, notice
   fakearg door, door2
   ifkey look
      respond wall, stone.wall
      respond steps, well.worn.steps
      ifkey landing
         set status, 1
      fin
      proceed
   fin
   ifkey door2
      ifkey knock
         proceed
      fin
      ifeq door2, closed
         ifany open, break
            quip door.not.for.breaking, arg2
         fin
         respond close, already.closed, arg2
      fin
      respond unlock, door.no.keyhole
      ifany push, pull, open, close, in
      else
         quip hah!
      fin
   fin
   ifany climb, steps
      and
   ifany up, down
      or
   ifkey climb, steps
      or
   ifkey in, door
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifany in, east
         ifeq door2, closed
            quip door.in.the.way, east
         fin
         ifeq door2, ajar
            say into.storeroom
         fin
         set door2, opened
         set tower.upper.landing, opened
         move storeroom
      fin
      move up, climb, tower.top.window
      move down, tower.upper.window
      ifkey steps
         call follow.it, tower.upper.window, down, tower.top.window, up
      fin
      respond landing, you.are.there
   fin
   ifany notice, inscription, sign, words, message, note
      or
   ifany steps, landing, door
      flag context, arg2.here
   fin
   lda throw.text, throw.downstairs
   lda throw.here, landing
#
#=====================================================================
#
at tower.top.window
   call fake.window
   ifgt alarm, 1
      set angry.voices, 2     # Switch vioces off
   otherwise
   iflt sentry, watchful
      set angry.voices, 0
   else
      set angry.voices, 1
   fin
   ifkey look
      respond wall, stone.wall
      respond out, sea, cliff, view, romantic.view, 2
      respond steps, well.worn.steps
      proceed
   fin
   ifany climb, steps
      and
   ifany up, down
      or
   ifkey climb, steps
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifkey steps
         and
         not
      ifany up, down, climb
         ifis there, tower.upper.landing
            lda arg1, up
         else
            lda arg1, down
         fin
      fin
      move down, tower.upper.landing
      ifany up, climb, steps
         ifgt alarm, 1
             move tower.top.landing
         fin
         ifeq sentry, welcoming.commettee
            save command, text.ptr
            set context, q.sentry
            quip sentry.will.kill
         fin
         call sentry.kills
      fin
      respond cliff, sea, no.way.there
   fin
   ifany steps, cliff, sea, view
      ifkey steps
         flag context, arg2.here
      else
         flag context, arg2.distant
      fin
   fin
   lda throw.text, throw.downstairs
   lda throw.here, tower.upper.landing
#
#=====================================================================
#
at tower.top.landing
   call default.read, notice
   ifany words, note, inscription, lettering, message, notice
      and
   ifany read, look
      quip door.notice
   fin
   fakearg door, door3
   ifkey stool
      respond look, get, pull, push, lift, its.a.stool
      ifeq status, 2
         flag context, arg2.here
         proceed
      fin
   fin
   ifkey look
      respond wall, stone.wall
      respond steps, well.worn.steps
      ifkey door3
         ifeq stage, exits.barred
            set no.access, 1
         else
            set no.access, 0
         fin
      fin
      ifkey landing
         set status, 1
      fin
      ifany table, mug
         ifeq door3, closed
            quip i.dont.see, arg2
         fin
         quip table.view
      fin
      proceed
   fin
   ifkey in, door
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifany east, in
         ifeq door3, closed
            quip door.in.the.way, east
         fin
         move dwarves.quarters
      fin
      move down, steps, tower.top.window
      respond landing, you.are.there
   fin
   ifeq door3, opened
      and
   ifany table, mug
      flag context, arg2.distant
   otherwise
   ifany steps
      flag context, arg2.here
   fin
   lda throw.text, throw.downstairs
   lda throw.here, tower.upper.landing
#
#=====================================================================
#
at dwarves.quarters
   fakearg door, door3
   respond mug, no.touch.mug
   ifkey look
      respond ceiling, up, its.a.ceiling, c.shelves
      respond beams, wood, planks, rough.ceiling
      respond ring, ring.clapper
      respond stool, wooden.stool
      respond table, dwarves.table
      respond wall, stone.wall
      respond window, forest, window.view
      ifkey landing
         ifeq door3, closed
            quip top.landing.view, 0
         fin
         quip top.landing.view, 1
      fin
      ifkey door3
         set no.access, 1
      fin
      proceed
   fin
   ifkey get
      respond knocker, knocker.fixed
      ifkey ring
         and
         not
      ifhere ring
         quip knocker.ring
      fin
   fin
   ifany pull, push
      and
   ifany ring, knocker
      quip try.knocking
   fin
   ifkey ring
      ifkey use
         lda arg1, knock
         set status, 1
         proceed
      fin
         not
      ifnear ring
         flag context, arg2.here
         proceed
      fin
   fin
   respond table, leave.it.alone, table
   respond stool, leave.it.alone, stool
   ifkey out, door
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifany out, west, landing
         ifeq door3, closed
            quip door.in.the.way, west
         fin
         move tower.top.landing
      fin
   fin
   ifeq door3, opened
      and
   ifany landing, stool
      flag context, arg2.distant
   otherwise
   ifany table, window, forest
      flag context, arg2.here
   fin
#
#=====================================================================
#
at tower.roof
   fakecom door, trapdoor
   ifkey look
      respond roof, its.a.roof
      respond horizon, far.horizon
      respond down, tower.down.view, 0
      respond garden, tower.down.view, 1
      respond bush, path, no.handy.them, arg2
      respond sea, sea.info
      respond view, vista, looks.magnificent, arg2
      respond forest, forest.view
      respond ravine, gates,cant.see.much, arg2
      respond crag, craggy.rocks
      respond hill, bit.of.a.hill
      respond track, track.from.tower
      proceed
   fin
   ifkey climb
      ifeq status, 1
         or
      ifany down, garden, ground, tower
         ifeq trapdoor, opened
            and
         ifne door2, closed
            set door2, closed
            set trapdoor closed
            say caught.climbing
            goto garden.s
            ifhave thurible
               apport thurible, road   # So he can try again
            fin
            call coroner
         fin
         call tower.climbing
      fin
   fin
   ifkey rest
      and
   ifeq status, 1
      and
   iflt alarm, 2
      respond wait, no.good.waiting, arg1
   fin
   ifkey trapdoor
      and
   ifany go, in
      set status, 1
   fin
   ifeq status, 1
      or
   ifany down, garden
      and
   ifkey jump
      goto garden.s
      ifhave bust
         set bust, damaged
      fin
      say no.dunes.here
      call coroner
   fin
   ifkey go
      or
   ifeq status, 1
      ifkey back
         and
      ifis there, garden.s
         call tower.climbing
      fin
      ifany in, down, trapdoor
         ifeq trapdoor, opened
            smove shelves.east, down.trapdoor
         fin
         respond in, trapdoor, trapdoor.in.the.way
         call tower.climbing
      fin
      respond sea, forest, gates, path, bush, ravine, crag, no.way.there
      respond track, hill, no.way.there
      respond roof, you.are.there
   fin
   lda throw.text, throw.roof
   lda throw.here, garden.s
   chance 33
      add throw.here, 1
   else
      chance 50
         sub throw.here, 1
      fin
   fin
   chance 5
      sub throw.here, 3
   fin
   ifany horizon, sea, view, forest, bush, path, gates
      flag context, arg2.distant
   otherwise
   ifany ravine, crag, track, hill, vista
      flag context, arg2.distant
   fin
#
#=====================================================================
#
at storeroom
   fakearg door, door2
   ifkey look
      respond passage, tunnel, corridor, shelf.passage
      respond door2, door2.inside
      respond ceiling, up, its.a.ceiling, c.storeroom
      respond wall, shelf.wall
      proceed
   fin
   ifany up, climb
      ifkey shelf
         smove shelves.west, climb.shelves
      fin
      ifkey ladder
         or
      ifeq status,1
         move shelves.east
      fin
   fin
   ifkey shelf
      flag context, arg2.here
      proceed
   fin
   ifkey go, door2
      fakearg door2, out
   fin
   ifkey go
      or
   ifeq status, 1
      ifany out, west, landing
         ifeq door2, closed
            quip door.in.the.way, west
         fin
         set door2, opened
         set tower.upper.landing, opened
         move tower.upper.landing
      fin
   fin
   ifany passage, tunnel, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at shelves.east
   fakecom door, trapdoor
   ifkey look
      respond ceiling, up, its.a.ceiling, c.shelves
      respond wall, stone.wall
      respond beams, wood, planks, rough.ceiling
      proceed
   fin
   ifkey go, trapdoor
      fakearg trapdoor, out
   fin
   ifkey climb, shelves
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move climb, down, storeroom
      move west, shelves.west
      ifany up, out
         ifeq trapdoor, closed
            quip trapdoor.in.the.way
         fin
         smove tower.roof, up.trapdoor
      fin
   fin
   ifany ceiling, beams, wood, planks, shelf
      flag context, arg2.here
   fin
   lda drop.text, drop.room
   lda drop.here, storeroom
   set throw.here, drop.here
   set throw.text, throw.room
#
#=====================================================================
#
at shelves.west
   unflag garden.n, hintable
   ifkey look
      respond ceiling, up, its.a.ceiling, c.shelves
      respond wall, stone.wall
      respond beams, wood, planks, rough.ceiling
      proceed
   fin
   ifkey shelf
      flag context, arg2.here
      proceed
   fin
   respond door, it.is.too.far
   ifkey climb, shelves
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move climb, down, storeroom
      move east, shelves.east
   fin
   ifany ceiling, beams, wood, planks, shelves
      flag context, arg2.here
      proceed
   fin
   lda drop.text, drop.room
   lda drop.here, storeroom
   set throw.here, drop.here
   set throw.text, throw.room
#
#=====================================================================
#
at track
   call in.dense.forest.actions
   respond grass, attention.to.detail, grass
   ifkey dirt
      call handle.dirt
   fin
   ifkey dirt
      call handle.dirt
   fin
   ifkey look
      respond hill, its.just.a, hill
      respond tower, too.far.to.see, tower
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany track, road
         call follow.it, outside.gates, sw, hill, east         
      fin
      ifhave sunstone
         ifany up, hill, house, road
            lda direction, east
         fin
         ifany tower, gates
            lda direction, sw
         fin
         call consult.sunstone, direction
      fin
      ifeq stage, mirror.world
         smove house, road, hill, dark.forest, something.strange
         smove tower, gates, forest.2, something.strange
      fin
      move house, road
      move east, up, hill, hill
      move north, ne, forest.2
      move nw, west,  dark.forest
      move sw, tower, gates, outside.gates
      ifany se, south
         chance 50
            goto forest.15
         else
            ifkey south
               goto forest.16
            else
               goto forest.14
            fin
         fin
         quip through.thicket
      fin
   fin
   ifkey track
      flag context, arg2.here    
   fin
   ifany hill, tower
      flag context, arg2.distant
   fin
#
#=====================================================================
#
at outside.gates
   set gates, 0
   ifkey gates
      apport gates, here
   fin
   call default.read, notice
   call fake.note, nothing.more.to.read, notice
   respond grass, attention.to.detail, grass
   call in.dense.forest.actions
   call default.read, notice
   ifany notice, note, message, sign, words, inscription
      respond get, pull, firmly.attached, notice
      respond read, look, trespass.notice
      respond push, no.push, notice
      flag context, arg2.here
      proceed
   fin
   ifkey look
      respond tower, tower.through.gates
      respond path, path.through.gates
      respond gravel, nothing.special, gravel
      respond horses, horse.shapes
      respond garden, bush, roses, in, desolate.garden
      respond wall, no.climb.wall
      proceed
   fin
   ifkey horses
      respond feed, kill, hit, placate, no.feed.horses, arg1
      flag context, arg2.here
      proceed
   fin
   ifkey dirt
      call handle.dirt
   fin
   ifkey open
      ifeq status, 1
         or
      ifkey gates
         quip no.open.gate
      fin
   fin
   ifkey close
      ifeq status, 1
         or
      ifkey gates
         quip already.shut, gates
      fin
   fin
   ifkey wall
      call wall.stuff
   fin
   ifkey climb
      and
   ifany gates, wall
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifany house, hill, road, track, north
         ifhave sunstone
            lda direction, ne
            call consult.sunstone, direction
         fin
         move hill, hill
         move road, north, track, track
         move house, road
      fin
      ifkey climb
         respond wall, dont.bother
         ifkey gates
            or
         ifeq status, 1
            ifhave bust
               lda arg1, in
            else
               lda text.ptr, gate.climb.tricky
               ifgt moebius.gates, 1
                  quip moebius.gates         # LAMP.IN.TEETH not used
               fin
               call climbing.check           # Sets LAMP.IN.TEETH or quits
               ifeq moebius.gates, 0
                  set context, q.forbidding
                  quip forbidding.notice
               fin
               quip moebius.gates            # Uses LAMP.IN.TEETH
            fin
         fin
      fin
      ifkey back
         and
      ifis there, garden.n
         or
      ifany south, in, tower, path, garden
         ifhave bust
            set beyond.gates, 1
            smove garden.n, through.the.gates
         fin      
         quip no.pass.gate
      fin
      ifeq stage, mirror.world
         smove building, hill, outside.gates, something.strange
      fin
      move east, west, ne, nw, dark.forest
   fin
   ifany notice, note, message, words, inscription
      or
   ifany garden, tower, roses, bush, path
      flag context, arg2.distant
   fin
#
#=====================================================================
#
at garden.nw
   ifkey pedestal
      respond look, garden.things, 0
      respond get, push, pull, no.move.pedestals
      flag context, arg2.here
      proceed
   fin
   ifany bushes, roses
      respond look, dead.rose.bushes
   fin
   ifkey tower
      respond look, tower.over.roses
      flag context, arg2.distant
      proceed
   fin
   respond roses, i.dont.see, roses
   call garden.stuff
   ifkey wall
      call wall.stuff
   fin
   ifkey look
      respond corner, wall.corners, 1
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move south, path, garden.sw
   fin
   ifany path, corner
      flag context, arg2.here
   fin
#
#=====================================================================
#
at garden.n
   call garden.stuff
   set gates, 1
   ifkey tower
      ifkey go
         or
      ifeq status, 1
         ifhave sunstone
            lda direction, south
            call consult.sunstone, direction
         fin
         move garden.s
      fin
      respond look, garden.things, 1
      flag context, arg2.distant
      proceed
   fin
   ifkey gates
      ifkey open
         and
      ifhave bust
         flag gates, special1
         quip automatic.gate, open
      fin
      apport gates, here
   fin
   ifkey wall
      call wall.stuff
   fin
   ifkey look
      respond tower, tower.to.south
      respond horses, horse.shapes
      proceed
   fin
   ifkey horses
      respond feed, kill, hit, placate, no.feed.horses, arg1
      flag context, arg2.here
      proceed
   fin
   ifkey climb
      ifkey gates
         or
      ifeq status, 1
         ifhave bust
            quip automatic.gate, climb
         fin
         lda text.ptr gate.climb.tricky
         call climbing.check
         smove outside.gates, over.the.gates
      fin
   fin
   ifkey go
      or
   ifeq status, 1
      move south, tower, garden.s
      respond path, need.a.direction
      move se, garden.se
      move sw, garden.sw
      ifany north, out
         ifhave bust
            flag gates, special1
            set beyond.gates, 0
            smove outside.gates, through.the.gates
         fin
         quip no.pass.gate
      fin
   fin
   ifany path
      flag context, arg2.here
   fin
#
#=====================================================================
#
at garden.ne
   ifkey pergola
      respond look, old.pergola
      quip just.a.fixture, pergola
   fin
   ifkey tower
      respond look, tower.over.roses
      flag context, arg2.distant
      proceed
   fin
   call garden.stuff
   ifkey wall
      call wall.stuff
   fin
   ifkey look
      respond corner, wall.corners, 1
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move south, garden.se
   fin
   ifany path, corner
      flag context, arg2.here
   fin
#
#=====================================================================
#
at garden.sw
   ifany rest, sleep
      or
   ifkey use, bench
      quip no.rest.garden
   fin
   ifkey bench
      respond look, garden.things, 2
      flag context, arg2.here
      proceed
   fin
   ifkey wall
      call wall.stuff
   fin
   ifkey tower
      respond look, below.tower, 1
      respond climb, up, tower.no.climb
      flag context, arg2.here
      proceed
   fin
   call garden.stuff
   ifkey look
      respond corner, wall.corners, 0
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move north, garden.nw
      move ne, garden.n
      ifkey path
         call follow.it, garden.nw, north, garden.n, ne
      fin
   fin
   ifany path, corner
      flag context, arg2.here
   fin
#
#=====================================================================
#
at garden.s
   ifkey look, up
      fakearg up, tower
   fin
   call default.read, plaque
   ifkey read
      ifeq status, 1
         or
      ifany plaque, message, inscription, note, notice
         quip culpability.noakes
      fin
   fin
   ifkey plaque
      respond look, culpability.noakes
      ifeq status, 1
         flag status, pls.clarify
         quip do.what?, plaque
      fin
      quip leave.it.alone, plaque
   fin
   ifany tower, wall
      respond look, below.tower, 0
      ifany up, climb
      else
         flag context, arg2.here
         proceed
      fin
   fin
   ifkey wall
      or
   ifkey ivy, look
      quip its.a.wall, 1
   fin
   call garden.stuff
   ifkey back
      and
   ifis there, tower.roof
      call tower.climbing
   fin
   ifkey climb, up
      or   
   ifany up, climb
      and
   ifeq status, 1
      or
   ifany tower, wall, ivy
      call tower.climbing
   fin
   ifany ivy, wall
      flag context, arg2.here
   fin
   ifkey go
      or
   ifeq status, 1
      move north, path, garden.n
   fin
   ifany path, plaque, message, inscription, note, notice, shadow, shade
      flag context, arg2.here
   fin
#
#=====================================================================
#
at garden.se
   ifkey fountain
      ifkey drink
         proceed
      fin
      respond look, garden.things, 3
      flag context, arg2.here
      proceed
   fin
   ifany cupid, statue
      respond look, garden.things, 4
      flag context, arg2.here
      proceed
   fin
   ifkey wall
      call wall.stuff
   fin
   ifkey tower
      respond look, below.tower, 1
      respond climb, up, tower.no.climb
      flag context, arg2.here
      proceed
   fin
   call garden.stuff
   ifkey look
      respond corner, wall.corners, 0
      respond shadow, shade, cast.shadow, tower
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move nw, garden.n
      move north, garden.ne
      ifkey path
         call follow.it, garden.n, nw, garden.ne, north
      fin
   fin
   ifany path, shadow, shade, corner
      flag context, arg2.here
   fin
#
#=====================================================================
#
at dungeon.exit
   ifkey look
      ifany tunnel, passage, corridor
         set status, 1
      fin
      respond hole, dungeon, no.see.up.there
      proceed
   fin
   ifkey climb
      and
   ifany out, up, hole
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move down, south, passage, well.bottom
      ifany up, out, hole, dungeon
         smove dungeon, back.to.dungeon
      fin
   fin
   ifany passage, tunnel, corridor, hole
      flag context, arg2.here
   fin
#
#=====================================================================
#
at well.bottom
   ifkey look
      respond up, patch, light, daylight, well, up.well.view
      respond passage, tunnel, corridor, dark.exit, passage
      respond wall, well.wall
      ifkey chamber
         set status, 1
      fin
      proceed
   fin
   respond well, you.are.there
   ifkey climb
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move north, passage, tunnel, corridor, dungeon.exit
      ifany out, up, climb, clearing
         smove clearing, well.climb
      fin
      respond chamber, well, you.are.there
   fin
   ifany well, wall, daylight, patch, passage, tunnel, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at crypt
   ifkey steps
      fakearg steps, stairs
   fin
   ifkey monocle
      and
   ifgt coffin, closed
      quip no.monocle
   fin
   ifkey look
      ifany in, thing, something    # I give up. Let's cater for "look in coffin".
         ifgt coffin, closed
            ifkey in
               fakearg in, coffin
            otherwise
            ifkey thing
               fakearg thing, coffin
            else
               fakearg something, coffin
            fin
         else
            quip open.it.first, coffin
         fin
      fin
      respond ceiling, up, its.a.ceiling, c.crypt
   fin
   ifkey lid
      respond look, coffin.lid
      fakearg lid, coffin
      ifany lift, pull
         call open
      fin
   fin
   respond tombs, just.a.fixture, tombs
   ifkey crucifix
      and
   ifnear vampire
      and
   ifflag status, light.here
      ifkey wave
         flag quips, crucifix.waved
         iflt vampire, asleep
            quip vampire.dont.care
         else
            quip crucifix.no.effect
         fin
      else
         ifany look, get, fetch
            proceed
         fin
         ifkey drop
            drop crucifix
            say you.do.it
#            say you.do, arg1
#            say it.is, arg2
            sub invct, 1
            quit
         fin
         ifflag quips, crucifix.waved
            ifkey give
               proceed
            fin
            flag context, arg2.here
            proceed
         else
            say blank
            quip wave.crucifix?
         fin
      fin
   fin
   ifkey look
      ifkey crypt
         set status, 1
      fin
      respond dust, dusty.place
      respond stairs, column, slab, stone.spiral, 1
      respond cobwebs, dull.stuff, 1
      proceed
   fin
   ifkey climb stairs
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifany up, out, stairs
         ifnear vampire, content
            call vampires.gift, 1
         fin
         move chapel
      fin
   fin
   ifany stairs, column, slab, tombs, dust, web
      flag context, arg2.here
   fin
#
#=====================================================================
#
at top.of.chapel
   local weapon

   fakearg steps, stairs
   fakearg fire, alarm   # Allow for "get fire [alarm]" etc...
   ifkey box
      and
   ifnear box
         proceed
   fin
   fakearg box, alarm
   ifkey alarm
      and
      not
   ifflag alarm, seen
      set top.of.chapel, 1
      apport alarm, here
      flag alarm, seen
      set alarm, 1         
      say oh.that.alarm
   fin
   ifany alarm, box
      and
   ifhere alarm
      respond read, cant.do.that, read
      ifkey look
      else
         ifany kill, hit
            set weapon, none
            ifhave trident
               lda weapon, trident
            otherwise
            ifhave sword
               lda weapon, sword
            otherwise
            ifhave axe
               lda weapon, axe
            fin
            ifne weapon, none
               quip no.break.alarm, weapon
            fin
            quip leave.alarm.alone
         fin
         quip alarm.out.of.reach
      fin
   fin
   ifkey trident
      and
   ifhave trident
      and
   ifany wave, throw
      and
   ifnear alarm
      and
      not
   ifnear dwarf
      quip no.damage.alarm, arg2
   fin
   ifany drawings, something, box
      ifgt alarm, 0
         ifkey something
            proceed
         fin
         ifeq status, 1
            set word.ptr, arg1
         else
            set word.ptr, arg2
         fin
         quip i.dont.see, word.ptr
      fin
      set status, 2
      lda arg1, look
      lda arg2, alarm
   fin
   ifkey look
      ifkey chamber
         set status, 1
      fin
      respond stairs, well.worn.steps
      respond opening, dark.exits, passage
      ifany doorway, arch
         ifhere alarm
            quip arched.doorway
         else
            fakearg doorway, alarm
         fin
      fin
      ifany alarm, shapes
         set top.of.chapel, 1
         describe alarm
         apport alarm, here
         flag alarm, seen
         set alarm, 1         
         quit
      fin               
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move down, stairs, chapel
      move north, attic
      move south, doorway, arch, in, tower.base
      move west, pantry, pantry
   fin
   ifany stairs, drawings, something, opening, arch, doorway
      flag context, arg2.here
   fin
   lda throw.text, throw.downstairs
   lda throw.here, chapel
#
#=====================================================================
#
at attic
   ifkey look
      ifkey attic
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move south, top.of.chapel
      move north, attic, north.attic
      move sw, pantry, pantry
   fin
   ifany attic
      flag context, arg2.here
   fin
#
#=====================================================================
#
at north.attic
   ifkey look
      ifkey attic
         set status, 1
      fin
      respond passage, tunnel, corridor, dark.exit, passage
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move south, out, attic, attic
      move north, in, passage, den
   fin
   ifany passage, tunnel, corridor, attic
      flag context, arg2.here
   fin
#
#=====================================================================
#
at den
   ifany something, corner
      and
   ifeq seal, 0
      fakearg corner, seal
      fakearg something, seal
   fin
   call default.read, note
   ifany note, notice, label, message, inscription
      respond read, look, new.premises
      quip leave.it.alone, note
   fin
   ifkey label
      respond look, read, its.swag
      respond get, leave.it.alone, label
      ifgt status, 1
         flag context, arg2.here
         proceed
      else
         flag status, pls.clarify
         quip do.what?, building
      fin
   fin
   ifkey look
      respond shelf, its.empty, shelf
      ifkey den
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move south, north.attic
      move out, attic
      respond den, you.are.there
   fin
   ifany note, notice, label, message, inscription, shelf, den
      flag context, arg2.here
   fin
#
#=====================================================================
#
at pantry
   ifkey hole
      ifany look, enter
         set tiny.mouse, 1
         quip mouse.hole
      fin
      quip hah!
   fin
   ifkey look
      respond stream, corner, water, just.a.trickle
      respond shelves, just.a.fixture, arg2
      respond steps, well.worn.steps
      respond arch, arch.with.steps
      respond tunnel, corridor, passage, dark.exits, passage
      respond wall, damp.walls
      ifkey pantry
         set status, 1
      fin
      proceed
   fin
   ifkey fill
      and
   ifany chalice, bucket
      and
   ifhave arg2, emptied
      quip cant.scoop, arg2
   fin
   ifhave bottle, emptied
      or
   ifhave flask, emptied
   else
      ifkey get, water
         ifhave bucket, emptied
            quip cant.scoop, bucket
         otherwise
         ifhave chalice
            quip cant.scoop, chalice
         fin
      fin
   fin          
   ifkey go
      or
   ifeq status, 1
      move east, top.of.chapel
      move ne, attic
      move north, down, steps, curtain.entrance
      move west, quarters
      ifkey mouse
         and
      ifeq tiny.mouse, 1
         quip mouse.hole
      fin
      respond pantry, you.are.there
      respond pantry, need.a.direction
   fin
   ifany steps, stream, pantry, shelves, corner, archway, arch, hole
      flag context, arg2.here
   fin
   ifany passage, tunnel, corridor, wall
      flag context, arg2.here
   fin
#
#=====================================================================
#
at unsafe
   ifkey look
      respond timber, wood, decaying.timber
      respond fall, rockfall, sagging.walls
      respond roof, ceiling, unsafe.roof, 0
      respond fracture, opening, hole, wall, slit, narrow.exit, fracture
      ifany passage, corridor, tunnel
         set status, 1
      fin
      proceed
   fin
   ifany west, crack, hole, slit
      and
   ifkey in
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move south, anteroom
      move north, very.unsafe
      ifany passage, corridor, tunnel
         call follow.it, anteroom, south, very.unsafe, north
      fin
      ifany west, crack, hole, slit, opening
         call nothing.big, crack.too.narrow, fracture
         move low.room
      fin
   fin
   ifany corridor, passage, tunnel, timber, wood, rockfall
      flag context, arg2.here
   fin
   ifany opening, hole, wall, fracture, slit
      flag context, arg2.here
   fin
#
#=====================================================================
#
at very.unsafe
   ifkey look
      respond timber, rotted.timber
      respond passage, corridor, tunnel, dark.exit, passage
      respond fall, rockfall, solid.blockage
      respond roof, ceiling, unsafe.roof, 1
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move south, passage, corridor, tunnel, unsafe
   fin
   ifany corridor, passage, tunnel, timber
      flag context, arg2.here
   fin
#
#=====================================================================
#
at low.room
   ifany drink, pour
      proceed
   fin
   respond water, no.collect.water
   ifkey look
      respond floor, slippery.floor
      respond roof, ceiling, water, wet.ceiling
      respond crack, hole, slit, out, narrow.exit, slit
      proceed
   fin
   ifkey fill
      and
   ifany flask, bottle, bucket
      quip no.collect.water
   fin
   ifkey water
      and
   ifany get, drink
      quip no.collect.water
   fin
   ifany crack, hole, opening, slit
      and
   ifany in, out
      or
   ifkey climb, down
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move west, bones.room
      move upstream, bones.room
      ifkey down
         ifflag rats, special1
            move in.shaft
         fin
         move phoney.shaft
      fin
      ifany up, east, crack, hole, slit, out
         call nothing.big, crack.too.narrow, slit
         move unsafe
      fin
   fin
   ifany water, crack, hole, slit, out
      flag context, arg2.here
   fin
   lda throw.here, sea.view
   lda throw.text, down.the.shaft
   set throw.it, true
   set drop.here, throw.here
   set drop.text, throw.text         
#
#=====================================================================
#
at bones.room
   ifany drink, pour
      proceed
   fin
   respond water, water.drops
   respond bones, bones.ugh
   ifkey droppings
      ifkey get
         ifflag beanstalk.bottom, been.here
            quip droppings.no.good, 1
         fin
         quip droppings.no.good, 0
      fin
      respond look, droppings.large
      flag context, arg2.here
      proceed
   fin
   ifkey look
      respond passage, tunnel, corridor, dark.exit, passage
      respond bones, marks, gnawed.bones
      ifkey cave
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move east, down, out, passage, tunnel, corridor, low.room
      respond cave, you.are.there
   fin
   ifany passage, tunnel, corridor, cave
      flag context, arg2.here
   fin
#
#=====================================================================
#
at phoney.shaft
   ifkey look
      respond down, water, liquid, its.sewage
      respond sewage, look.sewage
      respond wall, slime, yucky.slime
      ifkey shaft
         set status, 1
      fin
      proceed
   fin
   ifkey climb, shaft
      and
   ifany up, down, shaft
      or
   ifkey climb, shaft
      or
   ifkey jump, down
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifany down, jump, shaft, shaft
         say wheee...splash
         say glug.glug.glug...
         goto sea.view
         call coroner
      fin
      ifany up, out, back, wait, climb
         flag rats, special1
         set rats, 0
         random tide, 4
         ifkey wait
            smove in.shaft, tide.recedes
         fin
         move low.room
      fin
   fin
   ifany shaft, slime, sewage, liquid
      flag context, arg2.here
   fin
   lda throw.here, sea.view
   lda throw.text, into.sewage
   set drop.here, throw.here
   set drop.text, throw.text
#
#=====================================================================
#
at in.shaft
   ifkey look
      respond down, water, liquid, its.sewage
      respond sewage, look.sewage
      respond wall, slime, yucky.slime
      respond culvert, bricks, brick.culvert
      ifkey shaft
         set status, 1
      fin
      proceed
   fin
   ifkey climb, shaft
      and
   ifany up, down, shaft, shaft
      or
   ifkey climb, shaft
      or
   ifkey jump, down
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifany jump, down, shaft
         unflag rats, special1
         flag rats, special2
         smove culvert, wheee...splash
      fin
      move up, out, climb, low.room
   fin
   ifany shaft, sewage, water, liquid, culvert, slime
      flag context, arg2.here
   fin
   lda throw.here, sea.view
   lda throw.text, into.sewage
   set drop.here, throw.here
   set drop.text, throw.text
#
#=====================================================================
#
at culvert
   ifkey look
      respond bricks, wall, slimey.bricks
      respond wall, slime, yucky.slime
      ifkey culvert
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move north, sea.view
      move south, culvert.south
      ifkey culvert
         call follow.it, sea.view, north, culvert.south, south
      fin
   fin
   ifany sewage, bricks, culvert
      flag context, arg2.here
   fin
#
#=====================================================================
#
at sea.view
   call default.read, inscription
   ifnear spoon
      and
   ifflag spoon, special1
   else
      call fake.note, same.as.before, inscription
   fin
   respond grill, grill.solid
   ifkey look
      respond bricks, wall, slimey.bricks
      respond wall, slime, yucky.slime
      respond inscription, tide.level
      respond tunnel, passage, corridor, culvert, corridor, culvert.tunnel
      respond sea, cant.see.much, sea
      respond roof, ceiling, culvert.roof
      respond line, tide.line
      ifkey pieces
         and
         not
      ifnear pieces
         quip sewage.debris
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move south, out, culvert, tunnel, passage, corridor, culvert
      respond sea, grill.solid
   fin
   ifany grill, sewage, culvert, bricks, inscription
      flag context, arg2.here
   fin
   ifany passage, tunnel, corridor, sea, line, roof, ceiling
      flag context, arg2.here
   fin
#
#=====================================================================
#
at culvert.south
   ifkey rats
      and
   ifgt status, 1
      call rats.stuff
   fin
   ifkey look
      respond bricks, wall, slimey.bricks
      respond wall, slime, yucky.slime
      respond pipe, sewer.pipe, 1
      respond roof, ceiling, culvert.roof
      ifkey culvert
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move north, culvert, culvert
      move sw, sewer.4
      move west, nw, sewer.5
      move east, south, se, sewer.1
      respond pipe, need.a.direction
   fin
   ifany rats, pipe, sewage, bricks, culvert, roof, ceiling
      flag context, arg2.here
   fin
#
#=====================================================================
#
at sewer.1
   ifkey look
      respond pipe, sewer.pipe, 1
      respond wall, slime, yucky.slime
      ifkey junction
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move north, culvert.south
      move se, sw, sewer.2
      respond junction, you.are.there
      respond pipe, need.a.direction
   fin
   ifany pipe, sewage, junction
      flag context, arg2.here
   fin
#
#=====================================================================
#
at sewer.2
   ifkey look
      respond pipe, sewer.pipe, 1
      respond wall, slime, yucky.slime
      ifkey junction
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move north, sewer.1
      move south, se, sewer.3
      respond pipe, need.a.direction
      respond junction, you.are.there
   fin
   ifany pipe, sewage, junction
      flag context, arg2.here
   fin
#
#=====================================================================
#
at sewer.3
   ifkey look
      respond pipe, sewer.pipe, 0
      respond wall, slime, yucky.slime
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move north, out, pipe, junction, sewer.2
   fin
   ifany pipe, sewage, junction
      flag context, arg2.here
   fin
#
#=====================================================================
#
at sewer.4
   local rag.loc

   ifkey look
      respond stream, its.tears.are.wet, stream
      respond wall, slime, yucky.slime
      respond fracture, large.fracture
      respond pipe, sewer.pipe, 2
      ifkey junction
         set status, 1
      fin
      proceed
   fin
   ifany go, crawl
      or
   ifeq status, 1
      move ne, pipe, culvert, culvert.south
      ifany up, in, out, crawl, fracture
         set hint.time, 1
         locate rag.loc, rags
         ifinrange rag.loc, culvert, sewer.5
            apport rags, sea.view
         fin
         smove stream.maze.entrance, out.of.sewer
      fin
      respond junction, you.are.there
   fin
   ifany stream, pipe, sewage, junction, fracture
      flag context, arg2.here
   fin
#
#=====================================================================
#
at sewer.5
   ifkey look
      respond pipe, sewer.pipe
      respond wall, slime, yucky.slime
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move east, out, culvert, culvert.south
   fin
   ifany pipe, sewage
      flag context, arg2.here
   fin
#
#=====================================================================
#
at stream.maze.entrance
   ifkey stream
      call stream.stuff
      quip too.many.streams
   fin
   ifkey look
      respond passage, tunnel, corridor, dark.exits, passage
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond passage, tunnel, corridor, need.a.direction
      ifany down, downstream
         flag rats, special2
         move sewer.4
      fin
      ifany north, ne, east, se, south, sw, west, nw, up, upstream
         set stream.maze, 0
         move stream.maze
      fin
   fin
   ifany passage, tunnel, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at stream.maze
   ifkey stream
      call stream.stuff
      quip too.many.streams
   fin
   ifkey look
      respond passage, tunnel, corridor, dark.exits, passage
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond passage, tunnel, corridor, need.a.direction
      ifany stream, up, upstream
         and
         not
      ifflag rats, special2
         iflt stream.maze, 4
            call hide.things
            add stream.maze, 1
            move stream.maze
         fin
         set stream.maze, 0
         call dump.things, sea.view
         move jumble
      fin
      ifany down, downstream
         chance 15
            move stream.maze.entrance
         fin
      fin
      ifany north, south, east, west, ne, se, nw, sw, 
         or
      ifany upstream, up, down, downstream
         call hide.things
         move stream.maze
      fin
   fin
   ifany passage, tunnel, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at bare.cavern
   ifkey look
      respond opening, wall, hole, curtained.opening, opening
      respond curtains, its.a.curtain
      respond passage, tunnel, corridor, dark.exit, passage
      ifkey cavern
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move west, opening, hole, curtains, soft
      move north, passage, low.passage
      respond cavern, you.are.there
   fin
   ifany opening, hole, tunnel, corridor, passage, cavern
      flag context, arg2.here
   fin
#
#=====================================================================
#
at low.passage
   ifkey look
      respond cavern, cant.see.much, cavern
      respond wall, ceiling, floor, rock, polished.passage
      ifany tunnel, passage, corridor
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move south, cavern, bare.cavern
      move north, large.cavern
      ifany tunnel, passage, corridor
         call follow.it, bare.cavern, south, large.cavern, north
      fin
   fin
   ifany passage, tunnel, corridor, cavern
      flag context, arg2.here
   fin
#
#=====================================================================
#
at large.cavern
   ifkey look
      respond roof, ceiling, in.shadow, arg2
      respond mist, this.is.mist
      respond opening, hole, misty.opening
      respond passage, tunnel, corridor, dark.exit, passage
      ifkey cavern
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move sw, passage, low.passage
      move north, mist, opening, hole, swirling.mist
      respond cavern, you.are.there
   fin
   ifany mist, cavern, passage, roof, hole, opening
      flag context, arg2.here
   fin
#
#=====================================================================
#
at swirling.mist
   ifkey look
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany north, ne, east, se, south, sw, west, nw
         call hide.things
      fin
      ifany east, west
         call lost.in.mist
         quit
      fin
      ifany south, se, sw
         chance 33
            call dump.things, sword.place
            move large.cavern
         fin
         call lost.in.mist
      fin
      ifany north, ne, nw
         chance 33
            call dump.things, sword.place
            move causeway.west
         fin
         call lost.in.mist
      fin
   fin
   ifany mist
      flag context, arg2.here
   fin
#
#=====================================================================
#
at dank.cave
   ifkey look
      respond mould, no.mould
      ifkey cave
         set status, 1
      fin
      proceed
   fin
   ifkey find, mould
      quip no.point.in.that
   fin
   ifkey go
      or
   ifeq status, 1
      respond cave, you.are.there
      move north, back, out, web.maze.4
   fin
   ifany cave, mould
      flag context, arg2.here
   fin
#
#=====================================================================
#
at sword.place
   ifkey climb, rock
      quip no.point.in.that
   fin
   call default.read, rock
   ifany look, read
      and
   ifany rock, inscription, stone, boulder, words, pattern
      call read.rock
   fin
   ifkey look
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move north, ne, east, se, south, sw, west, nw, back, swirling.mist
   fin
   ifany mist, inscription, stone, boulder, words
      flag context, arg2.here
   fin
#
#=====================================================================
#
at stupendous.view
   local temp.val
#
   call house.inventory, 0    # He may be dropping the starstone here.
   ifhtml
      set tt.mode.on, 1
      set tt.mode.off, 1
   else     
      set tt.mode.on, 0
      set tt.mode.off, 0
   fin
   ifkey read
      and
   ifeq status, 1
      set status, 2
      lda arg2, notice
      proceed
   fin
   ifnear giant
      flag champagne, seen
   fin
   ifkey remove, mask
      and
   ifhave mask, worn
      and
   ifhere giant
      quip too.risky
   fin
   ifeq status, 2
      and
   ifis arg2, board
      fakecom board, notice
   fin
   fakearg plant, beanstalk2
   fakearg beanstalk, beanstalk2
   set path.info, 1
   ifhere giant
      and
   ifany caviar, champagne, bottle, delight, goodies, barrel, food, box, boxes
      ifkey look
         and
      ifany box, boxes
         quip boxes.too.far
      fin
      respond get, hands.off
      set obj.ptr, arg1
      ifeq status, 2
         set obj.ptr, arg2
      fin
      ifany bottle, delight, food
         and
      ifnear obj.ptr
         proceed
      fin
      ifkey champagne
         and
      ifnear bucket, full.of.champagne
         proceed
      fin
      quip hands.off
   fin
   respond grass, attention.to.detail, grass
   ifkey throw, sunstone
      and
   ifhave sunstone
      set temp.val, sunstone
      ifinrange temp.val, 6, 8
         quip sunstone.no.throw
      fin
   fin
   lda throw.here, beanstalk.bottom
   lda throw.text, throw.cliff
   fakearg tree, fir
   ifany fir, phalanx
      respond climb, no.climb.fir, 1
      quip no.handy.them, fir
   fin
   ifany ashes, heelprint
      ifgt stupendous.view, 0
         quip ashes.gone
      fin
      ifkey look
         respond ashes, cold.ashes
         quip heelprint.info
      fin
      respond ashes, just.a.fixture, ashes
      flag context, arg2.here
      proceed
   fin
   ifkey ravine
      respond look, its.ravine, 0
      ifkey in
         set status, 1
      fin
   fin
   ifkey look
      and
   ifany down, cliff
      call sunstone.cheat, no.approach.edge, 1
      flag sapling, seen
      quip sheer.cliff, beanstalk
   fin
   ifkey climb
      respond banks, banks.too.steep
      ifany cliff, down, beanstalk2
         ifeq beanstalk, gigantic
            call sunstone.cheat, no.approach.edge, 1
            smove beanstalk.middle, down.the.beanstalk
         else
            ifkey beanstalk2
               ifeq beanstalk, stunted
                  quip i.dont.see, arg2
               fin
               call sunstone.cheat, no.approach.edge, 1
               quip beanstalk.down.there
            fin
            quip suicidal
         fin
      fin
   fin
   ifkey cliff
      flag context, arg2.here
      proceed
   fin
   ifkey sapling
      and
   ifflag sapling, seen
      call sunstone.cheat, no.approach.edge, 0
      respond look, too.far.to.see, sapling
      quip its.too.far
   fin
   ifkey look
      ifkey beanstalk2
         ifeq beanstalk, stunted
            quip i.dont.see, arg2
         fin
         ifeq beanstalk, grown
            call sunstone.cheat, no.approach.edge, 1
            quip cant.see.much, beanstalk
         fin
      fin
      respond mountain, too.far.to.see, mountain
      respond beach, beach.from.above, 0
      respond view, vista, sea, rollers, sea.from.cliff
      respond reflections, sea.reflections, 1
      respond gorse, bushes, flowers, flower, flowering.gorse
      respond banks, banks.too.steep
      respond horizon, sea.horizon
      proceed
   fin
   ifany flower, flowers
      respond get, no.pick.flowers
   fin
   respond chalk, no.future.in.it, chalk
   ifeq status, 1
      respond view, vista, sea, looks.magnificent, arg1
      respond island, island.too.far
      respond banks, bushes, gorse, flower, flowers, beach, sea, rollers, pardon?
   fin
   ifany banks, bushes, gorse, flower, flowers
      flag context, arg2.here
      proceed
   fin
   ifany beach, sea, rollers
      flag context, arg2.distant
      proceed
   fin
   ifkey in, beanstalk2
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifeq stage, mirror.world
         and
      ifany house, road
         quip mirror.strangeness
      fin
      ifhave sunstone
         ifany house, road
            ifeq sunstone, 2
               say sunstone.stops.you, east
               move ravine.west
            fin
            lda direction, se
         otherwise
         ifany ravine, out, path
            lda direction, se
         fin
         call consult.sunstone, direction
      fin
      ifany house, road, path, ravine
         ifeq stage, mirror.world
            quip eek.cliff!
         fin
         move ravine, ravine.west
         move house, road, road
      fin
      ifany beanstalk2, plant, west
         and
      ifeq beanstalk, gigantic
         call sunstone.cheat, no.approach.edge, 1
         smove beanstalk.top, into.beanstalk
      fin
      ifkey jump
         set temp.val, sunstone
         ifhave sunstone
            and
         ifinrange temp.val, 6, 8
            quip sunstone.saves.you
         fin
         goto ylem
         call splatter
      fin
      move ravine, path, out, se, ravine.west
   fin
   ifany ravine, view, vista, island, sea, reflections, path
      ifkey ravine, path
         flag context, arg2.here
      else
         flag context, arg2.distant
      fin
   fin
#
#=====================================================================
#
at above.sea
   sub above.sea, 1
   ifgt above.sea, 0
      flag status, moved
      ifflag island, been.here
      else
         unflag above.sea, been.here
      fin
      ifany sand, vegetation, slope
         proceed
      fin
   otherwise
   iflt above.sea, 2
      ifkey beanstalk
         proceed
      fin
   fin
   ifkey look
      ifeq status, 1
         and
         not
      ifflag island, been.here
         quit                    # Full description will be given anyway
      fin
      respond reflections, sea.reflections, 1
      respond island, island.ahead
      respond horizon, sea.horizon
      respond giant, receding.giant, above.sea
      respond rug, rug.under.you
      respond mountain, volcano, approaching.mountain, above.sea
      respond sand, beach, in.flight.beach, above.sea
      respond beanstalk, in.flight.beanstalk
      respond vegetation, slope, mountain.slopes
      respond cliff, in.flight.cliffs, above.sea
      proceed
   fin
   ifkey take
      ifeq status, 1
         or
      ifany edges, rug
         quip rug.clutching
      fin
   fin
   ifkey fly
      ifeq status, 1
         or
      ifany west, island, on, forward, up
         quip rug.is.flying
      fin
      ifinrange arg2, first.direction, last.direction
         or
      ifkey rug
         quip no.steer.rug
      fin
   fin
   respond wait, you.sit.still
   ifany go, fly
      or
   ifeq status, 1
      respond on, island, mountain, flying.on
      respond back, cant.go.back, 1
   fin
   ifany inventory, score, quit, save, rest, remember, recall, say, yes, no
      or
   ifany brief, verbose, terse, length, scroll, margin, listen, contemplate
      or
   ifinrange arg1, first.magic, last.magic
   else
      quip flight.regulations
   fin
   ifany cliff, beanstalk, vegetation, reflections, slope, giant
      flag context, arg2.distant
   fin
   ifany sand, beach, mountain, volcano, vegetation, horizon, island, sea
      flag context, arg2.distant
   fin
#
#=====================================================================
#
at ravine
   ifkey look
      respond path, down, ground, path.in.ravine, 1
      respond ferns, its.ferns
      respond ravine, its.ravine, 1
      respond banks, steep.banks
      respond up, ravine.sky
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany path, ravine
         ifkey ravine
            and
         ifis there, road
            lda there, path
         fin
         call follow.it, path, se, ravine.west, west
      fin
      ifeq stage, mirror.world
         smove road, building, stupendous.view, something.strange
         smove view, road, something.strange
      fin
      ifhave sunstone
         ifany building, road
            lda direction, se
         fin
         ifkey view
            ifeq sunstone, 1
               say sunstone.stops.you, nw
               move ravine.west
            fin
            lda direction, nw
         fin
         ifkey path
            lda direction, se
         fin      
         call consult.sunstone, direction
      fin
      respond ferns, its.ferns
      move road, building, road
      move view, stupendous.view
      move west, ravine.west
      move se, path
   fin
   ifany path, ferns, ravine, banks
      flag context, arg2.here
   fin
#
#=====================================================================
#
at ravine.west
   ifkey look
      respond path, down, ground, path.in.ravine, 1
      respond ferns, its.ferns
      respond ravine, its.ravine, 1
      respond banks, steep.banks
      respond up, ravine.sky
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany path, ravine
         call follow.it, ravine, east, stupendous.view, nw
      fin
      ifeq stage, mirror.world
         smove road, building, stupendous.view, something.strange
         smove view, road, something.strange
      fin
      ifhave sunstone
         ifkey view
            lda direction, nw
         otherwise
         ifany building, road, road
            ifeq sunstone, 5
               say sunstone.stops.you, se
               move ravine
            fin
            lda direction, east
         fin
         ifkey path
            lda direction, east
         otherwise
         ifkey view
            lda direction, nw
         fin
         call consult.sunstone, direction   
      fin
      move view, stupendous.view
      move building, road, road
      move east, ravine
      move nw, stupendous.view
      respond ferns, its.ferns
   fin
   ifany path, ferns, ravine, banks
      flag context, arg2.here
   fin
#
#=====================================================================
#
at path
   respond grass, attention.to.detail, grass
   ifkey look
      respond path, path.in.ravine, 0
      respond ravine, its.ravine, 0
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifkey path
         call follow.it, road, se, ravine, nw
      fin
      ifeq stage, mirror.world
         smove road, building, stupendous.view, something.strange
         smove view, road, something.strange
      fin
      ifhave sunstone
         ifkey view
            ifeq sunstone, 6
               say sunstone.stops.you, west
               move ravine
            fin
            lda direction, nw
         otherwise
         ifkey ravine
            lda direction, nw
         otherwise
         ifkey forest
            lda direction, north
         otherwise
         ifkey building
            lda direction, se
         fin
         call consult.sunstone, direction
      fin
      move nw, ravine, ravine
      move north, forest, forest.1
      move ne, forest.5
      move east, forest.4
      move se, road, building, road
      move south, hill
      move sw, west, forest.2
      move view, stupendous.view
   fin
   ifany path, ravine
      flag context, arg2.here
   fin
#
#=====================================================================
#
at north.of.building
   call by.house.actions
   ifkey go
      or
   ifeq status, 1
      ifhave sunstone
         ifkey forest
            lda direction, north
         otherwise
         ifany building, road
            lda direction, sw
         fin
         call consult.sunstone, direction
      fin
      ifeq stage, mirror.world
         smove road, dark.forest, something.strange
      fin
      move north, forest, forest.6
      move ne, forest.7
      move east, forest.8
      move se, east.of.building
      move sw, road, road
      move west, forest.4
      move nw, forest.5
      ifkey south
         chance 50
            move east.of.building
         fin
         move road
      fin
   fin
#
#=====================================================================
#
at east.of.building
   flag seed, seen
   iflt stage, mirror.world
      ifkey seed
         or
      ifeq status, 1
         or
      ifkey all
         ifkey get
            ifhave seed
               quip leave.seed.for.birds
            fin
            get seed
            quip you.get.seed
         fin
      fin
      ifkey seed
         ifkey look
            describe seed
            quit
         fin
         ifeq status, 1
            flag status, pls.clarify
            quip do.what?, arg1
         fin
         ifhave seed
         else
           flag context, arg2.here
         fin
      fin
   otherwise
   ifkey seed
      quip no.seed
   fin
   call by.house.actions
   ifkey look
      respond leg, planks, feeder.parts
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifhave sunstone
         ifany building, road
            lda direction, west
         otherwise
         ifkey forest
            lda direction, east
         fin
         call consult.sunstone, direction
      fin
      move north, forest.8
      move ne, forest.9
      move east, forest, forest.10
      move se, forest.12
      move south, forest.11
      move sw, south.of.building
      move nw, north.of.building
      ifeq stage, mirror.world
         smove road, forest.10, something.strange
      fin
      move building, road, road
      ifkey west
         chance 50
            move north.of.building
         fin
         move south.of.building
      fin
   fin
#
#=====================================================================
#
at south.of.building
   call by.house.actions
   ifkey go
      or
   ifeq status, 1
      ifhave sunstone
         ifkey valley
            lda direction, west
         otherwise
         ifkey forest
            lda direction, south
         otherwise
         ifany building, road
            lda direction, nw
         fin
         call consult.sunstone, direction
      fin
      move ne, east.of.building
      move east, forest.11
      move se, forest.13
      move south, forest, forest.18
      move sw, slit
      ifeq stage, mirror.world
         smove road, forest.13, something.strange
      fin
      move west, down, valley, valley
      move nw, road, road
      ifkey north
         chance 50
            move east.of.building
         fin
         move road
      fin
   fin
#
#=====================================================================
#
at end.of.valley
   ifkey climb
      ifeq status, 1
         or
      ifany up, out, jumble, rocks, wall, slope
         quip not.me
      fin
   fin
   call in.valley.actions
   ifkey look
      respond nettles, brambles, viscious.lot, arg2
      respond rock, jumble, wild.rockery
      proceed
   fin
   ifkey eat
      respond nettles, romans.ate.nettles
      respond brambles, wrong.season
   fin
   ifany nettles, brambles, rock, jumble
      flag context, arg2.here
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifhave sunstone
         ifany depression, slit, valley, building
            lda direction, north
         fin
         call consult.sunstone, direction
      fin
      ifeq stage, mirror.world
         smove building, slit, valley, end.of.valley, something.strange
      fin
      move north, depression, depression
      move building, road, road
      move slit, slit
      move valley, valley
      move ne, forest.19
      move east, forest.20
      move west, forest, forest.17
      move nw, forest.16
   fin
   ifany wall, slope, soil
      flag context, arg2.here
   fin
#
#=====================================================================
#
at forest.1
   ifkey look
      respond path, ravine, too.far.to.see, arg2
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifhave sunstone
         ifany path, ravine
            lda direction, sw
         fin
         call consult.sunstone, direction
      fin
      move north, ne, west, nw, dark.forest
      move east, forest.5
      move se, forest.4
      move south, sw, path, ravine, path
   fin
   ifany path, ravine
      flag context, arg2.here
   fin
#
#=====================================================================
#
at forest.2
   ifkey look
      respond path, ravine, too.far.to.see, arg2
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifhave sunstone
         ifkey track
            lda direction, south
         otherwise
         ifany path, ravine
            lda direction, east
         fin
         call consult.sunstone, direction
      fin
      move south, track, track
      move ne, east, path, ravine, path
      move se, hill
      move sw, west, nw, dark.forest
   fin
   ifany path, ravine
      flag context, arg2.here
   fin
#
#=====================================================================
#
at forest.4
   ifkey look
      respond road, too.far.to.see, road
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifeq stage, mirror.world
         smove building, forest.5, something.strange
      fin
      ifhave sunstone
         ifany road, building
            lda direction, south
         otherwise
         ifkey path
            lda direction, west
         fin
         call consult.sunstone, direction
      fin
      move north, forest.5
      move ne, forest.6
      move east, north.of.building
      move se, south, sw, building, road, road
      move west, path
      move nw, forest.1
   fin
   ifany road
      flag context, arg2.here
   fin
#
#=====================================================================
#
at forest.5
   ifkey go
      or
   ifeq status, 1
      move north, ne, nw, dark.forest
      move east, forest.6
      move se, north.of.building
      move south, forest.4
      move sw, path
      move west, forest.1
   fin
#
#=====================================================================
#
at forest.6
   ifkey go
      or
   ifeq status, 1
      move north, ne, nw, dark.forest
      move east, forest.7
      move se, forest.8
      move south, north.of.building
      move sw, forest.4
      move west, forest.5
   fin
#
#=====================================================================
#
at forest.7
   ifkey go
      or
   ifeq status, 1
      move north, ne, east, nw, dark.forest
      move se, forest.9
      move south, forest.8
      move sw, north.of.building
      move west, forest.6
   fin
#
#=====================================================================
#
at forest.8
   ifkey go
      or
   ifeq status, 1
      move north, forest.7
      move ne, dark.forest
      move east, forest.9
      move se, forest.10
      move south, east.of.building
      move west, north.of.building
      move nw, forest.6
      ifkey sw
         chance 50
            move north.of.building
         fin
         move east.of.building
      fin
   fin
#
#=====================================================================
#
at forest.9
   ifkey go
      or
   ifeq status, 1
      move north, ne, east, se, dark.forest
      move south, forest.10
      move sw, east.of.building
      move west, forest.8
      move nw, forest.7
   fin
#
#=====================================================================
#
at forest.10
   ifkey go
      or
   ifeq status, 1
      move north, forest.9
      move ne, east, se, dark.forest
      move south, forest.12
      move sw, forest.11
      move west, east.of.building
      move nw, forest.8
   fin
#
#=====================================================================
#
at forest.11
   ifkey go
      or
   ifeq status, 1
      move north, east.of.building
      move ne, forest.10
      move east, forest.12
      move se, dark.forest
      move south, forest.13
      move sw, forest.18
      move west, south.of.building
      ifkey nw
         chance 50
            move east.of.building
         fin
         move south.of.building
      fin
   fin
#
#=====================================================================
#
at forest.12
   ifkey go
      or
   ifeq status, 1
      move north, forest.10
      ifkey se
         ifflag clearing, been.here
            or
         ifgt forest.12, 0
            move dark.path.1
         else
            move dark.forest
         fin
      fin
      move ne, east, south, dark.forest
      move sw, forest.13
      move west, forest.11
      move nw, east.of.building
      ifkey path
         ifeq forest.12, faint.path
            move dark.path.1
         fin
         quip i.dont.see, path
      fin
   fin
#
#=====================================================================
#
at forest.13
   ifkey go
      or
   ifeq status, 1
      move north, forest.11
      move ne, forest.12
      move east, se, south, dark.forest
      move sw, forest.19
      move west, forest.18
      move nw, south.of.building
   fin
#
#=====================================================================
#
at forest.14
   ifkey go
      or
   ifeq status, 1
      ifhave sunstone
         and
      ifany down, valley
         lda direction, east
         call consult.sunstone, direction
      fin
      move north, ne, road
      move down, east, valley, valley
      move se, slit
      move south, forest.15
      move sw, west, nw, dark.forest
   fin
#
#=====================================================================
#
at forest.15
   ifkey go
      or
   ifeq status, 1
      ifhave sunstone
         and
      ifany down, valley
         lda direction, east
         call consult.sunstone, direction
      fin
      move north, forest.14
      move ne, valley
      move east, down, valley, slit
      move se, depression
      move south, forest.16
      move sw, west, nw, dark.forest
   fin
#
#=====================================================================
#
at forest.16
   ifkey go
      or
   ifeq status, 1
      ifhave sunstone
         and
      ifany down, valley
         lda direction, east
         call consult.sunstone, direction
      fin
      move north, forest.15
      move ne, slit
      move east, down, valley, depression
      move se, end.of.valley
      move south, forest.17
      move sw, west, nw, dark.forest
   fin
#
#=====================================================================
#
at forest.17
   ifkey go
      or
   ifeq status, 1
      ifhave sunstone
         and
      ifany down,  valley
         lda direction, east
         call consult.sunstone, direction
      fin
      move north, forest.16
      move ne, depression
      move east, down, valley, end.of.valley
      move se, forest.20
      move south, sw, west, nw, dark.forest
   fin
#
#=====================================================================
#
at forest.18
   ifkey go
      or
   ifeq status, 1
      ifhave sunstone
         and
      ifany down, valley
         lda direction, west
         call consult.sunstone, direction
      fin
      move north, south.of.building
      move ne, forest.11
      move east, forest.13
      move se, dark.forest
      move south, forest.19
      move sw, depression
      move west, down, valley, slit
      move nw, valley
   fin
#
#=====================================================================
#
at forest.19
   ifkey go
      or
   ifeq status, 1
      ifhave sunstone
         and
      ifany down, valley
         lda direction, west
         call consult.sunstone, direction
      fin
      move north, forest.18
      move ne, forest.13
      move east, se, dark.forest
      move south, forest.20
      move sw, end.of.valley
      move west, down, valley, depression
      move nw, slit
   fin
#
#=====================================================================
#
at forest.20
   ifkey go
      or
   ifeq status, 1
      ifhave sunstone
         and
      ifany down, valley
         lda direction, west
         call consult.sunstone, direction
      fin
      move north, forest.19
      move ne, east, se, south, dark.forest
      move west, down, valley, end.of.valley
      move sw, forest.17
      move nw, depression
   fin
#
#=====================================================================
#
at dark.path.1
   call in.dark.forest.actions
   ifkey go
      or
   ifeq status, 1
      ifkey path
         call follow.it, dark.path.2, se, forest.12, nw
      fin
      move nw, forest.12
      move se, dark.path.2
      move north, ne, east, south, sw, west, dark.forest
   fin
#
#=====================================================================
#
at dark.path.2
   call in.dark.forest.actions
   ifkey go
      or
   ifeq status, 1
      ifkey path
         call follow.it, clearing, se, dark.path.1, nw
      fin
      move nw, dark.path.1
      move se, clearing
      move north, ne, east, south, sw, west, dark.forest
   fin
#
#=====================================================================
#
at dark.forest
   local trap
   local east.dir
#
   call in.dark.forest.actions
   ifkey go
      or
   ifeq status, 1
      ifany north, ne, east, se, south, sw, west, nw
         lda east.dir, east
         set trap, arg1
         ifgt status, 1
            set trap, arg2
         fin
         sub trap, east.dir
         iflt forest.block, 0
            and
         chance 20
            set forest.block, trap
         fin
         ifeq forest.block, trap
            quip forest.too.dense
         fin
         call hide.things
         set forest.block, -1
         set trap, forest.trap
         chance trap
            sub forest.trap, 10
            iflt forest.trap, 1
               set forest.trap, 1
            fin
            move dark.forest
         fin
         choose forest.trap, 120, 160
         choose place.ptr, forest.1, forest.20
         call dump.things, end.of.valley
         move place.ptr
      fin
   fin
#
#=====================================================================
#
text increment RASH.LEAP
   [You rashly leap into the well... /]Ooof!!
   [ A bit of a heavy landing there... Still, no harm done./]

at clearing
   ifkey look
      respond grass, attention.to.detail, grass
      respond clearing, clearing.info, 0
      respond forest, clearing.forest, 0
      respond tree, conifer, clearing.forest, 1
      ifkey well
         ifeq stage, adventuring
            quip well.info, 0
         fin
         quip well.no.info, 0
      fin
      respond shaft, bottom, down, well.info, 1
      respond shed, shed.info
      respond path, dark.path, 0
      respond track, dark.path, 1
      respond ground, clearing.info, 1
      respond stone, surround, its.crumbling
      respond supports, none.no.more, 1
      respond door, wooden.shed, 4
      respond window, shed.window, 0
      respond roof, shed.roof
      respond walls, wooden.shed, 0
      respond planks, shed.planks
      proceed
   fin
   ifkey door
      respond open, shed.no.stay.open, 0
      respond close, already.closed, door
      fakearg door, door4
   fin
   ifkey window
      respond rub, clean, dust, window.clean.enough, 0
      respond break, no.point.in.that
      respond open, close, it.dont.do.it, open
      flag context, arg2.here
      proceed
   fin
   ifkey jump
      and
   ifany in, well, down
      ifeq stage, mirror.world
         call done.it!, 1
      else
         smove well.bottom, rash.leap
#        smove well.bottom, "i:[You rashly leap into the well... /]Ooof!! 
#        [ A bit of a heavy landing there... Still, no harm done./]
#        /"
      fin
   fin
   ifkey enter, shed
      or
   ifkey climb, down
      or
   ifkey down well
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifkey nw
         or
      ifkey path
         set forest.12, faint.path
         move dark.path.2
      fin
      ifany in, sw, shed
         say through.shed.door, 0
         move shed
      fin
      ifany climb, down, well
         ifeq stage, mirror.world
            smove inside.well, lets.hang
         else
            move well.bottom
         fin
      fin
      move north, ne, east, se, south, west, dark.forest
   fin
   ifany grass, clearing, forest, tree, conifer, well, shaft
      flag context, arg2.here
   fin
   ifany shed, path, track, ground, stone, supports
      flag context, arg2.here
   fin
   ifany window, roof, wall, planks
      flag context, arg2.here
   fin
   lda throw.here, well.bottom
   lda throw.text, well.drop
#
#=====================================================================
#
at shed
   ifkey dust
      respond look, dusty.shed
      respond stir, kick, get, no.point.in.that
      respond door, walls, floor, no.point.in.that
      respond window, window.clean.enough, 1
      flag context, arg2.here
      proceed
   fin
   ifkey door
      respond open, shed.no.stay.open, 1
      respond close, already.closed, door
      fakearg door, door4
   fin
   ifkey shed
      respond look, shed.info
      respond go, in, already.inside, shed
      flag context, arg2.here
      proceed
   fin
   ifkey look
      respond walls, wooden.shed, 0
      respond floor, wooden.shed, 1
      respond ceiling, roof, wooden.shed, 2
      respond door4, wooden.shed, 3
      respond out, clearing, window, shed.window, 1
      respond planks, shed.planks
      proceed
   fin
   ifkey window
      respond rub, clean, window.clean.enough  # Dusting already handled.
      respond break, no.point.in.that
      respond open, close, it.dont.do.it, open
      flag context, arg2.here
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond in, already.inside, shed
      ifany out, ne, clearing
         say through.shed.door, 1
         move clearing
      fin
   fin
   ifany roof, window, wall, door4, floor, planks, shed, dust
      flag context, arg2.here
   fin
   ifany clearing
      flag context, arg2.here
   fin
#
#=====================================================================
#
at basalt.shelf
   local temp.val
#
   ifeq basalt.shelf 1
      or
   ifeq basalt.shelf 2
      flag spire, been.here
   fin
   ifkey spire
      ifkey look
         and
      ifeq basalt.shelf, 3
         quip no.see.spire
      fin
   fin
   ifeq basalt.shelf, 0
      ifany spire, mist, clouds, rollers
         proceed
      fin
   otherwise
   ifeq basalt.shelf, 1
      ifany aurora, rollers, reflections, moon
         proceed
      fin
   otherwise
   ifeq basalt.shelf, 2
      ifany mist, clouds, aurora, moon
         proceed
      fin
   else
      ifany mist, clouds, aurora, spire
         proceed
      fin
   fin
   ifkey look
      respond landscape, view, alien.landscape
      respond opening, tube, hole, dark.exit, opening
      respond break, shelf, shelf.info, 0
      respond beach, lava, shelf.info, 1
      respond spire, too.far.to.see, spire
      respond ocean, alien.ocean, basalt.shelf
      respond moon, alien.moon, basalt.shelf
      respond aurora, aurora.borealis
      respond reflections, sea.reflections, basalt.shelf
      respond mist, your.breath
      respond clouds, alien.sky, 1
      respond rollers, breaking.waves
      proceed
   fin
   respond cross, shelf.info, 2
   ifkey throw
      ifkey sunstone
         and
      ifhave sunstone
         set temp.val, sunstone
         ifinrange temp.val, 6, 8
            quip sunstone.no.throw
         fin
      fin
      lda throw.text, throw.beach
      lda throw.here, ylem
   fin
   ifkey go
      or
   ifeq status, 1
      respond beach, lava, dont.know.the.way
      ifhave sunstone
         and
      ifany tube, in, hole, opening, east
         lda direction, east
         call consult.sunstone, direction
      fin
      move east, opening, hole, tube, in, tube
      respond spire, beach, no.way.there
      ifkey jump
         set temp.val, sunstone
         ifhave sunstone
            and
         ifinrange temp.val, 6, 8
            quip sunstone.saves.you
         fin
         goto ylem
         call splatter
      fin
   fin
   ifany moon, opening, hole, beach, break, shelf, ocean, spire
      flag context, arg2.here
   fin
   ifany lava, landscape, view, mist, aurora, reflections, sun, clouds
      flag context, arg2.here
   fin
#
#=====================================================================
#
at west.of.spire
   ifkey look
      respond ramp, ramp.above
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move north, desert.20
      move nw, desert.22
      move west, desert.last
      move south, desert.21
      move ne, north.of.spire
      move se, south.of.spire
      respond east, spire.there, east
      respond ramp, no.way.there
   fin
   ifany ramp
      flag context, arg2.here
   fin
#
#=====================================================================
#
at north.of.spire
   ifkey look
      respond ramp, no.ramp.above
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move north, desert.20
      move ne, desert.15
      move east, desert.16
      move west, desert.last
      move nw, desert.22
      move se, east.of.spire
      move sw, west.of.spire
      respond south, spire.there, south
   fin
   ifany ramp
      flag context, arg2.here
   fin
#
#=====================================================================
#
at east.of.spire
   ifkey look
      respond ramp, no.ramp.above
      respond sun, spire.no.sun
      respond shade, shadow, cast.shadow, spire
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move north, desert.20
      move south, desert.21
      move se, desert.17
      move east, desert.16
      move ne, desert.15
      move nw, north.of.spire
      move sw, south.of.spire
      respond west, spire.there, west
   fin
#
#=====================================================================
#
at south.of.spire
   local temp.val
#
   ifkey look
      ifkey ramp
         say ramp.end
         quip blank
      fin
      proceed
   fin
   ifany up, climb
      and
   ifany spire, ramp
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifany up, climb, ramp
         ifhave sunstone
            set temp.val, sunstone
            ifinrange temp.val, 6, 8
               say follow.ramp, up
               quip sunstone.no.ramp, west
            otherwise
            ifeq sunstone, 1
               say follow.ramp, up
               quip cant.follow.ramp, NW
            otherwise
            ifeq sunstone, 2
               say follow.ramp, up
               quip cant.follow.ramp, north
            fin
         fin
         move spire.part.up
      fin
      move east, desert.16
      move se, desert.17
      move south, desert.21
      move west, desert.last
      move ne, east.of.spire
      move nw, west.of.spire
      respond north, spire.there, north
      chance 50
         move sw, desert.21
      else
         move sw, desert.last
      fin
   fin
   ifany ramp
      flag context, arg2.here
   fin
#
#=====================================================================
#
at spire.part.up
   local temp.val
#
   ifkey look
      respond horizon, desert.horizon
      respond ramp, ramp.at.part.up
      respond down, near.desert
      respond desert, dunes, dunes.in.desert, 0
      respond up, distant.top
      proceed
   fin
   ifkey dune
      ifkey go
         or
      ifeq status, 1
         fakearg dune, jump
      fin
   fin
   ifkey jump
      ifany down, off, bottom, sand, desert, dune
         or
      ifeq status, 1
         ifhave sunstone
            set temp.val, sunstone
            ifinrange temp.val, 6, 8
               quip sunstone.prevents.you, west
            fin
         fin
         choose sunstone, 1, 8
         say jumped.into.sand, 0
         move west.of.spire
      fin
   fin
   ifkey drop
      call spire.drop
   fin
   ifany climb, up, down
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifkey ramp
         and
      ifis there, spire.nearly.up
         or
      ifany down, south, desert, sand, bottom
         ifhave sunstone
            set temp.val, sunstone
            ifinrange temp.val, 4, 6
               say follow.ramp, down
               quip sunstone.no.ramp, south
            otherwise
            ifeq sunstone, 3
               say follow.ramp, down
               quip cant.follow.ramp, SE
            otherwise
            ifeq sunstone, 2
               smove south.of.spire, jumped.off
            fin
         fin
         move south.of.spire
      fin
      ifkey ramp
         and
      ifis there, south.of.spire
         or
      ifany up, ne, climb, top
         ifhave sunstone
            set temp.val, sunstone
            ifinrange temp.val, 1, 3
               say follow.ramp, up
               quip sunstone.no.ramp, NE
            otherwise
            ifeq sunstone, 4
               say follow.ramp, up
               quip cant.follow.ramp, east
            fin
         fin
         move spire.nearly.up
      fin
   fin
   ifany horizon, ramp, top, bottom, desert, sand, dune
      flag context, arg2.here
   fin
   lda throw.text, throw.spire
   lda throw.here, ylem
#
#=====================================================================
#
at spire.nearly.up
   local temp.val
#
   ifkey look
      respond horizon, desert.horizon, 0
      respond ramp, ramp.at.nearly.up
      respond up, top, near.top
      respond desert, dunes, dunes.in.desert, 0
      respond down, bottom, distant.desert
      proceed
   fin
   ifkey jump
      ifany off, down, sand, desert, dune, bottom
         or
      ifeq status, 1
         ifhave sunstone
            ifeq sunstone, 1
               or
            ifeq sunstone, 2
               or
            ifeq sunstone, 8
               quip sunstone.prevents.you, north
            fin
         fin     
      fin
#
# Must exclude sunstone value 7 to avoid player getting stuck in desert.19.
#
      choose sunstone, 1, 7
      ifeq sunstone, 7
         set sunstone, 8
      fin
      say jumped.into.sand, 1
      flag sunstone, special2
      move north.of.spire
   fin
   ifkey drop
      call spire.drop
   fin
   ifany climb, up, down
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifkey ramp
         and
      ifis there, spire
         or
      ifany down, west
         ifhave sunstone
            set temp.val, sunstone
            ifinrange temp.val, 6, 8
               say follow.ramp, down
               quip sunstone.no.ramp, west
            otherwise
            ifeq sunstone, 5
               say follow.ramp, down
               quip cant.follow.ramp, SW
            fin
         fin
         move spire.part.up
      fin
      ifkey back
         and
      ifis there, spire
         fakearg, back, up
      fin
      ifkey ramp
         and
      ifis there, spire.part.up
         or
      ifany up, se, top, climb
         ifhave sunstone
            set temp.val, sunstone
            ifinrange temp.val, 3, 5
               say follow.ramp, up
               quip sunstone.no.ramp, SE
            otherwise
            ifeq sunstone, 6
               say follow.ramp, up
               quip cant.follow.ramp, south
            fin
         fin
         ifflag spire, special
            unflag spire, special
            unflag spire, been.here
         fin
         move spire
      fin
      respond cliff, no.way.there
      respond bottom, desert, sand, dune, jump.if.you.want.to
   fin
   ifany horizon, ramp, top, bottom, cliff, desert, sand, dune
      flag context, arg2.here
   fin
   lda throw.text, throw.spire
   lda throw.here, ylem
#
#=====================================================================
#
at spire
   local temp.val
#
   ifkey design
      fakearg design, pedestal
      apport design, here
   fin
   ifkey climb, pedestal
      quip no.point.in.that
   fin
   ifkey look
      respond spire, platform, you.are.on.top
      respond ramp, ramp.at.top
      respond down, far.away.desert
      respond desert, dunes, dunes.in.desert, 1
      proceed
   fin
   ifkey drop
      ifeq status, 1
         default inhand
      fin
      ifkey windrose
         and
      ifhave windrose, 1
         set windrose, 2
         set pedestal, 1
         quip white.windrose
      fin
   fin
   ifkey jump
      ifany down, off
         or
      ifeq status, 1
         say jumped.into.sand, 2
         goto ylem
         call splatter
      fin
   fin
   ifkey get, sunstone
      ifeq sunstone, 0
         set sunstone, 2       # Give player something to ponder!
      fin
   fin
   ifkey climb, down
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifany down, ramp, back
         ifhave sunstone
            set temp.val, sunstone
            ifinrange temp.val, 2, 4
               quip cant.approach.ramp
            fin
            ifeq sunstone, 1
               or
            ifeq sunstone, 8
               say follow.ramp, down
               quip sunstone.no.ramp, north
            otherwise
            ifeq sunstone, 7
               say follow.ramp, down
               quip cant.follow.ramp, NW
            fin
            unflag spire, hintable
            flag spire.nearly.up, hintable
         fin
         move spire.nearly.up
      fin
      ifany north, ne, east, se, south, sw, west, nw
         set word.ptr, arg1
         ifgt status, 1
            set word.ptr, arg2
         fin
         set direction, word.ptr
         call consult.sunstone, direction
         say approach.edge, word.ptr
         quit
      fin
      respond cliff, no.way.there
      respond desert, dune, sand, jump.if.you.want.to
      respond spire, platform, top, you.are.there
   fin
   ifany horizon, dune, desert, top, spire, platform, ramp
      flag context, arg2.here
   fin
   lda throw.text, throw.spire
   lda throw.here, ylem
#
#=====================================================================
#
at basalt.shelf.2
   flag spire, been.here
   ifkey look
      respond scree, chunks, grit, sand, slope, its.scree
      respond shelf, crumbled.shelf
      respond tube, opening, hole, collapsed.tube
      respond lava, rock, no.look.rock
      respond scene, vista, view, eerie.aint.it?
      respond dunes, dunes.in.desert, 2
      proceed
   fin
   respond beach, sea, i.dont.see, arg2
   ifkey climb
      and
   ifany scree, slope, down
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifhave sunstone
         and 
      ifkey down
         lda direction, west
         call consult.sunstone, direction
      fin
      move west, down, scree, scree.2
      move nw, scree
      move sw, scree.3
   fin
   ifany slope, scree, lava, rock, tube, opening, hole
      flag context, arg2.here
   fin
   ifany chunks, grit, sand, scene, vista, view
      flag context, arg2.here
   fin
#
#=====================================================================
#
at scree
   ifkey look
      respond scree, slope, its.scree
      proceed
   fin
   ifkey climb
      and
   ifany scree, slope, up
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move north, cliff.base.1
      move nw, desert.1
      move west, desert.2
      move sw, desert.3
      move south, scree.2
      ifany up, se
         call consult.sunstone, se
      fin
      move up, se, scree, basalt.shelf.2
   fin
   ifany slope, scree, dune, sand
      flag context, arg2.here
   fin
#
#=====================================================================
#
at scree.2
   ifkey look
      respond scree, slope, its.scree
      proceed
   fin
   ifkey climb
      and
   ifany scree, slope, up
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move north, scree
      move south, scree.3
      move sw, desert.4
      move west, desert.3
      move nw, desert.2
      ifany up, east
         call consult.sunstone, east
      fin
      move east, up, scree, basalt.shelf.2
   fin
   ifany slope, scree, dune, sand
      flag context, arg2.here
   fin
#
#=====================================================================
#
at scree.3
   ifkey look
      respond scree, slope, its.scree
      proceed
   fin
   ifkey climb
      and
   ifany scree, slope, up
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move north, scree.2
      move nw, desert.3
      move west, desert.4
      move sw, desert.5
      move south, cliff.base.2
      ifany up, ne
         call consult.sunstone, ne
      fin
      move up, ne, scree, basalt.shelf.2
   fin
   ifany slope, scree, dune, sand, sky, sun
      flag context, arg2.here
   fin
#
#=====================================================================
#
at cliff.base.1
   ifkey go
      or
   ifeq status, 1
      move west, desert.1
      move sw, desert.2
      move south, scree
   fin
   ifany dune, sand
      flag context, arg2.here
   fin
#
#=====================================================================
#
at cliff.base.2
   ifkey go
      or
   ifeq status, 1
      move north, scree.3
      move nw, desert.4
      move west, desert.5
      move sw, desert.6
      move south, cliff.base.3
   fin
   ifany dune, sand
      flag context, arg2.here
   fin
#
#=====================================================================
#
at cliff.base.3
   ifkey look
      respond riverbed, streambed, ancient.riverbed, 2
      respond river, river.gone
   fin
   ifkey go
      or
   ifeq status, 1
      move north, cliff.base.2
      move nw, desert.5
      move west, desert.6
      move sw, river.bed.2
      move down, south, river.bed.1
   fin
   ifany dune, sand, riverbed, streambed
      flag context, arg2.here
   fin
#
#=====================================================================
#
at river.bed.1
   ifkey look
      respond cave, hole, opening, cut.river
      respond river, river.gone
      respond riverbed, ancient.riverbed, 1
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move north, cliff.base.3
      move nw, desert.6
      move west, river.bed.2
      move south, cliff.base.4
      ifkey up
         chance 50
            move cliff.base.4
         else
            move cliff.base.3
         fin
      fin
      ifany east, in, hole, opening, cave
         call consult.sunstone, east
         ifgt sunstone, 5              # I.e. no moving west!
            quip time.river, 1
         else
            quip time.river, 0
         fin
      fin
      respond riverbed, you.are.there
   fin
   ifany dune, sand, hole, cave, riverbed, opening
      flag context, arg2.here
   fin
#
#=====================================================================
#
at cliff.base.4
   ifkey look
      respond cave, hole, tunnel, opening, dark.exit, tunnel
      respond riverbed, streambed, ancient.riverbed, 3
      respond river, river.gone
   fin
   ifkey go
      or
   ifeq status, 1
      move north, down, river.bed.1
      move nw, river.bed.2
      ifany east, in, hole, opening, cave
         call consult.sunstone, east
      fin
      smove east, in, hole, opening, cave, cave.1, time.flip.1
      respond south, sw, west, dune.blocks
   fin
   ifany dune, sand, riverbed, hole, opening, cave, tunnel
      flag context, arg2.here
   fin
#
#=====================================================================
#
at desert.1
   ifkey look
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond dune, need.a.direction
      move sw, desert.7
      move south, desert.2
      move se, scree
      move east, cliff.base.1
   fin
   ifany dune, sand, sky, sun
      flag context, arg2.here
   fin
#
#=====================================================================
#
at desert.2
   ifkey look
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond dune, need.a.direction
      move north, desert.1
      move west, desert.7
      move sw, desert.8
      move south, desert.3
      move se, scree.2
      move east, scree
      move ne, cliff.base.1
   fin
   ifany dune, sand, sky, sun
      flag context, arg2.here
   fin
#
#=====================================================================
#
at desert.3
   ifkey look
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond dune, need.a.direction
      move north, desert.2
      move nw, desert.7
      move west, desert.8
      move sw, desert.9
      move south, desert.4
      move se, scree.3
      move east, scree.2
      move ne, scree
   fin
   ifany dune, sand, sky, sun
      flag context, arg2.here
   fin
#
#=====================================================================
#
at desert.4
   ifkey look
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond dune, need.a.direction
      move north, desert.3
      move nw, desert.8
      move west, desert.9
      move sw, desert.10
      move south, desert.5
      move se, cliff.base.2
      move east, scree.3
      move ne, scree.2
   fin
   ifany dune, sand, sky, sun
      flag context, arg2.here
   fin
#
#=====================================================================
#
at desert.5
   ifkey look
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond dune, need.a.direction
      move north, desert.4
      move nw, desert.9
      move west, desert.10
      move south, desert.6
      move se, cliff.base.3
      move east, cliff.base.2
      move ne, scree.3
   fin
   ifany dune, sand, sky, sun
      flag context, arg2.here
   fin
#
#=====================================================================
#
at desert.6
   ifkey look
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond dune, need.a.direction
      move north, desert.5
      move nw, desert.10
      move down, south, river.bed.2
      move se, river.bed.1
      move east, cliff.base.3
      move ne, cliff.base.2
   fin
   ifany dune, sand, sky, sun
      flag context, arg2.here
   fin
#
#=====================================================================
#
at river.bed.2
   ifkey look
      respond river, river.gone
      respond boulder, river.boulder
      respond riverbed, ancient.riverbed, 0
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move north, up, desert.6
      move se cliff.base.4
      move east, river.bed.1
      move ne, cliff.base.3
      respond riverbed, you.are.there
   fin
   ifany riverbed, boulder, stones
      flag context, arg2.here
   fin
#
#=====================================================================
#
at desert.7
   ifkey look
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond dune, need.a.direction
      move nw, desert.11
      move west, desert.12
      move sw, desert.13
      move south, desert.8
      move se, desert.3
      move east, desert.2
      move ne, desert.1
   fin
   ifany dune, sand, sky, sun
      flag context, arg2.here
   fin
#
#=====================================================================
#
at desert.8
   ifkey look
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond dune, need.a.direction
      move north, desert.7
      move nw, desert.12
      move west, desert.13
      move sw, desert.14
      move south, desert.9
      move se, desert.4
      move east, desert.3
      move ne, desert.2
   fin
   ifany dune, sand, sky, sun
      flag context, arg2.here
   fin
#
#=====================================================================
#
at desert.9
   ifkey look
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond dune, need.a.direction
      move north, desert.8
      move nw, desert.13
      move west, desert.14
      move south, desert.10
      move se, desert.5
      move east, desert.4
      move ne, desert.3
   fin
   ifany dune, sand, sky, sun
      flag context, arg2.here
   fin
#
#=====================================================================
#
at desert.10
   ifkey look
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond dune, need.a.direction
      move north, desert.9
      move nw, desert.14
      move se, desert.6
      move east, desert.5
      move ne, desert.4
   fin
   ifany dune, sand, sky, sun
      flag context, arg2.here
   fin
#
#=====================================================================
#
at desert.11
   ifkey look
      respond outcrop, outcrop.end, 0
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond dune, need.a.direction
      move nw, outcrop, rocky.desert
      move sw, desert.15
      move south, desert.12
      move se, desert.7
   fin
   ifany dune, sand, sky, sun, cliff, outcrop
      flag context, arg2.here
   fin
#
#=====================================================================
#
at rocky.desert
   ifkey look
      respond outcrop, outcrop.other.end
      respond boulder, rounded.boulders
      respond sea, dunes, desert, sea.of.dunes
      respond horizon, desert.horizon
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move se, outcrop, desert, desert.11
   fin
   ifany horizon, cliff, sky, sun, sand
      flag context, arg2.here
   fin
   ifany desert, dunes, outcrop, boulders, stones
      flag context, arg2.here
   fin
#
#=====================================================================
#
at desert.12
   ifkey look
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond dune, need.a.direction
      move north, desert.11
      move west, desert.15
      move sw, desert.16
      move south, desert.13
      move se, desert.8
      move east, desert.7
   fin
   ifany dune, sand, sky, sun
      flag context, arg2.here
   fin
#
#=====================================================================
#
at desert.13
   ifkey look
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond dune, need.a.direction
      move north, desert.12
      move nw, desert.15
      move west, desert.16
      move sw, desert.17
      move south, desert.14
      move se, desert.9
      move east, desert.8
      move ne, desert.7
   fin
   ifany dune, sand, sky, sun
      flag context, arg2.here
   fin
#
#=====================================================================
#
at desert.14
   ifkey look
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond dune, need.a.direction
      move north, desert.13
      move nw, desert.16
      move west, desert.17
      move sw, desert.18
      move se, desert.10
      move east, desert.9
      move ne, desert.8
   fin
   ifany dune, sand, sky, sun
      flag context, arg2.here
   fin
#
#=====================================================================
#
at desert.15
   ifkey look
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond dune, need.a.direction
      move nw, desert.19
      move west, desert.20
      move sw, east.of.spire
      move south, desert.16
      move se, desert.13
      move east, desert.12
      move ne, desert.11
   fin
   ifany dune, sand, sky, sun
      flag context, arg2.here
   fin
#
#=====================================================================
#
at desert.16
   ifkey look
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond dune, need.a.direction
      move north, desert.15
      move nw, desert.20
      move west, east.of.spire
      move sw, desert.21
      move south, desert.17
      move se, desert.14
      move east, desert.13
      move ne, desert.12
   fin
   ifany dune, sand, sky, sun
      flag context, arg2.here
   fin
#
#=====================================================================
#
at desert.17
   ifkey look
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond dune, need.a.direction
      move north, desert.16
      move nw, east.of.spire
      move west, desert.21
      move south, desert.18
      move east, desert.14
      move ne, desert.13
   fin
   ifany dune, sand, sky, sun
      flag context, arg2.here
   fin
#
#=====================================================================
#
at desert.18
   ifkey look
      respond outcrop, outcrop.end, 1
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond dune, need.a.direction
      move north, desert.17
      move nw, desert.21
      move ne, desert.14
      move sw, outcrop.2
   fin
   ifany dune, sand, sky, sun, outcrop
      flag context, arg2.here
   fin
#
#=====================================================================
#
at outcrop.2
   ifkey look
      respond outcrop, smooth.outcrop
      respond sea, dunes, desert, sea.of.dunes
      respond horizon, desert.horizon
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move ne, outcrop, desert, desert.18
   fin
   ifany horizon, cliff, sky, sun, sand
      flag context, arg2.here
   fin
   ifany desert, dunes, outcrop
      flag context, arg2.here
   fin
#
#=====================================================================
#
at outcrop.1
   ifkey look
      respond outcrop, smooth.outcrop
      respond sea, dunes, desert, sea.of.dunes
      respond horizon, desert.horizon
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move se, outcrop, desert, desert.19
   fin
   ifany horizon, cliff, sky, sun, sand
      flag context, arg2.here
   fin
   ifany desert, dunes, outcrop
      flag context, arg2.here
   fin
#
#=====================================================================
#
at desert.19
   ifkey look
      respond outcrop, outcrop.end, 0
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond dune, need.a.direction
      move sw, desert.22
      move south, desert.20
      move se, desert.15
      move nw, outcrop.1
   fin
   ifany dune, sand, sky, sun, outcrop
      flag context, arg2.here
   fin
#
#=====================================================================
#
at desert.20
   ifkey look
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond dune, need.a.direction
      move north, desert.19
      move west, desert.22
      move sw, desert.last
      move south, north.of.spire
      move se, desert.16
      move east, desert.15
   fin
   ifany dune, sand, sky, sun
      flag context, arg2.here
   fin
#
#=====================================================================
#
at desert.21
   ifkey look
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond dune, need.a.direction
      move north, south.of.spire
      move nw, desert.last
      move se, desert.18
      move east, desert.17
      move ne, desert.16
   fin
   ifany dune, sand, sky, sun
      flag context, arg2.here
   fin
#
#=====================================================================
#
at desert.22
   ifkey look
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond dune, need.a.direction
      move south, desert.last
      move se, west.of.spire
      move east, desert.20
      move ne, desert.19
   fin
   ifany dune, sand, sky, sun
      flag context, arg2.here
   fin
#
#=====================================================================
#
at desert.last
   ifkey look
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond dune, need.a.direction
      move north, desert.22
      move se, desert.21
      move east, west.of.spire
      move ne, desert.20
   fin
   ifany dune, sand, sky, sun
      flag context, arg2.here
   fin
#
#=====================================================================
#
at cave.1
   ifkey look
      respond floor, wall, ceiling, smooth.basalt, arg2
      respond corridor, passage, tunnel, dark.exit, corridor
      respond beach, sea, dark.beach
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      smove west, beach, sea, cliff.base.4, time.flip.2
      move east, cave.2
      move corridor, passage, tunnel, cave.2
   fin
   ifany corridor, passage, tunnel, beach, sea
      flag context, arg2.here
   fin
#
#=====================================================================
#
at cave.2
   ifkey look
      respond floor, wall, ceiling, smooth.basalt, arg2
      respond light, light.glimmer
      ifany corridor, passage, tunnel
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move west, cave.1
      move east, cave.3
      ifkey follow
         and
      ifany corridor, passage, tunnel
         call follow.it, cave.1, west, cave.3, east
      fin
   fin
   ifany corridor, passage, tunnel
      flag context, arg2.here
   fin
#
#=====================================================================
#
at cave.3
   ifhave bucket
      ifeq bucket, full.of.water
         or
      ifge bucket, mostly.full
         flag quips, desert.rat
      fin
   fin
   ifkey look
      respond floor, wall, ceiling, smooth.basalt, arg2
      ifany corridor, passage, tunnel, bend
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move west, cave.2
      move ne, cave.4
      ifany corridor, passage, tunnel
         call follow.it, cave.2, west, cave.4, ne
      fin
      respond bend, you.are.there
   fin
   ifany corridor, passage, tunnel
      flag context, arg2.here
   fin
#
#=====================================================================
#
at cave.4
   ifkey bridge
      apport bridge, here
   fin
   ifkey look
      respond floor, wall, ceiling, smooth.basalt, arg2
      respond passage, tunnel, corridor, dark.exit, passage
      respond opening, too.far.to.see, opening
      respond membrane, strange.stuff
      ifkey cave
         set status, 1
      fin
      proceed
   fin
   ifkey jump
      call river.jump, 1
   fin
   ifkey back
      and
   ifis there, cave.5
      fakecom back, north
   fin
   ifany north, cross, throw
      call bridge.stuff
   fin
   ifany go
      or
   ifeq status, 1
      move sw, corridor, passage, tunnel, cave.3
      move east, river, stream, shelf, upstream, river
      ifkey bridge
         call bridge.stuff
      fin
      respond cave, you.are.there
   fin
   ifany membrane, opening, passage, tunnel, corridor, cave
      flag context, arg2.here
   fin
   ifany river, stream, shelf, flow, foam, flecks, bank, shore, edge
      flag context, arg2.here
   fin
#
#=====================================================================
#
at cave.5
   ifkey bridge
      apport bridge, here
   fin
   ifkey look
      respond floor, wall, ceiling, smooth.basalt, arg2
      respond passage, corridor, tunnel, dark.exit, passage
      respond membrane, strange.stuff
      proceed
   fin
   ifkey jump
      call river.jump, 1
   fin
   ifkey back
      and
   ifis there, cave.4
      fakecom back, south
   fin
   ifany south, cross, throw
      call bridge.stuff
   fin
   ifkey go
      or
   ifeq status, 1
      ifkey bridge
         call bridge.stuff
      fin
      move up, north, corridor, tunnel, passage, cave.6
      ifany east, river, stream, shelf, upstream
         flag river.north, special
         move river.north
      fin
   fin
   ifany membrane, corridor, passage, tunnel
      flag context, arg2.here
   fin
   ifany river, stream, shelf, flow, foam, flecks, bank, shore, edge
      flag context, arg2.here
   fin
#
#=====================================================================
#
at cave.6
   ifkey look
      respond floor, wall, ceiling, smooth.basalt, arg2
      ifany corridor, slope, passage, tunnel
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move south, down, cave.5
      move north, up, cave.7
      ifany slope, corridor, passage, tunnel
         call follow.it, cave.7, north, cave.5, south
      fin
   fin
   ifany slope, passage, corridor, tunnel
      flag context, arg2.here
   fin
#
#=====================================================================
#
at cave.7
   ifkey look
      respond floor, wall, ceiling, smooth.basalt, arg2
      respond passage, corridor, tunnel, exit, dark.exit, corridor
      ifkey niche
         ifeq skull, 0
            quip skull
         fin
         quip skull.niche
      fin
      ifkey cave
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move out, corridor, passage, tunnel, south, cave.6
      respond cave, you.are.there
   fin
   ifany out, corridor, passage, tunnel, niche
      flag context, arg2.here
   fin
#
#=====================================================================
#
at cave.8
   call default.read, writing
   ifkey look
      respond floor, wall, ceiling, smooth.basalt, arg2
      respond writing, imps.writing, read
      ifkey imp
         and
      ifeq imps.writing, 0
         set imps.writing, 1
      fin
      ifany waterfall, sheet
         say imps.waterfall
         quip blank
      fin
      proceed
   fin
   ifkey evict
      ifeq status, 1
         or
      ifkey imp
         quip no.evict.imp
      fin
   fin
   ifkey imp
      flag context, arg2.here
      proceed
   fin
   ifkey jump
      call river.jump, 0
   fin
   ifkey throw
      call bridge.stuff
   fin
   ifany read, translate
       ifkey writing
         or
      ifeq status, 1
         quip imps.writing, arg1
      fin
   fin
   ifkey writing
      flag context, arg2.here
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany river, stream, shelf
         or
      ifany downstream, west, back
         ifflag cave.8, special
         else
            say astral.squatter
            flag cave.8, special
         fin
         move cave.9
      fin
   fin
   ifany river, stream, shelf, flow, foam, flecks, bank, shore, edge
      flag context, arg2.here
   fin
#
#=====================================================================
#
at cave.9
   ifkey look
      respond floor, wall, ceiling, smooth.basalt, arg2
      proceed
   fin
   ifkey jump
      call river.jump, 0
   fin
   ifkey throw
      call bridge.stuff
   fin
   ifkey go
      or
   ifeq status, 1
      move east, upstream, cave.8
      move west, downstream, river.north
      ifany river, stream, shelf
         call follow.it, cave.8, east, river.north, west
      fin
   fin
   ifany river, stream, shelf, flow, foam, flecks, bank, shore, edge
      flag context, arg2.here
   fin
#
#=====================================================================
#
at river
   ifkey look
      respond floor, wall, ceiling, smooth.basalt, arg2
      proceed
   fin
   ifkey jump
      call river.jump, 0
   fin
   ifkey throw
      call bridge.stuff
   fin
   ifkey go
      or
   ifeq status, 1
      move west, river, stream, shelf, downstream, cave.4
   fin
   ifany river, stream, shelf, flow, foam, flecks, bank, shore, edge
      flag context, arg2.here
   fin
#
#=====================================================================
#
at river.north
   ifkey look
      respond floor, wall, ceiling, smooth.basalt, arg2
      proceed
   fin
   ifkey jump
      call river.jump, 0
   fin
   ifkey throw
      call bridge.stuff
   fin
   ifkey go
      or
   ifeq status, 1
      ifany river, stream, shelf
         and
      ifis there, cave.5
         or
      ifany east, upstream
         flag cave.9, special
         move cave.9
      fin
      ifany river, stream, shelf
         or
      ifany west, downstream
         move cave.5
      fin
   fin
   ifany river, stream, shelf, flow, foam, flecks, bank, shore, edge
      flag context, arg2.here
   fin
#
#=====================================================================
#
at island
   fakearg tree, palms
   flag coconuts, seen
   apport palms, here
   call beach.stuff
   call plants.stuff, 0
   ifkey look
      respond mountain, towering.mountain, 0
      respond building, temple, structure, too.far.to.see, arg2
      respond outcrop, too.far.to.see, structure
      respond barrier, dense.tangle
      respond shade, shadow, restful.shade
      proceed
   fin
   ifkey enter, rest
      and
   ifany shade, shadow
      quip no.rest.in.shade
   fin
   ifkey go
      or
   ifeq status, 1
      move s, island.se
      move n, island.ne
      ifany beach, shore
         call follow.it, island.ne, north, island.se, south
      fin
      respond mountain, not.from.here
      respond shade, no.rest.in.shade
      ifkey back
         and
      ifis there, above.sea
         quip cant.go.back, 2
      fin
   fin
   ifany building, outcrop, temple, structure, mountain, barrier
      flag context, arg2.here
   fin
   ifany shadow, shade
      flag context, arg2.here
   fin
#
#=====================================================================
#
at island.se
   fakearg tree, palms
   apport palms, here
   call beach.stuff
   call plants.stuff, 1
   ifkey look
      respond slope, ridge, you.can.climb, 0
      respond mountain, towering.mountain, 0
      respond shade, shadow, restful.shade
      proceed
   fin
   ifkey enter, rest
      and
   ifany shade, shadow
      quip no.rest.in.shade
   fin
   ifkey go
      or
   ifeq status, 1
      move ne, island
      move sw, island.s
      move nw, ridge, up, slope, ridge
      ifany beach, shore
         call follow.it, island, ne, island.s, sw
      fin
      respond mountain, not.from.here
      respond shade, no.rest.in.shade
   fin
   ifany slope, mountain, ridge, shade, shadow
      flag context, arg2.here
   fin
#
#=====================================================================
#
at island.s
   call beach.stuff
   call plants.stuff, 1
   ifkey look
      respond ground, slope, you.can.climb, 2
      respond mountain, towering.mountain, 0
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move e, island.se
      move w, island.sw
      move n, mountain, slope, up, climb, island.04
      ifany beach, shore
         call follow.it, island.se, east, island.sw, west
      fin
   fin
   ifany slope, mountain
      flag context, arg2.here
   fin
#
#=====================================================================
#
at island.sw
   call beach.stuff
   call plants.stuff, 0
   ifkey look
      respond slope, you.cant.climb, 1
      respond mountain, towering.mountain, 0
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move se, island.s
      move nw, island.w
      ifany beach, shore
         call follow.it, island.s, se, island.w, nw
      fin
      respond slope, up, mountain, you.cant.climb, 1
   fin
   ifany slope, mountain
      flag context, arg2.here
   fin
#
#=====================================================================
#
at island.w
   call beach.stuff
   call plants.stuff, 1
   ifkey look
      respond slope, you.can.climb, 1
      respond mountain, towering.mountain, 0
      respond outcrop, no.more.to.say, outcrop
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move s, island.sw
      move n, island.nw
      move e, up, climb, slope, mountain, outcrop, island.01
      ifany beach, shore
         call follow.it, island.nw, north, island.sw, south
      fin
   fin
   ifany slope, outcrop, mountain
      flag context, arg2.here
   fin
#
#=====================================================================
#
at island.nw
   call beach.stuff
   call plants.stuff, 0
   ifkey look
      respond ground, slope, you.cant.climb, 0
      respond mountain, towering.mountain, 0
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond slope, up, mountain, you.cant.climb, 0
      move sw, island.w
      move ne, island.n
      ifany beach, shore
         call follow.it, island.n, ne, island.w, sw
      fin
   fin
   ifany slope, mountain
      flag context, arg2.here
   fin
#
#=====================================================================
#
at island.n
   call beach.stuff
   call plants.stuff, 1
   ifkey look
      respond slope, you.can.climb, 2
      respond shore, northern.shore
      respond outcrop, too.far.to.see, outcrop
      respond mountain, towering.mountain, 0
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move e, island.ne
      move w, island.nw
      move s, up, slope, mountain, climb, island.07
      ifany beach, shore
         call follow.it, island.ne, east, island.nw, west
      fin
   fin
   ifany slope, outcrop, mountain, soil
      flag context, arg2.here
   fin
#
#=====================================================================
#
at island.ne
   ifany drink, fill
      or
   ifkey get, water
   else
      call beach.stuff
   fin
   ifkey look
      respond water, island.water
   fin
   ifkey look
      respond ground, rocks, jumble, jumble.of.rocks
      respond outcrop, weathered.outcrop
      respond mountain, towering.mountain, 0
      respond stream, island.stream
      respond soil, reddish.soil
      proceed
   fin
   ifkey climb, outcrop
      respond outcrop, weathered.outcrop
   fin
   ifkey enter, stream
      quip too.little.water
   fin
   ifkey stream
      or
   ifeq status, 1
      respond cross, stream.crossed
   fin
   ifkey go
      or
   ifeq status, 1
      move se, island
      move nw, island.n
      move sw, upstream, stream, by.stream.1
      ifany beach, shore
         call follow.it, island.n, nw, island, se
      fin
      respond downstream, no.swim, 3
   fin
   ifany jumble, rock, outcrop, stream, mountain, soil
      flag context, arg2.here
   fin
#
#=====================================================================
#
at ridge
   call plants.stuff, 1
   ifkey look
      respond down, edge, swamp, caldera, dangerous.bog
      respond mountain, towering.mountain, 0
      respond slope, you.can.climb, 0
      respond beach, cant.see.properly, beach
      respond shoulder, mountain.shoulders
      respond waterfall, waterfall.info
      ifkey ridge
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move se, slope, beach, island.se
      respond mountain, not.from.here
      respond ridge, you.are.there
      ifany down, swamp, caldera, edge
         ifhave shoes
            ifflag viewpoint, special  # Does he know the route?
            else
               quip no.get.lost.in.bog
            fin
            smove below.ridge, down.to.bog
         else
            quip not.without.footware
         fin
      fin
   fin
   ifany beach, edge, ridge, slope, mountain, caldera, swamp
      flag context, arg2.here
   fin
   ifany waterfall, shoulder
      flag context, arg2.here
   fin
#
#=====================================================================
#
at below.ridge
   call plants.stuff, 3
   ifkey drink
      and
   ifeq status,1
      call find.water, false
      ifne vessel, none
         proceed
      fin
   fin
   respond water, drink swampy.water
   ifkey look
      respond caldera, swamp, swamp.edge, 0
      respond mountain, towering.mountain, 0
      respond grass, soil, muddy.grass
      respond edge, indistinct.edge, 0
      respond bank, ridge.bank
      proceed
   fin
   ifkey jump
      flag context, arg2.here
      proceed
   fin
   ifany cross, in
      and
   ifkey swamp
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifany up, back
         and
      ifis there, ridge
         quip too.late.to.get.out
      fin
      respond mountain, not.from.here
      ifany back, cross, north, swamp, caldera, nw
         ifhave shoes, worn
            smove caldera, into.the.bog
         fin
         quip need.footware
      fin 
   fin
   ifany, caldera, swamp, mountain, vegetation, plants, grass
      flag context, arg2.here
   fin
   ifany edge, bank
      flag context, arg2.here
   fin
#
#=====================================================================
#
at caldera
   call plants.stuff, 3
   ifkey drink
      and
   ifeq status,1
      call find.water, false
      ifne vessel, none
         proceed
      fin
   fin
   respond water, drink, brackish.water
   ifkey look
      respond swamp, caldera, swamp.edge, 1,
      respond mountain, towering.mountain, 1
      respond wall, up, cliffs, wet.cliffs, 1
      respond edge, indistinct.edge, 1
      respond waterfall, waterfall.info
      proceed
   fin
   ifany cliff, rock, up, wall
      or
   ifeq status, 1
      respond climb, no.climbing, 1
   fin
   ifany in, cross
      and
   ifkey swamp
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifany ne, edge, waterfall
         ifhave shoes, worn
            quip remove.it.first, shoes
         fin
         move by.waterfall
      fin
      ifkey back
         and 
      ifis there, below.ridge
         or
      ifany cross, south, swamp, caldera, se
         ifhave shoes, worn
            smove below.ridge, into.the.bog
         fin
         quip need.footware               
      fin
      respond mountain, no.climbing, 1
   fin
   ifany swamp, caldera, wall, cliffs, edge, waterfall
      flag context, arg2.here
   fin
#
#=====================================================================
#
at by.waterfall
   call plants.stuff, 3
   respond climb, no.climbing, 2
   ifkey look
      respond water, waterfall, its.a.waterfall, 0
      respond mountain, towering.mountain, 1
      respond up, wall, cliffs, wet.cliffs, 0
      respond chunks, fallen.chunks
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move sw, caldera
      respond climb, mountain, no.climbing, 2
      ifany in, ne, waterfall
         ifflag waterfall, been.here
            smove waterfall, through.waterfall
         fin
         set context, q.waterfall
         quip into.waterfall?
      fin
   fin
   ifany mountain, rock, waterfall, chunks, cliffs
      flag context, arg2.here
   fin
#
#=====================================================================
#
at waterfall
   call default.read, door
   ifkey read
      and
   ifany door, inscription, note, notice, words, message
      quip door.1.words
   fin
   fakearg door, door1
   set door1, outside.view
   ifkey look
      respond wall, waterfall.wall
      respond inscription, door.1.words
      respond water, spray, mist, waterfall, its.a.waterfall, 1
      respond debris, no.future.in.it, debris
      respond overhang, ceiling, waterfall.overhang
      ifgt waterfall, 0
         respond passage, tunnel, corridor, no.see.into.mine
      fin
      proceed
   fin
   ifkey get, debris
      quip no.future.in.it, debris
   fin
   ifkey go
      or
   ifeq status, 1
      move se, out, by.waterfall
      ifeq waterfall, opened
         ifeq dwarven, 0
            call close.mine.door
            quit
         fin
         set mine, opened
         unflag waterfall, hintable
         move in, mine, corridor, passage, tunnel, nw, mine
      fin
      respond nw, in, door.in.the.way, nw
   fin
   ifany door, inscription, note, notice, words, message
      or
   ifany debris, waterfall, overhang, ceiling, inscription, spray, mist
      flag context, arg2.here
   fin
   ifany passage, tunnel, corridor, mine
      and
   ifgt waterfall, 0
      flag context, arg2.here
      proceed
   fin
#
#=====================================================================
#
at mine
   ifeq mine, closed
      set door1, inside.view
   else
      set door1, outside.view
   fin
   call default.read, door1
   fakearg door, door1
   ifeq mine, opened
      ifany door, inscription, words, note, notice, message
         ifany read, look
            or
         ifkey read, door
            quip door.1.words
         fin
         flag context, arg2.here
      fin
      ifeq dwarven, 0
         call close.mine.door
         quit
      fin
   fin
   respond inscription, words, note, notice, message, i.dont.see, arg2
   ifkey read
      respond door1, cant.read.it, door
   fin
   ifkey look
      respond tunnel, passage, corridor, mine, dark.exit, tunnel
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      ifany se, out
         ifeq mine, opened
            move se, out, waterfall
         else
            quip door.in.the.way, nw
         fin
      fin
      move nw, u, tunnel, passage, mine, mine.1
   fin
   ifany tunnel, passage, corridor, mine, exit
      flag context, arg2.here
   fin
#
#=====================================================================
#
at mine.1
   ifkey look
      ifkey fork
         set status, 1
      fin
      respond tunnel, corridor, passage, dark.exits, passage
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move n, mine.dead.end.1
      move d, se, mine
      move u, w, mine.2
      ifany tunnel, passage, corridor
         call follow.it, mine, se, mine.2, w
      fin
      respond fork, you.are.there
   fin
   ifany tunnel, corridor, passage, fork
      flag context, arg2.here
   fin
#
#=====================================================================
#
at mine.dead.end.1
   ifkey look
      respond tunnel, passage, corridor, dark.exit, tunnel
      respond rockfall, solid.blockage
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move out, sw, corridor, tunnel, passage, mine.1
   fin
   ifany tunnel, passage, corridor, rockfall
      flag context, arg2.here
   fin
#
#=====================================================================
#
at mine.2
   ifkey look
      ifkey fork
         set status, 1
      fin
      respond corridor, tunnel, passage, dark.exits, tunnel
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move e, mine.1
      move sw, up, mine.3
      ifany down, north
         set steps.to.abyss, 0
         move steps.to.abyss
         respond tunnel, corridor, passage, too.many.exits, tunnel
      fin
      respond fork, you.are.there
   fin
   ifany fork, tunnel, passage, corridor
      flag context, arg2.here
   fin
#
#=====================================================================
#
at steps.to.abyss
   call default.read, inscription
   ifany notice, inscription, wall, words, message, note
      ifany read, look
         quip island.exit
      fin
      respond rub, nothing
      flag context, arg2.here
      proceed
   fin
   ifkey look
      respond shaft, opening, hole, no.see.down.there, 0
      respond corridor, tunnel, passage, dark.exit, corridor
      respond footholds, wall, climbing.aid, footholds
      proceed
   fin
   ifkey use, footholds
      fakearg use, climb
   fin
   ifany shaft, hole, opening
      and
   ifany climb, down
      or
   ifkey climb, down
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      smove d, climb, hole, shaft, opening, square.shaft.bottom, tiring.climb
      move sw, passage, tunnel, corridor, mine.2
   fin
   ifany notice, inscription, wall, words, message, note
      or
   ifany footholds, shaft, passage, tunnel, corridor, hole, opening
      flag context, arg2.here
   fin
#
#=====================================================================
#
at square.shaft.bottom
   ifkey look
      respond tunnel, passage, corridor, dark.exit, tunnel
      respond up, hole, opening, shaft, no.see.up.there
      respond handholds, climbing.aid, arg2
      respond wall, climbing.aid, handholds
      proceed
   fin
   ifkey use, handholds
      fakearg use, climb
   fin
   ifkey climb
      and
   ifany shaft, up
      or
   ifkey up, shaft
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifany u, climb, shaft, hole, opening
         set steps.to.abyss, 1
         smove steps.to.abyss, tiring.climb
      fin
      move east, tunnel, passage, corridor, abyss
   fin
   ifany handholds, shaft, wall, tunnel, passage, corridor, hole, opening
      flag context, arg2.here
   fin
#
#=====================================================================
#
at abyss
   ifkey look
      respond ceiling, up, its.a.ceiling, c.abyss
      respond wall, infinite.wall
      respond tunnel, passage, corridor, dark.exit, tunnel
      respond edge, abyss.edge
      respond platform, abyss.platform
      proceed
   fin
   ifkey jump
      and
   ifany down, in, abyss
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifany east, abyss, edge
         ifflag above.abyss, been.here
            smove above.abyss, over.abyss
         fin
         set context, q.into.abyss?
         quip over.the.edge?
      fin
      move west, tunnel, passage, corridor, square.shaft.bottom
      ifkey jump
         say abyss.fall, 0
         goto ylem
         call coroner
      fin
   fin
   ifany edge, ceiling, tunnel, passage, corridor, platform
      flag context, arg2.here
   fin
   lda throw.here, ylem
   lda throw.text, throw.abyss
#
#=====================================================================
#
at above.abyss
   ifeq above.abyss, 0
      set above.abyss, 1   # Activate the description
   fin
   ifkey look
      respond wall, infinite.wall
      call abyss.view, 0
      proceed
   fin
   call abyss.stuff, 0
#
#=====================================================================
#
at above.abyss.2
   ifkey look
      call abyss.view, 1
      proceed
   fin
   call abyss.stuff, 1
#
#=====================================================================
#
at above.abyss.3
   ifkey look
      call abyss.view, 1
      proceed
   fin
   call abyss.stuff, 1
#
#=====================================================================
#
at above.abyss.4
   respond insects, no.insects
   ifkey get, bat
      quip not.a.chance
   fin
   ifkey look
      call abyss.view, 2
      proceed
   fin
   call abyss.stuff, 2
#
#=====================================================================
#
at above.abyss.5
   respond insects, no.insects
   ifkey get, bat
      quip not.a.chance
   fin
   ifkey look
      call abyss.view, 2
      proceed
   fin
   call abyss.stuff, 2
#
#=====================================================================
#
at above.abyss.6
   ifkey look
      call abyss.view, 1
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move sw, imaze.01
   fin
   call abyss.stuff, 1
#
#=====================================================================
#
at above.abyss.7
   ifkey look
      call abyss.view, 1
      proceed
   fin
   call abyss.stuff, 1
#
#=====================================================================
#
at above.glow
   ifkey look
      respond ceiling, up, too.far.to.see, ceiling
      respond glow, sourceless.glow
      proceed
   fin
   call abyss.stuff, 3
   ifany glow
      flag context, arg2.here
   fin
#
#=====================================================================
#
at above.volcano
   ifkey look
      respond ceiling, up, its.a.ceiling, c.platform
      respond volcano, volcano.sight
      respond fountains, flow, molten.lava
      respond glow, lava, lava.glows
      proceed
   fin
   ifkey volcano
      respond listen, volcano.roar
      flag context, arg2.here
      proceed
   fin
   ifkey jump
      and
   ifany down, abyss, volcano
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move east, platform
      move west, above.glow
      ifkey jump
         say abyss.fall, 3
         goto ylem
         call coroner
      fin
   fin
   ifany ceiling, volcano, fountains, glow
      flag context, arg2.here
   fin
   lda throw.here, ylem
   lda drop.here, ylem
   lda throw.text, throw.abyss
   lda drop.text, drop.abyss
#
#=====================================================================
#
at mine.3
   ifkey look
      ifkey fork
         set status, 1
      fin
      respond, tunnel, corridor, passage, dark.exits, passage
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move n, corridor, mine.dead.end.2
      move up, sw, mine.exit
      move down, ne, mine.2
      ifany tunnel, passage, corridor
         call follow.it, mine.exit, sw, mine.2, ne
      fin
      respond passage, tunnel, corridor, too.many.exits, passage
      respond fork, you.are.there
   fin
   ifany corridor, tunnel, fork, passage
      flag context, arg2.here
   fin
#
#=====================================================================
#
at mine.dead.end.2
   ifany slab, table
      ifkey look
         quip stone.table
      else
        respond climb, no.point
        flag context, arg2.here
        proceed
      fin
   fin
   ifkey look
      ifkey chamber
         set status, 1
      fin
      respond tunnel, corridor, passage, dark.exit, tunnel
      respond cloth, folds, stone.cloth
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
       move out, tunnel, passage, corridor, se, mine.3
       respond chamber, you.are.there
   fin
   ifany folds, cloth, passage, tunnel, corridor, chamber
      flag context, arg2.here
   fin
#
#=====================================================================
#
at mine.exit
   ifkey look
      respond tunnel, passage, corridor, dark.exit, tunnel
      respond foliage, opening, mine.opening
      respond crawl, crawl.exit
      respond mountain, slope, path, track, mine.exit.view
      ifkey mine
         set status, 1
      fin
      proceed
   fin
   ifkey crawl, out
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      smove out, down, south, opening, slope, island.02, exiting.the.mine
      smove foliage, crawl, path, track, island.02, exiting.the.mine
      move ne, tunnel, passage, corridor, in, mine, mine.3
   fin
   ifany mine, tunnel, passage, corridor, crawl, opening
      flag context, arg2.here
   fin
   ifany foliage, mountain, slope, path, track
      flag context, arg2.here
   fin
   lda throw.here, island.02
   lda throw.text, chuck.down.slope
#
#=====================================================================
#
at island.01
   call plants.stuff, 4
   ifkey look
      respond slope, you.can.climb, 2
      respond mountain, towering.mountain, 1
      respond water, horizon, sea.horizon
      respond beach, beach.from.above, 1
      respond outcrop, no.more.to.say, outcrop
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move w, down, island.w
      move se, island.02
      move e, up, slope, mountain, island.03
      respond beach, its.out.of.reach, 0
      respond outcrop you.are.there
   fin
   ifany beach, outcrop, mountain, slope
      flag context, arg2.here
   fin
#
#=====================================================================
#
at island.02
   call plants.stuff, 4
   ifkey look
      ifany something, crevice, rock, shoes
         or
      ifeq status, 1
         ifeq island.02, shoes.noted
            or
         ifeq status, 1
            or
         ifkey crevice
            and
            not
         ifflag shoes, seen
            flag ridge, hintable
            set island.02, shoes.found
            apport shoes, here
            flag shoes, seen
            quip behold.mud.shoes
         fin
         ifkey shoes
            or
         ifeq status, 1
         else
            ifkey something
               ifeq island.02, shoes.noted
                  and
                  not
               ifflag shoes, seen
                  fakecom something, shoes
                  proceed
               fin
               quip pardon?
            fin
            ifkey rock
            else
               quip nothing.special, arg2
            fin
         fin
      fin
      respond mountain, towering.mountain, 1
      respond slope, dangerous.slope
      respond trees, bushes, fold, mountain.fold
      respond rocks, unstable.rocks
      proceed
   fin   
   ifkey climb
      respond tree, no.go.fold
      ifany up, down, mountain
         set status, 1
      fin
   fin
   ifkey go
      or
   ifeq status, 1
      respond climb, mountain, slope, up, dangerous.slope
      ifany nw, down, back
         ifeq island.02, shoes.hidden
            set island.02, shoes.noted
            quip shoes.in.crevice
         fin
         move island.01
      fin
   fin
   ifany mountain, slope, fold, trees, bushes
      flag context, arg2.here
   fin
#
#=====================================================================
#
at island.03
   call plants.stuff, 4
   fakearg tree, pine
   respond pine, ignore.them, pine
   ifkey look
      respond beach, beach.from.above, 1
      respond slope, you.can.climb, 2
      respond mountain, towering.mountain, 1
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move w, down, slope, island.01
      move ne, up, mountain, island.09
      move s, island.04
      respond beach, its.out.of.reach, 0
   fin
   ifany beach, slope, mountain
      flag context, arg2.here
   fin
#
#=====================================================================
#
at island.04
   call plants.stuff, 4
   ifkey look
      respond beach, beach.from.above, 1
      respond horizon, sea.horizon
      respond swamp, caldera, down, volcano, drop, dangerous.bog
      respond slope, you.can.climb, 1
      respond mountain, towering.mountain, 1
      respond stream, waterfall, too.far.to.see, arg2
      proceed
   fin
   ifkey jump
      ifany down, swamp, caldera
         or
      ifeq status, 1
         goto ylem
         say jumped.into.swamp
         call coroner
      fin
   fin
   ifkey go
      or
   ifeq status, 1
      move nw, up, slope, climb, mountain, island.03
      move se, down, island.s
      respond swamp, caldera, cant.get.to.bog
      respond beach, its.out.of.reach, 0
      respond waterfall, stream, not.from.here
   fin
   ifany beach, sea, horizon, swamp, caldera, slope, mountain
      flag context, arg2.here
   fin
   ifany stream, waterfall, volcano
      flag context, arg2.here
   fin
   lda throw.here, ylem
   lda throw.text, throw.into.swamp
#
#=====================================================================
#
at island.05
   fakecom tree, pine
   call plants.stuff, 4
   fakecom gap, ravine
   ifeq pine, fallen
      set island.05, 1
   fin
   ifkey look
      ifkey trail
         ifeq pine fallen
            quip bendy.trail, 1
         else
            quip bendy.trail, 0
         fin
      fin
      respond mountain, towering.mountain, 1
      respond ledge, point, no.more.it, ledge
      respond ravine, down, steep.ravine
      respond bridge, pine.bridge, pine
      respond slope, dangerous.slope
      proceed
   fin
   ifkey climb
      and
   ifany down, ravine
      quip steep.ravine
   fin      
   ifeq pine, fallen
      fakecom bridge, pine
   fin
   ifany south, cross
      and
   ifeq pine, standing
      or
   ifkey jump
      quip no.jump.gorge
   fin
   ifkey climb
      ifeq status, 1
         or
      ifany up, mountain, slope
         quip no.avoid.pine
      fin
      ifeq status, 1
         or
      ifkey pine
         and
      ifne pine, fallen
         quip pine.climbed
      fin
   fin
   ifkey cross
      and
   ifkey ravine
      set status, 1
   fin
   ifkey pine
      ifany cross, climb
         set status, 1
      fin
      ifkey water
         quip no.water.pine
      fin
      ifkey enter
         ifeq pine, fallen
            set ravine.exit, 1
            smove island.06, pine.is.bridge
         else
         flag context, arg2.here
         proceed
         fin
      fin
   fin
   ifkey go
      or
   ifeq status, 1
      move e, trail, island.08
      ifany south, cross, climb, 
         set ravine.exit, 1
         smove island.06, pine.is.bridge
      fin
   fin
   ifany slope, mountain, ravine, trail
      flag context, arg2.here
   fin
   lda throw.here, ylem
   lda throw.text, throw.into.ravine
#
#=====================================================================
#
at island.06
   fakecom tree, pine
   call plants.stuff, 4
   fakecom gap, ravine
   ifkey look
      respond soil, pine.soil
      respond ravine, down, steep.ravine
      respond bridge, pine.bridge, pine
      respond mountain, towering.mountain, 1
      respond trail, bendy.trail, 2
      proceed
   fin
   respond soil, no.get.soil, pine
   ifkey climb
      and
   ifany down, ravine
      quip steep.ravine
   fin      
   respond jump, no.jump.gorge
   ifkey bridge
      fakecom bridge, pine
   fin
   ifkey cross
      and
   ifany ravine, pine
      set status, 1
   fin
   ifkey pine
      ifkey climb
         set status, 1
      fin
      ifkey enter
         ifeq pine, fallen
            set ravine.exit, 0
            smove island.05, pine.is.bridge
         else
            flag context, arg2.here
            proceed
         fin
      fin
      ifkey water
         quip no.water.pine
      fin
   fin
   ifkey go
      or
   ifeq status, 1
      ifany n, climb, cross
         set ravine.exit, 0
         smove island.05, pine.is.bridge
      fin
      move e, trail, temple, by.temple
   fin
   ifany ravine, mountain, bridge, trail
      flag context, arg2.here
   fin
   lda throw.here, ylem
   lda throw.text, throw.into.ravine
#
#=====================================================================
#
at island.07
   call plants.stuff, 2
   ifkey look
      respond mountain, towering.mountain, 1
      respond slope, you.can.climb, 1
      respond ground, soil, reddish.soil
      respond vegetation, not.much.of.it, vegetation
      respond sea, sea.info
      respond cliff, too.far.plural, cliff
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      respond sea, beach, cliff, no.way.there
      move nw, down, island.n
      move se, up, island.08
   fin
   ifany mountain, slope, soil, vegetation, sea, cliff, soil
      flag context, arg2.here
   fin
#
#=====================================================================
#
at island.08
   call plants.stuff, 2
   fakearg tree, fir
   ifkey look
      respond trail, animal.trail, 1
      respond mountain, towering.mountain, 1
      respond slope, you.can.climb, 1
      respond sea, sea.info
      respond vegetation, not.much.of.it, vegetation
      respond ravine, cant.see.much, ravine
      proceed
   fin
   ifkey fir
      respond climb, no.climb.fir, 1
      quip no.handy.them, fir
   fin
   ifkey go
      or
   ifeq status, 1
      ifkey back
         and
      ifis there, viewpoint.2
         quip no.jump.back
      fin
      ifany s, up, ravine
         set ravine.exit, 0
         move island.05
      fin
      move n, down, island.07
      move nw, island.09
      smove e, by.stream.1, scramble.down
      ifkey trail
         set ravine.exit, 0
         call follow.it, island.09, nw, island.05, s
      fin
   fin
   ifkey listen
      ifkey stream
         or
      ifeq status, 1
         quip sounds.of.stream
      fin
   fin
   ifany trail, mountain, ravine, slope, sea, vegetation
      flag context, arg2.here
   fin
   lda throw.here, by.stream.1
   lda throw.text, throw.to.stream
#
#=====================================================================
#
at island.09
   ifhere anteater
      add anteater, 1
   fin
   call plants.stuff, 4
   fakecom tree, fir
   ifkey look
      respond trail, animal.trail, 0
      respond mountain, towering.mountain, 1
      respond fir, prickly.conifers, arg2
      respond undergrowth, generic.undergrowth
      respond slope, firs.on.slopes
      proceed
   fin
   ifany fir
      respond climb, no.climb.fir, 0
      quip ignore.them, fir
   fin
   ifkey go
      or
   ifeq status, 1
      respond up, down, n, ne, se, s, w, nw, slope, firs.on.slopes
      ifany sw, down, e, trail, back
         ifhere anteater
            set anteater, 3
            say anteater
            apport anteater, ylem
         fin
         move sw, down, island.03
         move e, island.08
         ifkey trail
            call follow.it, island.03, sw, island.08, east
         fin
      fin
   fin
   ifany trail, mountain, fir, undergrowth
      flag context, arg2.here
   fin
#
#=====================================================================
#
at by.temple
   call plants.stuff, 4
   call default.read, inscription
   ifany inscription, words, note, notice, message
      ifany read, look
         set what.ring, 2
         flag quips, oryan.quip
         quip oryans.daughter
      fin
      ifeq status, 1
         flag status, pls.clarify
         quip do.what?, arg1
      fin
      quip leave.it.alone, inscription
   fin
   ifkey look
      respond gorge, stream, down, stream.in.gorge
      respond temple, temple.is.folly
      respond in, west, doorway, cant.see.in
      respond beach, beach.from.above, 1
      respond slope, dangerous.slope
      respond marble, veined.marble, 1
      respond roof, cupola.roof
      respond wall, temple.walls
      respond edge, swamp, caldera, just.the.edge
      respond cliff, distant.cliffs
      respond view, vista, very.romantic
      proceed
   fin
   ifkey climb
      respond slope, up, dangerous.slope
      respond temple, wall, roof, no.climb.temple
   fin
   lda throw.here, ylem
   lda throw.text, throw.from.temple
   ifkey go
      or
   ifeq status, 1
      move in, w, temple, temple
      ifkey north,
         set ravine.exit, 1
         move island.06
      fin
      respond beach, its.out.of.reach, 0
      respond caldera, swamp, cant.get.to.bog
   fin
   ifany inscription, words, note, notice, message
      or
   ifany temple, vista, doorway, beach, caldera, swamp, slope
      flag context, arg2.here
   fin
#
#=====================================================================
#
at temple
   local state
   local destination
   local temp.val
#
   ifkey look
      respond ceiling, up, its.a.ceiling, c.temple
   fin
   iflt temple, vault.magicked
      and
   ifhave ring
      add temple, 1
   fin
   ifany out, east
      and
   iflt temple, vault.open
      and
   ifnear ring
      call temple.magic, 0
      quit
   fin
   ifeq temple, vault.open
      respond out, east, better.follow.them
      ifkey look
         respond hole, in.temple, 3
         respond down, in, steps, its.marble.steps
      fin
      ifany down, in, steps, follow, hole
         ifkey go
            or
         ifeq status, 1
            apport ring, temple
            set temple, vault.locked
            apport thurible, below.ridge
            ifhave lamp
               apport lamp, island
            fin
            itobj obj.ptr
               ifhave obj.ptr
                  set temp.val, 1
                  ifflag obj.ptr, wearable
                     eval state, obj.ptr
                     ifeq state, worn
                        set temp.val, 0
                     fin
                  fin
                  ifeq temp.val, 1
                     random destination, 5
                     ifeq destination, 4
                        apport obj.ptr, island.se
                     otherwise
                     ifeq destination, 3
                        apport obj.ptr, by.stream.1
                     otherwise
                     ifeq destination, 2
                        apport obj.ptr, island
                     otherwise
                     ifeq destination, 1
                        apport obj.ptr, by.temple
                     else
                        apport obj.ptr, temple
                     fin
                     ifis obj.ptr, bottle
                        set bottle, emptied
                     fin
                  fin
               fin
            fin
            goto island
            unflag status, moved
            say get.lost
            call here.you.can.see
            quit
         fin
         quip hah!
      fin
   fin
   ifkey look
      ifkey temple
         set status, 1
      fin
      respond columns, in.temple, 0
      respond roof, ceiling , in.temple, 1
      respond window, in.temple, 2
      respond floor, in.temple, 4
      respond walls, in.temple, 5
      respond out, doorway, too.bright.outside
      respond marble, veined.marble, 0
      respond periphery, the.periphery
      proceed
   fin
   ifany walls, floor, columns, marble
      respond push, no.push, arg2
      ifkey marble
         respond polish, nothing
      fin
      respond polish, smooth.marble, arg2
   fin
   ifkey go
      or
   ifeq status, 1
      move out, back, east, by.temple
      ifkey go, temple
         quip already.inside, temple
      fin
      ifkey in
         ifkey temple
            or
         ifeq status, 1
            quip already.inside, temple
         fin
      fin
   fin
   ifeq temple, vault.open
      and
   ifkey steps
      flag context, arg2.here
      proceed
   fin
   ifany columns, roof, ceiling, wall, window, floor, doorway, marble
      flag context, arg2.here
   fin
   ifany periphery
      flag context, arg2.here
   fin
#
#=====================================================================
#
at by.stream.1
   local temp.val
#
   ifkey drink
      call drink
   fin
   call plants.stuff, 0
   ifkey look
      respond stones, stepping.stones
      respond vegetation, dense.tangle
      respond rock, cliff, steep.cliff, 0
      respond slope, east, you.cant.climb, 1
      respond path, there.isnt.one
      respond stream, water, bog.stream
      respond gorge, stream.gorge
      respond sea, cant.see.much, sea
      respond banks, stream.banks.1
      proceed
   fin
   ifkey enter, stream
      quip too.little.water
   fin
   ifkey climb
      and
   ifany up, west, rock, cliff
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move north, down, downstream, island.ne
      move up, south, upstream, by.stream.2
      ifany stream, stones
         call follow.it, island.ne, north, by.stream.2, south
      fin
      ifany up, climb, west
         set temp.val, strength
         add temp.val, 2
         ifgt temp.val, 9
            set temp.val, 9
         fin
         multiply temp.val, 10
         chance temp.val
            smove island.08, scramble.up
         fin
         quip no.scramble.up
      fin
      respond path, there.isnt.one
   fin
   ifkey cross
      call arg1
   fin
   ifany stream, vegetation, stones, rock, cliff, slope
      flag context, arg2.here
   fin
#
#=====================================================================
#
at by.stream.2
   ifkey drink
      call drink
   fin
   ifkey look
      respond stream, water, bog.stream
      respond gorge, stream.gorge
      respond cliff, steep.cliff, 1
      respond banks, stream.banks.2
      respond bend, stream.bend
      proceed
   fin
   ifkey enter, stream
      quip too.little.water
   fin
   ifkey go
      or
   ifeq status, 1
      ifany stream, stones
         call follow.it, by.stream.1, ne, bog.edge, nw
      fin
      move ne, down, downstream, by.stream.1
      move nw, up, gorge, upstream, bog.edge
   fin
   ifany cross
      call arg1
   fin
   ifany stream, gorge, banks, cliff, bend
      flag context, arg2.here
   fin
#
#=====================================================================
#
at bog.edge
   call plants.stuff, 3
   ifkey look
      respond stones, stepping.stones
      respond gorge, se, stream.gorge
      respond stream, water, bog.stream
      respond cliff, steep.cliff, 2
      respond west, sw, s, swamp, dangerous.bog
      respond chunks, rocks, fallen.chunks
      respond up, crack, useful.crack
      ifkey edge
         set status, 1
      fin
      proceed   
   fin
   ifany climb, up
      and
   ifany up, crack, cliff
      set status, 1
   fin
   ifkey enter, stream
      quip too.little.water
   fin
   ifkey go
      or
   ifeq status, 1
      move stream, down, downstream, stones, gorge, se, by.stream.2
      move up, climb, viewpoint
      ifany west, upstream, sw, nw, swamp
         ifhave shoes
            ifflag viewpoint, special
               quip not.from.here, 2
            fin
            quip not.from.here, 1
         fin
         quip not.from.here, 0
      fin
      respond edge, you.are.there
   fin
   ifany stones, boulders, chunks, edge, rock, cliff
      flag context, arg2.here
   fin
   ifany swamp, stream, gorge
      flag context, arg2.here
   fin
#
#=====================================================================
#
at viewpoint
   ifkey look
      respond ridge, low.ridge
      respond shelf, shelf.of.rock
      ifany swamp, caldera, down
         flag viewpoint, special    # He now knows the route
         set no.see.bog, 0          # Switch off the in-flight comment
         quip swamp.route
      fin
      proceed
   fin
   ifkey climb
      and
   ifany up, down, ridge, over
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move up, east, ridge, over, viewpoint.2
      move down, climb, bog.edge
      respond swamp, caldera, cant.get.to.bog
      ifkey jump
         goto ylem
         say big.splash
         call coroner
      fin
   fin
   chance 50
      lda throw.here, bog.edge
   else
      lda throw.here, ylem
   fin
   lda throw.text, throw.into.swamp
   ifany swamp, caldera, ridge, shelf, rock
      flag context, arg2.here
   fin
#  
#=====================================================================
#
at viewpoint.2
   ifkey look
      respond beach, beach.from.above, 1
      respond sea, water, horizon, sea.horizon
      respond mountain, towering.mountain, 1
      respond cliffs, distant.cliffs
      respond down, edge, track, trail, n/s.track
      respond ridge, stony.ridge
      respond vista, looks.magnificent, arg2
      respond slope, slight.tilt
      respond platform, rock.platform
      proceed
   fin
   ifkey climb
      respond up, cliffs, mountain, upper.reaches
      ifeq status, 1
         lda arg2, ridge
      otherwise
      ifany down, track, trail, edge, ridge
         set status, 1
      fin
   fin
   ifkey jump, down
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      move west, ridge, viewpoint
      smove jump, island.08, bumpy.landing
      move down, east, edge, trail, track, island.08
      respond mountain, upper.reaches
      respond beach, its.out.of.reach, 0
      respond platform, you.are.there
   fin
   lda throw.here, island.08
   lda throw.text, chuck.from.view
   ifeq status 1
      respond sea, water, horizon, sea.horizon
      respond vista, view, looks.magnificent, arg2
   fin
   ifany beach, sea, ridge, track, trail, horizon, mountain, cliffs
      flag context, arg2.here
   fin
   ifany edge, vista, slope, platform
      flag context, arg2.here
   fin
#
#=====================================================================
#
at inside.well
   ifkey look
      respond down, well, well.no.info, 1
      respond up, sky.from.well
      proceed
   fin
   respond swing, well.swing
   ifany drop, jump
      and
   ifany down, in, off
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      smove up, back, out, clearing, climbed.out
      ifany jump, drop, let, fall
         call done.it!, 0
      fin
   fin
#
#=====================================================================
#
at wrong.venue
   flag venue, been.here
   iflt wrong.venue, 3
      add wrong.venue, 1
   fin
   ifkey look
      respond wall, nothing.special, wall
      respond water, shallow.water
      respond torch, no.see.torch
      respond gap, stream, watery.gap
      respond up, ceiling, its.a.ceiling, c.repository
      proceed
   fin
   ifany say, enter
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      smove xyzzy, plugh, house, zapping.out
      respond n, ne, e, se, s, sw, w, nw, wall, no.go
      respond back, upstream, gap, stream, no.enter.gap
      respond swim, water, no.swim, 0
      respond downstream, no.downstream
   fin
   respond torch, torches.too.high
   ifany stream, gap, ceiling, wall
      flag context, arg2.here
   fin
#
#=====================================================================
#
at ne.repository
   call default.read, sign
   call fake.note, nothing.more.to.read, sign
   ifkey knife
      respond get, look, no.steal.knives
   fin
   ifkey dwarf
     ifkey wake
        say dwarf.wakes
        call coroner
     fin
     quip no.wake.dwarves
   fin
   ifkey look
      respond torch, massive.torches
      respond ceiling, up, its.a.ceiling, c.repository
      ifkey repository
         set status, 1
      fin
      proceed
   fin
   ifkey get
      respond plant,  beanstalk roots.too.deep, arg2
      respond torch, torches.too.high
   fin
   ifkey go
      or
   ifeq status, 1
      move sw, sw.repository
      respond repository, you.are.there
   fin
   ifany repository, torch, dwarf
      flag context, arg2.here
   fin
#
#=====================================================================
#
at blasted.repository
   ifkey look
      respond floor, heaps, rubble, blasted.rubble
      respond hole, opening, dark.exit, hole
      respond wall, blasted.wall
      ifkey repository
         set status, 1
      fin
      proceed
   fin
   ifkey go
      or
   ifeq status, 1
      move sw, sw.repository
      move ne, hole, opening, dark.hole
      respond repository, you.are.there
   fin
   ifany repository, heaps, floor, rubble, hole, opening, wall
      flag context, arg2.here
   fin
#
#=====================================================================
#
at sw.repository
   ifkey look
      ifkey dynamite
         and
         not
      ifflag dynamite, stealable
         fakearg dynamite, rods
      fin
      respond ceiling, up, its.a.ceiling, c.repository
      respond pit, snake.pit
      respond torch, massive.torches
      ifkey repository
         set status, 1
      fin
      proceed
   fin
   ifkey get, torch
      quip torches.too.high
   fin
   ifkey pit
      and
   ifany climb, down
      set status, 1
   fin
   ifkey go
      or
   ifeq status, 1
      ifkey ne
         ifflag dark.hole, been.here
            move blasted.repository
         fin
         move ne.repository
      fin
      respond repository, you.are.there
      respond pit, no.go.snake.pit
   fin
   ifany repository, pit, torch
      flag context, arg2.here
   fin
#
#=====================================================================
#
at dark.hole
   ifkey go
      or
   ifeq status, 1
      move sw, blasted.repository
      move ne, up, south, west, north, dark.hole.2
      ifany e, se, d, nw
         call unicorn.stuff
      fin
   fin
#
#=====================================================================
#
at dark.hole.2
   ifkey go
      or
   ifeq status, 1
      ifany n, ne, e, se, s, sw, w, nw, up, down
         chance 25
            move dark.hole
         fin
         chance 40
            move dark.hole.2
         fin
         call unicorn.stuff
      fin
   fin
#
#=====================================================================
#
at imaze.01
   respond insects, no.insects
   ifkey get, bat
      quip not.a.chance
   fin
   ifkey look
      call abyss.view, 2
      proceed
   fin
   ifany go, jump
      or
   ifeq status, 1
      move nw, imaze.02
      move ne, imaze.03
      move se, above.abyss.6
   fin
   call imaze.stuff, 2
#
#=====================================================================
#
at imaze.02
   respond insects, no.insects
   ifkey get, bat
      quip not.a.chance
   fin
   ifkey look
      call abyss.view, 2
      proceed
   fin
   ifany go, jump
      or
   ifeq status, 1
      move se, imaze.01
   fin
   call imaze.stuff, 2
#
#=====================================================================
#
at imaze.03
   ifkey look
      call abyss.view, 1
      proceed
   fin
   ifany go, jump
      or
   ifeq status, 1
      move sw, imaze.01
      move ne, imaze.04
      move nw, imaze.06
   fin
   call imaze.stuff, 1
#
#=====================================================================
#
at imaze.04
   ifkey look
      call abyss.view, 1
      proceed
   fin
   ifany go, jump
      or
   ifeq status, 1
      move ne, imaze.05
      move sw, imaze.03
   fin
   call imaze.stuff, 1
#
#=====================================================================
#
at imaze.05
   ifkey look
      call abyss.view, 1
      proceed
   fin
   ifany go, jump
      or
   ifeq status, 1
      move sw, imaze.04
   fin
   call imaze.stuff, 1
#
#=====================================================================
#
at imaze.06
   respond insects, no.insects
   ifkey get, bat
      quip not.a.chance
   fin
   ifkey look
      call abyss.view, 2
      proceed
   fin
   ifany go, jump
      or
   ifeq status, 1
      move se, imaze.03
      move nw, imaze.07
      move west, imaze.08
   fin
   call imaze.stuff, 2
#
#=====================================================================
#
at imaze.07
   respond insects, no.insects
   ifkey get, bat
      quip not.a.chance
   fin
   ifkey look
      call abyss.view, 2
      proceed
   fin
   ifany go, jump
      or
   ifeq status, 1
      move se, imaze.06
      move east, imaze.05
   fin
   call imaze.stuff, 2
#
#=====================================================================
#
at imaze.08
   respond insects, no.insects
   ifkey get, bat
      quip not.a.chance
   fin
   ifkey look
      call abyss.view, 2
      proceed
   fin
   ifany go, jump
      or
   ifeq status, 1
      ifflag imaze.book, been.here
      else
         move south, imaze.02
      fin
      move sw, imaze.11
      move west, imaze.09
      move north, imaze.07
   fin
   call imaze.stuff, 2
#
#=====================================================================
#
at imaze.09
   ifkey look
      call abyss.view, 1
      proceed
   fin
   ifany go, jump
      or
   ifeq status, 1
      move east, imaze.08
      move west, imaze.10
   fin
   call imaze.stuff, 1
#
#=====================================================================
#
at imaze.10
   ifkey look
      call abyss.view, 1
      proceed
   fin
   ifany go, jump
      or
   ifeq status, 1
      move east, imaze.09
   fin
   call imaze.stuff, 1
#
#=====================================================================
#
at imaze.11
   ifkey look
      call abyss.view, 1
      proceed
   fin
   ifany go, jump
      or
   ifeq status, 1
      move ne, imaze.08
      move sw, imaze.12
      move west, imaze.13
   fin
   call imaze.stuff, 1
#
#=====================================================================
#
at imaze.12
   ifkey look
      call abyss.view, 1
      proceed
   fin
   ifany go, jump
      or
   ifeq status, 1
      move nw, imaze.11
      ifflag imaze.book, been.here
      else
         move east, imaze.01
      fin
   fin
   call imaze.stuff, 1
#
#=====================================================================
#
at imaze.13
   ifkey look
      call abyss.view, 1
      proceed
   fin
   ifany go, jump
      or
   ifeq status, 1
      move east, imaze.11
      move west, imaze.14
      move nw, imaze.15
   fin
   call imaze.stuff, 1
#
#=====================================================================
#
at imaze.14
   ifkey look
      call abyss.view, 0
      proceed
   fin
   ifany go, jump
      or
   ifeq status, 1
      move east, imaze.13
      move sw, imaze.12
   fin
   call imaze.stuff, 0
#
#=====================================================================
#
at imaze.15
   ifkey look
      call abyss.view, 0
      proceed
   fin
   ifany go, jump
      or
   ifeq status, 1
      move ne, imaze.16
      move se, imaze.13
      move sw, imaze.wall.1
      move nw, imaze.wall.2
   fin
   call imaze.stuff, 0
#
#=====================================================================
#
at imaze.16
   ifkey look
      call abyss.view, 1
      proceed
   fin
   ifany go, jump
      or
   ifeq status, 1
      ifis there, imaze.15
         move east, imaze.07
      fin
      move sw, imaze.15
      move nw, imaze.17
   fin
   call imaze.stuff, 1
#
#=====================================================================
#
at imaze.17
   ifkey look
      call abyss.view, 0
      proceed
   fin
   ifany go, jump
      or
   ifeq status, 1
      move se, imaze.16
      move west, imaze.book
      ifis there, imaze.16
         move east, imaze.05
      fin
   fin
   call imaze.stuff, 0
#
#=====================================================================
#
at imaze.wall.1
   ifkey look
      respond wall, infinite.wall
      call abyss.view, 0
      proceed
   fin
   ifany go, jump
      or
   ifeq status, 1
      move ne, imaze.15
   fin
   call imaze.stuff, 0
#
#=====================================================================
#
at imaze.wall.2
   ifkey look
      respond wall, infinite.wall
      call abyss.view, 0
      proceed
   fin
   ifany go, jump
      or
   ifeq status, 1
      move se, imaze.15
   fin
   call imaze.stuff, 0
#
#=====================================================================
#
at imaze.book
   ifgt codex, 1
      set codex, 1
      ifany n, no
         set codex.reward, excessive
         quip you.are.a.cheater
      fin
      ifkey yes
         quip deal!
      fin
   fin
   ifkey open
      ifkey book
         or
      ifeq status, 1
         fakearg open, read
      fin
   fin
   ifkey book
      fakearg look, read
   fin
   call default.read, book
   ifkey book
      or
   ifeq status, 1
      and
   ifkey read
      ifeq codex.reward, none
         set codex.reward, available
      fin
      quip infinite.wisdom
   fin
   ifkey book
      or
   ifeq status, 1
      and
   ifkey get
      ifeq codex.reward, excessive
         quip still.no.get.book
      fin
      say no.get.book
      ifeq codex.reward, available
         set codex.reward, awarded
      fin
      ifeq codex.reward, awarded
         set codex, 2
      fin
      quit
   fin
   ifkey book
      ifany push, pull
         quip no.move.book, arg1
      fin
      flag context, arg2.here
      proceed
   fin
   ifkey look
      respond wall, infinite.wall
      call abyss.view, 0
      proceed
   fin
   ifany go, jump
      or
   ifeq status, 1
      move east, imaze.17
   fin
   call imaze.stuff, 0
   ifkey words
      flag context, arg2.here
   fin
#
#=====================================================================
#
at hidey.hole
   ifany n, ne, e, se, s, sw, w, nw, up, down, out
      move swirling.mist
   fin
#
#=====================================================================
