summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-19 23:07:02 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-19 23:07:02 +0000
commit5d67b7dd209ef2db81de963d877fc54916694939 (patch)
treeec6a55961dde96478872a3b351d9de934d832e47 /crawl-ref/source/effects.cc
parentd1f33de7203325f2168c6b4e92d198e2c435473b (diff)
downloadcrawl-ref-5d67b7dd209ef2db81de963d877fc54916694939.tar.gz
crawl-ref-5d67b7dd209ef2db81de963d877fc54916694939.zip
Fix monster targeting yet again.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8604 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc15
1 files changed, 5 insertions, 10 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 2f67cdffd6..56c89402fa 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -329,9 +329,6 @@ void immolation(int pow, int caster, coord_def where, bool known,
beam.effect_known = known;
beam.affects_items = (caster != IMMOLATION_SCROLL);
- const monsters *atk = (attacker->atype() == ACT_PLAYER ? NULL :
- dynamic_cast<const monsters*>(attacker));
-
if (caster == IMMOLATION_GENERIC || attacker == NULL)
{
beam.thrower = KILL_MISC;
@@ -345,7 +342,8 @@ void immolation(int pow, int caster, coord_def where, bool known,
else
{
beam.thrower = KILL_MON;
- beam.beam_source = monster_index(atk);
+ beam.beam_source =
+ monster_index(dynamic_cast<const monsters*>(attacker));
}
beam.explode();
@@ -380,11 +378,7 @@ void cleansing_flame(int pow, int caster, coord_def where,
beam.ex_size = 2;
beam.is_explosion = true;
- const monsters *atk = (attacker->atype() == ACT_PLAYER ? NULL :
- dynamic_cast<const monsters*>(attacker));
-
- if (caster == CLEANSING_FLAME_GENERIC || caster == CLEANSING_FLAME_TSO
- || attacker == NULL)
+ if (caster == CLEANSING_FLAME_GENERIC || caster == CLEANSING_FLAME_TSO)
{
beam.thrower = KILL_MISC;
beam.beam_source = NON_MONSTER;
@@ -397,7 +391,8 @@ void cleansing_flame(int pow, int caster, coord_def where,
else
{
beam.thrower = KILL_MON;
- beam.beam_source = monster_index(atk);
+ beam.beam_source =
+ monster_index(dynamic_cast<const monsters*>(attacker));
}
beam.explode();