summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/mstuff2.cc3
-rw-r--r--crawl-ref/source/spells2.cc4
-rw-r--r--crawl-ref/source/spells2.h3
3 files changed, 6 insertions, 4 deletions
diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc
index 2990b06a52..23387cf558 100644
--- a/crawl-ref/source/mstuff2.cc
+++ b/crawl-ref/source/mstuff2.cc
@@ -486,7 +486,8 @@ void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast,
if (!monsterNearby || mons_friendly(monster))
return;
- cast_refrigeration(random2(12 * monster->hit_dice), true);
+ cast_refrigeration(random2(12 * monster->hit_dice), true,
+ monster->mindex());
return;
case SPELL_OLGREBS_TOXIC_RADIANCE:
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 230386026d..896ebb8d87 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -589,7 +589,7 @@ void cast_toxic_radiance(bool monster_cast)
}
}
-void cast_refrigeration(int pow, bool monster_cast)
+void cast_refrigeration(int pow, bool monster_cast, int caster)
{
mpr("The heat is drained from your surroundings.");
@@ -605,7 +605,7 @@ void cast_refrigeration(int pow, bool monster_cast)
if (hurted > 0)
{
mpr("You feel very cold.");
- ouch(hurted, NON_MONSTER, KILLED_BY_FREEZING);
+ ouch(hurted, caster, KILLED_BY_FREEZING);
// Note: this used to be 12!... and it was also applied even if
// the player didn't take damage from the cold, so we're being
diff --git a/crawl-ref/source/spells2.h b/crawl-ref/source/spells2.h
index 3e9eeab5f7..b1d26280fb 100644
--- a/crawl-ref/source/spells2.h
+++ b/crawl-ref/source/spells2.h
@@ -23,7 +23,8 @@ bool vampiric_drain(int pow, const dist &vmove);
int detect_creatures(int pow, bool telepathic = false);
int detect_items(int pow);
int detect_traps(int pow);
-void cast_refrigeration(int pow, bool monster_cast = false);
+void cast_refrigeration(int pow, bool monster_cast = false,
+ int caster = NON_MONSTER);
void cast_toxic_radiance(bool monster_cast = false);
void drain_life(int pow);