Make blessed scroll of fire useful

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.
This commit is contained in:
Pasi Kallinen
2017-08-23 23:35:49 +03:00
parent 0ad33783f0
commit c7d13d6fa3
2 changed files with 27 additions and 6 deletions

View 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

View 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)