From a60a585b183c72178d53df743c81bf5c3dcefc8b Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 13 Jun 2023 16:26:45 -0400 Subject: [PATCH] v2.1.2: teleportation effects now cleanse the rooted debuff --- .../items/scrolls/ScrollOfTeleportation.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java index 5aa550508..9295a6430 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java @@ -25,6 +25,8 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Roots; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; @@ -77,6 +79,7 @@ public class ScrollOfTeleportation extends Scroll { appear( ch, pos ); Dungeon.level.occupyCell( ch ); + Buff.detach(ch, Roots.class); if (ch == Dungeon.hero) { Dungeon.observe(); GameScene.updateFog(); @@ -118,6 +121,7 @@ public class ScrollOfTeleportation extends Scroll { appear( ch, pos ); Dungeon.level.occupyCell( ch ); + Buff.detach(ch, Roots.class); if (ch == Dungeon.hero) { GLog.i( Messages.get(ScrollOfTeleportation.class, "tele") ); @@ -188,7 +192,8 @@ public class ScrollOfTeleportation extends Scroll { } GLog.i( Messages.get(ScrollOfTeleportation.class, "tele") ); appear( hero, pos ); - Dungeon.level.occupyCell(hero ); + Dungeon.level.occupyCell( hero ); + Buff.detach(hero, Roots.class); if (secretDoor && level.map[doorPos] == Terrain.SECRET_DOOR){ Sample.INSTANCE.play( Assets.Sounds.SECRET ); int oldValue = Dungeon.level.map[doorPos]; @@ -254,6 +259,8 @@ public class ScrollOfTeleportation extends Scroll { appear( ch, pos ); Dungeon.level.occupyCell( ch ); + Buff.detach(ch, Roots.class); + if (ch == Dungeon.hero) { GLog.i( Messages.get(ScrollOfTeleportation.class, "tele") );