Xivgear Types Documentation
    Preparing search index...

    Class CycleContext<GaugeManagerType>

    CycleContext is similar to CycleProcessor, but is scoped to within a cycle. It provides methods and properties for keeping track of time relative to the cycle itself.

    Type Parameters

    Index

    Constructors

    Properties

    cycleNumber: number

    The number of this cycle. 0 is the first cycle.

    cycleStartedAt: number
    cycleTime: number

    cycleTime is the length of one cycle. Commonly 120 seconds.

    fightTimeRemainingAtCycleStart: number

    The amount of overall fight time when this cycle begins. Can be used to modify a rotation to account for an early end.

    Accessors

    • get cycleRemainingGcdTime(): number

      The time remaining, accounting for GCD time. That is, if our next GCD is not available for another X seconds, this would return cycleRemainingTime + X.

      Returns number

    • get cycleRemainingTime(): number

      The time remaining in this cycle, taking into account the possibility that the fight's overall remaining time would cut off the cycle.

      Returns number

    • get fightRemainingGcdTime(): number

      The overall fight's time remaining for GCDs.

      Returns number

    • get maxTime(): number

      The maximum possible length of this cycle. It is the lesser of the cycle time and the duration of overall fight time remaining when this cycle began.

      Returns number

    • get overallFightTime(): number

      The overall fight time. Equivalent to CycleProcessor's currentTime.

      Returns number

    Methods

    • Use an ability

      Parameters

      • ability:
            | Readonly<
                {
                    _idForCooldown?: number;
                    activatesBuffs?: readonly Buff[];
                    alternativeScalings?: AlternativeScaling[];
                    animationLock?: number;
                    appDelay?: number;
                    attackType: | "Unknown"
                    | "Auto-attack"
                    | "Spell"
                    | "Weaponskill"
                    | "Ability"
                    | "Item";
                    buffApplicationDelay?: number;
                    cast?: number;
                    combos?: readonly ComboData[];
                    cooldown?: Cooldown;
                    fixedGcd?: boolean;
                    id: number;
                    itemId?: number;
                    name: string;
                    noIcon?: boolean;
                    translate?: boolean;
                } & {
                    levelModifiers?: LevelModifier<
                        {
                            _idForCooldown?: number;
                            activatesBuffs?: readonly Buff[];
                            alternativeScalings?: AlternativeScaling[];
                            animationLock?: number;
                            appDelay?: number;
                            attackType: | "Unknown"
                            | "Auto-attack"
                            | "Spell"
                            | "Weaponskill"
                            | "Ability"
                            | "Item";
                            buffApplicationDelay?: number;
                            cast?: number;
                            combos?: readonly ComboData[];
                            cooldown?: Cooldown;
                            fixedGcd?: boolean;
                            id: number;
                            itemId?: number;
                            name: string;
                            noIcon?: boolean;
                            translate?: boolean;
                        },
                    >[];
                } & Readonly<{ potency: null }> & {
                    levelModifiers?: LevelModifier<Readonly<{ potency: null }>>[];
                },
            > & Readonly<LevelModifiable<{ gcd: number; type: "gcd" }>>
            | Readonly<
                {
                    _idForCooldown?: number;
                    activatesBuffs?: readonly Buff[];
                    alternativeScalings?: AlternativeScaling[];
                    animationLock?: number;
                    appDelay?: number;
                    attackType: | "Unknown"
                    | "Auto-attack"
                    | "Spell"
                    | "Weaponskill"
                    | "Ability"
                    | "Item";
                    buffApplicationDelay?: number;
                    cast?: number;
                    combos?: readonly ComboData[];
                    cooldown?: Cooldown;
                    fixedGcd?: boolean;
                    id: number;
                    itemId?: number;
                    name: string;
                    noIcon?: boolean;
                    translate?: boolean;
                } & {
                    levelModifiers?: LevelModifier<
                        {
                            _idForCooldown?: number;
                            activatesBuffs?: readonly Buff[];
                            alternativeScalings?: AlternativeScaling[];
                            animationLock?: number;
                            appDelay?: number;
                            attackType: | "Unknown"
                            | "Auto-attack"
                            | "Spell"
                            | "Weaponskill"
                            | "Ability"
                            | "Item";
                            buffApplicationDelay?: number;
                            cast?: number;
                            combos?: readonly ComboData[];
                            cooldown?: Cooldown;
                            fixedGcd?: boolean;
                            id: number;
                            itemId?: number;
                            name: string;
                            noIcon?: boolean;
                            translate?: boolean;
                        },
                    >[];
                } & Readonly<
                    {
                        alternativeScalings?: AlternativeScaling[];
                        attackType: | "Unknown"
                        | "Auto-attack"
                        | "Spell"
                        | "Weaponskill"
                        | "Ability"
                        | "Item";
                        autoCrit?: boolean;
                        autoDh?: boolean;
                        dot?: DotInfo;
                        potency: number;
                    },
                > & {
                    levelModifiers?: LevelModifier<
                        Readonly<
                            {
                                alternativeScalings?: AlternativeScaling[];
                                attackType: | "Unknown"
                                | "Auto-attack"
                                | "Spell"
                                | "Weaponskill"
                                | "Ability"
                                | "Item";
                                autoCrit?: boolean;
                                autoDh?: boolean;
                                dot?: DotInfo;
                                potency: number;
                            },
                        >,
                    >[];
                },
            > & Readonly<LevelModifiable<{ gcd: number; type: "gcd" }>>
            | Readonly<
                {
                    _idForCooldown?: number;
                    activatesBuffs?: readonly Buff[];
                    alternativeScalings?: AlternativeScaling[];
                    animationLock?: number;
                    appDelay?: number;
                    attackType: | "Unknown"
                    | "Auto-attack"
                    | "Spell"
                    | "Weaponskill"
                    | "Ability"
                    | "Item";
                    buffApplicationDelay?: number;
                    cast?: number;
                    combos?: readonly ComboData[];
                    cooldown?: Cooldown;
                    fixedGcd?: boolean;
                    id: number;
                    itemId?: number;
                    name: string;
                    noIcon?: boolean;
                    translate?: boolean;
                } & {
                    levelModifiers?: LevelModifier<
                        {
                            _idForCooldown?: number;
                            activatesBuffs?: readonly Buff[];
                            alternativeScalings?: AlternativeScaling[];
                            animationLock?: number;
                            appDelay?: number;
                            attackType: | "Unknown"
                            | "Auto-attack"
                            | "Spell"
                            | "Weaponskill"
                            | "Ability"
                            | "Item";
                            buffApplicationDelay?: number;
                            cast?: number;
                            combos?: readonly ComboData[];
                            cooldown?: Cooldown;
                            fixedGcd?: boolean;
                            id: number;
                            itemId?: number;
                            name: string;
                            noIcon?: boolean;
                            translate?: boolean;
                        },
                    >[];
                } & Readonly<{ potency: null }> & {
                    levelModifiers?: LevelModifier<Readonly<{ potency: null }>>[];
                },
            > & Readonly<LevelModifiable<{ type: "ogcd" }>>
            | Readonly<
                {
                    _idForCooldown?: number;
                    activatesBuffs?: readonly Buff[];
                    alternativeScalings?: AlternativeScaling[];
                    animationLock?: number;
                    appDelay?: number;
                    attackType: | "Unknown"
                    | "Auto-attack"
                    | "Spell"
                    | "Weaponskill"
                    | "Ability"
                    | "Item";
                    buffApplicationDelay?: number;
                    cast?: number;
                    combos?: readonly ComboData[];
                    cooldown?: Cooldown;
                    fixedGcd?: boolean;
                    id: number;
                    itemId?: number;
                    name: string;
                    noIcon?: boolean;
                    translate?: boolean;
                } & {
                    levelModifiers?: LevelModifier<
                        {
                            _idForCooldown?: number;
                            activatesBuffs?: readonly Buff[];
                            alternativeScalings?: AlternativeScaling[];
                            animationLock?: number;
                            appDelay?: number;
                            attackType: | "Unknown"
                            | "Auto-attack"
                            | "Spell"
                            | "Weaponskill"
                            | "Ability"
                            | "Item";
                            buffApplicationDelay?: number;
                            cast?: number;
                            combos?: readonly ComboData[];
                            cooldown?: Cooldown;
                            fixedGcd?: boolean;
                            id: number;
                            itemId?: number;
                            name: string;
                            noIcon?: boolean;
                            translate?: boolean;
                        },
                    >[];
                } & Readonly<
                    {
                        alternativeScalings?: AlternativeScaling[];
                        attackType: | "Unknown"
                        | "Auto-attack"
                        | "Spell"
                        | "Weaponskill"
                        | "Ability"
                        | "Item";
                        autoCrit?: boolean;
                        autoDh?: boolean;
                        dot?: DotInfo;
                        potency: number;
                    },
                > & {
                    levelModifiers?: LevelModifier<
                        Readonly<
                            {
                                alternativeScalings?: AlternativeScaling[];
                                attackType: | "Unknown"
                                | "Auto-attack"
                                | "Spell"
                                | "Weaponskill"
                                | "Ability"
                                | "Item";
                                autoCrit?: boolean;
                                autoDh?: boolean;
                                dot?: DotInfo;
                                potency: number;
                            },
                        >,
                    >[];
                },
            > & Readonly<LevelModifiable<{ type: "ogcd" }>>
            | never
            | Readonly<
                {
                    _idForCooldown?: number;
                    activatesBuffs?: readonly Buff[];
                    alternativeScalings?: AlternativeScaling[];
                    animationLock?: number;
                    appDelay?: number;
                    attackType: | "Unknown"
                    | "Auto-attack"
                    | "Spell"
                    | "Weaponskill"
                    | "Ability"
                    | "Item";
                    buffApplicationDelay?: number;
                    cast?: number;
                    combos?: readonly ComboData[];
                    cooldown?: Cooldown;
                    fixedGcd?: boolean;
                    id: number;
                    itemId?: number;
                    name: string;
                    noIcon?: boolean;
                    translate?: boolean;
                } & {
                    levelModifiers?: LevelModifier<
                        {
                            _idForCooldown?: number;
                            activatesBuffs?: readonly Buff[];
                            alternativeScalings?: AlternativeScaling[];
                            animationLock?: number;
                            appDelay?: number;
                            attackType: | "Unknown"
                            | "Auto-attack"
                            | "Spell"
                            | "Weaponskill"
                            | "Ability"
                            | "Item";
                            buffApplicationDelay?: number;
                            cast?: number;
                            combos?: readonly ComboData[];
                            cooldown?: Cooldown;
                            fixedGcd?: boolean;
                            id: number;
                            itemId?: number;
                            name: string;
                            noIcon?: boolean;
                            translate?: boolean;
                        },
                    >[];
                } & Readonly<
                    {
                        alternativeScalings?: AlternativeScaling[];
                        attackType: | "Unknown"
                        | "Auto-attack"
                        | "Spell"
                        | "Weaponskill"
                        | "Ability"
                        | "Item";
                        autoCrit?: boolean;
                        autoDh?: boolean;
                        dot?: DotInfo;
                        potency: number;
                    },
                > & {
                    levelModifiers?: LevelModifier<
                        Readonly<
                            {
                                alternativeScalings?: AlternativeScaling[];
                                attackType: | "Unknown"
                                | "Auto-attack"
                                | "Spell"
                                | "Weaponskill"
                                | "Ability"
                                | "Item";
                                autoCrit?: boolean;
                                autoDh?: boolean;
                                dot?: DotInfo;
                                potency: number;
                            },
                        >,
                    >[];
                },
            > & Readonly<
                {
                    alternativeScalings?: AlternativeScaling[];
                    attackType: | "Unknown"
                    | "Auto-attack"
                    | "Spell"
                    | "Weaponskill"
                    | "Ability"
                    | "Item";
                    autoCrit?: boolean;
                    autoDh?: boolean;
                    dot?: DotInfo;
                    potency: number;
                },
            > & Readonly<LevelModifiable<{ type: "autoattack" }>>

        The ability to use

      Returns AbilityUseResult

    • Use an ability until a specific time. The time is treated as being relative to the cycle.

      Parameters

      • ability: GcdAbility

        The ability to use.

      • useUntil: number | "end"

        The time (relative to start of cycle) to use.

      Returns void