diff options
author | Chris Campbell <chriscampbell89@gmail.com> | 2013-10-01 07:23:08 +0100 |
---|---|---|
committer | Chris Campbell <chriscampbell89@gmail.com> | 2013-10-01 07:31:13 +0100 |
commit | d3966a996d4cad513212968e6f599c20d721695f (patch) | |
tree | 2242b43672a831f2012986175220d7ab915e1608 /crawl-ref/source/spl-selfench.cc | |
parent | 9a1e88313eeadd259828872df13a27486f4c6cf6 (diff) | |
download | crawl-ref-d3966a996d4cad513212968e6f599c20d721695f.tar.gz crawl-ref-d3966a996d4cad513212968e6f599c20d721695f.zip |
Generalise some flight checks, fix inconsistencies
Flight from innate ability, potion, evokable item or spell is now
consistently prevented by tree form, liquefaction and grasping roots.
Most cases also correctly abort without costing a turn, potions are still
wasted at the moment though.
Diffstat (limited to 'crawl-ref/source/spl-selfench.cc')
-rw-r--r-- | crawl-ref/source/spl-selfench.cc | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/crawl-ref/source/spl-selfench.cc b/crawl-ref/source/spl-selfench.cc index 963b24e533..ecb4b1f5f7 100644 --- a/crawl-ref/source/spl-selfench.cc +++ b/crawl-ref/source/spl-selfench.cc @@ -223,23 +223,8 @@ spret_type cast_swiftness(int power, bool fail) spret_type cast_fly(int power, bool fail) { - if (you.form == TRAN_TREE) - { - mpr("Your roots keep you in place.", MSGCH_WARN); - return SPRET_ABORT; - } - - if (you.liquefied_ground()) - { - mpr("Such puny magic can't pull you from the ground!", MSGCH_WARN); + if (!flight_allowed()) return SPRET_ABORT; - } - - if (you.duration[DUR_GRASPING_ROOTS]) - { - mpr("The grasping roots prevent you from becoming airborne.", MSGCH_WARN); - return SPRET_ABORT; - } fail_check(); const int dur_change = 25 + random2(power) + random2(power); |