-/* NetHack 3.6 artifact.c $NHDT-Date: 1433050876 2015/05/31 05:41:16 $ $NHDT-Branch: master $:$NHDT-Revision: 1.90 $ */
+/* NetHack 3.6 artifact.c $NHDT-Date: 1433060653 2015/05/31 08:24:13 $ $NHDT-Branch: master $:$NHDT-Revision: 1.91 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
/* use for warning "glow" for Sting, Orcrist, and Grimtooth */
void
Sting_effects(orc_count)
-int orc_count;
+int orc_count; /* new count (warn_obj_cnt is old count); -1 is a flag value */
{
if (uwep
&& (uwep->oartifact == ART_STING
|| uwep->oartifact == ART_ORCRIST
|| uwep->oartifact == ART_GRIMTOOTH)) {
- /*
- * 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 (orc_count == -1 && warn_obj_cnt > 0) {
+ /* -1 means that blindess has just been toggled; give a
+ 'continue' message that eventual 'stop' message will match */
+ pline("%s is %s.", bare_artifactname(uwep),
+ !Blind ? "glowing" : "quivering");
+ } else if (orc_count > 0 && warn_obj_cnt == 0) {
+ /* 'start' message */
if (!Blind)
pline("%s %s %s!", bare_artifactname(uwep),
otense(uwep, "glow"), glow_color(uwep->oartifact));
else
pline("%s quivers slightly.", bare_artifactname(uwep));
} else if (orc_count == 0 && warn_obj_cnt > 0) {
+ /* 'stop' message */
pline("%s stops %s.", bare_artifactname(uwep),
!Blind ? "glowing" : "quivering");
}
-/* NetHack 3.6 potion.c $NHDT-Date: 1432512769 2015/05/25 00:12:49 $ $NHDT-Branch: master $:$NHDT-Revision: 1.115 $ */
+/* NetHack 3.6 potion.c $NHDT-Date: 1433060654 2015/05/31 08:24:14 $ $NHDT-Branch: master $:$NHDT-Revision: 1.116 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
if (Blind_telepat || Infravision)
see_monsters();
+ /* avoid either of the sequences
+ "Sting starts glowing", [become blind], "Sting stops quivering" or
+ "Sting starts quivering", [regain sight], "Sting stops glowing"
+ by giving "Sting is quivering" when becoming blind or
+ "Sting is glowing" when regaining sight so that the eventual
+ "stops" message matches */
+ if (warn_obj_cnt && uwep && (EWarn_of_mon & W_WEP) != 0L)
+ Sting_effects(-1);
/* update dknown flag for inventory picked up while blind */
if (can_see_now)
learn_unseen_invent();