summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells2.cc
diff options
context:
space:
mode:
authorabrahamwl <abrahamwl@gmail.com>2009-10-31 08:39:53 -0700
committerRobert Vollmert <rvollmert@gmx.net>2009-10-31 17:31:05 +0100
commit09687dbfa8bc4df93dd243e4c291a1fad58f7470 (patch)
treece71ea575914510913a171a68b295197d7b7376f /crawl-ref/source/spells2.cc
parentc1d8dc0f1c7cfa48c46d7fe34c558a1d8f0ff586 (diff)
downloadcrawl-ref-09687dbfa8bc4df93dd243e4c291a1fad58f7470.tar.gz
crawl-ref-09687dbfa8bc4df93dd243e4c291a1fad58f7470.zip
Combine mons_res_foo(monsters *m) into monsters::res_foo()
...and replace all references to mons_res_foo() with res_foo(). Where "foo" is one of the many different things monsters can resist that happened to have a function of that format. TGfR! (Thank God for Regex!) Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r--crawl-ref/source/spells2.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index ea96dd9595..a1ea78180f 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -681,7 +681,7 @@ void drain_life(int pow)
if (!monster->alive()
|| mons_holiness(monster) != MH_NATURAL
- || mons_res_negative_energy(monster))
+ || monster->res_negative_energy())
{
continue;
}
@@ -754,7 +754,7 @@ bool vampiric_drain(int pow, const dist &vmove)
}
if (mons_holiness(monster) != MH_NATURAL
- || mons_res_negative_energy(monster))
+ || monster->res_negative_energy())
{
canned_msg(MSG_NOTHING_HAPPENS);
return (false);
@@ -842,7 +842,7 @@ bool burn_freeze(int pow, beam_type flavour, monsters *monster)
if (flavour == BEAM_COLD)
{
- const int cold_res = mons_res_cold( monster );
+ const int cold_res = monster->res_cold();
if (cold_res <= 0)
{
const int stun = (1 - cold_res) * random2(2 + pow/5);