]> granicus.if.org Git - nethack/commitdiff
Don't describe sleep explosion as a "ray"
authorMichael Meyer <me@entrez.cc>
Thu, 18 Aug 2022 19:48:15 +0000 (15:48 -0400)
committerMichael Meyer <me@entrez.cc>
Thu, 18 Aug 2022 19:57:53 +0000 (15:57 -0400)
When breaking a wand of sleep, don't print the message "the sleep ray
hits you!" since it produces an area effect/explosion rather than a ray.
For a couple other wands, !ordinary (wand breakage) effects don't
produce a message (I assume because the do_break_wand feedback is
considered sufficient), but I put in an alternative message for the
explosion since I think it's important to inform the player the hero has
fallen asleep.

src/explode.c
src/zap.c

index ee56eb6dcc558686b5462019f70710c7c305c7ba..871cbfd9a9000058962f93199d4da0b50fdfd6d9 100644 (file)
@@ -156,7 +156,7 @@ explode(
             break;
         case 4:
             adstr = (olet == WAND_CLASS) ? "death field"
-                                       : "disintegration field";
+                                         : "disintegration field";
             adtyp = AD_DISN;
             break;
         case 5:
index 1900846fe2c8e7cd9cf1e06b90a44b5c7cdf2a69..dc68b447f42b8efa624d106650f216d95aabdeb5 100644 (file)
--- a/src/zap.c
+++ b/src/zap.c
@@ -2633,7 +2633,10 @@ zapyourself(struct obj *obj, boolean ordinary)
             You("don't feel sleepy!");
             monstseesu(M_SEEN_SLEEP);
         } else {
-            pline_The("sleep ray hits you!");
+            if (ordinary)
+                pline_The("sleep ray hits you!");
+            else
+                You("fall alseep!");
             fall_asleep(-rnd(50), TRUE);
         }
         break;