]> granicus.if.org Git - nethack/commitdiff
more PR #771 - blast vs spell
authorPatR <rankin@nethack.org>
Sat, 28 May 2022 21:09:31 +0000 (14:09 -0700)
committerPatR <rankin@nethack.org>
Sat, 28 May 2022 21:09:31 +0000 (14:09 -0700)
Add the patch from entrez to describe the tower of flame effect from
a scroll of fire as "the blast" rather than "your spell" if it reveals
a secret door.

src/explode.c
src/read.c
src/zap.c

index f9e2ac77c7c64d78a86dad69be6b7f66ca2954f8..de8bb3f90394b5706bb4c1780b8e499159b59f94 100644 (file)
@@ -85,6 +85,9 @@ explode(
     } else if (olet == BURNING_OIL) {
         /* used to provide extra information to zap_over_floor() */
         exploding_wand_typ = POT_OIL;
+    } else if (olet == SCROLL_CLASS) {
+        /* ditto */
+        exploding_wand_typ = SCR_FIRE;
     }
     /* muse_unslime: SCR_FIRE */
     if (expltype < 0) {
index b73c129cfc289a38dd8ded1a5f1e6f1fac81b4e8..6d474103d8b5af05c08360e99529a9fdae3e8176 100644 (file)
@@ -1763,7 +1763,9 @@ seffect_fire(struct obj **sobjp)
             burn_away_slime();
         }
     }
-    explode(cc.x, cc.y, 11, dam, SCROLL_CLASS, EXPL_FIERY);
+#define ZT_SPELL_O_FIRE 11 /* explained in splatter_burning_oil(explode.c) */
+    explode(cc.x, cc.y, ZT_SPELL_O_FIRE, dam, SCROLL_CLASS, EXPL_FIERY);
+#undef ZT_SPELL_O_FIRE
 }
 
 static void
index a3ab9b820dbac402ff4a110f90f07617030f6488..6c139cf35c19a477189fc758aca290adbcf8fef5 100644 (file)
--- a/src/zap.c
+++ b/src/zap.c
@@ -4841,11 +4841,13 @@ zap_over_floor(
             zapverb = "bolt"; /* wand zap */
         else if (abs(type) < ZT_BREATH(0))
             zapverb = "spell";
-    } else if (exploding_wand_typ == POT_OIL) {
+    } else if (exploding_wand_typ == POT_OIL
+               || exploding_wand_typ == SCR_FIRE) {
         /* breakobj() -> explode_oil() -> splatter_burning_oil()
            -> explode(ZT_SPELL(ZT_FIRE), BURNING_OIL)
            -> zap_over_floor(ZT_SPELL(ZT_FIRE), POT_OIL) */
-        yourzap = FALSE;  /* and leave zapverb as "blast" */
+        /* leave zapverb as "blast"; exploding_wand_typ was nonzero, so
+           'yourzap' is FALSE and the result will be "the blast" */
         exploding_wand_typ = 0; /* not actually an exploding wand */
     }