v3.2.5: fixed very specific errors relating to inter-floor teleports

This commit is contained in:
Evan Debenham
2025-09-24 16:29:52 -04:00
parent 19363d8188
commit 0cce050429
2 changed files with 12 additions and 2 deletions

View File

@@ -131,7 +131,7 @@ public class BeaconOfReturning extends Spell {
Char existing = Actor.findChar(returnPos);
if (existing != null && existing != hero){
Char toPush = !Char.hasProp(existing, Char.Property.IMMOVABLE) ? hero : existing;
Char toPush = Char.hasProp(existing, Char.Property.IMMOVABLE) ? hero : existing;
ArrayList<Integer> candidates = new ArrayList<>();
for (int n : PathFinder.NEIGHBOURS8) {

View File

@@ -527,7 +527,17 @@ public class GameScene extends PixelScene {
new Flare( 5, 16 ).color( 0xFFFF00, true ).show( hero, 4f ) ;
break;
case RETURN:
ScrollOfTeleportation.appearVFX( Dungeon.hero );
if (Dungeon.level.pit[Dungeon.hero.pos] && !Dungeon.hero.flying){
//delay this so falling into the chasm processes properly
ShatteredPixelDungeon.runOnRenderThread(new Callback() {
@Override
public void call() {
ScrollOfTeleportation.appearVFX(Dungeon.hero);
}
});
} else {
ScrollOfTeleportation.appearVFX(Dungeon.hero);
}
break;
case DESCEND:
case FALL: