]> granicus.if.org Git - nethack/commitdiff
Make explosions give feedback message
authorPasi Kallinen <paxed@alt.org>
Wed, 24 Aug 2022 10:26:41 +0000 (13:26 +0300)
committerPasi Kallinen <paxed@alt.org>
Wed, 24 Aug 2022 10:26:44 +0000 (13:26 +0300)
... even when the explosion doesn't hit anything.

src/explode.c

index 871cbfd9a9000058962f93199d4da0b50fdfd6d9..7ec286a9e24507044013fb5b1c1a8e8b6d471314 100644 (file)
@@ -50,6 +50,7 @@ explode(
     char hallu_buf[BUFSZ], killr_buf[BUFSZ];
     short exploding_wand_typ = 0;
     boolean you_exploding = (olet == MON_EXPLODE && type >= 0);
+    boolean didmsg = FALSE;
 
     if (olet == WAND_CLASS) { /* retributive strike */
         /* 'type' is passed as (wand's object type * -1); save
@@ -324,10 +325,15 @@ explode(
             str = "explosion";
             generic = TRUE;
         }
-        if (!Deaf && olet != SCROLL_CLASS)
+        if (!Deaf && olet != SCROLL_CLASS) {
             You_hear("a blast.");
+            didmsg = TRUE;
+        }
     }
 
+    if (!Deaf && !didmsg)
+        pline("Boom!");
+
     if (dam) {
         for (i = 0; i < 3; i++) {
             for (j = 0; j < 3; j++) {