From e995d889974435455f16ea3547a0ddb6b1a93475 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Fri, 9 Oct 2015 08:00:43 +0300 Subject: [PATCH] Fix cursed scroll of light on the rogue level Being blind and engulfed, reading cursed scroll of light did still darken the room on the Rogue level. This also changes the logic a bit, so that cursed scroll of light will douse lamps in your inventory, even when swallowed. --- src/read.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/read.c b/src/read.c index 20bffa975..92e34c24c 100644 --- a/src/read.c +++ b/src/read.c @@ -1816,13 +1816,13 @@ struct obj *obj; if (!Blind) { if (u.uswallow) { pline("It seems even darker in here than before."); - return; + } else { + if (uwep && artifact_light(uwep) && uwep->lamplit) + pline("Suddenly, the only light left comes from %s!", + the(xname(uwep))); + else + You("are surrounded by darkness!"); } - if (uwep && artifact_light(uwep) && uwep->lamplit) - pline("Suddenly, the only light left comes from %s!", - the(xname(uwep))); - else - You("are surrounded by darkness!"); } /* the magic douses lamps, et al, too */ @@ -1840,14 +1840,12 @@ struct obj *obj; pline("%s shines briefly.", Monnam(u.ustuck)); else pline("%s glistens.", Monnam(u.ustuck)); - return; - } - if (!Blind) + } else if (!Blind) pline("A lit field surrounds you!"); } - /* No-op in water - can only see the adjacent squares and that's it! */ - if (Underwater || Is_waterlevel(&u.uz)) + /* No-op when swallowed or in water */ + if (u.uswallow || Underwater || Is_waterlevel(&u.uz)) return; /* * If we are darkening the room and the hero is punished but not