diff options
author | Adam Borowski <kilobyte@angband.pl> | 2013-11-01 12:58:14 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-11-01 13:05:23 +0100 |
commit | 074ac2fdc1421cb51432e2e71ab615f2834914a9 (patch) | |
tree | 151392bb04d874e2ba5fc414ef32bf8b71e03658 /crawl-ref/source/spl-util.cc | |
parent | 109c0d635f0c9440b6789c9251a38783e7d5e9a0 (diff) | |
download | crawl-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.cc | 3 |
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; |