X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=actions.c;h=9a68f268429a0f5ed1c9c615164fc1e325996850;hb=bfa06be62d73a8ed7559b5344672d8a3f9bd947e;hp=1e1e223035cf418f4c4727f8ef6c27495c7af3e5;hpb=6166d687b98e21bce25fb6e910ffc31441648688;p=open-adventure.git diff --git a/actions.c b/actions.c index 1e1e223..9a68f26 100644 --- a/actions.c +++ b/actions.c @@ -129,17 +129,18 @@ static int bigwords(long foo) if (game.place[EGGS]==PLAC[EGGS] || (TOTING(EGGS) && game.loc==PLAC[EGGS])) { RSPEAK(spk); return GO_CLEAROBJ; + } else { + /* Bring back troll if we steal the eggs back from him before + * crossing. */ + if (game.place[EGGS]==0 && game.place[TROLL]==0 && game.prop[TROLL]==0) + game.prop[TROLL]=1; + k=2; + if (HERE(EGGS))k=1; + if (game.loc == PLAC[EGGS])k=0; + MOVE(EGGS,PLAC[EGGS]); + PSPEAK(EGGS,k); + return GO_CLEAROBJ; } - /* Bring back troll if we steal the eggs back from him before - * crossing. */ - if (game.place[EGGS]==0 && game.place[TROLL]==0 && game.prop[TROLL]==0) - game.prop[TROLL]=1; - k=2; - if (HERE(EGGS))k=1; - if (game.loc == PLAC[EGGS])k=0; - MOVE(EGGS,PLAC[EGGS]); - PSPEAK(EGGS,k); - return GO_CLEAROBJ; } } @@ -469,7 +470,7 @@ static int feed(token_t verb, token_t obj) return GO_CLEAROBJ; } else if (obj == SNAKE || obj == DRAGON || obj == TROLL) { - int spk=102; + spk=102; if (obj == DRAGON && game.prop[DRAGON] != 0)spk=110; if (obj == TROLL)spk=182; if (obj == SNAKE && !game.closed && HERE(BIRD)) { @@ -693,7 +694,6 @@ static int listen(void) static int lock(token_t verb, token_t obj) /* Lock, unlock, no object given. Assume various things if present. */ { - int k; int spk = ACTSPK[verb]; if (obj == INTRANSITIVE) { spk=28; @@ -988,7 +988,6 @@ int action(FILE *input, enum speechpart part, long verb, token_t obj) * unless verb is "say", which snarfs arbitrary second word. */ { - int kk; token_t spk=ACTSPK[verb]; if (part == unknown)