summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/religion.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-13 23:44:16 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-13 23:44:16 +0000
commit3edacadcb25331db8301cd232d9b9897f20b6257 (patch)
treeed330bcaae323a156664515c9dc2228047d22d04 /crawl-ref/source/religion.cc
parentb698d649b8774be00f1d64a64926e7fdf5b2d5e1 (diff)
downloadcrawl-ref-3edacadcb25331db8301cd232d9b9897f20b6257.tar.gz
crawl-ref-3edacadcb25331db8301cd232d9b9897f20b6257.zip
Add follower-related cleanups.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5797 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r--crawl-ref/source/religion.cc24
1 files changed, 16 insertions, 8 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 67749e2211..3b3bc6ee5c 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -819,24 +819,32 @@ static void _give_nemelex_gift()
}
}
-bool is_good_follower(const monsters* mon)
+bool is_orcish_follower(const monsters* mon)
+{
+ return (mon->alive() && mons_species(mon->type) == MONS_ORC
+ && mon->attitude == ATT_FRIENDLY && mons_is_god_gift(mon));
+}
+
+bool is_good_lawful_follower(const monsters* mon)
{
return (mon->alive() && !mons_is_evil_or_unholy(mon)
- && mons_friendly(mon));
+ && !mons_is_chaotic(mon) && mons_friendly(mon));
}
-bool is_orcish_follower(const monsters* mon)
+bool is_good_follower(const monsters* mon)
{
- return (mon->alive() && mons_species(mon->type) == MONS_ORC
- && mon->attitude == ATT_FRIENDLY && mons_is_god_gift(mon));
+ return (mon->alive() && !mons_is_evil_or_unholy(mon)
+ && mons_friendly(mon));
}
bool is_follower(const monsters* mon)
{
- if (is_good_god(you.religion))
- return is_good_follower(mon);
- else if (you.religion == GOD_BEOGH)
+ if (you.religion == GOD_BEOGH)
return is_orcish_follower(mon);
+ else if (you.religion == GOD_ZIN)
+ return is_good_lawful_follower(mon);
+ else if (is_good_god(you.religion))
+ return is_good_follower(mon);
else
return (mon->alive() && mons_friendly(mon));
}