diff options
author | Charles Otto <ottochar@gmail.com> | 2009-10-16 15:28:00 -0400 |
---|---|---|
committer | Charles Otto <ottochar@gmail.com> | 2009-10-16 17:12:32 -0400 |
commit | 1feac7b0b1cef1cea1ab107f0cce26e3a94e84b7 (patch) | |
tree | 82c6df5370ab885099c1765abdb2f15a3bc51cca /crawl-ref/source/it_use2.cc | |
parent | d5c9626b31d13b7e3b180603f72b93910679ba30 (diff) | |
download | crawl-ref-1feac7b0b1cef1cea1ab107f0cce26e3a94e84b7.tar.gz crawl-ref-1feac7b0b1cef1cea1ab107f0cce26e3a94e84b7.zip |
Fix bug [2874791], Merfolk stat change issues
Fix some conditions causing permanent stat loss or gain for Mf with
stat modifying boots.
Unmerge boots when the player starts levitating or flying on a water
square.
Use move_player_to_grid in blink, semi-controlled blink, and
teleportation.
Also fix a bug where Mf could random teleport into solid walls.
Diffstat (limited to 'crawl-ref/source/it_use2.cc')
-rw-r--r-- | crawl-ref/source/it_use2.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crawl-ref/source/it_use2.cc b/crawl-ref/source/it_use2.cc index 84cdc0b4ed..5d3f4e795b 100644 --- a/crawl-ref/source/it_use2.cc +++ b/crawl-ref/source/it_use2.cc @@ -31,6 +31,8 @@ REVISION("$Rev$"); #include "spl-mis.h" #include "spl-util.h" #include "stuff.h" +#include "terrain.h" +#include "transfor.h" #include "tutorial.h" #include "view.h" #include "xom.h" @@ -243,6 +245,13 @@ bool potion_effect(potion_type pot_eff, int pow, bool drank_it, bool was_known) } } + // Merfolk boots unmeld if levitation takes us out of water + if(!player_is_airborne() && you.species == SP_MERFOLK + && grid_is_water(grd(you.pos()))) + { + unmeld_one_equip(EQ_BOOTS); + } + you.duration[DUR_LEVITATION] += 25 + random2(pow); if (you.duration[DUR_LEVITATION] > 100) |