diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-10-30 14:59:30 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-10-30 14:59:30 +0000 |
commit | 8ed677055467ee859be944fabf1d1686d7385137 (patch) | |
tree | a6fba3741aa1809bcff789300303a22401cef3ac /crawl-ref/source | |
parent | eaa5abaa3b42fc31511709f1f32de857052ea2e6 (diff) | |
download | crawl-ref-8ed677055467ee859be944fabf1d1686d7385137.tar.gz crawl-ref-8ed677055467ee859be944fabf1d1686d7385137.zip |
Make is_follower() return true for all undead slaves under Yred.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7305 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/beam.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/religion.cc | 12 | ||||
-rw-r--r-- | crawl-ref/source/religion.h | 1 |
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); |