summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-29 12:30:20 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-29 12:30:20 +0000
commit90b272a317a96b72679acd8bd21f5ac9af77d000 (patch)
treedd4dd783f4ec6f93e5c0e9870a222f802ca1d524 /crawl-ref/source/fight.cc
parent537d9d5e0f922b3b0731f922d0eac7fd94dc2c27 (diff)
downloadcrawl-ref-90b272a317a96b72679acd8bd21f5ac9af77d000.tar.gz
crawl-ref-90b272a317a96b72679acd8bd21f5ac9af77d000.zip
Beogh conversion fixes for trunk.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2660 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc17
1 files changed, 16 insertions, 1 deletions
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();
}