Magic-number elimination.
[open-adventure.git] / actions.c
index ec17c07b2145254be33b052c1700b9912df1f8a6..b1c1ce5c76603f8ead7f188770a5cf8cd912d0fc 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -6,12 +6,6 @@
 
 static int fill(token_t, token_t);
 
-static void state_change(long obj, long state)
-{
-    game.prop[obj] = state;
-    pspeak(obj, change, state, true);
-}
-
 static int attack(struct command_t *command)
 /*  Attack.  Assume target if unambiguous.  "Throw" also links here.
  *  Attackable objects fall into two categories: enemies (snake,
@@ -118,19 +112,22 @@ static int attack(struct command_t *command)
         }
         state_change(DRAGON, DRAGON_DEAD);
         game.prop[RUG] = RUG_FLOOR;
-        /* FIXME: Arithmetic on location values */
-        int k = (objects[DRAGON].plac + objects[DRAGON].fixd) / 2;
+        /* Hardcoding LOC_SECRET5 as the dragon's death location is ugly.
+        * The way it was computed before was wirse; it depended on the
+        * two dragon locations being LOC_SECRET4 and LOC_SECRET6 and 
+        * LOC_SECRET5 being right between them.
+        */
         move(DRAGON + NOBJECTS, -1);
         move(RUG + NOBJECTS, 0);
-        move(DRAGON, k);
-        move(RUG, k);
-        drop(BLOOD, k);
+        move(DRAGON, LOC_SECRET5);
+        move(RUG, LOC_SECRET5);
+        drop(BLOOD, LOC_SECRET5);
         for (obj = 1; obj <= NOBJECTS; obj++) {
             if (game.place[obj] == objects[DRAGON].plac ||
                 game.place[obj] == objects[DRAGON].fixd)
-                move(obj, k);
+                move(obj, LOC_SECRET5);
         }
-        game.loc = k;
+        game.loc = LOC_SECRET5;
         return GO_MOVE;
     }
 
@@ -179,51 +176,58 @@ static int attack(struct command_t *command)
         rspeak(ROCKY_TROLL);
         break;
     default:
-        rspeak(actions[verb].message);
+        speak(actions[verb].message);
     }
     return GO_CLEAROBJ;
 }
 
