summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/abl-show.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/abl-show.cc')
-rw-r--r--crawl-ref/source/abl-show.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc
index 0c1ada0d03..2e5bbab3d5 100644
--- a/crawl-ref/source/abl-show.cc
+++ b/crawl-ref/source/abl-show.cc
@@ -988,7 +988,10 @@ static bool _activate_talent(const talent& tal)
const ability_def& abil = get_ability_def(tal.which);
// Check that we can afford to pay the costs.
- if (!enough_mp( abil.mp_cost, false ))
+ // Note that mutation shenanigans might leave us with negative MP,
+ // so don't fail in that case if there's no MP cost.
+ if (abil.mp_cost > 0
+ && !enough_mp(abil.mp_cost, false, !(abil.flags & ABFLAG_PERMANENT_MP)))
{
crawl_state.zero_turns_taken();
return (false);