summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-util.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2013-06-17 13:51:14 -0600
committerSteve Melenchuk <smelenchuk@gmail.com>2013-06-17 13:51:14 -0600
commitc8c6743db2aba8f13623590aa6591a01a039cf15 (patch)
tree4430ac5f944d521fc8d406429a534b72196e5ff1 /crawl-ref/source/spl-util.cc
parente3678806b64130754ffbe5eb19b2d0d58c918995 (diff)
downloadcrawl-ref-c8c6743db2aba8f13623590aa6591a01a039cf15.tar.gz
crawl-ref-c8c6743db2aba8f13623590aa6591a01a039cf15.zip
Mark Leda's as useless when it can't be cast (#7221).
The prerequisites are that the player's standing on solid ground and that the ground's not already liquefied, which are mirrored in the uselessness check.
Diffstat (limited to 'crawl-ref/source/spl-util.cc')
-rw-r--r--crawl-ref/source/spl-util.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc
index 1cad065c0e..4265b8144d 100644
--- a/crawl-ref/source/spl-util.cc
+++ b/crawl-ref/source/spl-util.cc
@@ -17,6 +17,7 @@
#include "externs.h"
+#include "areas.h"
#include "beam.h"
#include "coord.h"
#include "coordit.h"
@@ -1179,6 +1180,15 @@ bool spell_is_useless(spell_type spell, bool transient)
return true;
break;
+ case SPELL_LEDAS_LIQUEFACTION:
+ if (!you.stand_on_solid_ground()
+ || you.duration[DUR_LIQUEFYING]
+ || liquefied(you.pos()))
+ {
+ return true;
+ }
+ break;
+
default:
break; // quash unhandled constants warnings
}