From 4cbdf6e0349c6b37dfa50ed933c4f6a92d19cbf6 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 17 Aug 2015 16:46:40 -0400 Subject: [PATCH] v0.3.1: fixed bugs with teleportation, cleaned up Lloyd's beacon sfx --- .../shatteredpixeldungeon/items/artifacts/LloydsBeacon.java | 4 +--- .../items/scrolls/ScrollOfTeleportation.java | 2 +- .../shatteredpixeldungeon/items/wands/CursedWand.java | 2 +- .../shatteredpixeldungeon/levels/traps/TeleportationTrap.java | 2 +- .../shatteredpixel/shatteredpixeldungeon/plants/Fadeleaf.java | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/LloydsBeacon.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/LloydsBeacon.java index 477a37788..ba0af62d1 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/LloydsBeacon.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/LloydsBeacon.java @@ -204,7 +204,6 @@ public class LloydsBeacon extends Artifact { if (Actor.findChar(target) == curUser){ ScrollOfTeleportation.teleportHero(curUser); - Sample.INSTANCE.play(Assets.SND_TELEPORT); curUser.spendAndNext(1f); } else { final Ballistica bolt = new Ballistica( curUser.pos, target, Ballistica.MAGIC_BOLT ); @@ -212,7 +211,6 @@ public class LloydsBeacon extends Artifact { if (ch == curUser){ ScrollOfTeleportation.teleportHero(curUser); - Sample.INSTANCE.play(Assets.SND_TELEPORT); curUser.spendAndNext( 1f ); } else { Sample.INSTANCE.play( Assets.SND_ZAP ); @@ -233,7 +231,7 @@ public class LloydsBeacon extends Artifact { } } while (pos == -1); - if (pos == -1) { + if (pos == -1 || Dungeon.bossLevel()) { GLog.w(ScrollOfTeleportation.TXT_NO_TELEPORT); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java index 7cb19f256..565972a7d 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java @@ -66,7 +66,7 @@ public class ScrollOfTeleportation extends Scroll { } } while (pos == -1); - if (pos == -1) { + if (pos == -1 || Dungeon.bossLevel()) { GLog.w( TXT_NO_TELEPORT ); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/CursedWand.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/CursedWand.java index 59162d0cf..c440a51e1 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/CursedWand.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/CursedWand.java @@ -164,7 +164,7 @@ public class CursedWand { break; } } while (pos == -1); - if (pos == -1) { + if (pos == -1 || Dungeon.bossLevel()) { GLog.w(ScrollOfTeleportation.TXT_NO_TELEPORT); } else { ch.pos = pos; diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/TeleportationTrap.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/TeleportationTrap.java index 6a1cd1e59..a79152575 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/TeleportationTrap.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/TeleportationTrap.java @@ -64,7 +64,7 @@ public class TeleportationTrap extends Trap { } } while (pos == -1); - if (pos == -1) { + if (pos == -1 || Dungeon.bossLevel()) { GLog.w(ScrollOfTeleportation.TXT_NO_TELEPORT); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Fadeleaf.java b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Fadeleaf.java index 4bcebde7c..4e3e0825a 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Fadeleaf.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Fadeleaf.java @@ -62,7 +62,7 @@ public class Fadeleaf extends Plant { } } while (newPos == -1); - if (newPos != -1) { + if (newPos != -1 && !Dungeon.bossLevel()) { ch.pos = newPos; ch.sprite.place( ch.pos );