From 71bb4b451ea67fedbcb2542ff8e7e51c30f9ed81 Mon Sep 17 00:00:00 2001 From: KAMKEEL <28842281+KAMKEEL@users.noreply.github.com> Date: Tue, 11 Aug 2026 05:01:50 -0400 Subject: [PATCH] Honour the effective windup instead of the raw field start() and tick() compared against the raw windUpTicks, but when the windup is synced to an animation the value that applies comes from getWindUpTicks(). An ability configured that way skipped its windup entirely and fired on the first tick. The telegraph duration used the raw field too, so it disagreed with the phase it was meant to cover. --- .../npcs/controllers/data/ability/Ability.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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;