summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells1.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-20 17:21:09 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-20 17:21:09 +0000
commit3a4159644bb83b286ae10d5f37fcdbf81dced398 (patch)
treeedf72dff6f6250859ea6d051eba807049e6e661a /crawl-ref/source/spells1.cc
parente57ab785ed42435069db2f2397fe939a70119c27 (diff)
downloadcrawl-ref-3a4159644bb83b286ae10d5f37fcdbf81dced398.tar.gz
crawl-ref-3a4159644bb83b286ae10d5f37fcdbf81dced398.zip
Pan overhaul:
Allow monsters (including player ghosts) to use fire storm and ice storm, give Lom Lobon ice storm and Cerebov fire storm. Lom Lobon also gets conjure ball lightning. Mnoleg gets Summon Horrible Things instead of polymorph/shadow creatures. Gloorx gets symbol of torment instead of summon demon. Hellion hellfire burst now behaves the same way for both hellion vs player and hellion vs monster. Merged monster vs player and m vs m handling for direct spell effects such as smiting. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6621 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells1.cc')
-rw-r--r--crawl-ref/source/spells1.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc
index ca2c9294a7..e544ecfb7c 100644
--- a/crawl-ref/source/spells1.cc
+++ b/crawl-ref/source/spells1.cc
@@ -243,15 +243,17 @@ bool fireball(int pow, bolt &beam)
return (zapping(ZAP_FIREBALL, pow, beam, true));
}
-void cast_fire_storm(int pow, bolt &beam)
+void setup_fire_storm(const actor *source, int pow, bolt &beam)
{
beam.name = "great blast of fire";
beam.ex_size = 2 + (random2(pow) > 75);
beam.flavour = BEAM_LAVA;
beam.type = dchar_glyph(DCHAR_FIRED_ZAP);
beam.colour = RED;
- beam.beam_source = MHITYOU;
- beam.thrower = KILL_YOU_MISSILE;
+ beam.beam_source = source->mindex();
+ // XXX: Should this be KILL_MON_MISSILE?
+ beam.thrower =
+ source->atype() == ACT_PLAYER? KILL_YOU_MISSILE : KILL_MON;
beam.aux_source.clear();
beam.obvious_effect = false;
beam.is_beam = false;
@@ -260,6 +262,11 @@ void cast_fire_storm(int pow, bolt &beam)
beam.ench_power = pow; // used for radius
beam.hit = 20 + pow / 10;
beam.damage = calc_dice(9, 20 + pow);
+}
+
+void cast_fire_storm(int pow, bolt &beam)
+{
+ setup_fire_storm(&you, pow, beam);
if (explosion(beam, false, false, true, true, false) > 0)
mpr("A raging storm of fire appears!");