From: PatR Date: Fri, 29 May 2015 01:36:51 +0000 (-0700) Subject: Sting's glow while blind X-Git-Tag: NetHack-3.6.0_RC01~336^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=29617ada12dfeb380eac90db7489db26556c87f5;p=nethack Sting's glow while blind Give an alternate message if Sting starts or stops glowing while the hero can't see. It probably ought to give an immediate message when blindness toggles but that looks like it could get messy. Having an 'o' die or migrate off level should probably also redo the Sting message immediately, otherwise we see things like: The little dog kills the goblin. The little dog eats a goblin corpse. Sting stops glowing. (There could be lots of additional intervening messages depending on other monster activity at the time.) Calling see_monsters() in the relevant places--probably m_detach() and migrate_to_level()--would address this but won't do because that could result in hallucinating monsters changing appearance mid-turn. --- diff --git a/src/artifact.c b/src/artifact.c index b7ac61046..2a5873f79 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 artifact.c $NHDT-Date: 1432512770 2015/05/25 00:12:50 $ $NHDT-Branch: master $:$NHDT-Revision: 1.86 $ */ +/* NetHack 3.6 artifact.c $NHDT-Date: 1432863398 2015/05/29 01:36:38 $ $NHDT-Branch: master $:$NHDT-Revision: 1.87 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1813,11 +1813,24 @@ Sting_effects(orc_count) int orc_count; { if (uwep && uwep->oartifact == ART_STING) { - if (orc_count > 0 && warn_obj_cnt == 0) - pline("%s %s %s!", bare_artifactname(uwep), otense(uwep, "glow"), - hcolor(NH_LIGHT_BLUE)); - else if (orc_count == 0 && warn_obj_cnt > 0) - pline("%s stops glowing.", bare_artifactname(uwep)); + /* + * Toggling blindness in between warning messages can result in + * Sting glows light blue! [...] Sting stops quivering. + * or + * Sting quivers slightly. [...] Sting stops glowing. + * but addressing that is far more trouble than it's worth. + */ + if (orc_count > 0 && warn_obj_cnt == 0) { + if (!Blind) + pline("%s %s %s!", bare_artifactname(uwep), + otense(uwep, "glow"), + hcolor(NH_LIGHT_BLUE)); + else + pline("%s quivers slightly.", bare_artifactname(uwep)); + } else if (orc_count == 0 && warn_obj_cnt > 0) { + pline("%s stops %s.", bare_artifactname(uwep), + !Blind ? "glowing" : "quivering"); + } } } diff --git a/src/display.c b/src/display.c index fdcad2427..3bb62436c 100644 --- a/src/display.c +++ b/src/display.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 display.c $NHDT-Date: 1432536528 2015/05/25 06:48:48 $ $NHDT-Branch: master $:$NHDT-Revision: 1.54 $ */ +/* NetHack 3.6 display.c $NHDT-Date: 1432863399 2015/05/29 01:36:39 $ $NHDT-Branch: master $:$NHDT-Revision: 1.55 $ */ /* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */ /* and Dave Cohrs, 1990. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1141,11 +1141,8 @@ see_monsters() newsym(mon->mx, mon->my); if (mon->wormno) see_wsegs(mon); - if (MATCH_WARN_OF_MON(mon)) { - if (context.warntype.obj - && (context.warntype.obj & mon->data->mflags2)) - new_warn_obj_cnt++; - } + if (Warn_of_mon && (context.warntype.obj & mon->data->mflags2) != 0L) + new_warn_obj_cnt++; } /* * Make Sting glow blue or stop glowing if required.