summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-19 20:07:13 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-19 20:07:13 +0000
commitf6f7d43fc9608119649ad43ff68fe4b0a6be7951 (patch)
treebae432465f8a61f056af38863829f322169c41aa /crawl-ref/source/fight.cc
parentd5f91332d6bd79a8e8c992d5f0cc0fe735d0e85a (diff)
downloadcrawl-ref-f6f7d43fc9608119649ad43ff68fe4b0a6be7951.tar.gz
crawl-ref-f6f7d43fc9608119649ad43ff68fe4b0a6be7951.zip
Add more minor cosmetic fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5138 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc34
1 files changed, 17 insertions, 17 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 0f820c4f93..71f986d6ac 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -2834,6 +2834,22 @@ void melee_attack::player_stab_check()
unchivalric_attack_type unchivalric =
is_unchivalric_attack(&you, defender, def);
+ if (unchivalric)
+ {
+ if (you.religion == GOD_SHINING_ONE
+ && !tso_unchivalric_attack_safe_monster(defender))
+ {
+ if (!you.confused()
+ && !yesno("Really attack this helpless creature?", false, 'n'))
+ {
+ cancel_attack = true;
+ return;
+ }
+ }
+
+ did_god_conduct(DID_UNCHIVALRIC_ATTACK, 4, true, def);
+ }
+
bool roll_needed = true;
int roll = 155;
// This ordering is important!
@@ -2880,27 +2896,11 @@ void melee_attack::player_stab_check()
// see if we need to roll against dexterity / stabbing
if (stab_attempt && roll_needed)
stab_attempt = (random2(roll) <= you.skills[SK_STABBING] + you.dex);
-
- if (unchivalric)
- {
- if (you.religion == GOD_SHINING_ONE
- && !tso_unchivalric_attack_safe_monster(defender))
- {
- if (!you.confused()
- && !yesno("Really attack this helpless creature?", false, 'n'))
- {
- cancel_attack = true;
- return;
- }
- }
-
- did_god_conduct(DID_UNCHIVALRIC_ATTACK, 4, true, def);
- }
}
void melee_attack::player_apply_attack_delay()
{
- int attack_delay = weapon? player_weapon_speed() : player_unarmed_speed();
+ int attack_delay = weapon ? player_weapon_speed() : player_unarmed_speed();
attack_delay = player_apply_shield_delay(attack_delay);
if (attack_delay < 3)