summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells4.cc
diff options
context:
space:
mode:
authorCharles Otto <ottochar@gmail.com>2009-10-16 15:28:00 -0400
committerCharles Otto <ottochar@gmail.com>2009-10-16 17:12:32 -0400
commit1feac7b0b1cef1cea1ab107f0cce26e3a94e84b7 (patch)
tree82c6df5370ab885099c1765abdb2f15a3bc51cca /crawl-ref/source/spells4.cc
parentd5c9626b31d13b7e3b180603f72b93910679ba30 (diff)
downloadcrawl-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/spells4.cc')
-rw-r--r--crawl-ref/source/spells4.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc
index 43966336b2..5fe91b53bd 100644
--- a/crawl-ref/source/spells4.cc
+++ b/crawl-ref/source/spells4.cc
@@ -1980,11 +1980,16 @@ static int _quadrant_blink(coord_def where, int pow, int, actor *)
if (!found)
return(0);
- // Leave a purple cloud.
- place_cloud(CLOUD_PURP_SMOKE, you.pos(), 1 + random2(3), KC_YOU);
+ coord_def origin = you.pos();
+ int res = move_player_to_grid(target, false, true, true);
- you.moveto(target);
- return 1;
+ if(res)
+ {
+ // Leave a purple cloud.
+ place_cloud(CLOUD_PURP_SMOKE, origin, 1 + random2(3), KC_YOU);
+ }
+
+ return res;
}
int cast_semi_controlled_blink(int pow)