v2.1.0: fixed bugs with action-stacking while using flurry

This commit is contained in:
Evan Debenham
2023-04-21 13:38:17 -04:00
parent 7948faf090
commit e9255998a7

View File

@@ -388,14 +388,14 @@ public class SpiritBow extends Weapon {
} }
return; return;
} }
QuickSlotButton.target(enemy); QuickSlotButton.target(enemy);
final boolean last = flurryCount == 1;
user.busy(); user.busy();
throwSound(); throwSound();
user.sprite.zap(cell);
((MissileSprite) user.sprite.parent.recycle(MissileSprite.class)). ((MissileSprite) user.sprite.parent.recycle(MissileSprite.class)).
reset(user.sprite, reset(user.sprite,
cell, cell,
@@ -407,8 +407,27 @@ public class SpiritBow extends Weapon {
curUser = user; curUser = user;
onThrow(cell); onThrow(cell);
} }
if (last) { flurryCount--;
if (flurryCount > 0){
Actor.add(new Actor() {
{
actPriority = VFX_PRIO-1;
}
@Override
protected boolean act() {
flurryActor = this;
int target = QuickSlotButton.autoAim(enemy, SpiritArrow.this);
if (target == -1) target = cell;
cast(user, target);
Actor.remove(this);
return false;
}
});
curUser.next();
} else {
if (user.buff(Talent.LethalMomentumTracker.class) != null){ if (user.buff(Talent.LethalMomentumTracker.class) != null){
user.buff(Talent.LethalMomentumTracker.class).detach(); user.buff(Talent.LethalMomentumTracker.class).detach();
user.next(); user.next();
@@ -426,32 +445,6 @@ public class SpiritBow extends Weapon {
} }
}); });
user.sprite.zap(cell, new Callback() {
@Override
public void call() {
flurryCount--;
if (flurryCount > 0){
Actor.add(new Actor() {
{
actPriority = VFX_PRIO-1;
}
@Override
protected boolean act() {
flurryActor = this;
int target = QuickSlotButton.autoAim(enemy, SpiritArrow.this);
if (target == -1) target = cell;
cast(user, target);
Actor.remove(this);
return false;
}
});
curUser.next();
}
}
});
} else { } else {
if (user.hasTalent(Talent.SEER_SHOT) if (user.hasTalent(Talent.SEER_SHOT)