summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-18 16:09:33 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-18 16:09:33 +0000
commit752bd3be6f5bf7bd5a8509e036f2d8a6c5c75e77 (patch)
tree381e398384f1b3f57c76c665bf1b6898f0623d62 /crawl-ref
parentfdb1f24de9d264bac9001fd211ddb1a1ee7bc3dd (diff)
downloadcrawl-ref-752bd3be6f5bf7bd5a8509e036f2d8a6c5c75e77.tar.gz
crawl-ref-752bd3be6f5bf7bd5a8509e036f2d8a6c5c75e77.zip
Add a few more follower-related cleanups.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5947 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/monstuff.cc2
-rw-r--r--crawl-ref/source/religion.cc6
-rw-r--r--crawl-ref/source/stuff.cc5
3 files changed, 5 insertions, 8 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 2b42ed9ad6..28ae299f8c 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -600,7 +600,7 @@ static bool _monster_avoided_death(monsters *monster, killer_type killer, int i)
else if (MON_KILL(killer) && !invalid_monster_index(i))
{
monsters *mon = &menv[i];
- if (is_orcish_follower(mon) && !one_chance_in(3))
+ if (is_follower(mon) && !one_chance_in(3))
convert = true;
}
}
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 2811311f70..874934a436 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -1072,7 +1072,8 @@ static void _give_nemelex_gift()
bool is_orcish_follower(const monsters* mon)
{
return (mon->alive() && mons_species(mon->type) == MONS_ORC
- && mons_friendly(mon) && mons_is_god_gift(mon, GOD_BEOGH));
+ && mon->attitude == ATT_FRIENDLY
+ && mons_is_god_gift(mon, GOD_BEOGH));
}
bool is_good_lawful_follower(const monsters* mon)
@@ -4453,7 +4454,7 @@ static bool _beogh_followers_abandon_you()
for (int x = xstart; x <= xend; ++x)
{
const unsigned short targ_monst = mgrd[x][y];
- if ( targ_monst != NON_MONSTER )
+ if (targ_monst != NON_MONSTER)
{
monsters *monster = &menv[targ_monst];
if (is_orcish_follower(monster))
@@ -4476,7 +4477,6 @@ static bool _beogh_followers_abandon_you()
}
monster->attitude = ATT_HOSTILE;
- monster->del_ench(ENCH_CHARM, true);
behaviour_event(monster, ME_ALERT, MHITYOU);
// For now CREATED_FRIENDLY stays.
diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc
index 9e78684770..d5ba752a98 100644
--- a/crawl-ref/source/stuff.cc
+++ b/crawl-ref/source/stuff.cc
@@ -320,11 +320,8 @@ static bool tag_follower_at(const coord_def &pos)
return (false);
// Orcs will follow Beogh worshippers.
- if (you.religion != GOD_BEOGH
- || !is_orcish_follower(fmenv))
- {
+ if (you.religion != GOD_BEOGH || !is_orcish_follower(fmenv))
return (false);
- }
}
// Monster is chasing player through stairs.