summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-19 03:08:54 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-19 03:08:54 +0000
commit233e50497b1541c053d9c126c2c3dc0647a86c67 (patch)
tree281358f9597eb28be92da961b2995c7286ea80fe /crawl-ref
parent40baf6a7321fbe1ad3385f7b090abd3535b8bf29 (diff)
downloadcrawl-ref-233e50497b1541c053d9c126c2c3dc0647a86c67.tar.gz
crawl-ref-233e50497b1541c053d9c126c2c3dc0647a86c67.zip
For abjuration purposes, treat good neutral monsters like friendly
monsters. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4354 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/mstuff2.cc8
-rw-r--r--crawl-ref/source/spells1.cc2
2 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc
index fc0162e428..9ac10b196b 100644
--- a/crawl-ref/source/mstuff2.cc
+++ b/crawl-ref/source/mstuff2.cc
@@ -2203,14 +2203,14 @@ bolt mons_spells( int spell_cast, int power )
static int monster_abjure_square(const coord_def &pos,
int power, int test_only,
- int friendly)
+ int wont_attack)
{
const int mindex = mgrd(pos);
if (mindex == NON_MONSTER)
return (0);
monsters *target = &menv[mindex];
- if (!target->alive() || ((bool)friendly == mons_friendly(target)))
+ if (!target->alive() || ((bool)wont_attack == mons_wont_attack(target)))
return (0);
mon_enchant abj = target->get_ench(ENCH_ABJ);
@@ -2262,7 +2262,7 @@ static int apply_radius_around_square(
static int monster_abjuration(const monsters *caster, bool test)
{
- const bool friendly = mons_friendly(caster);
+ const bool wont_attack = mons_wont_attack(caster);
int maffected = 0;
if (!test)
@@ -2276,7 +2276,7 @@ static int monster_abjuration(const monsters *caster, bool test)
int number_hit =
apply_radius_around_square(
caster->pos(), rad, monster_abjure_square,
- pow, test, friendly);
+ pow, test, wont_attack);
maffected += number_hit;
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc
index 2cc4264396..efd111612e 100644
--- a/crawl-ref/source/spells1.cc
+++ b/crawl-ref/source/spells1.cc
@@ -864,7 +864,7 @@ void abjuration(int pow)
if (monster->type == -1 || !mons_near(monster))
continue;
- if (mons_friendly(monster))
+ if (mons_wont_attack(monster))
continue;
mon_enchant abj = monster->get_ench(ENCH_ABJ);