summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/externs.h3
-rw-r--r--crawl-ref/source/fight.cc2
-rw-r--r--crawl-ref/source/mon-util.cc7
-rw-r--r--crawl-ref/source/player.cc5
4 files changed, 15 insertions, 2 deletions
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index cdce5fee23..c3edebce66 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -144,6 +144,7 @@ public:
virtual void attacking(actor *other) = 0;
virtual bool can_go_berserk() const = 0;
virtual bool can_see_invisible() const = 0;
+ virtual bool is_icy() const = 0;
virtual bool invisible() const = 0;
virtual void go_berserk(bool intentional) = 0;
virtual void mutate() = 0;
@@ -718,6 +719,7 @@ public:
bool cannot_speak() const;
bool invisible() const;
bool can_see_invisible() const;
+ bool is_icy() const;
kill_category kill_alignment() const;
@@ -1001,6 +1003,7 @@ public:
int levitates() const;
bool invisible() const;
bool can_see_invisible() const;
+ bool is_icy() const;
bool paralysed() const;
bool confused() const;
bool asleep() const;
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index a9856708f4..c8fe040218 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -1537,7 +1537,7 @@ bool melee_attack::apply_damage_brand()
{
case SPWPN_FLAMING:
res = fire_res_apply_cerebov_downgrade( defender->res_fire() );
- calc_elemental_brand_damage(res, "burn");
+ calc_elemental_brand_damage(res, defender->is_icy()? "melt" : "burn");
defender->expose_to_element(BEAM_FIRE);
break;
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 5c06518fd0..077d47c117 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -308,7 +308,7 @@ bool mons_is_stationary(const monsters *mons)
bool mons_is_icy(const monsters *mons)
{
- return (mons_is_icy(mons->type));
+ return (mons->is_icy());
}
bool mons_is_icy(int mtype)
@@ -3719,6 +3719,11 @@ void monsters::mutate()
monster_polymorph(this, RANDOM_MONSTER, 100);
}
+bool monsters::is_icy() const
+{
+ return (mons_is_icy(type));
+}
+
/////////////////////////////////////////////////////////////////////////
// mon_enchant
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 2918e42053..42d78f93b1 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -5277,3 +5277,8 @@ void player::mutate()
else
give_bad_mutation();
}
+
+bool player::is_icy() const
+{
+ return (attribute[ATTR_TRANSFORMATION] == TRAN_ICE_BEAST);
+}