summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-07 22:50:11 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-07 22:50:11 +0000
commit0915163a542776844b0ce664221417f86c05245c (patch)
treec24191aacde143a54c20ba2180a05b4db4577019 /crawl-ref/source/fight.cc
parentefd814414b3ee9043cb7195fb048d1e4bf9843db (diff)
downloadcrawl-ref-0915163a542776844b0ce664221417f86c05245c.tar.gz
crawl-ref-0915163a542776844b0ce664221417f86c05245c.zip
More neutrality cleanups. Holy beings neutralized on sight by your
piety will not attack you and can swap positions with you. All other neutral beings behave the same as before. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4119 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 0bba6838c7..998a3147e4 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -310,7 +310,7 @@ melee_attack::melee_attack(actor *attk, actor *defn,
void melee_attack::check_hand_half_bonus_eligible()
{
- hand_half_bonus =
+ hand_half_bonus =
unarmed_ok
&& !can_do_unarmed
&& !shield
@@ -326,14 +326,14 @@ void melee_attack::init_attack()
if (defender && defender->atype() == ACT_MONSTER)
def = dynamic_cast<monsters*>(defender);
-
+
weapon = attacker->weapon(attack_number);
damage_brand = attacker->damage_brand(attack_number);
if (weapon && weapon->base_type == OBJ_WEAPONS
&& is_random_artefact( *weapon ))
{
- randart_wpn_properties( *weapon, art_props );
+ randart_wpn_properties( *weapon, art_props );
}
wpn_skill = weapon? weapon_skill( *weapon ) : SK_UNARMED_COMBAT;
@@ -3908,8 +3908,8 @@ bool monster_attack(int monster_attacking)
{
monsters *attacker = &menv[monster_attacking];
- // Friendly monsters won't attack unless confused.
- if (mons_friendly(attacker) && !mons_is_confused(attacker))
+ // Friendly and good neutral monsters won't attack unless confused.
+ if (mons_wont_attack(attacker) && !mons_is_confused(attacker))
return false;
// In case the monster hasn't noticed you, bumping into it will