Skip to content

swingTiming beta ​

Function of @v12-engine/engine

ts
export declare function swingTiming(damagePoint: number, base: number, speed: number, recovery?: number): {
    swing: number;
    period: number;
    recovery: number;
} | undefined;

How long an attack takes, from the start of the swing to the hit (the windup), from one swing to the next, and how long the unit is held after the hit (AttackDef.recovery, 0 when left out), for a unit whose type attacks base times a second and that now attacks speed times. Undefined for what does not attack