}
static phase_codes_t bigwords(vocab_t 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). */
+/* Only called on 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). */
{
if ((game.foobar == WORD_EMPTY && id == FEE) ||
(game.foobar == FEE && id == FIE) ||
(TOTING(EGGS) && game.loc == objects[EGGS].plac)) {
rspeak(NOTHING_HAPPENS);
return GO_CLEAROBJ;
+ } else if (id == FUM) {
+ goto fum;
} else {
/* Bring back troll if we steal the eggs back from him before
* crossing. */
return GO_CLEAROBJ;
}
} else {
+ fum:
if (game.loc == LOC_GIANTROOM) {
rspeak(START_OVER);
} else {
- /* This is new begavior in Open Adventure - sounds better when
+ /* This is new behavior in Open Adventure - sounds better when
* player isn't in the Giant Room. */
- rspeak(WELL_POINTLESS);
+ rspeak(NOTHING_HAPPENS);
}
game.foobar = WORD_EMPTY;
return GO_CLEAROBJ;
game.newloc = LOC_CLIFF;
rspeak(RUG_RETURNS);
} else {
+// LCOV_EXCL_START
/* should never happen */
rspeak(NOTHING_HAPPENS);
+// LCOV_EXCL_STOP
}
return GO_TERMINATE;
}
static phase_codes_t listen(void)
/* Listen. Intransitive only. Print stuff based on object sound proprties. */
{
+ bool soundlatch = false;
vocab_t sound = locations[game.loc].sound;
if (sound != SILENT) {
rspeak(sound);
if (!locations[game.loc].loud)
rspeak(NO_MESSAGE);
- return GO_CLEAROBJ;
+ soundlatch = true;
}
for (obj_t i = 1; i <= NOBJECTS; i++) {
if (!HERE(i) ||
rspeak(NO_MESSAGE);
if (i == BIRD && mi == BIRD_ENDSTATE)
DESTROY(BIRD);
- return GO_CLEAROBJ;
+ soundlatch = true;
}
- rspeak(ALL_SILENT);
+ if (!soundlatch)
+ rspeak(ALL_SILENT);
return GO_CLEAROBJ;
}