-static int bigwords(token_t foo)
+static int bigwords(long id)
 /*  FEE FIE FOE FOO (AND FUM).  Advance to next state if given in proper order.
  *  Look up foo in special section of vocab to determine which word we've got.
  *  Last word zips the eggs back to the giant room (unless already there). */
 {
-    char word[TOKLEN + 1];
-    packed_to_token(foo, word);
-    int k = (int) get_special_vocab_id(word);
-    if (game.foobar != 1 - k) {
-        if (game.foobar != 0 && game.loc == LOC_GIANTROOM) {
-            rspeak( START_OVER);
-        } else {
-            rspeak(NOTHING_HAPPENS);
-        }
-        return GO_CLEAROBJ;
-    } else {
-        game.foobar = k;
-        if (k != 4) {
-            rspeak(OK_MAN);
-            return GO_CLEAROBJ;
-        }
-        game.foobar = 0;
-        if (game.place[EGGS] == objects[EGGS].plac ||
-            (TOTING(EGGS) && game.loc == objects[EGGS].plac)) {
-            rspeak(NOTHING_HAPPENS);
-            return GO_CLEAROBJ;
-        } else {
-            /*  Bring back troll if we steal the eggs back from him before
-             *  crossing. */
-            if (game.place[EGGS] == LOC_NOWHERE && game.place[TROLL] == LOC_NOWHERE && game.prop[TROLL] == TROLL_UNPAID)
-                game.prop[TROLL] = TROLL_PAIDONCE;
-            k = EGGS_DONE;
-            if (HERE(EGGS))
-                k = EGGS_VANISHED;
-            if (game.loc == objects[EGGS].plac)
-                k = EGGS_HERE;
-            move(EGGS, objects[EGGS].plac);
-            pspeak(EGGS, look, k, true);
-            return GO_CLEAROBJ;
-        }
+  if ((game.foobar == WORD_EMPTY && id == ACTION_WORD(FEE)) ||
+      (game.foobar == ACTION_WORD(FEE) && id == ACTION_WORD(FIE)) ||
+      (game.foobar == ACTION_WORD(FIE) && id == ACTION_WORD(FOE)) ||
+      (game.foobar == ACTION_WORD(FOE) && id == ACTION_WORD(FOO)) ||
+      (game.foobar == ACTION_WORD(FOE) && id == ACTION_WORD(FUM)))
+    {
+      game.foobar = id;
+      if ((id != ACTION_WORD(FOO)) && (id != ACTION_WORD(FUM))) {
+       rspeak(OK_MAN);
+       return GO_CLEAROBJ;
+      }
+      game.foobar = WORD_EMPTY;
+      if (game.place[EGGS] == objects[EGGS].plac ||
+         (TOTING(EGGS) && game.loc == objects[EGGS].plac)) {
+       rspeak(NOTHING_HAPPENS);
+       return GO_CLEAROBJ;
+      } else {
+       /*  Bring back troll if we steal the eggs back from him before
+        *  crossing. */
+       if (game.place[EGGS] == LOC_NOWHERE && game.place[TROLL] == LOC_NOWHERE && game.prop[TROLL] == TROLL_UNPAID)
+         game.prop[TROLL] = TROLL_PAIDONCE;
+       int k = EGGS_DONE;
+       if (HERE(EGGS))
+         k = EGGS_VANISHED;
+       if (game.loc == objects[EGGS].plac)
+         k = EGGS_HERE;
+       move(EGGS, objects[EGGS].plac);
+       pspeak(EGGS, look, k, true);
+       return GO_CLEAROBJ;
+      }
+    }
+  else
+    {
+      if (game.loc == LOC_GIANTROOM) {
+       rspeak(START_OVER);
+      } else {
+         /* This is new begavior in Open Adventure - sounds better when
+          * player isn't in the Giant Room. */
+       rspeak(WELL_POINTLESS);
+      }
+      game.foobar = WORD_EMPTY;
+      return GO_CLEAROBJ;
     }
 }
 
@@ -260,10 +264,10 @@ static int vbreak(token_t verb, token_t obj)
         if (TOTING(VASE))
             drop(VASE, game.loc);
         state_change(VASE, VASE_BROKEN);
-        game.fixed[VASE] = -1;
+        game.fixed[VASE] = IS_FIXED;
         return GO_CLEAROBJ;
     }
-    rspeak(actions[verb].message);
+    speak(actions[verb].message);
     return (GO_CLEAROBJ);
 }
 
@@ -301,8 +305,9 @@ static int vcarry(token_t verb, token_t obj)
         return GO_CLEAROBJ;
     }
 
