Attached Files |
0001-Remove-mp-roting-ability-abuse.patch [^] (1,147 bytes) 2014-01-12 14:34 [Show Content] [Hide Content]From 213590deda4a56752c6a27083cc943de9c6d7fd2 Mon Sep 17 00:00:00 2001
From: Cedor <cedordark@yahoo.fr>
Date: Sun, 12 Jan 2014 14:34:17 +0100
Subject: [PATCH] Remove mp roting ability abuse
When trying to use a MP roting ability (DD recharging, or mummy
restoration, check if the player really have 1 max MP available without
possible ring/staff of power.
---
crawl-ref/source/ability.cc | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/crawl-ref/source/ability.cc b/crawl-ref/source/ability.cc
index 5c2017b..40d161b 100644
--- a/crawl-ref/source/ability.cc
+++ b/crawl-ref/source/ability.cc
@@ -1423,6 +1423,16 @@ static bool _check_ability_possible(const ability_def& abil,
}
}
+ // in case of mp rot ability, check is the player have enough natural MP
+ // (avoid use of ring/staf of magical power)
+ if ((abil.flags & ABFLAG_PERMANENT_MP)
+ && get_real_mp(false) < 1)
+ {
+ if (!quiet)
+ mpr("You don't have enough personal magic energy to sacrifice.");
+ return false;
+ }
+
switch (abil.ability)
{
case ABIL_ZIN_RECITE:
--
1.8.4.msysgit.0
|