+# This YAML file gets processed into a collection of data structures and
+# variable initializers describing Colossal Cave. It replaces an ad-hoc
+# text database shipped with Adventure versions up to 2.5. The format
+# change enabled a lot of use of symbolic names where there were previously
+# inscrutable numeric literals.
+#
+# We define a bunch of YAML structures:
+#
+# motions: Motion words, grouped into synonyms. The 'oldstyle'
+# attribute, if false, means that single-letter synonyms should be
+# accepted in oldstyle mode; it defaults to true.
+
+# actions: Action words, grouped into synonyms, and their corresponding
+# default messages. The 'oldstyle' attribute is as for motions.
+#
+# hints: Each item contains a hint number, a hint label (used to
+# generate the value macro for the hint) the number of turns he
+# must be at the right loc(s) before triggering the hint, the
+# points deducted for taking the hint, the message number (in
+# arbitrary_messages) of the question, and the message number of
+# the hint.
+#
+# locations: They have attributes as follows...
+# long: Long description, always shown on first encounter.
+# short: Short description. If none, use long description.
+# conditions: A dictionary of attributes
+# LIT Light
+# OILY If FLUID flag is on: true for oil, false for water
+# FLUID Liquid asset
+# NOARRR Pirate doesn't go here unless following player
+# NOBACK Cannot use "back" to move away
+# HCAVE Trying to get into cave
+# HBIRD Trying to catch bird
+# HSNAKE Trying to deal with snake
+# HMAZE Lost in maze
+# HDARK Pondering dark room
+# HWITT At Witt's End
+# HCLIFF Cliff with urn
+# HWOODS Lost in forest
+# HOGRE Trying to deal with ogre
+# HJADE Found all treasures except jade
+# hints: A list of YAML references to hints that may be available at
+# this location. (This is why locations has to follow hints.)
+# sound: Label for a location sound.
+# loud: If true, object sounds are drowned out at this location.
+# travel: A list of movement rules. They're applied in the order
+# they appear. For a rule to fire, (1) the movement command
+# must be a synonym for one of its verbs, and (2) the
+# condition, if present, must evaluate to true. In that case
+# the action fires. The action may be a goto (move to
+# a named location) a speak (utter a named message), or
+# a special (branch to special case in movement code).
+# The conditional may be one of the following:
+# [pct, N] Roll a die, n% chance of success
+# [carry, OBJ] Must be carrying named object
+# [with, OBJ] Must be carrying or in room with
+# [not, OBJ N] Property of named OBJ must not be N.
+# N may be numeric or a state label.
+# [nodwarves] Dwarves must skip this rule.
+# All attributes are optional except the long description and
+# travel. Order of locations is not significant.
+#
+# arbitrary_messages: These are arguments to rspeak(). Some spans of
+# these messages need to be kept adjacent and ordered (for now),
+# though there are no depenencies on actual numbers left. To see
+# which, grep for rspeak() calls containing expressions with
+# arithmetic. Eventually, these will be pulled out into more
+# appropriate data structures. Then ordering can be dropped.
+#
+# classes: Each item contains a point threshold and a message
+# describing a classification of player. Point thresholds must be
+# in ascending order. The scoring code selects the appropriate
+# message, where each message is considered to apply to players
+# whose scores are higher than the previous N but not higher than
+# this N. Note that these scores probably change with every
+# modification (and particularly expansion) of the program.
+#
+# turn_thresholds: Each item contains a number and a message
+# berating the player for taking so many turns. When the turn count
+# matches one of the thresholds, the corresponding message is shown.
+# Order doesn't matter; the logic simply tests every threshold on
+# the assumption that turn counts never decrease nor skip values.
+#
+# objects: Objects have attributes as follows...
+# inventory: A description for use in the inventory command.
+# states: A list of state labels for states from 0 up. Each
+# 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.
+# 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. 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, meaning it cannot be carried.
+# 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).
+#
+# obituaries: Death messages and reincarnation queries. Order is
+# significant, they're used in succession as the player racks up
+# deaths.
+#
+# Message strings may include certain special character sequences to
+# denote that the program must provide parameters to insert into a
+# message when the message is printed. These sequences are:
+# %d = an integer
+# %s = an ASCII string
+# %S = The letter 's' or nothing (if a previous %d value is exactly 1)
+# %V = substitute program version string
+
+motions: !!omap
+- MOT_0:
+ words: !!null
+- HERE:
+ words: !!null
+- MOT_2:
+ words: ['road', 'hill']
+- ENTER:
+ words: ['enter']
+- MOT_4:
+ words: ['upstr']
+- MOT_5:
+ words: ['downs']
+- MOT_6:
+ words: ['fores']
+- FORWARD:
+ words: ['forwa', 'conti', 'onwar']
+- BACK:
+ words: ['back', 'retur', 'retre']
+- MOT_9:
+ words: ['valle']
+- MOT_10:
+ words: ['stair']
+- OUTSIDE:
+ words: ['out', 'outsi', 'exit', 'leave']
+- MOT_12:
+ words: ['build', 'house']
+- MOT_13:
+ words: ['gully']
+- STREAM:
+ words: ['strea']
+- MOT_15:
+ words: ['fork']
+- MOT_16:
+ words: ['bed']
+- CRAWL:
+ words: ['crawl']
+- MOT_18:
+ words: ['cobbl']
+- INSIDE:
+ words: ['inwar', 'insid', 'in']
+- MOT_20:
+ words: ['surfa']
+- NUL:
+ words: ['null', 'nowhe']
+- MOT_22:
+ words: ['dark']
+- MOT_23:
+ words: ['passa', 'tunne']
+- MOT_24:
+ words: ['low']
+- MOT_25:
+ words: ['canyo']
+- MOT_26:
+ words: ['awkwa']
+- MOT_27:
+ words: ['giant']
+- MOT_28:
+ words: ['view']
+- UP:
+ words: ['upwar', 'up', 'u', 'above', 'ascen']
+- DOWN:
+ words: ['d', 'downw', 'down', 'desce']
+- MOT_31:
+ words: ['pit']
+- MOT_32:
+ words: ['outdo']
+- MOT_33:
+ words: ['crack']
+- MOT_34:
+ words: ['steps']
+- MOT_35:
+ words: ['dome']
+- LEFT:
+ words: ['left']
+- RIGHT:
+ words: ['right']
+- MOT_38:
+ words: ['hall']
+- MOT_39:
+ words: ['jump']
+- MOT_40:
+ words: ['barre']
+- MOT_41:
+ words: ['over']
+- MOT_42:
+ words: ['acros']
+- EAST:
+ words: ['east', 'e']
+- WEST:
+ words: ['west', 'w']
+- MOT_45:
+ words: ['north', 'n']
+- MOT_46:
+ words: ['south', 's']
+- NE:
+ words: ['ne']
+- SE:
+ words: ['se']
+- SW:
+ words: ['sw']
+- NW:
+ words: ['nw']
+- MOT_51:
+ words: ['debri']
+- MOT_52:
+ words: ['hole']
+- MOT_53:
+ words: ['wall']
+- MOT_54:
+ words: ['broke']
+- MOT_55:
+ words: ['y2']
+- MOT_56:
+ words: ['climb']
+- LOOK:
+ words: ['l', 'x', 'look', 'exami', 'touch', 'descr']
+ oldstyle: false
+- MOT_58:
+ words: ['floor']
+- MOT_59:
+ words: ['room']
+- MOT_60:
+ words: ['slit']
+- MOT_61:
+ words: ['slab', 'slabr']
+- XYZZY:
+ words: ['xyzzy']
+- DPRSSN:
+ words: ['depre']
+- ENTRNC:
+ words: ['entra']
+- PLUGH:
+ words: ['plugh']
+- MOT_66:
+ words: ['secre']
+- CAVE:
+ words: ['cave']
+- MOT_68:
+ words: !!null
+- MOT_69:
+ words: ['cross']
+- BEDQUILT:
+ words: ['bedqu']
+- PLOVER:
+ words: ['plove']
+- FORWARD2:
+ words: ['orien']
+- FORWARD3:
+ words: ['caver']
+- FORWARD4:
+ words: ['shell']
+- FORWARD5:
+ words: ['reser']
+- FORWARD6:
+ words: ['main', 'offic']
+
+actions: !!omap
+- ACT_0:
+ message: !!null
+ words: !!null
+- CARRY:
+ message: ALREADY_CARRYING
+ words: ['g', 'carry', 'take', 'keep', 'catch',
+ 'steal', 'captu', 'get', 'tote', 'snarf']
+ oldstyle: false
+- DROP:
+ message: ARENT_CARRYING
+ words: ['drop', 'relea', 'free', 'disca', 'dump']
+- SAY:
+ message: NO_MESSAGE
+ words: ['say', 'chant', 'sing', 'utter', 'mumbl']
+- UNLOCK:
+ message: NOT_LOCKABLE
+ words: ['unloc', 'open']
+- NOTHING:
+ message: NO_MESSAGE
+ words: ['z', 'nothi']
+ oldstyle: false
+- LOCK:
+ message: NOT_LOCKABLE
+ words: ['lock', 'close']
+- LIGHT:
+ message: DONT_UNDERSTAND
+ words: ['light', 'on']
+- EXTINGUISH:
+ message: DONT_UNDERSTAND
+ words: ['extin', 'off']
+- WAVE:
+ message: NOTHING_HAPPENS
+ words: ['wave', 'shake', 'swing']
+- TAME:
+ message: AM_GAME
+ words: ['calm', 'placa', 'tame']
+- GO:
+ message: WHERE_QUERY
+ words: ['walk', 'run', 'trave', 'go', 'proce',
+ 'conti', 'explo', 'follo', 'turn']
+- ATTACK:
+ message: RIDICULOUS_ATTEMPT
+ words: ['attac', 'kill', 'fight', 'hit', 'strik', 'slay']
+- POUR:
+ message: ARENT_CARRYING
+ words: ['pour']
+- EAT:
+ message: RIDICULOUS_ATTEMPT
+ words: ['eat', 'devou']
+- DRINK:
+ message: STREAM_WATER
+ words: ['drink']
+- RUB:
+ message: RUB_NOGO
+ words: ['rub']
+- THROW:
+ message: ARENT_CARRYING
+ words: ['throw', 'toss']
+- QUIT:
+ message: HUH_MAN
+ words: ['quit']
+- FIND:
+ message: NEARBY
+ words: ['find', 'where']
+- INVENTORY:
+ message: NEARBY
+ words: ['i', 'inven']
+ oldstyle: false
+- FEED:
+ message: NO_EDIBLES
+ words: ['feed']
+- FILL:
+ message: CANT_FILL
+ words: ['fill']
+- BLAST:
+ message: REQUIRES_DYNAMITE
+ words: ['blast', 'deton', 'ignit', 'blowu']
+- SCORE:
+ message: HUH_MAN
+ words: ['score']
+- GIANTWORDS:
+ message: NOT_KNOWHOW
+ words: ['fee', 'fie', 'foe', 'foo', 'fum']
+- BRIEF:
+ message: ON_WHAT
+ words: ['brief']
+- READ:
+ message: DONT_UNDERSTAND
+ words: ['read', 'perus']
+- BREAK:
+ message: BEYOND_POWER
+ words: ['break', 'shatt', 'smash']
+- WAKE:
+ message: RIDICULOUS_ATTEMPT
+ words: ['wake', 'distu']
+- SAVE:
+ message: HUH_MAN
+ words: ['suspe', 'pause', 'save']
+- RESUME:
+ message: HUH_MAN
+ words: ['resum', 'resta']
+- FLY:
+ message: AM_GAME
+ words: ['fly']
+- LISTEN:
+ message: DONT_UNDERSTAND
+ words: ['liste']
+- PART:
+ message: NOTHING_HAPPENS
+ words: ['z''zzz']
+- ACT_35:
+ message: HUH_MAN
+ words: !!null
+
+hints:
+ - hint: &grate
+ name: CAVE
+ number: 1
+ turns: 4
+ penalty: 2
+ question: 'Are you trying to get into the cave?'
+ hint: |-
+ The grate is very solid and has a hardened steel lock. You cannot
+ enter without a key, and there are no keys nearby. I would recommend
+ looking elsewhere for the keys.
+ - hint: &bird
+ name: BIRD
+ number: 2
+ turns: 5
+ penalty: 2
+ question: 'Are you trying to catch the bird?'
+ hint: |-
+ Something about you seems to be frightening the bird. Perhaps you
+ might figure out what it is.
+ - hint: &snake
+ name: SNAKE
+ number: 3
+ turns: 8
+ penalty: 2
+ question: 'Are you trying to somehow deal with the snake?'
+ hint: |-
+ You can't kill the snake, or drive it away, or avoid it, or anything
+ like that. There is a way to get by, but you don't have the necessary
+ resources right now.
+ - hint: &maze
+ name: MAZE
+ number: 4
+ turns: 75
+ penalty: 4
+ question: 'Do you need help getting out of the maze?'
+ hint: 'You can make the passages look less alike by dropping things.'
+ - hint: &dark
+ name: DARK
+ number: 5
+ turns: 25
+ penalty: 5
+ question: 'Are you trying to explore beyond the plover room?'
+ hint: |-
+ There is a way to explore that region without having to worry about
+ falling into a pit. None of the objects available is immediately
+ useful in discovering the secret.
+ - hint: &witt
+ name: WITT
+ number: 6
+ turns: 20
+ penalty: 3
+ question: 'Do you need help getting out of here?'
+ hint: 'Don''t go west.\n'
+ - hint: &urn
+ name: CLIFF
+ number: 7
+ turns: 8
+ penalty: 2
+ question: 'Are you wondering what to do here?'
+ hint: 'This section is quite advanced. Find the cave first.\n'
+ - hint: &forest
+ name: WOODS
+ number: 8
+ turns: 25
+ penalty: 2
+ question: 'Would you like to be shown out of the forest?'
+ hint: |-
+ Go east ten times. If that doesn't get you out, then go south, then
+ west twice, then south.
+ - hint: &ogre
+ name: OGRE
+ number: 9
+ turns: 10
+ penalty: 4
+ question: 'Do you need help dealing with the ogre?'
+ hint: |-
+ There is nothing the presence of which will prevent you from defeating
+ him; thus it can't hurt to fetch everything you possibly can.
+ - hint: &jade
+ name: JADE
+ number: 10
+ turns: 1
+ penalty: 4
+ question: 'You''re missing only one other treasure. Do you need help finding it?'
+ hint: |-
+ Once you''ve found all the other treasures, it is no longer possible to
+ locate the one you''re now missing.'
+