-    if (game.fixed[obj] != 0) {
-        if (obj == PLANT && game.prop[PLANT] <= 0) {
+    if (game.fixed[obj] != IS_FREE) {
+        /* Next guard tests whether plant is tiny or stashed */
+        if (obj == PLANT && game.prop[PLANT] <= PLANT_THIRSTY) {
             rspeak(DEEP_ROOTS);
             return GO_CLEAROBJ;
         }
@@ -377,17 +382,16 @@ static int vcarry(token_t verb, token_t obj)
         }
         game.prop[BIRD] = BIRD_CAGED;
     }
-    /* FIXME: Arithmetic on state numbers */
     if ((obj == BIRD ||
          obj == CAGE) &&
         (game.prop[BIRD] == BIRD_CAGED || STASHED(BIRD) == BIRD_CAGED))
+        /* expression maps BIRD to CAGE and CAGE to BIRD */
         carry(BIRD + CAGE - obj, game.loc);
     carry(obj, game.loc);
     if (obj == BOTTLE && LIQUID() != NO_OBJECT)
         game.place[LIQUID()] = CARRIED;
-    if (GSTONE(obj) && game.prop[obj] != 0) {
-        game.prop[obj]
-            = STATE_GROUND;
+    if (GSTONE(obj) && game.prop[obj] != STATE_FOUND) {
+        game.prop[obj] = STATE_FOUND;
         game.prop[CAVITY] = CAVITY_EMPTY;
     }
     rspeak(OK_MAN);
@@ -407,16 +411,16 @@ static int chain(token_t verb)
             return GO_CLEAROBJ;
         }
         game.prop[CHAIN] = CHAIN_HEAP;
-        game.fixed[CHAIN] = CHAIN_HEAP;
+        game.fixed[CHAIN] = IS_FREE;
         if (game.prop[BEAR] != BEAR_DEAD)
             game.prop[BEAR] = CONTENTED_BEAR;
 
         switch (game.prop[BEAR]) {
         case BEAR_DEAD:
-            game.fixed[BEAR] = -1;
+            game.fixed[BEAR] = IS_FIXED;
             break;
         default:
-            game.fixed[BEAR] = 0;
+            game.fixed[BEAR] = IS_FREE;
         }
         rspeak(CHAIN_UNLOCKED);
         return GO_CLEAROBJ;
@@ -435,7 +439,7 @@ static int chain(token_t verb)
 
     if (TOTING(CHAIN))
         drop(CHAIN, game.loc);
-    game.fixed[CHAIN] = -1;
+    game.fixed[CHAIN] = IS_FIXED;
 
     rspeak(CHAIN_LOCKED);
     return GO_CLEAROBJ;
@@ -450,7 +454,7 @@ static int discard(token_t verb, token_t obj, bool just_do_it)
         if (TOTING(ROD2) && obj == ROD && !TOTING(ROD))
             obj = ROD2;
         if (!TOTING(obj)) {
-            rspeak(actions[verb].message);
+            speak(actions[verb].message);
             return GO_CLEAROBJ;
         }
         if (obj == BIRD && HERE(SNAKE)) {
@@ -463,7 +467,7 @@ static int discard(token_t verb, token_t obj, bool just_do_it)
 
         } else if ((GSTONE(obj) && AT(CAVITY) && game.prop[CAVITY] != CAVITY_FULL)) {
             rspeak(GEM_FITS);
-            game.prop[obj] = 1;
+            game.prop[obj] = STATE_IN_CAVITY;
             game.prop[CAVITY] = CAVITY_FULL;
             if (HERE(RUG) && ((obj == EMERALD && game.prop[RUG] != RUG_HOVER) ||
                               (obj == RUBY && game.prop[RUG] == RUG_HOVER))) {
@@ -474,10 +478,9 @@ static int discard(token_t verb, token_t obj, bool just_do_it)
                     spk = RUG_SETTLES;
                 rspeak(spk);
                 if (spk != RUG_WIGGLES) {
-                    /* FIXME: Arithmetic on state numbers */
-                    int k = 2 - game.prop[RUG];
+                    int k = (game.prop[RUG] == RUG_HOVER) ? RUG_FLOOR : RUG_HOVER;
                     game.prop[RUG] = k;
-                    if (k == 2)
+                    if (k == RUG_HOVER)
                         k = objects[SAPPH].plac;
                     move(RUG + NOBJECTS, k);
                 }
@@ -502,12 +505,11 @@ static int discard(token_t verb, token_t obj, bool just_do_it)
                    game.loc == objects[PILLOW].plac) {
             rspeak(OK_MAN);
         } else {
-            game.prop[VASE] = VASE_BROKEN;
-            if (AT(PILLOW))
-                game.prop[VASE] = VASE_WHOLE;
-            pspeak(VASE, look, game.prop[VASE] + 1, true);
+            state_change(VASE, AT(PILLOW)
+                         ? VASE_WHOLE
+                         : VASE_DROPPED);
             if (game.prop[VASE] != VASE_WHOLE)
-                game.fixed[VASE] = -1;
+                game.fixed[VASE] = IS_FIXED;
         }
     }
     int k = LIQUID();
@@ -547,13 +549,12 @@ static int drink(token_t verb, token_t obj)
         return GO_CLEAROBJ;
     }
     if (LIQUID() == WATER && HERE(BOTTLE)) {
-        game.prop[BOTTLE] = EMPTY_BOTTLE;
         game.place[WATER] = LOC_NOWHERE;
-        rspeak(BOTTLE_EMPTY);
+        state_change(BOTTLE, EMPTY_BOTTLE);
         return GO_CLEAROBJ;
     }
 
