]> granicus.if.org Git - nethack/commitdiff
Make blessed scroll of fire useful
authorPasi Kallinen <paxed@alt.org>
Wed, 23 Aug 2017 20:35:49 +0000 (23:35 +0300)
committerPasi Kallinen <paxed@alt.org>
Wed, 23 Aug 2017 20:35:53 +0000 (23:35 +0300)
Blessed scroll of fire allows to choose the explosion location like
scroll of stinking cloud does. This should make it somewhat useful
in the early game.

doc/fixes36.1
src/read.c

index ed5d98304410cc7a9d33c0f79d0112397667edf9..a4f90a550a94fe82fd6fc21e7fb68c91640386e0 100644 (file)
@@ -417,6 +417,7 @@ the "bonesid" written into bones files when they're created so that they can
 surviving a gas spore's explosion would leave that explosion as a stale reason
        for death which might show up strangely ("crushed to death by a gas
        spore's explosion" when killed by an opening drawbridge)
+blessed scroll of fire lets you choose explosion location like stinking cloud
 
 
 Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository
index f1fef012d28bb32d17ae256f2849a0855e59ed9a..9c0b5ccf763d8772bb3abeca4f001fffa7bee232 100644 (file)
@@ -1556,8 +1556,14 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */
             pline("Thinking of Maud you forget everything else.");
         exercise(A_WIS, FALSE);
         break;
-    case SCR_FIRE:
+    case SCR_FIRE: {
+        coord cc;
+        int dam;
+
+        cc.x = u.ux;
+        cc.y = u.uy;
         cval = bcsign(sobj);
+        dam = (2 * (rn1(3, 3) + 2 * cval) + 1) / 3;
         useup(sobj);
         sobj = 0; /* it's gone */
         if (!already_known)
@@ -1581,13 +1587,27 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */
         if (Underwater) {
             pline_The("%s around you vaporizes violently!", hliquid("water"));
         } else {
-            pline_The("scroll erupts in a tower of flame!");
-            iflags.last_msg = PLNMSG_TOWER_OF_FLAME; /* for explode() */
-            burn_away_slime();
+            if (sblessed) {
+                if (!already_known)
+                    pline("This is a scroll of fire!");
+                dam *= 5;
+                pline("Where do you want to center the explosion?");
+                getpos_sethilite(display_stinking_cloud_positions, get_valid_stinking_cloud_pos);
+                (void) getpos(&cc, TRUE, "the desired position");
+                if (is_valid_stinking_cloud_pos(cc.x, cc.y, FALSE)) {
+                    /* try to reach too far, get burned */
+                    cc.x = u.ux;
+                    cc.y = u.uy;
+                }
+            } else {
+                pline_The("scroll erupts in a tower of flame!");
+                iflags.last_msg = PLNMSG_TOWER_OF_FLAME; /* for explode() */
+                burn_away_slime();
+            }
         }
-        explode(u.ux, u.uy, 11, (2 * (rn1(3, 3) + 2 * cval) + 1) / 3,
-                SCROLL_CLASS, EXPL_FIERY);
+        explode(cc.x, cc.y, 11, dam, SCROLL_CLASS, EXPL_FIERY);
         break;
+    }
     case SCR_EARTH:
         /* TODO: handle steeds */
         if (!Is_rogue_level(&u.uz) && has_ceiling(&u.uz)