v2.1.2: teleportation effects now cleanse the rooted debuff

This commit is contained in:
Evan Debenham
2023-06-13 16:26:45 -04:00
parent 42081ae144
commit a60a585b18

View File

@@ -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") );