-    rspeak(actions[verb].message);
+    speak(actions[verb].message);
     return GO_CLEAROBJ;
 }
 
@@ -585,7 +586,7 @@ static int eat(token_t verb, token_t obj)
         rspeak(LOST_APPETITE);
         return GO_CLEAROBJ;
     }
-    rspeak(actions[verb].message);
+    speak(actions[verb].message);
     return GO_CLEAROBJ;
 }
 
@@ -624,7 +625,7 @@ static int extinguish(token_t verb, int obj)
         return GO_CLEAROBJ;
     }
 
-    rspeak(actions[verb].message);
+    speak(actions[verb].message);
     return GO_CLEAROBJ;
 }
 
@@ -632,46 +633,59 @@ static int feed(token_t verb, token_t obj)
 /*  Feed.  If bird, no seed.  Snake, dragon, troll: quip.  If dwarf, make him
  *  mad.  Bear, special. */
 {
-    int spk = actions[verb].message;
-    if (obj == BIRD) {
+    switch (obj) {
+    case BIRD:
         rspeak(BIRD_PINING);
-        return GO_CLEAROBJ;
-    } else if (obj == SNAKE ||
-               obj == DRAGON ||
-               obj == TROLL) {
-        spk = NOTHING_EDIBLE;
-        if (obj == DRAGON && game.prop[DRAGON] != DRAGON_BARS)
-            spk = RIDICULOUS_ATTEMPT;
-        if (obj == TROLL)
-            spk = TROLL_VICES;
-        if (obj == SNAKE && !game.closed && HERE(BIRD)) {
+        break;
+    case DRAGON:
+        if (game.prop[DRAGON] != DRAGON_BARS)
+            rspeak(RIDICULOUS_ATTEMPT);
+        else
+            rspeak(NOTHING_EDIBLE);
+        break;
+    case SNAKE:
+        if (!game.closed && HERE(BIRD)) {
             DESTROY(BIRD);
-            spk = BIRD_DEVOURED;
-        }
-    } else if (obj == DWARF) {
+            rspeak(BIRD_DEVOURED);
+        } else
+            rspeak(NOTHING_EDIBLE);
+        break;
+    case TROLL:
+        rspeak(TROLL_VICES);
+        break;
+    case DWARF:
         if (HERE(FOOD)) {
             game.dflag += 2;
-            spk = REALLY_MAD;
+            rspeak(REALLY_MAD);
+        } else
+            speak(actions[verb].message);
+        break;
+    case BEAR:
+        if (game.prop[BEAR] == BEAR_DEAD) {
+            rspeak(RIDICULOUS_ATTEMPT);
+            break;
         }
-    } else if (obj == BEAR) {
-        if (game.prop[BEAR] == UNTAMED_BEAR)
-            spk = NOTHING_EDIBLE;
-        if (game.prop[BEAR] == BEAR_DEAD)
-            spk = RIDICULOUS_ATTEMPT;
-        if (HERE(FOOD)) {
-            DESTROY(FOOD);
-            game.prop[BEAR] = SITTING_BEAR;
-            game.fixed[AXE] = 0;
-            game.prop[AXE] = 0;
-            spk = BEAR_TAMED;
+        if (game.prop[BEAR] == UNTAMED_BEAR) {
+            if (HERE(FOOD)) {
+                DESTROY(FOOD);
+                game.fixed[AXE] = IS_FREE;
+                game.prop[AXE] = AXE_HERE;
+                state_change(BEAR, SITTING_BEAR);
+            } else
+                rspeak(NOTHING_EDIBLE);
+            break;
         }
-    } else if (obj == OGRE) {
+        speak(actions[verb].message);
+        break;
+    case OGRE:
         if (HERE(FOOD))
-            spk = OGRE_FULL;
-    } else {
-        spk = AM_GAME;
+            rspeak(OGRE_FULL);
+        else
+            speak(actions[verb].message);
+        break;
+    default:
+        rspeak(AM_GAME);
     }
-    rspeak(spk);
     return GO_CLEAROBJ;
 }
 
@@ -690,7 +704,7 @@ int fill(token_t verb, token_t obj)
         }
         rspeak(SHATTER_VASE);
         game.prop[VASE] = VASE_BROKEN;
-        game.fixed[VASE] = -1;
+        game.fixed[VASE] = IS_FIXED;
         return (discard(verb, VASE, true));
     }
 
