Skip to content

Commit

Permalink
Spellbook of fire bolt can appear randomly. Closes #484.
Browse files Browse the repository at this point in the history
Other spellcasters can use it now (1d10 fire damage), but only the flame mage gets the nice scaling bonuses as they level up.

Other roles might still use it as a more accurate form of force bolt since it has a higher to-hit rate.
  • Loading branch information
elunna committed Sep 25, 2023
1 parent ccc1381 commit 84df1d3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
6 changes: 2 additions & 4 deletions src/objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -1191,13 +1191,11 @@ SPELL("reflection", "decrepit", P_MATTER_SPELL, 15, 3, 5, 1, IMM
SPELL("flame sphere", "canvas", P_MATTER_SPELL, 15, 2, 1, 1, NODIR, CLR_BROWN), /* Slash'EM */
SPELL("freeze sphere", "hardcover", P_MATTER_SPELL, 15, 2, 1, 1, NODIR, CLR_BROWN), /* Slash'EM */
SPELL("cancellation", "shining", P_MATTER_SPELL, 15, 8, 7, 1, IMMEDIATE, CLR_WHITE),
/* Fire Bolt is the Flame Mage's special spell - not randomly generated. */
SPELL("fire bolt", "feathered", P_MATTER_SPELL, 0, 2, 1, 1, IMMEDIATE, CLR_YELLOW),
SPELL("fire bolt", "feathered", P_MATTER_SPELL, 15, 2, 1, 1, IMMEDIATE, CLR_YELLOW),
SPELL("slow monster", "light green", P_ENCHANTMENT_SPELL, 30, 2, 1, 1, IMMEDIATE, CLR_BRIGHT_GREEN),
SPELL("cause fear", "light blue", P_ENCHANTMENT_SPELL, 25, 3, 3, 1, NODIR, CLR_BRIGHT_BLUE),
SPELL("cause fear", "light blue", P_ENCHANTMENT_SPELL, 25, 3, 3, 1, NODIR, CLR_BRIGHT_BLUE),
SPELL("charm monster", "magenta", P_ENCHANTMENT_SPELL, 15, 3, 4, 1, IMMEDIATE, CLR_MAGENTA),
SPELL("confuse monster", "orange", P_ENCHANTMENT_SPELL, 30, 2, 1, 1, IMMEDIATE, CLR_ORANGE),

SPELL("haste self", "purple", P_ESCAPE_SPELL, 30, 4, 3, 1, NODIR, CLR_MAGENTA),
SPELL("levitation", "tan", P_ESCAPE_SPELL, 20, 4, 4, 1, NODIR, CLR_BROWN),
SPELL("teleport away", "gold", P_ESCAPE_SPELL, 15, 6, 5, 1, IMMEDIATE, HI_GOLD),
Expand Down
28 changes: 15 additions & 13 deletions src/zap.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ struct obj *otmp;
learn_it = TRUE;
break;
case SPE_FIRE_BOLT:
/* New special spell just for Flame Mages */
zap_type_text = "fire bolt";
dmg = 0;
reveal_invis = TRUE;
Expand Down Expand Up @@ -236,19 +235,22 @@ struct obj *otmp;
xkilled(mtmp, XKILL_NOMSG | XKILL_NOCORPSE);
} else if (!resist(mtmp, otmp->oclass, dmg, NOTELL)
&& !DEADMONSTER(mtmp)) {
/* Damage scales with level */
dmg = d(1, 10); /* Level 1 = 1d10 fire damage */
if (u.ulevel >= 4)
dmg += d(1, 8); /* Level 4 = +1d8 */
if (u.ulevel >= 8)
dmg += d(1, 8); /* Level 8 = +1d8 */
if (u.ulevel >= 12)
dmg += d(1, 8); /* Level 12 = +1d8 */
if (P_SKILL(P_MATTER_SPELL) >= P_SKILLED) {
dmg += d(1, 4); /* Skilled = +1d4 */
}
if (P_SKILL(P_MATTER_SPELL) >= P_EXPERT) {
dmg += d(1, 4); /* Expert = +1d4 */

/* Flame mages are the true masters of this spell */
if (Role_if(PM_FLAME_MAGE)) {
if (u.ulevel >= 4)
dmg += d(1, 8); /* Level 4 = +1d8 */
if (u.ulevel >= 8)
dmg += d(1, 8); /* Level 8 = +1d8 */
if (u.ulevel >= 12)
dmg += d(1, 8); /* Level 12 = +1d8 */
if (P_SKILL(P_MATTER_SPELL) >= P_SKILLED) {
dmg += d(1, 4); /* Skilled = +1d4 */
}
if (P_SKILL(P_MATTER_SPELL) >= P_EXPERT) {
dmg += d(1, 4); /* Expert = +1d4 */
}
}
if (dbldam)
dmg *= 2;
Expand Down

0 comments on commit 84df1d3

Please sign in to comment.