X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=sidebyside;f=actions.c;h=4d6944f6d043125443cc12b59f8b2c60c745dc55;hb=ab94051da166ca2be050c0d5725774f2edf3e7ee;hp=a30d7c0fc8f551af25cfcd0366ff1f2f2d6e4a96;hpb=36a6cbca3449b3a4d298715b065e909333379636;p=open-adventure.git diff --git a/actions.c b/actions.c index a30d7c0..4d6944f 100644 --- a/actions.c +++ b/actions.c @@ -93,8 +93,12 @@ static int attack(struct command_t *command) } spk = (dwarves > 1) ? OGRE_PANIC1 : OGRE_PANIC2; } else if (obj == BEAR) { - /* FIXME: Arithmetic on message numbers */ - spk = BEAR_HANDS + (game.prop[BEAR] + 1) / 2; + switch (game.prop[BEAR]) { + case UNTAMED_BEAR: spk = BEAR_HANDS; break; + case SITTING_BEAR: spk = BEAR_CONFUSED; break; + case CONTENTED_BEAR: spk = BEAR_CONFUSED; break; + case BEAR_DEAD: spk = ALREADY_DEAD; break; + } } else if (obj == DRAGON && game.prop[DRAGON] == 0) { /* Fun stuff for dragon. If he insists on attacking it, win! * Set game.prop to dead, move dragon to central loc (still