From: NHOrus Date: Tue, 4 Jul 2017 11:33:30 +0000 (+0300) Subject: linearized extinguish X-Git-Tag: takebird~44 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=3c636e27e2fa4540ffa71ac12db0f4dda7c2ebd2;p=open-adventure.git linearized extinguish --- diff --git a/actions.c b/actions.c index 2b97800..5fa2fed 100644 --- a/actions.c +++ b/actions.c @@ -582,9 +582,7 @@ static int extinguish(token_t verb, int obj) obj = LAMP; if (HERE(URN) && game.prop[URN] == URN_LIT) obj = URN; - if (obj == INTRANSITIVE || - (HERE(LAMP) && game.prop[LAMP] == LAMP_BRIGHT && - HERE(URN) && game.prop[URN] == URN_LIT)) + if (obj == INTRANSITIVE) return GO_UNKNOWN; } @@ -594,20 +592,24 @@ static int extinguish(token_t verb, int obj) } else { pspeak(URN, change, URN_DARK, true); } + return GO_CLEAROBJ; + } - } else if (obj == LAMP) { + if (obj == LAMP) { state_change(LAMP, LAMP_DARK); rspeak(DARK(game.loc) ? PITCH_DARK : NO_MESSAGE); + return GO_CLEAROBJ; + } - } else if (obj == DRAGON || - obj == VOLCANO) { + if (obj == DRAGON || + obj == VOLCANO) { rspeak(BEYOND_POWER); - - } else { - rspeak(actions[verb].message); + return GO_CLEAROBJ; } + + rspeak(actions[verb].message); return GO_CLEAROBJ; }