diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-04-14 09:05:09 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-04-14 09:05:09 +0000 |
commit | 72560e17acd9fd40a9dcc969c14f3b1fd60fe96c (patch) | |
tree | 957d64e854d8921a4c909f3c650d9150e01a5052 /crawl-ref/source | |
parent | d173ffd6c2eee6f558d8bf6094e34e04c23a0d7e (diff) | |
download | crawl-ref-72560e17acd9fd40a9dcc969c14f3b1fd60fe96c.tar.gz crawl-ref-72560e17acd9fd40a9dcc969c14f3b1fd60fe96c.zip |
Flame brand in melee was producing "burn" messages vs ice beasts, fixed.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1304 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/externs.h | 3 | ||||
-rw-r--r-- | crawl-ref/source/fight.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/mon-util.cc | 7 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 5 |
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); +} |