X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=sidebyside;f=actions.c;h=ec17c07b2145254be33b052c1700b9912df1f8a6;hb=a8ac2f477a2564bcf5b40508aea2c192d237c88a;hp=2ad4623dce25e693b44a01157d212629b2566731;hpb=733b035933c1c53d79e26dd475109782af02d864;p=open-adventure.git diff --git a/actions.c b/actions.c index 2ad4623..ec17c07 100644 --- a/actions.c +++ b/actions.c @@ -361,7 +361,7 @@ static int vcarry(token_t verb, token_t obj) } - if (obj == BIRD && game.prop[BIRD] != BIRD_CAGED && -1 - game.prop[BIRD] != BIRD_CAGED) { + if (obj == BIRD && game.prop[BIRD] != BIRD_CAGED && STASHED(BIRD) != BIRD_CAGED) { if (game.prop[BIRD] == BIRD_FOREST_UNCAGED) { DESTROY(BIRD); rspeak(BIRD_CRAP); @@ -380,8 +380,7 @@ static int vcarry(token_t verb, token_t obj) /* FIXME: Arithmetic on state numbers */ if ((obj == BIRD || obj == CAGE) && - (game.prop[BIRD] == BIRD_CAGED || - -1 - game.prop[BIRD] == 1)) + (game.prop[BIRD] == BIRD_CAGED || STASHED(BIRD) == BIRD_CAGED)) carry(BIRD + CAGE - obj, game.loc); carry(obj, game.loc); if (obj == BOTTLE && LIQUID() != NO_OBJECT) @@ -447,12 +446,11 @@ static int discard(token_t verb, token_t obj, bool just_do_it) * bird (might attack snake or dragon) and cage (might contain bird) and vase. * Drop coins at vending machine for extra batteries. */ { - int spk = actions[verb].message; if (!just_do_it) { if (TOTING(ROD2) && obj == ROD && !TOTING(ROD)) obj = ROD2; if (!TOTING(obj)) { - rspeak(spk); + rspeak(actions[verb].message); return GO_CLEAROBJ; } if (obj == BIRD && HERE(SNAKE)) { @@ -469,7 +467,7 @@ static int discard(token_t verb, token_t obj, bool just_do_it) game.prop[CAVITY] = CAVITY_FULL; if (HERE(RUG) && ((obj == EMERALD && game.prop[RUG] != RUG_HOVER) || (obj == RUBY && game.prop[RUG] == RUG_HOVER))) { - spk = RUG_RISES; + int spk = RUG_RISES; if (TOTING(RUG)) spk = RUG_WIGGLES; if (obj == RUBY) @@ -515,7 +513,7 @@ static int discard(token_t verb, token_t obj, bool just_do_it) int k = LIQUID(); if (k == obj) obj = BOTTLE; - if (obj == BOTTLE && k != 0) + if (obj == BOTTLE && k != NO_OBJECT) game.place[k] = LOC_NOWHERE; if (obj == CAGE && game.prop[BIRD] == BIRD_CAGED) drop(BIRD, game.loc); @@ -693,7 +691,7 @@ int fill(token_t verb, token_t obj) rspeak(SHATTER_VASE); game.prop[VASE] = VASE_BROKEN; game.fixed[VASE] = -1; - return (discard(verb, obj, true)); + return (discard(verb, VASE, true)); } if (obj == URN) {