X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=actions.c;h=d5cb410bcd8df4db87d5d8ec7a10aa69587053d9;hb=e0b9aeda6e03a79fbe8029eb4fa63f39692cdef7;hp=5460848f95a93d7c10fa3f80fe82d8032eae251c;hpb=e7dc3eab5d7eb798199e59081e846582af7205a7;p=open-adventure.git diff --git a/actions.c b/actions.c index 5460848..d5cb410 100644 --- a/actions.c +++ b/actions.c @@ -845,15 +845,20 @@ static phase_codes_t fly(verb_t verb, obj_t obj) rspeak(RUG_NOTHING1); return GO_CLEAROBJ; } - game.oldlc2 = game.oldloc; - game.oldloc = game.loc; - if (game.prop[SAPPH] == STATE_NOTFOUND) { - game.newloc = game.place[SAPPH]; + if (game.loc == LOC_CLIFF) { + game.oldlc2 = game.oldloc; + game.oldloc = game.loc; + game.newloc = LOC_LEDGE; rspeak(RUG_GOES); - } else { + } else if (game.loc == LOC_LEDGE) { + game.oldlc2 = game.oldloc; + game.oldloc = game.loc; game.newloc = LOC_CLIFF; rspeak(RUG_RETURNS); + } else { + /* should never happen */ + rspeak(NOTHING_HAPPENS); } return GO_TERMINATE; } @@ -998,6 +1003,8 @@ static phase_codes_t lock(verb_t verb, obj_t obj) case CLAM: if (verb == LOCK) rspeak(HUH_MAN); + else if (TOTING(CLAM)) + rspeak(DROP_CLAM); else if (!TOTING(TRIDENT)) rspeak(CLAM_OPENER); else { @@ -1103,8 +1110,14 @@ static phase_codes_t read(command_t command) if (DARK(game.loc)) { sspeak(NO_SEE, command.word[0].raw); - } else if (command.obj == OYSTER && !game.clshnt && game.closed) { - game.clshnt = yes(arbitrary_messages[CLUE_QUERY], arbitrary_messages[WAYOUT_CLUE], arbitrary_messages[OK_MAN]); + } else if (command.obj == OYSTER) { + if (!TOTING(OYSTER) || !game.closed) { + rspeak(DONT_UNDERSTAND); + } else if (!game.clshnt) { + game.clshnt = yes(arbitrary_messages[CLUE_QUERY], arbitrary_messages[WAYOUT_CLUE], arbitrary_messages[OK_MAN]); + } else if (game.clshnt) { + pspeak(OYSTER, hear, true, 1); // Not really a sound, but oh well. + } } else if (objects[command.obj].texts[0] == NULL || game.prop[command.obj] == STATE_NOTFOUND) { speak(actions[command.verb].message); @@ -1346,8 +1359,8 @@ phase_codes_t action(command_t command) /* FALL THROUGH */; else if (command.obj == DWARF && atdwrf(game.loc) > 0) /* FALL THROUGH */; - else if ((LIQUID() == command.obj && HERE(BOTTLE)) || - command.obj == LIQLOC(game.loc)) + else if (!game.closed && ((LIQUID() == command.obj && HERE(BOTTLE)) || + command.obj == LIQLOC(game.loc))) /* FALL THROUGH */; else if (command.obj == OIL && HERE(URN) && game.prop[URN] != URN_EMPTY) { command.obj = URN;