Test coverage - add lots more coverage from actions.c
[open-adventure.git] / adventure.yaml
index 1e7bc3210f227342b6ac6b7d57453ce71ce15347..e507cc65ba87dce70603d9345210276529cce024 100644 (file)
 #      %B = Variable number of blanks
 #      %! = The entire message should be suppressed
 
-# There are duplicate keys in this vocabulary, that's why it can't be a normal
-# map.  You have to iterate through it looking for a match qualified by type.
-# 1 is not allocated because it's used as a sentinel value in motion-verb
-# lists.
-vocabulary: [
-    {word: "ROAD",  type: motion, value: 2},
-    {word: "HILL",  type: motion, value: 2},
-    {word: "ENTER", type: motion, value: 3},
-    {word: "UPSTR", type: motion, value: 4},
-    {word: "DOWNS", type: motion, value: 5},
-    {word: "FORES", type: motion, value: 6},
-    {word: "FORWA", type: motion, value: 7},
-    {word: "CONTI", type: motion, value: 7},
-    {word: "ONWAR", type: motion, value: 7},
-    {word: "BACK",  type: motion, value: 8},
-    {word: "RETUR", type: motion, value: 8},
-    {word: "RETRE", type: motion, value: 8},
-    {word: "VALLE", type: motion, value: 9},
-    {word: "STAIR", type: motion, value: 10},
-    {word: "OUT",   type: motion, value: 11},
-    {word: "OUTSI", type: motion, value: 11},
-    {word: "EXIT",  type: motion, value: 11},
-    {word: "LEAVE", type: motion, value: 11},
-    {word: "BUILD", type: motion, value: 12},
-    {word: "HOUSE", type: motion, value: 12},
-    {word: "GULLY", type: motion, value: 13},
-    {word: "STREA", type: motion, value: 14},
-    {word: "FORK",  type: motion, value: 15},
-    {word: "BED",   type: motion, value: 16},
-    {word: "CRAWL", type: motion, value: 17},
-    {word: "COBBL", type: motion, value: 18},
-    {word: "INWAR", type: motion, value: 19},
-    {word: "INSID", type: motion, value: 19},
-    {word: "IN",    type: motion, value: 19},
-    {word: "SURFA", type: motion, value: 20},
-    {word: "NULL",  type: motion, value: 21},
-    {word: "NOWHE", type: motion, value: 21},
-    {word: "DARK",  type: motion, value: 22},
-    {word: "PASSA", type: motion, value: 23},
-    {word: "TUNNE", type: motion, value: 23},
-    {word: "LOW",   type: motion, value: 24},
-    {word: "CANYO", type: motion, value: 25},
-    {word: "AWKWA", type: motion, value: 26},
-    {word: "GIANT", type: motion, value: 27},
-    {word: "VIEW",  type: motion, value: 28},
-    {word: "UPWAR", type: motion, value: 29},
-    {word: "UP",    type: motion, value: 29},
-    {word: "U",     type: motion, value: 29},
-    {word: "ABOVE", type: motion, value: 29},
-    {word: "ASCEN", type: motion, value: 29},
-    {word: "D",     type: motion, value: 30},
-    {word: "DOWNW", type: motion, value: 30},
-    {word: "DOWN",  type: motion, value: 30},
-    {word: "DESCE", type: motion, value: 30},
-    {word: "PIT",   type: motion, value: 31},
-    {word: "OUTDO", type: motion, value: 32},
-    {word: "CRACK", type: motion, value: 33},
-    {word: "STEPS", type: motion, value: 34},
-    {word: "DOME",  type: motion, value: 35},
-    {word: "LEFT",  type: motion, value: 36},
-    {word: "RIGHT", type: motion, value: 37},
-    {word: "HALL",  type: motion, value: 38},
-    {word: "JUMP",  type: motion, value: 39},
-    {word: "BARRE", type: motion, value: 40},
-    {word: "OVER",  type: motion, value: 41},
-    {word: "ACROS", type: motion, value: 42},
-    {word: "EAST",  type: motion, value: 43},
-    {word: "E",     type: motion, value: 43},
-    {word: "WEST",  type: motion, value: 44},
-    {word: "W",     type: motion, value: 44},
-    {word: "NORTH", type: motion, value: 45},
-    {word: "N",     type: motion, value: 45},
-    {word: "SOUTH", type: motion, value: 46},
-    {word: "S",     type: motion, value: 46},
-    {word: "NE",    type: motion, value: 47},
-    {word: "SE",    type: motion, value: 48},
-    {word: "SW",    type: motion, value: 49},
-    {word: "NW",    type: motion, value: 50},
-    {word: "DEBRI", type: motion, value: 51},
-    {word: "HOLE",  type: motion, value: 52},
-    {word: "WALL",  type: motion, value: 53},
-    {word: "BROKE", type: motion, value: 54},
-    {word: "Y2",    type: motion, value: 55},
-    {word: "CLIMB", type: motion, value: 56},
-    {word: "LOOK",  type: motion, value: 57},
-    {word: "EXAMI", type: motion, value: 57},
-    {word: "TOUCH", type: motion, value: 57},
-    {word: "DESCR", type: motion, value: 57},
-    {word: "FLOOR", type: motion, value: 58},
-    {word: "ROOM",  type: motion, value: 59},
-    {word: "SLIT",  type: motion, value: 60},
-    {word: "SLAB",  type: motion, value: 61},
-    {word: "SLABR", type: motion, value: 61},
-    {word: "XYZZY", type: motion, value: 62},
-    {word: "DEPRE", type: motion, value: 63},
-    {word: "ENTRA", type: motion, value: 64},
-    {word: "PLUGH", type: motion, value: 65},
-    {word: "SECRE", type: motion, value: 66},
-    {word: "CAVE",  type: motion, value: 67},
-    {word: "CROSS", type: motion, value: 69},
-    {word: "BEDQU", type: motion, value: 70},
-    {word: "PLOVE", type: motion, value: 71},
-    {word: "ORIEN", type: motion, value: 72},
-    {word: "CAVER", type: motion, value: 73},
-    {word: "SHELL", type: motion, value: 74},
-    {word: "RESER", type: motion, value: 75},
-    {word: "MAIN",  type: motion, value: 76},
-    {word: "OFFIC", type: motion, value: 76},
-    {word: "CARRY", type: action, value: 1},
-    {word: "TAKE",  type: action, value: 1},
-    {word: "KEEP",  type: action, value: 1},
-    {word: "CATCH", type: action, value: 1},
-    {word: "STEAL", type: action, value: 1},
-    {word: "CAPTU", type: action, value: 1},
-    {word: "GET",   type: action, value: 1},
-    {word: "TOTE",  type: action, value: 1},
-    {word: "SNARF", type: action, value: 1},
-    {word: "DROP",  type: action, value: 2},
-    {word: "RELEA", type: action, value: 2},
-    {word: "FREE",  type: action, value: 2},
-    {word: "DISCA", type: action, value: 2},
-    {word: "DUMP",  type: action, value: 2},
-    {word: "SAY",   type: action, value: 3},
-    {word: "CHANT", type: action, value: 3},
-    {word: "SING",  type: action, value: 3},
-    {word: "UTTER", type: action, value: 3},
-    {word: "MUMBL", type: action, value: 3},
-    {word: "UNLOC", type: action, value: 4},
-    {word: "OPEN",  type: action, value: 4},
-    {word: "NOTHI", type: action, value: 5},
-    {word: "LOCK",  type: action, value: 6},
-    {word: "CLOSE", type: action, value: 6},
-    {word: "LIGHT", type: action, value: 7},
-    {word: "ON",    type: action, value: 7},
-    {word: "EXTIN", type: action, value: 8},
-    {word: "OFF",   type: action, value: 8},
-    {word: "WAVE",  type: action, value: 9},
-    {word: "SHAKE", type: action, value: 9},
-    {word: "SWING", type: action, value: 9},
-    {word: "CALM",  type: action, value: 10},
-    {word: "PLACA", type: action, value: 10},
-    {word: "TAME",  type: action, value: 10},
-    {word: "WALK",  type: action, value: 11},
-    {word: "RUN",   type: action, value: 11},
-    {word: "TRAVE", type: action, value: 11},
-    {word: "GO",    type: action, value: 11},
-    {word: "PROCE", type: action, value: 11},
-    {word: "CONTI", type: action, value: 11},
-    {word: "EXPLO", type: action, value: 11},
-    {word: "FOLLO", type: action, value: 11},
-    {word: "TURN",  type: action, value: 11},
-    {word: "ATTAC", type: action, value: 12},
-    {word: "KILL",  type: action, value: 12},
-    {word: "FIGHT", type: action, value: 12},
-    {word: "HIT",   type: action, value: 12},
-    {word: "STRIK", type: action, value: 12},
-    {word: "SLAY",  type: action, value: 12},
-    {word: "POUR",  type: action, value: 13},
-    {word: "EAT",   type: action, value: 14},
-    {word: "DEVOU", type: action, value: 14},
-    {word: "DRINK", type: action, value: 15},
-    {word: "RUB",   type: action, value: 16},
-    {word: "THROW", type: action, value: 17},
-    {word: "TOSS",  type: action, value: 17},
-    {word: "QUIT",  type: action, value: 18},
-    {word: "FIND",  type: action, value: 19},
-    {word: "WHERE", type: action, value: 19},
-    {word: "INVEN", type: action, value: 20},
-    {word: "FEED",  type: action, value: 21},
-    {word: "FILL",  type: action, value: 22},
-    {word: "BLAST", type: action, value: 23},
-    {word: "DETON", type: action, value: 23},
-    {word: "IGNIT", type: action, value: 23},
-    {word: "BLOWU", type: action, value: 23},
-    {word: "SCORE", type: action, value: 24},
-    {word: "FEE",   type: action, value: 25},
-    {word: "FIE",   type: action, value: 25},
-    {word: "FOE",   type: action, value: 25},
-    {word: "FOO",   type: action, value: 25},
-    {word: "FUM",   type: action, value: 25},
-    {word: "BRIEF", type: action, value: 26},
-    {word: "READ",  type: action, value: 27},
-    {word: "PERUS", type: action, value: 27},
-    {word: "BREAK", type: action, value: 28},
-    {word: "SHATT", type: action, value: 28},
-    {word: "SMASH", type: action, value: 28},
-    {word: "WAKE",  type: action, value: 29},
-    {word: "DISTU", type: action, value: 29},
-    {word: "SUSPE", type: action, value: 30},
-    {word: "PAUSE", type: action, value: 30},
-    {word: "SAVE",  type: action, value: 30},
-    {word: "RESUM", type: action, value: 31},
-    {word: "RESTA", type: action, value: 31},
-    {word: "FLY",   type: action, value: 32},
-    {word: "LISTE", type: action, value: 33},
-    {word: "Z'ZZZ", type: action, value: 34}, # Gets replaced
-    {word: "FEE",   type: special, value: 1},
-    {word: "FIE",   type: special, value: 2},
-    {word: "FOE",   type: special, value: 3},
-    {word: "FOO",   type: special, value: 4},
-    {word: "FUM",   type: special, value: 5},
-    {word: "THANK", type: special, value: 13},
-    {word: "SESAM", type: special, value: 50},
-    {word: "OPENS", type: special, value: 50},
-    {word: "ABRA",  type: special, value: 50},
-    {word: "ABRAC", type: special, value: 50},
-    {word: "SHAZA", type: special, value: 50},
-    {word: "HOCUS", type: special, value: 50},
-    {word: "POCUS", type: special, value: 50},
-    {word: "HELP",  type: special, value: 51},
-    {word: "?",     type: special, value: 51},
-    {word: "NO",    type: special, value: 54},
-    {word: "TREE",  type: special, value: 64},
-    {word: "TREES", type: special, value: 64},
-    {word: "DIG",   type: special, value: 66},
-    {word: "EXCAV", type: special, value: 66},
-    {word: "LOST",  type: special, value: 68},
-    {word: "MIST",  type: special, value: 69},
-    {word: "FUCK",  type: special, value: 79},
-    {word: "STOP",  type: special, value: 139},
-    {word: "INFO",  type: special, value: 142},
-    {word: "INFOR", type: special, value: 142},
-    {word: "SWIM",  type: special, value: 147},
-    {word: "WIZAR", type: special, value: 246},
-    {word: "YES",   type: special, value: 271},
-    {word: "NEWS",  type: special, value: 275},
-]
-
 motions: !!omap
 - MOT_0:
     words: !!null
