From f6f7d43fc9608119649ad43ff68fe4b0a6be7951 Mon Sep 17 00:00:00 2001 From: dolorous Date: Mon, 19 May 2008 20:07:13 +0000 Subject: Add more minor cosmetic fixes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5138 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/fight.cc | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'crawl-ref/source/fight.cc') 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) -- cgit v1.2.3-54-g00ecf