summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-util.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-11-01 12:58:14 +0100
committerAdam Borowski <kilobyte@angband.pl>2013-11-01 13:05:23 +0100
commit074ac2fdc1421cb51432e2e71ab615f2834914a9 (patch)
tree151392bb04d874e2ba5fc414ef32bf8b71e03658 /crawl-ref/source/spl-util.cc
parent109c0d635f0c9440b6789c9251a38783e7d5e9a0 (diff)
downloadcrawl-ref-074ac2fdc1421cb51432e2e71ab615f2834914a9.tar.gz
crawl-ref-074ac2fdc1421cb51432e2e71ab615f2834914a9.zip
Use enough_mp() in more cases.
This makes MP/EP more transparent, and allows "MP shutdown" effects.
Diffstat (limited to 'crawl-ref/source/spl-util.cc')
-rw-r--r--crawl-ref/source/spl-util.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc
index 3d047f6bfd..6fdda5aaa1 100644
--- a/crawl-ref/source/spl-util.cc
+++ b/crawl-ref/source/spl-util.cc
@@ -1092,8 +1092,7 @@ bool spell_is_useless(spell_type spell, bool transient)
if (transient)
{
if (you.duration[DUR_CONF] > 0
- || spell_mana(spell) > (you.species != SP_DJINNI ? you.magic_points
- : (you.hp - 1) / DJ_MP_RATE)
+ || !enough_mp(spell_mana(spell), true, false)
|| spell_no_hostile_in_range(spell))
{
return true;