From 1feac7b0b1cef1cea1ab107f0cce26e3a94e84b7 Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Fri, 16 Oct 2009 15:28:00 -0400 Subject: 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. --- crawl-ref/source/it_use2.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'crawl-ref/source/it_use2.cc') 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) -- cgit v1.2.3-54-g00ecf