diff options
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r-- | crawl-ref/source/player.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 4687203d10..84ccd266c6 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -6445,8 +6445,24 @@ bool player::haloed() const return (halo_radius()); } +bool player::can_mutate() const +{ + return true; +} + +bool player::can_safely_mutate() const +{ + return (can_mutate() + && (!you.is_undead + || (you.is_undead == US_SEMI_UNDEAD + && you.hunger_state == HS_ENGORGED))); +} + void player::mutate() { + if (!can_mutate()) + return; + if (one_chance_in(5)) { if (::mutate(RANDOM_MUTATION)) |