summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-22 23:50:26 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-22 23:50:26 +0000
commit81876c70a7f81134cf0b1ecb35cec07800718508 (patch)
tree6fb727b32d9e856406b090825e12de1cc0206efa
parent9daac86c5e72c14573708a7061fc0b225b2beafb (diff)
downloadcrawl-ref-81876c70a7f81134cf0b1ecb35cec07800718508.tar.gz
crawl-ref-81876c70a7f81134cf0b1ecb35cec07800718508.zip
Disallow stabbing while berserk.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4501 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/fight.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 892fb5769a..7290bb752d 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -2827,9 +2827,14 @@ void melee_attack::player_stab_check()
stab_bonus = 0;
}
- if (stab_attempt
- && you.religion == GOD_SHINING_ONE
- && !you.duration[DUR_BERSERKER])
+ // no stabs while berserk
+ if (you.duration[DUR_BERSERKER])
+ {
+ stab_attempt = false;
+ stab_bonus = 0;
+ }
+
+ if (stab_attempt && you.religion == GOD_SHINING_ONE)
{
// check for the would-be-stabbed monster's being alive, in case
// it was abjured as a result of the attack