@@ -517,7 +289,7 @@ actions: !!omap
     words: ['g', 'carry', 'take', 'keep', 'catch', 'steal', 'captu', 'get', 'tote', 'snarf']
 - DROP:
     message: ARENT_CARRYING
-    words: ['d', 'drop', 'relea', 'free', 'disca', 'dump']
+    words: ['drop', 'relea', 'free', 'disca', 'dump']
 - SAY:
     message: NO_MESSAGE
     words: ['say', 'chant', 'sing', 'utter', 'mumbl']
@@ -618,6 +390,71 @@ actions: !!omap
     message: HUH_MAN
     words: !!null
 
+specials: !!omap
+- SPC_0:
+    message: !!null
+    words: !!null
+- SPC_1:
+    message: !!null
+    words: ['fee']
+- SPC_2:
+    message: !!null
+    words: ['fie']
+- SPC_3:
+    message: !!null
+    words: ['foe']
+- SPC_4:
+    message: !!null
+    words: ['foo']
+- SPC_5:
+    message: !!null
+    words: ['fum']
+- SPC_13:
+    message: YOUR_WELCOME
+    words: ['thank']
+- SPC_50:
+    message: WORN_OUT
+    words: ['sesam', 'opens', 'abra', 'abrac', 'shaza', 'hocus', 'pocus']
+- SPC_51:
+    message: VOCAB_DESCRIPTION
+    words: ['help', '?']
+- SPC_54:
+    message: OK_MAN
+    words: ['no']
+- SPC_64:
+    message: FOREST_LOOK
+    words: ['tree', 'trees']
+- SPC_66:
+    message: DIGGING_FUTILE
+    words: ['dig', 'excav']
+- SPC_68:
+    message: IM_CONFUSED
+    words: ['lost']
+- SPC_69:
+    message: EXPLAIN_MIST
+    words: ['mist']
+- SPC_79:
+    message: WATCH_IT
+    words: ['fuck']
+- SPC_139:
+    message: STOP_UNKNOWN
+    words: ['stop']
+- SPC_142:
+    message: QUICK_START
+    words: ['info', 'infor']
+- SPC_147:
+    message: NOT_KNOWHOW
+    words: ['swim']
+- SPC_246:
+    message: WIZARDS_NODISTURB
+    words: ['wizar']
+- SPC_271:
+    message: GUESS_AGAIN
+    words: ['yes']
+- SPC_275:
+    message: ADVENTURE_NEWS
+    words: ['news']
+
 hints:
   - hint: &grate
       name: CAVE
