v3.0.0: stone of blink now lets you self-teleport (fixes recall exploit)
This commit is contained in:
@@ -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") );
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user