summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-17 18:28:56 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-17 18:28:56 +0000
commit8af40b84cbc2dec50a2a2244aca9d01344614b6a (patch)
treebbf3fcc47aa77e283410133c4d338ab46fe345e7 /crawl-ref/source/fight.cc
parent51a3d79045ff49839e884b92c78e9a0cc01ed33f (diff)
downloadcrawl-ref-8af40b84cbc2dec50a2a2244aca9d01344614b6a.tar.gz
crawl-ref-8af40b84cbc2dec50a2a2244aca9d01344614b6a.zip
Fix handling of monsters that TSO doesn't mind your using unchivalric
attacks on. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5102 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 3e4350ee6e..3db36c9e9a 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -2870,12 +2870,11 @@ void melee_attack::player_stab_check()
if (stab_attempt && roll_needed)
stab_attempt = (random2(roll) <= you.skills[SK_STABBING] + you.dex);
- if (unchivalric && you.religion == GOD_SHINING_ONE)
+ if (unchivalric)
{
- // check for the would-be-stabbed monster's being alive, in case
- // it was abjured as a result of the attack
- bool cancel_stab = !defender->alive() ||
- (!tso_unchivalric_attack_safe_monster(defender)
+ bool cancel_stab =
+ (you.religion == GOD_SHINING_ONE
+ && !tso_unchivalric_attack_safe_monster(defender)
&& !yesno("Really attack this helpless creature?", false, 'n'));
if (cancel_stab)