@@ -2690,7 +2527,7 @@ locations: !!omap
 
 arbitrary_messages:  !!omap
 - NO_MESSAGE: !!null
-- CAVE_NEARBY: 'Somewhere nearby is Colossal Cave, where others have found fortunes in\ntreasure and gold, though it is rumored that some who enter are never\nseen again.  Magic is said to work in the cave.  I will be your eyes\nand hands.  Direct me with commands of 1 or 2 words.  I should warn\nyou that I look at only the first five letters of each word, so you''ll\nhave to enter "northeast" as "ne" to distinguish it from "north".\nYou can type "help" for some general hints.  For information on how\nto end your adventure, scoring, etc., type "info".\n\t\t\t      - - -\nThis program was originally developed by Willie Crowther.  Most of the\nfeatures of the current program were added by Don Woods.  Contact Don\nif you have any questions, comments, etc.'
+- CAVE_NEARBY: 'Somewhere nearby is Colossal Cave, where others have found fortunes in\ntreasure and gold, though it is rumored that some who enter are never\nseen again.  Magic is said to work in the cave.  I will be your eyes\nand hands.  Direct me with commands of 1 or 2 words.  I should warn\nyou that I look at only the first five letters of each word, so you''ll\nhave to enter "northeast" as "ne" to distinguish it from "north".\nYou can type "help" for some general hints.  For information on how\nto end your adventure, scoring, etc., type "info".\n\t\t\t      - - -\nThis program was originally developed by Willie Crowther.  Most of the\nfeatures of the current program were added by Don Woods. You are running Open Adventure; there is a resource page at http://www.catb.org/esr/open-adventure/'
 - DWARF_BLOCK: 'A little dwarf with a big knife blocks your way.'
 - DWARF_RAN: 'A little dwarf just walked around a corner, saw you, threw a little\naxe at you which missed, cursed, and ran away.'
 - DWARF_PACK: 'There are %d threatening little dwarves in the room with you.'
@@ -3141,7 +2978,7 @@ objects: !!omap
     - 'Even though it''s an oyster, the critter''s as tight-mouthed as a clam.'
     - 'It says the same thing it did before.  Hm, maybe it''s a pun?'
 - MAGAZINE:
-    words: ['issue', 'spelu', '"spel']
+    words: ['magaz', 'issue', 'spelu', '"spel']
     inventory: '"Spelunker Today"'
     locations: LOC_ANTEROOM
     descriptions:
@@ -3363,8 +3200,8 @@ objects: !!omap
     locations: LOC_NOWHERE
     immovable: true
     descriptions:
-    - '' # something in it
-    - 'There is a small urn-shaped cavity in the rock.'
+    - [CAVITY_FULL, ''] # something in it
+    - [CAVITY_EMPTY, 'There is a small urn-shaped cavity in the rock.']
 - BLOOD:
     words: ['blood']
     inventory: '*blood'