summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells4.cc
diff options
context:
space:
mode:
authorVsevolod Kozlov <zaba@thorium.homeunix.org>2009-11-05 19:58:50 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2009-11-05 19:58:50 +1000
commitb9def0122143459c4d1fd0721384028f3974dc69 (patch)
treef7b26f422d93b6f6769a45cb757c9075279a7c6a /crawl-ref/source/spells4.cc
parent313465bf23382559f7c26c63849b64266c8d939f (diff)
downloadcrawl-ref-b9def0122143459c4d1fd0721384028f3974dc69.tar.gz
crawl-ref-b9def0122143459c4d1fd0721384028f3974dc69.zip
Move *_res(ist)_magic to relevant classes, provide actor interface.
Signed-off-by: Jude Brown <bookofjude@users.sourceforge.net>
Diffstat (limited to 'crawl-ref/source/spells4.cc')
-rw-r--r--crawl-ref/source/spells4.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc
index 863acda3d5..84af39d6f3 100644
--- a/crawl-ref/source/spells4.cc
+++ b/crawl-ref/source/spells4.cc
@@ -398,7 +398,7 @@ static int _sleep_monsters(coord_def where, int pow, int, actor *)
if (monster->holiness() != MH_NATURAL)
return (0);
- if (check_mons_resist_magic(monster, pow))
+ if (monster->check_res_magic(pow))
return (0);
// Works on friendlies too, so no check for that.
@@ -464,7 +464,7 @@ static int _tame_beast_monsters(coord_def where, int pow, int, actor *)
if (you.species == SP_HILL_ORC && monster->type == MONS_WARG)
pow += (pow / 2);
- if (check_mons_resist_magic(monster, pow))
+ if (monster->check_res_magic(pow))
return 0;
simple_monster_message(monster, " is tamed!");
@@ -872,7 +872,7 @@ int disperse_monsters(coord_def where, int pow, int, actor *)
simple_monster_message(defender, " resists.");
return 1;
}
- else if (check_mons_resist_magic(defender, pow))
+ else if (defender->check_res_magic(pow))
{
// XXX Note that this might affect magic-immunes!
if (coinflip())