diff options
author | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2011-06-07 11:35:42 -0500 |
---|---|---|
committer | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2011-06-07 11:38:48 -0500 |
commit | 015c09545a891973f1a7f35090e17c8aa7938d9f (patch) | |
tree | fd0ab68738c1486ee1db2855c4b407eb2b2ed5a8 /crawl-ref/source/attitude-change.cc | |
parent | 42e5c465d84086cbf84acc71c98aff961002b172 (diff) | |
download | crawl-ref-015c09545a891973f1a7f35090e17c8aa7938d9f.tar.gz crawl-ref-015c09545a891973f1a7f35090e17c8aa7938d9f.zip |
Fix LOS radius checks for Yred/Beogh/Jiyva follower abandonment.
Also, use this for Zin's Recite instead of hardcoding an LOS of 8.
Diffstat (limited to 'crawl-ref/source/attitude-change.cc')
-rw-r--r-- | crawl-ref/source/attitude-change.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/crawl-ref/source/attitude-change.cc b/crawl-ref/source/attitude-change.cc index 836006aad2..aace7d6c9c 100644 --- a/crawl-ref/source/attitude-change.cc +++ b/crawl-ref/source/attitude-change.cc @@ -171,13 +171,14 @@ bool make_god_gifts_disappear() return (count); } -// When under penance, Yredelemnulites can lose all undead slaves in sight. +// When under penance, Yredelemnulites can lose all nearby undead slaves. bool yred_slaves_abandon_you() { int num_reclaim = 0; int num_slaves = 0; - for (radius_iterator ri(you.pos(), 9); ri; ++ri) + for (radius_iterator ri(you.pos(), LOS_RADIUS, C_ROUND, you.get_los()); + ri; ++ri) { monster* mons = monster_at(*ri); if (mons == NULL) @@ -220,7 +221,7 @@ bool yred_slaves_abandon_you() return (false); } -// When under penance, Beoghites can lose all orcish followers in sight, +// When under penance, Beoghites can lose all nearby orcish followers, // subject to a few limitations. bool beogh_followers_abandon_you() { @@ -228,7 +229,8 @@ bool beogh_followers_abandon_you() int num_reconvert = 0; int num_followers = 0; - for (radius_iterator ri(you.pos(), 9); ri; ++ri) + for (radius_iterator ri(you.pos(), LOS_RADIUS, C_ROUND, you.get_los()); + ri; ++ri) { monster* mons = monster_at(*ri); if (mons == NULL) |