From 90b272a317a96b72679acd8bd21f5ac9af77d000 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 29 Oct 2007 12:30:20 +0000 Subject: Beogh conversion fixes for trunk. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2660 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/fight.cc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/fight.cc') diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 072cbe0bbd..4a5a9c7f5d 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -549,9 +549,17 @@ bool melee_attack::player_attack() // messages, etc. player_calc_hit_damage(); + bool hit_woke_orc = false; + if (you.religion == GOD_BEOGH && mons_species(def->type) == MONS_ORC + && def->behaviour == BEH_SLEEP && you.species == SP_HILL_ORC + && !player_under_penance() && you.piety >= 75 ) + { + hit_woke_orc = true; + } + // always upset monster regardless of damage behaviour_event(def, ME_WHACK, MHITYOU); - + player_hurt_monster(); if (damage_done > 0 || !defender_visible) @@ -567,6 +575,13 @@ bool melee_attack::player_attack() if (player_check_monster_died()) return (true); + + if (hit_woke_orc) + { + // call function of orcs first noticing you but with + // beaten-up conversion messages (if applicable) + beogh_follower_convert(def, true); + } player_sustain_passive_damage(); } -- cgit v1.2.3-54-g00ecf