From 965f690bd28dbb82e2c6402ddbc178d1c2c2ab70 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sat, 8 Oct 2022 17:46:28 -0400 Subject: [PATCH] v1.4.1: fixed elastic and bmage blast wave effect conflicting --- .../items/wands/WandOfBlastWave.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfBlastWave.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfBlastWave.java index da51ee205..74600cc5c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfBlastWave.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfBlastWave.java @@ -186,7 +186,22 @@ public class WandOfBlastWave extends DamageWand { @Override public void onHit(MagesStaff staff, Char attacker, Char defender, int damage) { //acts like elastic enchantment - new BlastWaveOnHit().proc(staff, attacker, defender, damage); + //we delay this with an actor to prevent conflicts with regular elastic + //so elastic always fully resolves first, then this effect activates + Actor.addDelayed(new Actor() { + { + actPriority = VFX_PRIO-1; //act after pushing effects + } + + @Override + protected boolean act() { + Actor.remove(this); + if (defender.isAlive()) { + new BlastWaveOnHit().proc(staff, attacker, defender, damage); + } + return true; + } + }, -1); } private static class BlastWaveOnHit extends Elastic{