summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 58a6393271..51eb1dc1d9 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -7143,6 +7143,24 @@ bool player::can_safely_mutate() const
&& you.hunger_state == HS_ENGORGED);
}
+bool player::can_bleed() const
+{
+ if (you.is_undead && (you.species != SP_VAMPIRE
+ || you.hunger_state <= HS_SATIATED))
+ {
+ return (false);
+ }
+
+ const int tran = you.attribute[ATTR_TRANSFORMATION];
+ if (tran == TRAN_STATUE || tran == TRAN_ICE_BEAST
+ || tran == TRAN_AIR || tran == TRAN_LICH
+ || tran == TRAN_SPIDER) // Monster spiders don't bleed either.
+ {
+ return (false);
+ }
+ return (true);
+}
+
bool player::mutate()
{
ASSERT(!crawl_state.arena);