From 09687dbfa8bc4df93dd243e4c291a1fad58f7470 Mon Sep 17 00:00:00 2001 From: abrahamwl Date: Sat, 31 Oct 2009 08:39:53 -0700 Subject: 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 --- crawl-ref/source/spells4.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/spells4.cc') diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc index c6fb109290..3d281652b2 100644 --- a/crawl-ref/source/spells4.cc +++ b/crawl-ref/source/spells4.cc @@ -401,7 +401,7 @@ static int _sleep_monsters(coord_def where, int pow, int, actor *) // Works on friendlies too, so no check for that. //jmf: Now that sleep == hibernation: - const int res = mons_res_cold(monster); + const int res = monster->res_cold(); if (res > 0 && one_chance_in(std::max(4 - res, 1))) return (0); if (monster->has_ench(ENCH_SLEEP_WARY) && !one_chance_in(3)) @@ -791,7 +791,7 @@ static int _discharge_monsters(coord_def where, int pow, int, actor *) } else if (monster == NULL) return (0); - else if (mons_res_elec(monster) > 0 || mons_flies(monster)) + else if (monster->res_elec() > 0 || mons_flies(monster)) return (0); else { @@ -1003,7 +1003,7 @@ static int _intoxicate_monsters(coord_def where, int pow, int, actor *) if (monster == NULL || mons_intel(monster) < I_NORMAL || mons_holiness(monster) != MH_NATURAL - || mons_res_poison(monster) > 0) + || monster->res_poison() > 0) { return 0; } -- cgit v1.2.3-54-g00ecf