summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-11 21:58:55 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-11 21:58:55 +0000
commit66a5899fafcf34e1e473b4cbac42938ce90300bb (patch)
treeae6ef8639672874f08bba1fb2edd7760c5f09cec /crawl-ref/source/fight.cc
parentf5ce15870a0d4ae042a704065df4d0cdbbda0506 (diff)
downloadcrawl-ref-66a5899fafcf34e1e473b4cbac42938ce90300bb.tar.gz
crawl-ref-66a5899fafcf34e1e473b4cbac42938ce90300bb.zip
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
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc4
1 files changed, 2 insertions, 2 deletions
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)
{