diff --git a/src/main/java/kamkeel/npcs/controllers/data/ability/Ability.java b/src/main/java/kamkeel/npcs/controllers/data/ability/Ability.java index a73a8a0a2..d944f7535 100644 --- a/src/main/java/kamkeel/npcs/controllers/data/ability/Ability.java +++ b/src/main/java/kamkeel/npcs/controllers/data/ability/Ability.java @@ -1050,10 +1050,11 @@ public abstract class Ability implements IAbility, IAbilityAction { return null; } - telegraph.setDurationTicks(windUpTicks); + int windUp = getWindUpTicks(); + telegraph.setDurationTicks(windUp); telegraph.setColor(windUpColor); telegraph.setWarningColor(activeColor); - telegraph.setWarningStartTick(Math.max(5, windUpTicks / 4)); + telegraph.setWarningStartTick(Math.max(5, windUp / 4)); telegraph.setHeightOffset(telegraphHeightOffset); TelegraphInstance instance = new TelegraphInstance(telegraph, x, y, z, yaw); @@ -1171,7 +1172,9 @@ public abstract class Ability implements IAbility, IAbilityAction { this.burstIndex = 0; this.burstEntities.clear(); - if (windUpTicks <= 0) { + // Use the effective windup, not the raw field: when the windup is synced to an + // animation the raw field is not the duration that actually applies. + if (getWindUpTicks() <= 0) { this.phase = AbilityPhase.ACTIVE; } else { this.phase = AbilityPhase.WINDUP; @@ -1193,7 +1196,7 @@ public abstract class Ability implements IAbility, IAbilityAction { switch (phase) { case WINDUP: - if (currentTick >= windUpTicks) { + if (currentTick >= getWindUpTicks()) { phase = AbilityPhase.ACTIVE; currentTick = 0; return true;