summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-15 07:24:00 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-15 07:24:00 +0000
commit1ec85725d1e87db172a4cab09f8b2710ddc83a4b (patch)
treef7887de1edb53be9f5335868dfb9c5d2585d0364 /crawl-ref/source/fight.cc
parentd05b3c703413d1a81ff309ad8c13539ce6911f34 (diff)
downloadcrawl-ref-1ec85725d1e87db172a4cab09f8b2710ddc83a4b.tar.gz
crawl-ref-1ec85725d1e87db172a4cab09f8b2710ddc83a4b.zip
Shield blocks are much harder vs invisible attackers.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1316 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index c8fe040218..0362cad36d 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -2503,7 +2503,10 @@ bool melee_attack::attack_shield_blocked(bool verbose)
const int con_block = random2(attacker->shield_bypass_ability(to_hit)
+ defender->shield_block_penalty());
- const int pro_block = defender->shield_bonus();
+ int pro_block = defender->shield_bonus();
+
+ if (attacker->invisible() && !defender->can_see_invisible())
+ pro_block /= 3;
if (pro_block >= con_block)
{