static int extinguish(token_t verb, int obj)
/* Extinguish. Lamp, urn, dragon/volcano (nice try). */
{
static int extinguish(token_t verb, int obj)
/* Extinguish. Lamp, urn, dragon/volcano (nice try). */
{
if (obj == INTRANSITIVE) {
if (HERE(LAMP) && game.prop[LAMP] == LAMP_BRIGHT)
obj = LAMP;
if (HERE(URN) && game.prop[URN] == URN_LIT)
if (obj == INTRANSITIVE) {
if (HERE(LAMP) && game.prop[LAMP] == LAMP_BRIGHT)
obj = LAMP;
if (HERE(URN) && game.prop[URN] == URN_LIT)
- obj = obj * NOBJECTS + URN;
- if (obj == INTRANSITIVE || obj == 0 || obj > NOBJECTS)
+ obj = URN;
+ if (obj == INTRANSITIVE ||
+ HERE(LAMP) && game.prop[LAMP] == LAMP_BRIGHT &&
+ HERE(URN) && game.prop[URN] == URN_LIT)
} else if (obj == LAMP) {
state_change(LAMP, LAMP_DARK);
} else if (obj == LAMP) {
state_change(LAMP, LAMP_DARK);
- spk = DARK(game.loc) ? PITCH_DARK : NO_MESSAGE;
- } else if (obj == DRAGON || obj == VOLCANO)
- spk = BEYOND_POWER;
- rspeak(spk);
+ rspeak(DARK(game.loc) ? PITCH_DARK : NO_MESSAGE);
+ } else if (obj == DRAGON || obj == VOLCANO) {
+ rspeak(BEYOND_POWER);
+
+ } else {
+ rspeak(actions[verb].message);
+ }