summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-behv.cc
diff options
context:
space:
mode:
authorVsevolod Kozlov <zaba@thorium.homeunix.org>2009-11-09 14:33:06 +0300
committerVsevolod Kozlov <zaba@thorium.homeunix.org>2009-11-09 14:58:19 +0300
commit9338556ebf846bbc4176134e3846ef6699e8434b (patch)
tree2107949166730a765e3e1e98a66778f112fb5e6a /crawl-ref/source/mon-behv.cc
parentbf03515e22d610f81afa6d4153afc383f7331363 (diff)
downloadcrawl-ref-9338556ebf846bbc4176134e3846ef6699e8434b.tar.gz
crawl-ref-9338556ebf846bbc4176134e3846ef6699e8434b.zip
Replace mons_wont_attack with monsters::wont_attack.
Diffstat (limited to 'crawl-ref/source/mon-behv.cc')
-rw-r--r--crawl-ref/source/mon-behv.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/crawl-ref/source/mon-behv.cc b/crawl-ref/source/mon-behv.cc
index 8566f6a5a9..62cf3b992c 100644
--- a/crawl-ref/source/mon-behv.cc
+++ b/crawl-ref/source/mon-behv.cc
@@ -1085,7 +1085,7 @@ void handle_behaviour(monsters *mon)
bool changed = true;
bool isFriendly = mon->friendly();
bool isNeutral = mon->neutral();
- bool wontAttack = mons_wont_attack(mon);
+ bool wontAttack = mon->wont_attack();
// Whether the player is in LOS of the monster and can see
// or has guessed the player's location.
@@ -1096,7 +1096,7 @@ void handle_behaviour(monsters *mon)
#ifdef WIZARD
// If stealth is greater than actually possible (wizmode level)
// pretend the player isn't there, but only for hostile monsters.
- if (proxPlayer && you.skills[SK_STEALTH] > 27 && !mons_wont_attack(mon))
+ if (proxPlayer && you.skills[SK_STEALTH] > 27 && !mon->wont_attack())
proxPlayer = false;
#endif
bool proxFoe;
@@ -1221,7 +1221,7 @@ void handle_behaviour(monsters *mon)
// Friendly and good neutral monsters do not attack other friendly
// and good neutral monsters.
if (mon->foe != MHITNOT && mon->foe != MHITYOU
- && wontAttack && mons_wont_attack(&menv[mon->foe]))
+ && wontAttack && menv[mon->foe].wont_attack())
{
mon->foe = MHITNOT;
}
@@ -1659,7 +1659,7 @@ void behaviour_event(monsters *mon, mon_event_type event, int src,
const beh_type old_behaviour = mon->behaviour;
bool isSmart = (mons_intel(mon) > I_ANIMAL);
- bool wontAttack = mons_wont_attack(mon);
+ bool wontAttack = mon->wont_attack();
bool sourceWontAttack = false;
bool setTarget = false;
bool breakCharm = false;
@@ -1668,7 +1668,7 @@ void behaviour_event(monsters *mon, mon_event_type event, int src,
if (src == MHITYOU)
sourceWontAttack = true;
else if (src != MHITNOT)
- sourceWontAttack = mons_wont_attack(&menv[src]);
+ sourceWontAttack = menv[src].wont_attack();
if (is_sanctuary(mon->pos()) && mons_is_fleeing_sanctuary(mon))
{
@@ -1891,7 +1891,7 @@ void behaviour_event(monsters *mon, mon_event_type event, int src,
// If it woke up and you're its new foe, it might shout.
if (was_sleeping && !mon->asleep() && allow_shout
- && mon->foe == MHITYOU && !mons_wont_attack(mon))
+ && mon->foe == MHITYOU && !mon->wont_attack())
{
handle_monster_shouts(mon);
}