mwg API
    Preparing search index...

    Class AbilityCycle

    One ability per named slot, each with its own cooldown in turns: advance() counts every cooldown down by one turn, ready() lists whatever may fire now, and use(id) spends one - resetting its full cooldown - reporting whether it was actually ready, so a game can tell "fired" from "still waiting" without tracking the counters itself.

    Index
    • counts every cooling-down ability turns closer to ready

      Parameters

      • turns: number = 1

      Returns void

    • Fires id, resetting its full cooldown.

      Parameters

      • id: string

      Returns boolean

      false, changing nothing, for an unknown id or one still cooling down

    • Parameters

      • cooldowns: Record<string, number>
      • data: { remaining: [string, number][] }

      Returns AbilityCycle