@@ -723,7 +737,7 @@ int fill(token_t verb, token_t obj)
         return GO_CLEAROBJ;
     }
     if (obj != NO_OBJECT && obj != BOTTLE) {
-        rspeak(actions[verb].message);
+        speak(actions[verb].message);
         return GO_CLEAROBJ;
     }
     if (obj == NO_OBJECT && !HERE(BOTTLE))
@@ -742,13 +756,11 @@ int fill(token_t verb, token_t obj)
         return GO_CLEAROBJ;
     }
 
-    game.prop[BOTTLE] = (LIQLOC(game.loc) == OIL) ? OIL_BOTTLE : WATER_BOTTLE;
+    state_change(BOTTLE, (LIQLOC(game.loc) == OIL)
+                 ? OIL_BOTTLE
+                 : WATER_BOTTLE);
     if (TOTING(BOTTLE))
         game.place[LIQUID()] = CARRIED;
-    if (LIQUID() == OIL)
-        rspeak(BOTTLED_OIL);
-    else
-        rspeak(BOTTLED_WATER);
     return GO_CLEAROBJ;
 }
 
@@ -774,7 +786,7 @@ static int find(token_t verb, token_t obj)
     }
 
 
-    rspeak(actions[verb].message);
+    speak(actions[verb].message);
     return GO_CLEAROBJ;
 }
 
@@ -794,7 +806,7 @@ static int fly(token_t verb, token_t obj)
     }
 
     if (obj != RUG) {
-        rspeak(actions[verb].message);
+        speak(actions[verb].message);
         return GO_CLEAROBJ;
     }
     if (game.prop[RUG] != RUG_HOVER) {
@@ -803,13 +815,13 @@ static int fly(token_t verb, token_t obj)
     }
     game.oldlc2 = game.oldloc;
     game.oldloc = game.loc;
-    /* FIXME: Arithmetic on location values */
-    game.newloc = game.place[RUG] + game.fixed[RUG] - game.loc;
 
-    if (game.prop[SAPPH] >= 0) {
-        rspeak(RUG_RETURNS);
-    } else {
+    if (game.prop[SAPPH] == STATE_NOTFOUND) {
+       game.newloc = game.place[SAPPH];
         rspeak(RUG_GOES);
+    } else {
+       game.newloc = LOC_CLIFF;
+        rspeak(RUG_RETURNS);
     }
     return GO_TERMINATE;
 }
