Magic-number elimination.
[open-adventure.git] / adventure.yaml
index 535e05174f7f90e68e68c63e4255ddfe2955e3d0..4338eb33fb20742bfc0899357fe8ef8ee7d9d4b7 100644 (file)
 #                    becomes a #define, and is also a state label that
 #                    can be used in travel-rule 'not' clauses.
 #      descriptions: Messages describing the object in different states.
-#       changes:     State-change messages to be emitted whenever the object
+#                    Must correspond 1:1 with state labels if the latter exist.
+#      changes:      State-change messages to be emitted whenever the object
 #                    *changes* to the (0-origin) state that is the index of the
-#                    message in this array.
-#       words:       The vocabulary word(s) referring to this object.
-#       treasure:    A boolean "treasure" used for point-scoring and pirate
+#                    message in this array. Must correspond 1:1 with state
+#                    labels if the latter exist.
+#      words:        The vocabulary word(s) referring to this object.
+#      treasure:     A boolean "treasure" used for point-scoring and pirate
 #                    snatches, defaulting to false.
-#       immovable:   An object may also be flagged
+#      immovable:    An object may also be flagged
 #                    immovable, meaning it cannot be carried.
-#       locations:   An object may have one or two start locations (the gate
+#      locations:    An object may have one or two start locations (the gate
 #                    is an example of a two-location object; it can be accessed
 #                    from above or below).
 #
@@ -492,7 +494,7 @@ locations: !!omap
     travel: [
       {verbs: [ROAD, WEST, UPWAR], action: [goto, LOC_HILL]},
       {verbs: [ENTER, BUILD, INWAR, EAST], action: [goto, LOC_BUILDING]},
-      {verbs: [DOWNS, GULLY, STREA, SOUTH, D], action: [goto, LOC_VALLEY]},
+      {verbs: [DOWNS, GULLY, STREA, SOUTH, DOWN], action: [goto, LOC_VALLEY]},
       {verbs: [FORES, NORTH], action: [goto, LOC_FOREST1]},
       {verbs: [DEPRE], action: [goto, LOC_GRATE]},
     ]
@@ -534,7 +536,7 @@ locations: !!omap
       {verbs: [UPSTR, BUILD, NORTH], action: [goto, LOC_START]},
       {verbs: [EAST, FORES], action: [goto, LOC_FOREST6]},
       {verbs: [WEST], action: [goto, LOC_FOREST12]},
-      {verbs: [DOWNS, SOUTH, D], action: [goto, LOC_SLIT]},
+      {verbs: [DOWNS, SOUTH, DOWN], action: [goto, LOC_SLIT]},
       {verbs: [DEPRE], action: [goto, LOC_GRATE]},
       {verbs: [STREA], action: [speak, UPSTREAM_DOWNSTREAM]},
     ]
@@ -594,7 +596,7 @@ locations: !!omap
       {verbs: [WEST], action: [goto, LOC_FOREST9]},
       {verbs: [BUILD], action: [goto, LOC_START]},
       {verbs: [UPSTR, GULLY, NORTH], action: [goto, LOC_SLIT]},
-      {verbs: [ENTER, INWAR, D],
+      {verbs: [ENTER, INWAR, DOWN],
                              cond: [not, GRATE, GRATE_CLOSED],
                              action: [goto, LOC_BELOWGRATE]},
       {verbs: [ENTER], action: [speak, GRATE_NOWAY]},
@@ -1067,7 +1069,7 @@ locations: !!omap
       {verbs: [NORTH], action: [goto, LOC_ALIKE2]},
       {verbs: [EAST], action: [goto, LOC_DEADEND1]},
       {verbs: [SOUTH], action: [goto, LOC_DEADEND2]},
-      {verbs: [UPWAR, D], action: [goto, LOC_ALIKE14]},
+      {verbs: [UPWAR, DOWN], action: [goto, LOC_ALIKE14]},
     ]
 - LOC_DEADEND1:
     description:
@@ -1536,7 +1538,7 @@ locations: !!omap
     conditions: {DEEP: true, NOBACK: true}
     hints: [*maze]
     travel: [
-      {verbs: [UPWAR, D], action: [goto, LOC_ALIKE4]},
+      {verbs: [UPWAR, DOWN], action: [goto, LOC_ALIKE4]},
     ]
 - LOC_NARROW:
     description:
@@ -1785,7 +1787,7 @@ locations: !!omap
     conditions: {DEEP: true, NOBACK: true}
     hints: [*witt]
     travel: [
-      {verbs: [EAST, NORTH, SOUTH, NE, SE, SW, NW, UPWAR, D],
+      {verbs: [EAST, NORTH, SOUTH, NE, SE, SW, NW, UPWAR, DOWN],
               cond: [pct, 95], action: [speak, FUTILE_CRAWL]},
       {verbs: [EAST], action: [goto, LOC_ANTEROOM]},
       {verbs: [WEST], action: [speak, WAY_BLOCKED]},
@@ -2017,7 +2019,7 @@ locations: !!omap
     travel: [
       {verbs: [WEST], action: [goto, LOC_CORRIDOR]},
       {verbs: [NE, LEFT], action: [goto, LOC_WARMWALLS]},
-      {verbs: [SE, RIGHT, D], action: [goto, LOC_LIMESTONE]},
+      {verbs: [SE, RIGHT, DOWN], action: [goto, LOC_LIMESTONE]},
       {verbs: [VIEW], action: [goto, LOC_BREATHTAKING]},
       {verbs: [BARRE], action: [goto, LOC_BARRENFRONT]},
     ]
@@ -2687,7 +2689,7 @@ locations: !!omap
       short: 'You''re at top of cliff.'
     conditions: {DEEP: true}
     travel: [
-      {verbs: [CLIMB, D], action: [goto, LOC_CLIFFACE]},
+      {verbs: [CLIMB, DOWN], action: [goto, LOC_CLIFFACE]},
       {verbs: [NE, CRAWL], action: [goto, LOC_REACHDEAD]},
     ]
 - LOC_REACHDEAD:
@@ -2843,7 +2845,6 @@ arbitrary_messages:  !!omap
 - STREAM_WATER: |-
     You have taken a drink from the stream.  The water tastes strongly of
     minerals, but is not unpleasant.  It is extremely cold.
-- BOTTLE_EMPTY: 'The bottle of water is now empty.'
 - RUB_NOGO: |-
     Rubbing the electric lamp is not particularly rewarding.  Anyway,
     nothing exciting happens.
@@ -2869,8 +2870,6 @@ arbitrary_messages:  !!omap
 - NO_CONTAINER: 'You have nothing in which to carry it.'
 - BOTTLE_FULL: 'Your bottle is already full.'
 - NO_LIQUID: 'There is nothing here with which to fill the bottle.'
-- BOTTLED_WATER: 'Your bottle is now full of water.'
-- BOTTLED_OIL: 'Your bottle is now full of oil.'
 - CANT_FILL: 'You can''t fill that.'
 - RIDICULOUS_ATTEMPT: 'Don''t be ridiculous!'
 - RUSTY_DOOR: 'The door is extremely rusty and refuses to open.'
@@ -2969,9 +2968,6 @@ arbitrary_messages:  !!omap
     weight of the bear, which was still following you around.  You
     scrabble desperately for support, but as the bridge collapses you
     stumble back and fall into the chasm.
-- TROLL_SCAMPERS: |-
-    The bear lumbers toward the troll, who lets out a startled shriek and
-    scurries away.  The bear soon gives up the pursuit and wanders back.
 - BEAR_HANDS: 'With what?  Your bare hands?  Against *HIS* bear hands??'
 - BEAR_CONFUSED: 'The bear is confused; he only wants to be your friend.'
 - ALREADY_DEAD: 'For crying out loud, the poor thing is already dead!'
@@ -3252,6 +3248,7 @@ objects: !!omap
     inventory: '*steps'
     locations: [LOC_PITTOP, LOC_MISTHALL]
     immovable: true
+    states: [STEPS_DOWN, STEPS_UP]
     descriptions:
     - 'Rough stone steps lead down the pit.'
     - 'Rough stone steps lead up the dome.'
@@ -3309,16 +3306,19 @@ objects: !!omap
     - '' # chased away
     sounds:
     - 'The snake is hissing venomously.'
+    - ''
 - FISSURE:
     words: ['fissu']
     inventory: '*fissure'
     locations: [LOC_EASTBANK, LOC_WESTBANK]
     immovable: true
-    states: [UNBRIDGED, BRIDGED, VANISHED]
+    states: [UNBRIDGED, BRIDGED]
     descriptions:
     - ''
-    - 'A crystal bridge now spans the fissure.'
+    - 'A crystal bridge spans the fissure.'
+    changes:
     - 'The crystal bridge has vanished!'
+    - 'A crystal bridge now spans the fissure.'
 - OBJ_13:
     words: ['table']
     inventory: '*stone tablet'
@@ -3384,6 +3384,10 @@ objects: !!omap
     - 'There is a bottle of water here.'
     - 'There is an empty bottle here.'
     - 'There is a bottle of oil here.'
+    changes:
+    - 'Your bottle is now full of water.'
+    - 'The bottle of water is now empty.'
+    - 'Your bottle is now full of oil.'
 - WATER:
     words: ['water', 'h2o']
     inventory: 'Water in the bottle'
@@ -3410,9 +3414,10 @@ objects: !!omap
     - 'There is a tiny little plant in the pit, murmuring "water, water, ..."'
     - 'There is a 12-foot-tall beanstalk stretching up out of the pit,\nbellowing "WATER!! WATER!!"'
     - 'There is a gigantic beanstalk stretching all the way up to the hole.'
+    changes:
+    - 'You''ve over-watered the plant!  It''s shriveling up!  And now . . .'
     - 'The plant spurts into furious growth for a few seconds.'
     - 'The plant grows explosively, almost filling the bottom of the pit.'
-    - 'You''ve over-watered the plant!  It''s shriveling up!  And now . . .'
     sounds:
     - 'The plant continues to ask plaintively for water.'
     - 'The plant continues to demand water.'
@@ -3502,9 +3507,16 @@ objects: !!omap
     - 'A burly troll stands by the bridge and insists you throw him a\ntreasure before you may cross.'
     - 'The troll steps out from beneath the bridge and blocks your way.'
     - '' # chased away
+    changes:
+    - ''
+    - ''
+    - |-
+        The bear lumbers toward the troll, who lets out a startled shriek and
+        scurries away.  The bear soon gives up the pursuit and wanders back.
     sounds:
     - 'The troll sounds quite adamant in his demand for a treasure.'
     - 'The troll sounds quite adamant in his demand for a treasure.'
+    - ''
 - TROLL2:
     words: ['troll']
     inventory: '*phony troll'
@@ -3617,11 +3629,13 @@ objects: !!omap
     inventory: '*reservoir'
     locations: [LOC_RESERVOIR, LOC_RESNORTH]
     immovable: true
-    states: [WATERS_UNPARTED, WATERS_PARTED, WATERS_CRASH]
+    states: [WATERS_UNPARTED, WATERS_PARTED]
     descriptions:
     - ''
     - 'The waters have parted to form a narrow path across the reservoir.'
+    changes:
     - 'The waters crash together again.'
+    - 'The waters have parted to form a narrow path across the reservoir.'
 - OBJ_46:
     words: ['appen', 'lepor']
     inventory: 'Leporine appendage'
@@ -3725,15 +3739,14 @@ objects: !!omap
     inventory: 'Ming vase'
     locations: LOC_ORIENTAL
     treasure: true
-    states: [VASE_WHOLE, VASE_RESTING, VASE_BROKEN, VASE_DROPS]
+    states: [VASE_WHOLE, VASE_DROPPED, VASE_BROKEN]
     descriptions:
     - 'There is a delicate, precious, ming vase here!'
-    - 'The vase is now resting, delicately, on a velvet pillow.'
     - 'The floor is littered with worthless shards of pottery.'
-    - 'The ming vase drops with a delicate crash.'
+    - 'The floor is littered with worthless shards of pottery.'
     changes:
-    - ''
-    - ''
+    - 'The vase is now resting, delicately, on a velvet pillow.'
+    - 'The ming vase drops with a delicate crash.'
     - 'You have taken the vase and hurled it delicately to the ground.'
 - EMERALD:
     words: ['emera']