X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=actions.c;h=f2ec65adac01a042d5b8b7283d4e89f9bee2ca4f;hb=7eaefce61d74fbc73daabd3f42f048038366b5ad;hp=51a3f599a6cddde9b9d7d590e7b5bfb70826b6b0;hpb=e91742e1b9ff7715ba47f7354f8d8803b11a5df9;p=open-adventure.git diff --git a/actions.c b/actions.c index 51a3f59..f2ec65a 100644 --- a/actions.c +++ b/actions.c @@ -528,7 +528,9 @@ static int extinguish(token_t verb, int obj) obj = LAMP; if (HERE(URN) && game.prop[URN] == URN_LIT) obj = URN; - if (obj == INTRANSITIVE) + if (obj == INTRANSITIVE || + HERE(LAMP) && game.prop[LAMP] == LAMP_BRIGHT && + HERE(URN) && game.prop[URN] == URN_LIT) return GO_UNKNOWN; } @@ -739,7 +741,9 @@ static int light(token_t verb, token_t obj) obj = LAMP; if (HERE(URN) && game.prop[URN] == URN_DARK) obj = URN; - if (obj == INTRANSITIVE || obj == 0 || obj > NOBJECTS) + if (obj == INTRANSITIVE || + HERE(LAMP) && game.prop[LAMP] == LAMP_DARK && game.limit >= 0 && + HERE(URN) && game.prop[URN] == URN_DARK) return GO_UNKNOWN; }