@@ -856,7 +868,7 @@ static int light(token_t verb, token_t obj)
         return GO_CLEAROBJ;
     } else {
         if (obj != LAMP) {
-            rspeak(actions[verb].message);
+            speak(actions[verb].message);
             return GO_CLEAROBJ;
         }
         if (game.limit < 0) {
@@ -872,7 +884,7 @@ static int light(token_t verb, token_t obj)
 }
 
 static int listen(void)
-/*  Listen.  Intransitive only.  Print stuff based on objsnd/locsnd. */
+/*  Listen.  Intransitive only.  Print stuff based on object sound proprties. */
 {
     long sound = locations[game.loc].sound;
     if (sound != SILENT) {
@@ -892,8 +904,7 @@ static int listen(void)
         long packed_zzword = token_to_packed(game.zzword);
         pspeak(i, hear, mi, true, packed_zzword);
         rspeak(NO_MESSAGE);
-        /* FIXME: Magic number, sensitive to bird state logic */
-        if (i == BIRD && game.prop[i] == 5)
+        if (i == BIRD && mi == BIRD_ENDSTATE)
             DESTROY(BIRD);
         return GO_CLEAROBJ;
     }
@@ -975,7 +986,7 @@ static int lock(token_t verb, token_t obj)
         rspeak(CANNOT_UNLOCK);
         break;
     default:
-        rspeak(actions[verb].message);
+        speak(actions[verb].message);
     }
 
     return GO_CLEAROBJ;
@@ -991,7 +1002,7 @@ static int pour(token_t verb, token_t obj)
     if (obj == NO_OBJECT)
         return GO_UNKNOWN;
     if (!TOTING(obj)) {
-        rspeak(actions[verb].message);
+        speak(actions[verb].message);
         return GO_CLEAROBJ;
     }
 
@@ -1055,7 +1066,7 @@ static int read(struct command_t command)
         game.clshnt = yes(arbitrary_messages[CLUE_QUERY], arbitrary_messages[WAYOUT_CLUE], arbitrary_messages[OK_MAN]);
     } else if (objects[command.obj].texts[0] == NULL ||
                game.prop[command.obj] < 0) {
-        rspeak(actions[command.verb].message);
+        speak(actions[command.verb].message);
     } else
         pspeak(command.obj, study, game.prop[command.obj], true);
     return GO_CLEAROBJ;
