From 73c7ba7653843ab2433c146eb1ff22636706c024 Mon Sep 17 00:00:00 2001 From: dolorous Date: Fri, 9 Jan 2009 00:34:32 +0000 Subject: Simplify. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8343 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/fight.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/fight.cc') 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(); -- cgit v1.2.3-54-g00ecf