From 66a5899fafcf34e1e473b4cbac42938ce90300bb Mon Sep 17 00:00:00 2001 From: haranp Date: Wed, 11 Feb 2009 21:58:55 +0000 Subject: Fix [2035741]: give different messages when an attack is completely stopped by AC and when at least some of it bypasses AC but it is completely stopped by resistance. Fix bug where determine_damage() was ignoring AC. Fix negative energy always being known even if it hits something you can't see. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9027 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/fight.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/fight.cc') diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index e9dc16ee95..317c7d2c72 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -184,11 +184,11 @@ int calc_your_to_hit( bool random_factor ) // be stochastic; if false, deterministic (e.g. for chardumps.) int calc_heavy_armour_penalty( bool random_factor ) { - const bool ur_armed = (you.equip[EQ_WEAPON] != -1); + const bool ur_armed = (you.weapon() != NULL); int heavy_armour = 0; // heavy armour modifiers for shield borne - if (you.shield()) + if (player_wearing_slot(EQ_SHIELD)) { switch (you.shield()->sub_type) { -- cgit v1.2.3-54-g00ecf