Skip to content

Commit

Permalink
Update apl rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Krealle committed Mar 17, 2024
1 parent 2aafa26 commit 9b9453e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 11 deletions.
2 changes: 2 additions & 0 deletions src/analysis/retail/evoker/devastation/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ export const DEVA_T31_2PC_MULTIPLER = 0.05;

export const POWER_SWELL_REGEN_FACTOR = 1;
export const DENSE_ENERGY_ESSENCE_REDUCTION = 1;

export const OPTIMAL_EMPOWER_DRAGONRAGE_GAP_ST_MS = 13000;
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,21 @@ import * as cnd from 'parser/shared/metrics/apl/conditions';
import SPELLS from 'common/SPELLS/evoker';
import { SpellLink } from 'interface';
import { tenseAlt } from 'parser/shared/metrics/apl';
import { OPTIMAL_EMPOWER_DRAGONRAGE_GAP_ST_MS } from '../../constants';
import { buffSoonPresent } from 'parser/shared/metrics/apl/conditions/buffSoonPresent';

export const avoidIfDragonRageSoon = (time: number) => {
return cnd.spellCooldownRemaining(TALENTS.DRAGONRAGE_TALENT, { atLeast: time });
export const avoidIfDragonRageSoon = (time: number = OPTIMAL_EMPOWER_DRAGONRAGE_GAP_ST_MS) => {
return cnd.describe(
buffSoonPresent(TALENTS.DRAGONRAGE_TALENT, {
atLeast: time,
}),
(tense) => (
<>
there {tenseAlt(tense, <>is</>, <>was</>)} atleast {time / 1000} seconds left before{' '}
{tenseAlt(tense, <>using</>, <>you used</>)} <SpellLink spell={TALENTS.DRAGONRAGE_TALENT} />
</>
),
);
};

export const hasEssenceRequirement = (resources: number, initial: number) => {
Expand All @@ -18,13 +30,11 @@ export const hasEssenceRequirement = (resources: number, initial: number) => {
);
};

export const standardEmpowerConditional = cnd.describe(
cnd.or(cnd.buffPresent(TALENTS.DRAGONRAGE_TALENT), avoidIfDragonRageSoon(13000)),
(tense) => (
export const standardEmpowerConditional = cnd.or(
cnd.describe(cnd.buffPresent(TALENTS.DRAGONRAGE_TALENT), (tense) => (
<>
{tenseAlt(tense, <>in</>, <>you were in</>)} <SpellLink spell={TALENTS.DRAGONRAGE_TALENT} />{' '}
or <SpellLink spell={TALENTS.DRAGONRAGE_TALENT} /> {tenseAlt(tense, <>has</>, <>had</>)} at
least 13 seconds remaining on cooldown
{tenseAlt(tense, <>in</>, <>you were in</>)} <SpellLink spell={TALENTS.DRAGONRAGE_TALENT} />
</>
),
)),
avoidIfDragonRageSoon(),
);
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const fireBreath = (info: TalentInfo): Rule => {
const stEternitySurge = (info: TalentInfo): Rule => {
return {
spell: info.eternitySurgeSpell,
condition: info.hasEventHorizon ? avoidIfDragonRageSoon(13000) : standardEmpowerConditional,
condition: info.hasEventHorizon ? avoidIfDragonRageSoon() : standardEmpowerConditional,
};
};
const ehEternitySurge = (info: TalentInfo): Rule => {
Expand Down Expand Up @@ -227,7 +227,7 @@ const fillerLivingFlame: Rule = {
condition: cnd.buffMissing(TALENTS.DRAGONRAGE_TALENT),
};
const greenSpells: Rule = {
spell: [SPELLS.EMERALD_BLOSSOM_CAST, SPELLS.VERDANT_EMBRACE_HEAL],
spell: [SPELLS.EMERALD_BLOSSOM_CAST, TALENTS.VERDANT_EMBRACE_TALENT],
condition: cnd.describe(
cnd.and(
cnd.buffMissing(TALENTS.DRAGONRAGE_TALENT),
Expand Down

0 comments on commit 9b9453e

Please sign in to comment.