summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/beam.cc2
-rw-r--r--crawl-ref/source/religion.cc12
-rw-r--r--crawl-ref/source/religion.h1
3 files changed, 10 insertions, 5 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index a51b2f7d28..8f54e03703 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -3308,7 +3308,7 @@ static bool _beam_is_harmless(bolt &beam, monsters *mon)
case BEAM_HOLY:
return (mons_is_holy(mon)
|| is_good_god(you.religion)
- && ( is_follower(mon) || mons_neutral(mon) ));
+ && (is_follower(mon) || mons_neutral(mon)));
case BEAM_STEAM:
return (mons_res_steam(mon) >= 3);
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 3ea0be07d1..a24a26ce4f 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -1182,11 +1182,15 @@ static bool _is_yred_enslaved_soul(const monsters* mon)
return (mon->alive() && mons_enslaved_soul(mon));
}
-bool is_yred_undead_slave(const monsters* mon)
+bool is_undead_slave(const monsters* mon)
{
return (mon->alive() && mons_holiness(mon) == MH_UNDEAD
- && mon->attitude == ATT_FRIENDLY
- && mons_is_god_gift(mon, GOD_YREDELEMNUL));
+ && mon->attitude == ATT_FRIENDLY);
+}
+
+bool is_yred_undead_slave(const monsters* mon)
+{
+ return (is_undead_slave(mon) && mons_is_god_gift(mon, GOD_YREDELEMNUL));
}
bool is_orcish_follower(const monsters* mon)
@@ -1211,7 +1215,7 @@ bool is_good_follower(const monsters* mon)
bool is_follower(const monsters* mon)
{
if (you.religion == GOD_YREDELEMNUL)
- return is_yred_undead_slave(mon);
+ return is_undead_slave(mon);
else if (you.religion == GOD_BEOGH)
return is_orcish_follower(mon);
else if (you.religion == GOD_ZIN)
diff --git a/crawl-ref/source/religion.h b/crawl-ref/source/religion.h
index 3b2731039b..6ee1eca468 100644
--- a/crawl-ref/source/religion.h
+++ b/crawl-ref/source/religion.h
@@ -115,6 +115,7 @@ bool tso_unchivalric_attack_safe_monster(const monsters *mon);
void mons_make_god_gift(monsters *mon, god_type god = you.religion);
bool mons_is_god_gift(const monsters *mon, god_type god = you.religion);
+bool is_undead_slave(const monsters* mon);
bool is_yred_undead_slave(const monsters* mon);
bool is_orcish_follower(const monsters* mon);
bool is_good_lawful_follower(const monsters* mon);