X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=actions.c;h=c4d86b48ca42201318140bc294bb8238071d4488;hb=9eda1f424dcdc8c154b6a881feed270eeb17e83e;hp=802c1f3303b6c233d8b648985b04d28fc7369b2c;hpb=596a15457d897451aa8bfcf64c7c76b09836c01b;p=open-adventure.git diff --git a/actions.c b/actions.c index 802c1f3..c4d86b4 100644 --- a/actions.c +++ b/actions.c @@ -253,7 +253,7 @@ static int vbreak(verb_t verb, obj_t obj) switch (obj) { case MIRROR: if (game.closed) { - rspeak(BREAK_MIRROR); + state_change(MIRROR, MIRROR_BROKEN); return GO_DWARFWAKE; } else { rspeak(TOO_FAR); @@ -545,9 +545,7 @@ static int discard(verb_t verb, obj_t obj) } else rspeak(OK_MAN); - game.prop[BIRD] = BIRD_UNCAGED; - if (FOREST(game.loc)) - game.prop[BIRD] = BIRD_FOREST_UNCAGED; + game.prop[BIRD] = FOREST(game.loc) ? BIRD_FOREST_UNCAGED : BIRD_UNCAGED; drop(obj, game.loc); return GO_CLEAROBJ; } @@ -1347,14 +1345,14 @@ int action(struct command_t *command) command->obj = ROD2; /* FALL THROUGH */; } else if ((command->verb == FIND || - command->verb == INVENTORY) && command->wd2 <= 0) + command->verb == INVENTORY) && (command->id2 == WORD_EMPTY || command->id2 == WORD_NOT_FOUND)) /* FALL THROUGH */; else { sspeak(NO_SEE, command->raw1); return GO_CLEAROBJ; } - if (command->wd2 > 0) + if (command->id2 != WORD_EMPTY && command->id2 != WORD_NOT_FOUND) return GO_WORD2; if (command->verb != 0) command->part = transitive;