v3.0.0: stone of blink now lets you self-teleport (fixes recall exploit)

This commit is contained in:
Evan Debenham
2024-12-31 13:24:40 -05:00
parent fc69986244
commit 03b642c698
2 changed files with 2 additions and 5 deletions

View File

@@ -71,7 +71,7 @@ public class ScrollOfTeleportation extends Scroll {
PathFinder.buildDistanceMap(pos, BArray.or(Dungeon.level.passable, Dungeon.level.avoid, null));
if (PathFinder.distance[ch.pos] == Integer.MAX_VALUE
|| (!Dungeon.level.passable[pos] && !Dungeon.level.avoid[pos])
|| Actor.findChar(pos) != null){
|| (Actor.findChar(pos) != null && Actor.findChar(pos) != ch)){
if (ch == Dungeon.hero){
GLog.w( Messages.get(ScrollOfTeleportation.class, "cant_reach") );
}

View File

@@ -21,7 +21,6 @@
package com.shatteredpixel.shatteredpixeldungeon.items.stones;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
@@ -53,8 +52,6 @@ public class StoneOfBlink extends Runestone {
@Override
protected void activate(int cell) {
if (!ScrollOfTeleportation.teleportToLocation(curUser, cell) && !anonymous){
Dungeon.level.drop(this, cell).sprite.drop();
}
ScrollOfTeleportation.teleportToLocation(curUser, cell);
}
}