From 06da6f9ef1cbd20cd6ac2cb1245fb48c545606f0 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 21 Feb 2025 12:40:10 -0500 Subject: [PATCH] v3.0.0: fixed beaming ray and stasis sometimes playing allies over chasm --- .../shatteredpixeldungeon/actors/hero/spells/BeamingRay.java | 3 ++- .../shatteredpixeldungeon/actors/hero/spells/Stasis.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/BeamingRay.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/BeamingRay.java index 28e195a91..53fba9d97 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/BeamingRay.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/BeamingRay.java @@ -89,7 +89,8 @@ public class BeamingRay extends TargetedClericSpell { if (Dungeon.level.solid[telePos] || !Dungeon.level.heroFOV[telePos] || Actor.findChar(telePos) != null){ telePos = -1; for (int i : PathFinder.NEIGHBOURS8){ - if (Actor.findChar(target+i) == null && !Dungeon.level.solid[target+i] && Dungeon.level.heroFOV[target+i]){ + if (Actor.findChar(target+i) == null && Dungeon.level.heroFOV[target+i] + && (Dungeon.level.passable[target+i] || (ally.flying && Dungeon.level.avoid[target+i])) ){ if (telePos == -1 || Dungeon.level.trueDistance(telePos, ally.pos) > Dungeon.level.trueDistance(target+i, ally.pos)){ telePos = target+i; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/Stasis.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/Stasis.java index 765e7486d..a28e97a3e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/Stasis.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/Stasis.java @@ -152,7 +152,8 @@ public class Stasis extends ClericSpell { ArrayList spawnPoints = new ArrayList<>(); for (int i = 0; i < PathFinder.NEIGHBOURS8.length; i++) { int p = target.pos + PathFinder.NEIGHBOURS8[i]; - if (Actor.findChar(p) == null && (Dungeon.level.passable[p] || Dungeon.level.avoid[p])) { + if (Actor.findChar(p) == null + && (Dungeon.level.passable[p] || (stasisAlly.flying && Dungeon.level.avoid[p])) ){ spawnPoints.add(p); } }