From: NHOrus Date: Mon, 3 Jul 2017 03:07:57 +0000 (+0300) Subject: Unspk and streamline eat command X-Git-Tag: takebird~80 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=5613b0ce36636d421cfa3002d39aeb0e2f69e389;p=open-adventure.git Unspk and streamline eat command --- diff --git a/actions.c b/actions.c index 44fc201..5dfb987 100644 --- a/actions.c +++ b/actions.c @@ -518,23 +518,25 @@ static int eat(token_t verb, token_t obj) /* Eat. Intransitive: assume food if present, else ask what. Transitive: food * ok, some things lose appetite, rest are ridiculous. */ { - int spk = actions[verb].message; if (obj == INTRANSITIVE) { if (!HERE(FOOD)) return GO_UNKNOWN; DESTROY(FOOD); - spk = THANKS_DELICIOUS; - } else { - if (obj == FOOD) { - DESTROY(FOOD); - spk = THANKS_DELICIOUS; - } - if (obj == BIRD || obj == SNAKE || obj == CLAM || obj == OYSTER || obj == - DWARF || obj == DRAGON || obj == TROLL || obj == BEAR || obj == - OGRE) - spk = LOST_APPETITE; + rspeak(THANKS_DELICIOUS); + return GO_CLEAROBJ; } - rspeak(spk); + if (obj == FOOD) { + DESTROY(FOOD); + rspeak(THANKS_DELICIOUS); + return GO_CLEAROBJ; + } + if (obj == BIRD || obj == SNAKE || obj == CLAM || obj == OYSTER || obj == + DWARF || obj == DRAGON || obj == TROLL || obj == BEAR || obj == + OGRE) { + rspeak(LOST_APPETITE); + return GO_CLEAROBJ; + } + rspeak(actions[verb].message); return GO_CLEAROBJ; } diff --git a/tests/wakedwarves2.log b/tests/wakedwarves2.log index bead5db..ac3862a 100644 --- a/tests/wakedwarves2.log +++ b/tests/wakedwarves2.log @@ -1,4 +1,4 @@ -## Wake the dwarves and die. +## Wake the dwarves differently and die. n seed 1838473132 in