diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-09 00:34:32 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-09 00:34:32 +0000 |
commit | 73c7ba7653843ab2433c146eb1ff22636706c024 (patch) | |
tree | 11423ae5d5d399c869de1f6e1988e5911d9888be /crawl-ref/source/fight.cc | |
parent | 7d52150177817250dc5648c0e54136b5fa14ab18 (diff) | |
download | crawl-ref-73c7ba7653843ab2433c146eb1ff22636706c024.tar.gz crawl-ref-73c7ba7653843ab2433c146eb1ff22636706c024.zip |
Simplify.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8343 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r-- | crawl-ref/source/fight.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 170dec3c05..ed48ac70e3 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -478,12 +478,12 @@ std::string melee_attack::wep_name(description_level_type desc, return (name); } -bool melee_attack::is_banished(const actor *defn) const +bool melee_attack::is_banished(const actor *a) const { - if (!defn) + if (!a || a->alive()) return (false); - if (defn->atype() == ACT_PLAYER) + if (a->atype() == ACT_PLAYER) return (you.banished); else return (def->flags & MF_BANISHED); @@ -4663,7 +4663,7 @@ void melee_attack::mons_perform_attack_rounds() // Defender banished. Bail before chaos_killed_defender() // is called, since the defender is still alive in the // Abyss. - if (!defender->alive() && is_banished(defender)) + if (is_banished(defender)) { if (chaos_attack && attacker->alive()) chaos_affects_attacker(); |