linearized extinguish

This commit is contained in:
NHOrus 2017-07-04 14:33:30 +03:00
parent 8cbb8afcbe
commit 3c636e27e2

View file

@ -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 ||
if (obj == DRAGON ||
obj == VOLCANO) {
rspeak(BEYOND_POWER);
} else {
rspeak(actions[verb].message);
return GO_CLEAROBJ;
}
rspeak(actions[verb].message);
return GO_CLEAROBJ;
}