@@ -1064,8 +1075,7 @@ static int read(struct command_t command)
 static int reservoir(void)
 /*  Z'ZZZ (word gets recomputed at startup; different each game). */
 {
-    /* FIXME: Arithmetic on state numbers */
-    if (!AT(RESER) && game.loc != game.fixed[RESER] - 1) {
+    if (!AT(RESER) && game.loc != LOC_RESBOTTOM) {
         rspeak(NOTHING_HAPPENS);
         return GO_CLEAROBJ;
     } else {
@@ -1095,7 +1105,7 @@ static int rub(token_t verb, token_t obj)
     } else if (obj != LAMP) {
         rspeak(PECULIAR_NOTHING);
     } else {
-        rspeak(actions[verb].message);
+        speak(actions[verb].message);
     }
     return GO_CLEAROBJ;
 }
@@ -1110,11 +1120,14 @@ static int say(struct command_t *command)
     char word1[TOKLEN + 1];
     packed_to_token(command->wd1, word1);
     int wd = (int) get_vocab_id(word1);
-    /* FIXME: magic numbers */
     if (wd == MOTION_WORD(XYZZY) ||
         wd == MOTION_WORD(PLUGH) ||
         wd == MOTION_WORD(PLOVER) ||
-        wd == ACTION_WORD(GIANTWORDS) ||
+        wd == ACTION_WORD(FEE) ||
+       wd == ACTION_WORD(FIE) ||
+       wd == ACTION_WORD(FOE) ||
+       wd == ACTION_WORD(FOO) ||
+       wd == ACTION_WORD(FUM) ||
         wd == ACTION_WORD(PART)) {
         /* FIXME: scribbles on the interpreter's command block */
         wordclear(&command->wd2);
@@ -1137,10 +1150,8 @@ static int throw (struct command_t *command)
  *  (Only way to do so!)  Axe also special for dragon, bear, and
  *  troll.  Treasures special for troll. */
 {
-    if (TOTING(ROD2) && command->obj == ROD && !TOTING(ROD))
-        command->obj = ROD2;
     if (!TOTING(command->obj)) {
-        rspeak(actions[command->verb].message);
+        speak(actions[command->verb].message);
         return GO_CLEAROBJ;
     }
     if (objects[command->obj].is_treasure && AT(TROLL)) {
@@ -1172,7 +1183,7 @@ static int throw (struct command_t *command)
             else if (HERE(BEAR) && game.prop[BEAR] == UNTAMED_BEAR) {
                 /* This'll teach him to throw the axe at the bear! */
                 drop(AXE, game.loc);
-                game.fixed[AXE] = -1;
+                game.fixed[AXE] = IS_FIXED;
                 juggle(BEAR);
                 state_change(AXE, AXE_LOST);
                 return GO_CLEAROBJ;
@@ -1199,7 +1210,7 @@ static int wake(token_t verb, token_t obj)
 {
     if (obj != DWARF ||
         !game.closed) {
-        rspeak(actions[verb].message);
+        speak(actions[verb].message);
         return GO_CLEAROBJ;
     } else {
         rspeak(PROD_DWARF);
@@ -1215,16 +1226,16 @@ static int wave(token_t verb, token_t obj)
         (!HERE(BIRD) &&
          (game.closng ||
           !AT(FISSURE)))) {
-        rspeak(((!TOTING(obj)) && (obj != ROD ||
+        speak(((!TOTING(obj)) && (obj != ROD ||
                                    !TOTING(ROD2))) ?
-               ARENT_CARRYING :
+               arbitrary_messages[ARENT_CARRYING] :
                actions[verb].message);
         return GO_CLEAROBJ;
     }
 
     if (game.prop[BIRD] == BIRD_UNCAGED && game.loc == game.place[STEPS] && game.prop[JADE] < 0) {
         drop(JADE, game.loc);
-        game.prop[JADE] = 0;
+        game.prop[JADE] = STATE_FOUND;
         --game.tally;
         rspeak(NECKLACE_FLY);
         return GO_CLEAROBJ;
@@ -1346,7 +1357,7 @@ int action(struct command_t *command)
             case  TAME:
                 return GO_UNKNOWN;
             case GO: {
-                rspeak(actions[command->verb].message);
+                speak(actions[command->verb].message);
                 return GO_CLEAROBJ;
             }
             case ATTACK:
@@ -1377,8 +1388,12 @@ int action(struct command_t *command)
             case SCORE:
                 score(scoregame);
                 return GO_CLEAROBJ;
-            case GIANTWORDS:
-                return bigwords(command->wd1);
+           case FEE:
+           case FIE:
+           case FOE:
+           case FOO:
+            case FUM:
+                return bigwords(command->id1);
             case BRIEF:
                 return brief();
             case READ:
@@ -1427,11 +1442,11 @@ int action(struct command_t *command)
         case WAVE:
             return wave(command->verb, command->obj);
         case TAME: {
-            rspeak(actions[command->verb].message);
+            speak(actions[command->verb].message);
             return GO_CLEAROBJ;
         }
         case GO: {
-            rspeak(actions[command->verb].message);
+            speak(actions[command->verb].message);
             return GO_CLEAROBJ;
         }
         case ATTACK:
@@ -1447,7 +1462,7 @@ int action(struct command_t *command)
         case THROW:
             return throw (command);
         case QUIT: {
-            rspeak(actions[command->verb].message);
+            speak(actions[command->verb].message);
             return GO_CLEAROBJ;
         }
         case FIND:
@@ -1462,15 +1477,19 @@ int action(struct command_t *command)
             blast();
             return GO_CLEAROBJ;
         case SCORE: {
-            rspeak(actions[command->verb].message);
+            speak(actions[command->verb].message);
             return GO_CLEAROBJ;
         }
-        case GIANTWORDS: {
-            rspeak(actions[command->verb].message);
+       case FEE:
+       case FIE:
+       case FOE:
+       case FOO:
+        case FUM: {
+            speak(actions[command->verb].message);
             return GO_CLEAROBJ;
         }
         case BRIEF: {
-            rspeak(actions[command->verb].message);
+            speak(actions[command->verb].message);
             return GO_CLEAROBJ;
         }
         case READ:
@@ -1480,17 +1499,17 @@ int action(struct command_t *command)
         case WAKE:
             return wake(command->verb, command->obj);
         case SAVE: {
-            rspeak(actions[command->verb].message);
+            speak(actions[command->verb].message);
             return GO_CLEAROBJ;
         }
         case RESUME: {
-            rspeak(actions[command->verb].message);
+            speak(actions[command->verb].message);
             return GO_CLEAROBJ;
         }
         case FLY:
             return fly(command->verb, command->obj);
         case LISTEN: {
-            rspeak(actions[command->verb].message);
+            speak(actions[command->verb].message);
             return GO_CLEAROBJ;
         }
         case PART: