summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-02 07:27:33 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-02 07:27:33 +0000
commita33e5fa47d9fee51bed481a0a6271193955bec92 (patch)
tree2a433487d1975e45afb51ba319b03e3b9cd57eeb /crawl-ref/source/fight.cc
parent83ea81594f83f749d21a9f5f57b9b92525f717ad (diff)
downloadcrawl-ref-a33e5fa47d9fee51bed481a0a6271193955bec92.tar.gz
crawl-ref-a33e5fa47d9fee51bed481a0a6271193955bec92.zip
Add a few fighting-related consistency checks: don't try to convert
sleeping orcs if they're shapeshifters or summoned, and check if a monster can bleed before making it do so on the floor when it's hurt. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9309 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 179500c31d..15aaf56c80 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -856,10 +856,12 @@ bool melee_attack::player_attack()
}
bool hit_woke_orc = false;
- if (you.religion == GOD_BEOGH && defender->mons_species() == MONS_ORC
- && defender->asleep() && !player_under_penance()
- && you.piety >= piety_breakpoint(2)
- && mons_near(defender_as_monster()))
+ if (you.religion == GOD_BEOGH
+ && defender->mons_species() == MONS_ORC
+ && !mons_is_summoned(defender_as_monster())
+ && !mons_is_shapeshifter(defender_as_monster())
+ && !player_under_penance() && you.piety >= piety_breakpoint(2)
+ && mons_near(defender_as_monster()) && defender->asleep())
{
hit_woke_orc = true;
}
@@ -870,6 +872,7 @@ bool melee_attack::player_attack()
coord_def(), !stab_attempt);
if (damage_done > 0
+ && defender->can_bleed()
&& !defender->is_summoned()
&& !defender->submerged())
{