v2.4.0: fixed emp strike effect not fully triggering with blastwave
This commit is contained in:
@@ -182,7 +182,10 @@ public enum Talent {
|
|||||||
public static class LethalMomentumTracker extends FlavourBuff{};
|
public static class LethalMomentumTracker extends FlavourBuff{};
|
||||||
public static class StrikingWaveTracker extends FlavourBuff{};
|
public static class StrikingWaveTracker extends FlavourBuff{};
|
||||||
public static class WandPreservationCounter extends CounterBuff{{revivePersists = true;}};
|
public static class WandPreservationCounter extends CounterBuff{{revivePersists = true;}};
|
||||||
public static class EmpoweredStrikeTracker extends FlavourBuff{};
|
public static class EmpoweredStrikeTracker extends FlavourBuff{
|
||||||
|
//blast wave on-hit doesn't resolve instantly, so we delay detaching for it
|
||||||
|
public boolean delayedDetach = false;
|
||||||
|
};
|
||||||
public static class ProtectiveShadowsTracker extends Buff {
|
public static class ProtectiveShadowsTracker extends Buff {
|
||||||
float barrierInc = 0.5f;
|
float barrierInc = 0.5f;
|
||||||
|
|
||||||
|
|||||||
+9
@@ -27,6 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Effects;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.Effects;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Pushing;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.Pushing;
|
||||||
@@ -184,6 +185,13 @@ public class WandOfBlastWave extends DamageWand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onHit(MagesStaff staff, Char attacker, Char defender, int damage) {
|
public void onHit(MagesStaff staff, Char attacker, Char defender, int damage) {
|
||||||
|
|
||||||
|
Talent.EmpoweredStrikeTracker tracker = attacker.buff(Talent.EmpoweredStrikeTracker.class);
|
||||||
|
|
||||||
|
if (tracker != null){
|
||||||
|
tracker.delayedDetach = true;
|
||||||
|
}
|
||||||
|
|
||||||
//acts like elastic enchantment
|
//acts like elastic enchantment
|
||||||
//we delay this with an actor to prevent conflicts with regular elastic
|
//we delay this with an actor to prevent conflicts with regular elastic
|
||||||
//so elastic always fully resolves first, then this effect activates
|
//so elastic always fully resolves first, then this effect activates
|
||||||
@@ -198,6 +206,7 @@ public class WandOfBlastWave extends DamageWand {
|
|||||||
if (defender.isAlive()) {
|
if (defender.isAlive()) {
|
||||||
new BlastWaveOnHit().proc(staff, attacker, defender, damage);
|
new BlastWaveOnHit().proc(staff, attacker, defender, damage);
|
||||||
}
|
}
|
||||||
|
if (tracker != null) tracker.detach();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
+1
-1
@@ -184,7 +184,7 @@ public class MagesStaff extends MeleeWeapon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (empoweredStrike != null){
|
if (empoweredStrike != null){
|
||||||
empoweredStrike.detach();
|
if (!empoweredStrike.delayedDetach) empoweredStrike.detach();
|
||||||
if (!(defender instanceof Mob) || !((Mob) defender).surprisedBy(attacker)){
|
if (!(defender instanceof Mob) || !((Mob) defender).surprisedBy(attacker)){
|
||||||
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG, 0.75f, 1.2f);
|
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG, 0.75f, 1.2f);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user