v2.2.0: etheral chains no longer do a pathfind check on mining floors

This commit is contained in:
Evan Debenham
2023-10-12 12:53:01 -04:00
parent e7bd3857e3
commit ebd6c9e5be

View File

@@ -36,6 +36,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Chains;
import com.shatteredpixel.shatteredpixeldungeon.effects.Effects;
import com.shatteredpixel.shatteredpixeldungeon.effects.Pushing;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy;
import com.shatteredpixel.shatteredpixeldungeon.levels.MiningLevel;
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector;
@@ -120,7 +121,7 @@ public class EtherealChains extends Artifact {
//chains cannot be used to go where it is impossible to walk to
PathFinder.buildDistanceMap(target, BArray.or(Dungeon.level.passable, Dungeon.level.avoid, null));
if (PathFinder.distance[curUser.pos] == Integer.MAX_VALUE){
if (!(Dungeon.level instanceof MiningLevel) && PathFinder.distance[curUser.pos] == Integer.MAX_VALUE){
GLog.w( Messages.get(EtherealChains.class, "cant_reach") );
return;
}