summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/mon-util.cc5
-rw-r--r--crawl-ref/source/mon-util.h1
-rw-r--r--crawl-ref/source/monplace.cc2
-rw-r--r--crawl-ref/source/monstuff.cc6
-rw-r--r--crawl-ref/source/religion.cc9
5 files changed, 8 insertions, 15 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index cd16abbbce..b60b9924b7 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -1109,11 +1109,6 @@ bool mons_is_holy(const monsters *mon)
return (mon->holiness() == MH_HOLY);
}
-bool mons_is_evil_or_unholy(const monsters *mon)
-{
- return (mon->is_evil() || mon->is_unholy());
-}
-
bool mons_has_lifeforce(const monsters *mon)
{
const mon_holy_type holiness = mon->holiness();
diff --git a/crawl-ref/source/mon-util.h b/crawl-ref/source/mon-util.h
index 21c57dd4d5..3ef2ce3f46 100644
--- a/crawl-ref/source/mon-util.h
+++ b/crawl-ref/source/mon-util.h
@@ -638,7 +638,6 @@ bool mons_was_seen(const monsters *m);
bool mons_is_known_mimic(const monsters *m);
bool mons_is_unknown_mimic(const monsters *m);
bool mons_is_holy(const monsters *mon);
-bool mons_is_evil_or_unholy(const monsters *mon);
bool mons_is_icy(int mc);
bool mons_is_skeletal(int mc);
bool mons_class_is_slime(int mc);
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index 1c00483f26..278dc511b0 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -2576,7 +2576,7 @@ bool player_will_anger_monster(monsters *mon, bool *holy,
bool *antimagical)
{
const bool isHoly =
- (is_good_god(you.religion) && mons_is_evil_or_unholy(mon));
+ (is_good_god(you.religion) && mon->is_evil());
const bool isUnholy =
(is_evil_god(you.religion) && mons_is_holy(mon));
const bool isLawful =
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 6c65a4a923..737a5bce24 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -1605,7 +1605,7 @@ int monster_die(monsters *monster, killer_type killer,
|| (!created_friendly && gives_xp
&& (you.religion == GOD_MAKHLEB
|| you.religion == GOD_SHINING_ONE
- && mons_is_evil_or_unholy(monster))
+ && monster->is_evil())
&& !player_under_penance()
&& random2(you.piety) >= piety_breakpoint(0)))
{
@@ -1621,7 +1621,7 @@ int monster_die(monsters *monster, killer_type killer,
&& (you.religion == GOD_MAKHLEB
|| you.religion == GOD_VEHUMET
|| you.religion == GOD_SHINING_ONE
- && mons_is_evil_or_unholy(monster))
+ && monster->is_evil())
&& !player_under_penance()
&& random2(you.piety) >= piety_breakpoint(0))
{
@@ -1836,7 +1836,7 @@ int monster_die(monsters *monster, killer_type killer,
}
if (you.religion == GOD_SHINING_ONE
- && mons_is_evil_or_unholy(monster)
+ && monster->is_evil()
&& !player_under_penance()
&& random2(you.piety) >= piety_breakpoint(0)
&& !invalid_monster_index(killer_index))
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 3b3d42f106..cf32f5e100 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -1478,14 +1478,13 @@ bool _has_jelly()
bool is_good_lawful_follower(const monsters* mon)
{
- return (mon->alive() && !mons_is_evil_or_unholy(mon)
- && !mon->is_chaotic() && mons_friendly(mon));
+ return (mon->alive() && !mon->is_evil() && !mon->is_chaotic()
+ && mons_friendly(mon));
}
bool is_good_follower(const monsters* mon)
{
- return (mon->alive() && !mons_is_evil_or_unholy(mon)
- && mons_friendly(mon));
+ return (mon->alive() && !mon->is_evil() && mons_friendly(mon));
}
bool is_follower(const monsters* mon)
@@ -5186,7 +5185,7 @@ static bool _evil_beings_on_level_attitude_change()
{
monsters *monster = &menv[i];
if (monster->alive()
- && mons_is_evil_or_unholy(monster))
+ && monster->is_evil())
{
#ifdef DEBUG_DIAGNOSTICS
mprf(MSGCH_DIAGNOSTICS, "Evil attitude changing: %s "