summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-17 01:36:13 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-17 01:36:13 +0000
commitded3b65a0dfd01a304e0b1c9f41c5d9fafc1d3f8 (patch)
tree9d6d2a77c39e986ffa86f8e094ec446deb3f742c /crawl-ref/source/fight.cc
parent408f0d9ba4e28730d1bb388f8ed2f771c9d45155 (diff)
downloadcrawl-ref-ded3b65a0dfd01a304e0b1c9f41c5d9fafc1d3f8.tar.gz
crawl-ref-ded3b65a0dfd01a304e0b1c9f41c5d9fafc1d3f8.zip
For TSO, change the "stabbing" conduct to an "unchivalrous attack"
conduct, and exercise it on every stabbing attempt, whether it succeeds or not (and also whether the player is berserk or not, since a berserk player trying to stab seems unchivalrous to me). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5093 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc18
1 files changed, 5 insertions, 13 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index a120e06740..ae8885f921 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -1424,9 +1424,6 @@ int melee_attack::player_stab(int damage)
stab_message( def, stab_bonus );
exercise(SK_STABBING, 1 + random2avg(5, 4));
-
- if (!tso_stab_safe_monster(defender))
- did_god_conduct(DID_STABBING, 4);
}
else
{
@@ -2776,7 +2773,7 @@ int melee_attack::player_to_hit(bool random_factor)
void melee_attack::player_stab_check()
{
bool roll_needed = true;
- int roll = 155;
+ int roll = 155;
// This ordering is important!
// not paying attention (but not batty)
@@ -2835,26 +2832,21 @@ void melee_attack::player_stab_check()
stab_bonus = 0;
}
- // 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
bool cancel_stab = !defender->alive() ||
- (!tso_stab_safe_monster(defender)
+ (!tso_unchivalric_attack_safe_monster(defender)
&& !yesno("Really attack this helpless creature?", false, 'n'));
if (cancel_stab)
{
- stab_attempt = false;
+ stab_attempt = false;
cancel_attack = true;
}
+ else
+ did_god_conduct(DID_UNCHIVALRIC_ATTACK, 4);
}
// see if we need to roll against dexterity / stabbing