diff --git a/ui/core/launched_sims.ts b/ui/core/launched_sims.ts index 657312b642..0cd2c2209a 100644 --- a/ui/core/launched_sims.ts +++ b/ui/core/launched_sims.ts @@ -54,10 +54,10 @@ export const aplLaunchStatuses: Record = { [Spec.SpecProtectionPaladin]: LaunchStatus.Launched, [Spec.SpecRetributionPaladin]: LaunchStatus.Beta, [Spec.SpecHealingPriest]: LaunchStatus.Launched, - [Spec.SpecShadowPriest]: LaunchStatus.Alpha, + [Spec.SpecShadowPriest]: LaunchStatus.Beta, [Spec.SpecSmitePriest]: LaunchStatus.Launched, - [Spec.SpecWarlock]: LaunchStatus.Alpha, - [Spec.SpecWarrior]: LaunchStatus.Alpha, + [Spec.SpecWarlock]: LaunchStatus.Beta, + [Spec.SpecWarrior]: LaunchStatus.Beta, [Spec.SpecProtectionWarrior]: LaunchStatus.Launched, [Spec.SpecDeathknight]: LaunchStatus.Beta, [Spec.SpecTankDeathknight]: LaunchStatus.Beta, diff --git a/ui/shadow_priest/sim.ts b/ui/shadow_priest/sim.ts index ec3d6f7831..676f209524 100644 --- a/ui/shadow_priest/sim.ts +++ b/ui/shadow_priest/sim.ts @@ -1,11 +1,17 @@ -import { PartyBuffs } from '../core/proto/common.js'; -import { Spec } from '../core/proto/common.js'; -import { Stat } from '../core/proto/common.js'; +import { + PartyBuffs, + Spec, + Stat, +} from '../core/proto/common.js'; +import { + APLAction, + APLListItem, + APLRotation, +} from '../core/proto/apl.js'; + import { Stats } from '../core/proto_utils/stats.js'; import { Player } from '../core/player.js'; import { IndividualSimUI } from '../core/individual_sim_ui.js'; - - import * as IconInputs from '../core/components/icon_inputs.js'; import * as OtherInputs from '../core/components/other_inputs.js'; import * as Mechanics from '../core/constants/mechanics.js'; @@ -133,8 +139,8 @@ export class ShadowPriestSimUI extends IndividualSimUI { ], rotations: [ Presets.ROTATION_PRESET_DEFAULT, - Presets.ROTATION_PRESET_AOE4PLUS, Presets.ROTATION_PRESET_AOE24, + Presets.ROTATION_PRESET_AOE4PLUS, ], // Preset gear configurations that the user can quickly select. gear: [ @@ -145,6 +151,17 @@ export class ShadowPriestSimUI extends IndividualSimUI { Presets.P4_PRESET, ], }, + + autoRotation: (player: Player): APLRotation => { + const numTargets = player.sim.encounter.targets.length; + if (numTargets > 4) { + return Presets.ROTATION_PRESET_AOE4PLUS.rotation.rotation!; + } else if (numTargets > 1) { + return Presets.ROTATION_PRESET_AOE24.rotation.rotation!; + } else { + return Presets.ROTATION_PRESET_DEFAULT.rotation.rotation!; + } + }, }); } } diff --git a/ui/warlock/apls/affliction.apl.json b/ui/warlock/apls/affliction.apl.json new file mode 100644 index 0000000000..8a47b2a27a --- /dev/null +++ b/ui/warlock/apls/affliction.apl.json @@ -0,0 +1,54 @@ +{ + "type": "TypeAPL", + "prepullActions": [ + {"action":{"triggerIcd":{"auraId":{"spellId":71636}}},"doAtValue":{"const":{"val":"-105s"}}}, + {"action":{"triggerIcd":{"auraId":{"spellId":72416}}},"doAtValue":{"const":{"val":"-65s"}}}, + {"action":{"triggerIcd":{"auraId":{"spellId":55637}}},"doAtValue":{"const":{"val":"-65s"}}}, + {"action":{"triggerIcd":{"auraId":{"spellId":75473}}},"doAtValue":{"const":{"val":"-55s"}}}, + {"action":{"triggerIcd":{"auraId":{"spellId":64713}}},"doAtValue":{"const":{"val":"-50s"}}}, + {"action":{"triggerIcd":{"auraId":{"spellId":60492}}},"doAtValue":{"const":{"val":"-50s"}}}, + {"action":{"triggerIcd":{"auraId":{"spellId":60064}}},"doAtValue":{"const":{"val":"-50s"}}}, + {"action":{"triggerIcd":{"auraId":{"spellId":64741}}},"doAtValue":{"const":{"val":"-50s"}}}, + {"action":{"triggerIcd":{"auraId":{"spellId":60494}}},"doAtValue":{"const":{"val":"-50s"}}}, + {"action":{"triggerIcd":{"auraId":{"spellId":67669}}},"doAtValue":{"const":{"val":"-50s"}}}, + {"action":{"triggerIcd":{"auraId":{"itemId":50348}}},"doAtValue":{"const":{"val":"-50s"}}}, + {"action":{"castSpell":{"spellId":{"spellId":57946}}},"doAtValue":{"const":{"val":"-23s"}}}, + {"action":{"castSpell":{"spellId":{"spellId":57946}}},"doAtValue":{"const":{"val":"-21s"}}}, + {"action":{"castSpell":{"spellId":{"spellId":57946}}},"doAtValue":{"const":{"val":"-19s"}}}, + {"action":{"castSpell":{"spellId":{"spellId":57946}}},"doAtValue":{"const":{"val":"-17s"}}}, + {"action":{"castSpell":{"spellId":{"spellId":57946}}},"doAtValue":{"const":{"val":"-15s"}}}, + {"action":{"castSpell":{"spellId":{"spellId":57946}}},"doAtValue":{"const":{"val":"-13s"}}}, + {"action":{"castSpell":{"spellId":{"spellId":57946}}},"doAtValue":{"const":{"val":"-11s"}}}, + {"action":{"castSpell":{"spellId":{"spellId":57946}}},"doAtValue":{"const":{"val":"-9s"}}}, + {"action":{"castSpell":{"spellId":{"spellId":57946}}},"doAtValue":{"const":{"val":"-7s"}}}, + {"action":{"castSpell":{"spellId":{"spellId":57946}}},"doAtValue":{"const":{"val":"-4.5s"}}}, + {"action":{"castSpell":{"spellId":{"otherId":"OtherActionPotion"}}},"doAtValue":{"const":{"val":"-1.65s"}}}, + {"action":{"castSpell":{"spellId":{"spellId":47809}}},"doAtValue":{"const":{"val":"-1.65s"}}} + ], + "priorityList": [ + {"action":{"condition":{"cmp":{"op":"OpGe","lhs":{"currentTime":{}},"rhs":{"const":{"val":"0"}}}},"castSpell":{"spellId":{"spellId":2825,"tag":-1}}}}, + {"action":{"condition":{"auraIsActive":{"auraId":{"spellId":70840}}},"sequence":{"name":"tricks","actions":[{"castSpell":{"spellId":{"spellId":57933,"tag":-1}}},{"castSpell":{"spellId":{"itemId":50259}}}]}}}, + {"action":{"condition":{"isExecutePhase":{"threshold":"E35"}},"resetSequence":{"sequenceName":"tricks"}}}, + {"action":{"castSpell":{"spellId":{"spellId":10060,"tag":-1}}}}, + {"action":{"condition":{"auraIsActive":{"auraId":{"spellId":70840}}},"castSpell":{"spellId":{"itemId":50259}}}}, + {"action":{"condition":{"or":{"vals":[{"cmp":{"op":"OpGt","lhs":{"remainingTime":{}},"rhs":{"const":{"val":"138"}}}}]}},"castSpell":{"spellId":{"itemId":45466}}}}, + {"action":{"condition":{"or":{"vals":[{"cmp":{"op":"OpGt","lhs":{"remainingTime":{}},"rhs":{"const":{"val":"138"}}}}]}},"castSpell":{"spellId":{"spellId":33697}}}}, + {"action":{"condition":{"or":{"vals":[{"cmp":{"op":"OpGt","lhs":{"remainingTime":{}},"rhs":{"const":{"val":"138"}}}}]}},"castSpell":{"spellId":{"itemId":45148}}}}, + {"action":{"condition":{"or":{"vals":[{"cmp":{"op":"OpGt","lhs":{"remainingTime":{}},"rhs":{"const":{"val":"138"}}}}]}},"castSpell":{"spellId":{"itemId":48722}}}}, + {"action":{"condition":{"or":{"vals":[{"cmp":{"op":"OpGt","lhs":{"remainingTime":{}},"rhs":{"const":{"val":"70"}}}}]}},"castSpell":{"spellId":{"spellId":54758}}}}, + {"action":{"condition":{"or":{"vals":[{"and":{"vals":[{"isExecutePhase":{"threshold":"E25"}},{"or":{"vals":[{"auraIsActive":{"auraId":{"spellId":64713}}},{"auraIsActive":{"auraId":{"itemId":50348}}},{"auraIsActive":{"auraId":{"spellId":71636}}},{"auraIsActive":{"auraId":{"spellId":60492}}},{"auraIsActive":{"auraId":{"spellId":60064}}},{"auraIsActive":{"auraId":{"spellId":64741}}},{"auraIsActive":{"auraId":{"spellId":60494}}},{"auraIsActive":{"auraId":{"spellId":67669}}},{"auraIsActive":{"auraId":{"spellId":75473}}}]}}]}},{"cmp":{"op":"OpLe","lhs":{"remainingTime":{}},"rhs":{"const":{"val":"25"}}}}]}},"sequence":{"name":"big snap","actions":[{"castSpell":{"spellId":{"otherId":"OtherActionPotion"}}},{"castSpell":{"spellId":{"itemId":45466}}},{"castSpell":{"spellId":{"spellId":33697}}},{"castSpell":{"spellId":{"spellId":54758}}},{"castSpell":{"spellId":{"itemId":45148}}},{"castSpell":{"spellId":{"itemId":48722}}}]}}}, + {"action":{"sequence":{"name":"opener","actions":[{"castSpell":{"spellId":{"spellId":47813}}},{"castSpell":{"spellId":{"spellId":59164}}},{"castSpell":{"spellId":{"spellId":47843}}},{"castSpell":{"spellId":{"spellId":47864}}}]}}}, + {"action":{"condition":{"and":{"vals":[{"or":{"vals":[{"cmp":{"op":"OpLt","lhs":{"auraRemainingTime":{"auraId":{"spellId":71572}}},"rhs":{"math":{"op":"OpAdd","lhs":{"spellCastTime":{"spellId":{"spellId":59164}}},"rhs":{"math":{"op":"OpAdd","lhs":{"spellTravelTime":{"spellId":{"spellId":59164}}},"rhs":{"const":{"val":"2"}}}}}}}},{"cmp":{"op":"OpLt","lhs":{"auraRemainingTime":{"auraId":{"spellId":60486}}},"rhs":{"math":{"op":"OpAdd","lhs":{"spellCastTime":{"spellId":{"spellId":59164}}},"rhs":{"math":{"op":"OpAdd","lhs":{"spellTravelTime":{"spellId":{"spellId":59164}}},"rhs":{"const":{"val":"2"}}}}}}}},{"cmp":{"op":"OpLt","lhs":{"auraRemainingTime":{"auraId":{"spellId":65006}}},"rhs":{"math":{"op":"OpAdd","lhs":{"spellCastTime":{"spellId":{"spellId":59164}}},"rhs":{"math":{"op":"OpAdd","lhs":{"spellTravelTime":{"spellId":{"spellId":59164}}},"rhs":{"const":{"val":"2"}}}}}}}}]}},{"isExecutePhase":{"threshold":"E25"}},{"cmp":{"op":"OpGt","lhs":{"remainingTime":{}},"rhs":{"const":{"val":"5"}}}}]}},"castSpell":{"spellId":{"spellId":59164}}}}, + {"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpLt","lhs":{"auraRemainingTime":{"sourceUnit":{"type":"CurrentTarget"},"auraId":{"spellId":59164}}},"rhs":{"math":{"op":"OpAdd","lhs":{"spellCastTime":{"spellId":{"spellId":59164}}},"rhs":{"math":{"op":"OpAdd","lhs":{"spellTravelTime":{"spellId":{"spellId":59164}}},"rhs":{"const":{"val":"2"}}}}}}}},{"cmp":{"op":"OpGt","lhs":{"remainingTime":{}},"rhs":{"const":{"val":"5"}}}}]}},"castSpell":{"spellId":{"spellId":59164}}}}, + {"action":{"condition":{"and":{"vals":[{"or":{"vals":[{"not":{"val":{"auraIsActive":{"auraId":{"spellId":63321}}}}},{"cmp":{"op":"OpLt","lhs":{"auraRemainingTime":{"auraId":{"spellId":63321}}},"rhs":{"const":{"val":"2"}}}}]}},{"cmp":{"op":"OpGt","lhs":{"remainingTime":{}},"rhs":{"const":{"val":"27"}}}}]}},"castSpell":{"spellId":{"spellId":57946}}}}, + {"action":{"condition":{"warlockShouldRefreshCorruption":{}},"castSpell":{"spellId":{"spellId":47813}}}}, + {"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpLt","lhs":{"dotRemainingTime":{"spellId":{"spellId":47843}}},"rhs":{"spellCastTime":{"spellId":{"spellId":47843}}}}},{"cmp":{"op":"OpGt","lhs":{"remainingTime":{}},"rhs":{"const":{"val":"10"}}}}]}},"castSpell":{"spellId":{"spellId":47843}}}}, + {"action":{"condition":{"cmp":{"op":"OpLe","lhs":{"remainingTime":{}},"rhs":{"const":{"val":"64"}}}},"castSpell":{"spellId":{"spellId":1122}}}}, + {"action":{"condition":{"and":{"vals":[{"not":{"val":{"dotIsActive":{"spellId":{"spellId":47864}}}}},{"cmp":{"op":"OpGt","lhs":{"remainingTime":{}},"rhs":{"const":{"val":"22"}}}}]}},"castSpell":{"spellId":{"spellId":47864}}}}, + {"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpLt","lhs":{"remainingTimePercent":{}},"rhs":{"const":{"val":"27%"}}}},{"not":{"val":{"isExecutePhase":{"threshold":"E25"}}}}]}},"sequence":{"name":"lifetap","actions":[{"castSpell":{"spellId":{"spellId":57946}}}]}}}, + {"action":{"condition":{"warlockShouldRecastDrainSoul":{}},"channelSpell":{"spellId":{"spellId":47855},"interruptIf":{}}}}, + {"action":{"condition":{"isExecutePhase":{"threshold":"E25"}},"channelSpell":{"spellId":{"spellId":47855},"interruptIf":{"const":{"val":"True"}}}}}, + {"action":{"castSpell":{"spellId":{"spellId":47809}}}}, + {"action":{"castSpell":{"spellId":{"spellId":57946}}}} + ] +} \ No newline at end of file diff --git a/ui/warlock/presets.ts b/ui/warlock/presets.ts index 0c5006d5c6..696315d81c 100644 --- a/ui/warlock/presets.ts +++ b/ui/warlock/presets.ts @@ -47,6 +47,7 @@ import P3DestroAllianceGear from './gear_sets/p3_destro_alliance.gear.json'; import P3DestroHordeGear from './gear_sets/p3_destro_horde.gear.json'; import P4DestroGear from './gear_sets/p4_destro.gear.json'; +import AfflictionApl from './apls/affliction.apl.json'; import DemoApl from './apls/demo.apl.json'; import DestroApl from './apls/destro.apl.json'; @@ -99,9 +100,11 @@ export const DestructionRotation = WarlockRotation.create({ detonateSeed: true, }); -export const APL_Demo_Legacy = PresetUtils.makePresetLegacyRotation('Demo Legacy', Spec.SpecWarlock, DemonologyRotation); +export const APL_Affliction_Legacy = PresetUtils.makePresetLegacyRotation('Affliction Legacy', Spec.SpecWarlock, AfflictionRotation, { talentTree: 0 }); +export const APL_Affliction_Default = PresetUtils.makePresetAPLRotation('Affliction', AfflictionApl, { talentTree: 0 }); +export const APL_Demo_Legacy = PresetUtils.makePresetLegacyRotation('Demo Legacy', Spec.SpecWarlock, DemonologyRotation, { talentTree: 1 }); export const APL_Demo_Default = PresetUtils.makePresetAPLRotation('Demo', DemoApl, { talentTree: 1 }); -export const APL_Destro_Legacy = PresetUtils.makePresetLegacyRotation('Destro Legacy', Spec.SpecWarlock, DestructionRotation); +export const APL_Destro_Legacy = PresetUtils.makePresetLegacyRotation('Destro Legacy', Spec.SpecWarlock, DestructionRotation, { talentTree: 2 }); export const APL_Destro_Default = PresetUtils.makePresetAPLRotation('Destro', DestroApl, { talentTree: 2 }); // Default talents. Uses the wowhead calculator format, make the talents on diff --git a/ui/warlock/sim.ts b/ui/warlock/sim.ts index 5048475d01..cb3fc6c01f 100644 --- a/ui/warlock/sim.ts +++ b/ui/warlock/sim.ts @@ -3,6 +3,11 @@ import { Spec, Stat, } from '../core/proto/common.js'; +import { + APLAction, + APLListItem, + APLRotation, +} from '../core/proto/apl.js'; import { Stats } from '../core/proto_utils/stats.js'; import { Player } from '../core/player.js'; @@ -140,6 +145,8 @@ export class WarlockSimUI extends IndividualSimUI { ], // Preset rotations that the user can quickly select. rotations: [ + Presets.APL_Affliction_Legacy, + Presets.APL_Affliction_Default, Presets.APL_Demo_Legacy, Presets.APL_Demo_Default, Presets.APL_Destro_Legacy, @@ -166,6 +173,17 @@ export class WarlockSimUI extends IndividualSimUI { Presets.P4_DESTRO_PRESET, ], }, + + autoRotation: (player: Player): APLRotation => { + const talentTree = player.getTalentTree(); + if (talentTree == 0) { + return Presets.APL_Affliction_Default.rotation.rotation!; + } else if (talentTree == 1) { + return Presets.APL_Demo_Default.rotation.rotation!; + } else { + return Presets.APL_Destro_Default.rotation.rotation!; + } + }, }); } } diff --git a/ui/warrior/apls/arms.apl.json b/ui/warrior/apls/arms.apl.json index 8c4f56b8f5..3f0490d627 100644 --- a/ui/warrior/apls/arms.apl.json +++ b/ui/warrior/apls/arms.apl.json @@ -12,7 +12,6 @@ {"action":{"condition":{"isExecutePhase":{"threshold":"E20"}},"castSpell":{"spellId":{"otherId":"OtherActionPotion"}}}}, {"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpGe","lhs":{"currentRage":{}},"rhs":{"const":{"val":"35"}}}},{"cmp":{"op":"OpLe","lhs":{"autoTimeToNext":{}},"rhs":{"const":{"val":"1ms"}}}},{"cmp":{"op":"OpGt","lhs":{"numberTargets":{}},"rhs":{"const":{"val":"1"}}}}]}},"castSpell":{"spellId":{"spellId":47520,"tag":1}}}}, {"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpGe","lhs":{"currentRage":{}},"rhs":{"const":{"val":"40"}}}},{"cmp":{"op":"OpLe","lhs":{"autoTimeToNext":{}},"rhs":{"const":{"val":"1ms"}}}},{"cmp":{"op":"OpEq","lhs":{"numberTargets":{}},"rhs":{"const":{"val":"1"}}}}]}},"castSpell":{"spellId":{"spellId":47450,"tag":1}}}}, - {"hide":true,"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpLt","lhs":{"auraNumStacks":{"sourceUnit":{"type":"CurrentTarget"},"auraId":{"spellId":47467}}},"rhs":{"const":{"val":"5"}}}},{"not":{"val":{"auraIsActive":{"sourceUnit":{"type":"CurrentTarget"},"auraId":{"spellId":8647}}}}}]}},"castSpell":{"spellId":{"spellId":47467}}}}, {"hide":true,"action":{"condition":{"auraShouldRefresh":{"auraId":{"spellId":47467},"maxOverlap":{"const":{"val":"3s"}}}},"castSpell":{"spellId":{"spellId":47467}}}}, {"action":{"condition":{"and":{"vals":[{"not":{"val":{"auraIsActive":{"sourceUnit":{"type":"CurrentTarget"},"auraId":{"spellId":47465}}}}},{"cmp":{"op":"OpGt","lhs":{"remainingTime":{}},"rhs":{"const":{"val":"7s"}}}}]}},"castSpell":{"spellId":{"spellId":47465}}}}, {"action":{"condition":{"auraIsActive":{"auraId":{"spellId":68051}}},"castSpell":{"spellId":{"spellId":7384}}}}, diff --git a/ui/warrior/apls/arms_sunder.apl.json b/ui/warrior/apls/arms_sunder.apl.json new file mode 100644 index 0000000000..cc12cdaab0 --- /dev/null +++ b/ui/warrior/apls/arms_sunder.apl.json @@ -0,0 +1,24 @@ +{ + "type": "TypeAPL", + "prepullActions": [ + {"action":{"castSpell":{"spellId":{"spellId":2687}}},"doAtValue":{"const":{"val":"-10s"}}}, + {"action":{"castSpell":{"spellId":{"spellId":1719}}},"doAtValue":{"const":{"val":"-3s"}}}, + {"action":{"castSpell":{"spellId":{"spellId":2457}}},"doAtValue":{"const":{"val":"-2s"}}}, + {"action":{"castSpell":{"spellId":{"otherId":"OtherActionPotion"}}},"doAtValue":{"const":{"val":"-0.1s"}}} + ], + "priorityList": [ + {"action":{"autocastOtherCooldowns":{}}}, + {"action":{"condition":{"cmp":{"op":"OpLt","lhs":{"currentRage":{}},"rhs":{"const":{"val":"20"}}}},"castSpell":{"spellId":{"spellId":2687}}}}, + {"action":{"condition":{"isExecutePhase":{"threshold":"E20"}},"castSpell":{"spellId":{"otherId":"OtherActionPotion"}}}}, + {"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpGe","lhs":{"currentRage":{}},"rhs":{"const":{"val":"35"}}}},{"cmp":{"op":"OpLe","lhs":{"autoTimeToNext":{}},"rhs":{"const":{"val":"1ms"}}}},{"cmp":{"op":"OpGt","lhs":{"numberTargets":{}},"rhs":{"const":{"val":"1"}}}}]}},"castSpell":{"spellId":{"spellId":47520,"tag":1}}}}, + {"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpGe","lhs":{"currentRage":{}},"rhs":{"const":{"val":"40"}}}},{"cmp":{"op":"OpLe","lhs":{"autoTimeToNext":{}},"rhs":{"const":{"val":"1ms"}}}},{"cmp":{"op":"OpEq","lhs":{"numberTargets":{}},"rhs":{"const":{"val":"1"}}}}]}},"castSpell":{"spellId":{"spellId":47450,"tag":1}}}}, + {"action":{"condition":{"auraShouldRefresh":{"auraId":{"spellId":47467},"maxOverlap":{"const":{"val":"3s"}}}},"castSpell":{"spellId":{"spellId":47467}}}}, + {"action":{"condition":{"and":{"vals":[{"not":{"val":{"auraIsActive":{"sourceUnit":{"type":"CurrentTarget"},"auraId":{"spellId":47465}}}}},{"cmp":{"op":"OpGt","lhs":{"remainingTime":{}},"rhs":{"const":{"val":"7s"}}}}]}},"castSpell":{"spellId":{"spellId":47465}}}}, + {"action":{"condition":{"auraIsActive":{"auraId":{"spellId":68051}}},"castSpell":{"spellId":{"spellId":7384}}}}, + {"action":{"condition":{"cmp":{"op":"OpGt","lhs":{"currentTime":{}},"rhs":{"const":{"val":"3.5s"}}}},"castSpell":{"spellId":{"spellId":46924}}}}, + {"action":{"condition":{"cmp":{"op":"OpGe","lhs":{"currentRage":{}},"rhs":{"const":{"val":"30"}}}},"castSpell":{"spellId":{"spellId":47486}}}}, + {"action":{"condition":{"cmp":{"op":"OpGe","lhs":{"currentRage":{}},"rhs":{"const":{"val":"15"}}}},"castSpell":{"spellId":{"spellId":47471}}}}, + {"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpGe","lhs":{"currentRage":{}},"rhs":{"const":{"val":"15"}}}},{"cmp":{"op":"OpGt","lhs":{"numberTargets":{}},"rhs":{"const":{"val":"1"}}}}]}},"castSpell":{"spellId":{"spellId":47502}}}}, + {"action":{"condition":{"cmp":{"op":"OpGe","lhs":{"currentRage":{}},"rhs":{"const":{"val":"15"}}}},"castSpell":{"spellId":{"spellId":47475}}}} + ] + } \ No newline at end of file diff --git a/ui/warrior/apls/fury.apl.json b/ui/warrior/apls/fury.apl.json index 6335e3837f..b52dea2371 100644 --- a/ui/warrior/apls/fury.apl.json +++ b/ui/warrior/apls/fury.apl.json @@ -11,7 +11,6 @@ "priorityList": [ {"action":{"autocastOtherCooldowns":{}}}, {"action":{"condition":{"and":{"vals":[{"auraIsActive":{"auraId":{"spellId":2458}}},{"cmp":{"op":"OpLe","lhs":{"currentRage":{}},"rhs":{"const":{"val":"20"}}}}]}},"castSpell":{"spellId":{"spellId":2687}}}}, - {"hide":true,"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpLt","lhs":{"auraNumStacks":{"sourceUnit":{"type":"CurrentTarget"},"auraId":{"spellId":47467}}},"rhs":{"const":{"val":"5"}}}},{"not":{"val":{"auraIsActive":{"sourceUnit":{"type":"CurrentTarget"},"auraId":{"spellId":8647}}}}}]}},"castSpell":{"spellId":{"spellId":47467}}}}, {"hide":true,"action":{"condition":{"auraShouldRefresh":{"auraId":{"spellId":47467},"maxOverlap":{"const":{"val":"3s"}}}},"castSpell":{"spellId":{"spellId":47467}}}}, {"action":{"condition":{"auraIsActive":{"auraId":{"spellId":12292}}},"castSpell":{"spellId":{"itemId":40211}}}}, {"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpGe","lhs":{"currentRage":{}},"rhs":{"const":{"val":"12"}}}},{"cmp":{"op":"OpGt","lhs":{"numberTargets":{}},"rhs":{"const":{"val":"1"}}}}]}},"castSpell":{"spellId":{"spellId":47520,"tag":1}}}}, diff --git a/ui/warrior/apls/fury_sunder.apl.json b/ui/warrior/apls/fury_sunder.apl.json index 5a4e9c7098..040e886612 100644 --- a/ui/warrior/apls/fury_sunder.apl.json +++ b/ui/warrior/apls/fury_sunder.apl.json @@ -11,7 +11,6 @@ "priorityList": [ {"action":{"autocastOtherCooldowns":{}}}, {"action":{"condition":{"and":{"vals":[{"auraIsActive":{"auraId":{"spellId":2458}}},{"cmp":{"op":"OpLe","lhs":{"currentRage":{}},"rhs":{"const":{"val":"20"}}}}]}},"castSpell":{"spellId":{"spellId":2687}}}}, - {"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpLt","lhs":{"auraNumStacks":{"sourceUnit":{"type":"CurrentTarget"},"auraId":{"spellId":47467}}},"rhs":{"const":{"val":"5"}}}},{"not":{"val":{"auraIsActive":{"sourceUnit":{"type":"CurrentTarget"},"auraId":{"spellId":8647}}}}}]}},"castSpell":{"spellId":{"spellId":47467}}}}, {"action":{"condition":{"auraShouldRefresh":{"auraId":{"spellId":47467},"maxOverlap":{"const":{"val":"3s"}}}},"castSpell":{"spellId":{"spellId":47467}}}}, {"action":{"condition":{"auraIsActive":{"auraId":{"spellId":12292}}},"castSpell":{"spellId":{"itemId":40211}}}}, {"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpGe","lhs":{"currentRage":{}},"rhs":{"const":{"val":"12"}}}},{"cmp":{"op":"OpGt","lhs":{"numberTargets":{}},"rhs":{"const":{"val":"1"}}}}]}},"castSpell":{"spellId":{"spellId":47520,"tag":1}}}}, diff --git a/ui/warrior/presets.ts b/ui/warrior/presets.ts index d0eb83339a..24d4422eee 100644 --- a/ui/warrior/presets.ts +++ b/ui/warrior/presets.ts @@ -37,6 +37,7 @@ import P3FuryHordeGear from './gear_sets/p3_fury_horde.gear.json'; import FuryApl from './apls/fury.apl.json'; import FurySunderApl from './apls/fury_sunder.apl.json'; import ArmsApl from './apls/arms.apl.json'; +import ArmsSunderApl from './apls/arms_sunder.apl.json'; // Preset options for this spec. // Eventually we will import these values for the raid sim too, so its good to @@ -95,6 +96,7 @@ export const ArmsRotation = WarriorRotation.create({ export const ROTATION_FURY = PresetUtils.makePresetAPLRotation('Fury', FuryApl, { talentTree: 1 }); export const ROTATION_FURY_SUNDER = PresetUtils.makePresetAPLRotation('Fury + Sunder', FurySunderApl, { talentTree: 1 }); export const ROTATION_ARMS = PresetUtils.makePresetAPLRotation('Arms', ArmsApl, { talentTree: 0 }); +export const ROTATION_ARMS_SUNDER = PresetUtils.makePresetAPLRotation('Arms + Sunder', ArmsSunderApl, { talentTree: 0 }); // Default talents. Uses the wowhead calculator format, make the talents on // https://wowhead.com/wotlk/talent-calc and copy the numbers in the url. diff --git a/ui/warrior/sim.ts b/ui/warrior/sim.ts index 3de1a1b513..3f6e90b60d 100644 --- a/ui/warrior/sim.ts +++ b/ui/warrior/sim.ts @@ -1,18 +1,25 @@ -import { RaidBuffs } from '../core/proto/common.js'; -import { PartyBuffs } from '../core/proto/common.js'; -import { IndividualBuffs } from '../core/proto/common.js'; -import { Debuffs } from '../core/proto/common.js'; -import { Spec } from '../core/proto/common.js'; -import { Stat, PseudoStat } from '../core/proto/common.js'; -import { TristateEffect } from '../core/proto/common.js' +import { + Debuffs, + GemColor, + IndividualBuffs, + ItemSlot, + PartyBuffs, + RaidBuffs, + Spec, + Stat, PseudoStat, + Profession, + TristateEffect, +} from '../core/proto/common.js'; +import { + APLAction, + APLListItem, + APLRotation, +} from '../core/proto/apl.js'; import { Stats } from '../core/proto_utils/stats.js'; import { Player } from '../core/player.js'; import { IndividualSimUI } from '../core/individual_sim_ui.js'; import { TypedEvent } from '../core/typed_event.js'; import { Gear } from '../core/proto_utils/gear.js'; -import { ItemSlot } from '../core/proto/common.js'; -import { GemColor } from '../core/proto/common.js'; -import { Profession } from '../core/proto/common.js'; import * as IconInputs from '../core/components/icon_inputs.js'; @@ -173,6 +180,7 @@ export class WarriorSimUI extends IndividualSimUI { Presets.ROTATION_FURY, Presets.ROTATION_FURY_SUNDER, Presets.ROTATION_ARMS, + Presets.ROTATION_ARMS_SUNDER, ], // Preset gear configurations that the user can quickly select. gear: [ @@ -190,6 +198,15 @@ export class WarriorSimUI extends IndividualSimUI { Presets.P3_ARMS_4P_PRESET_HORDE, ], }, + + autoRotation: (player: Player): APLRotation => { + const talentTree = player.getTalentTree(); + if (talentTree == 0) { + return Presets.ROTATION_ARMS_SUNDER.rotation.rotation!; + } else { + return Presets.ROTATION_FURY_SUNDER.rotation.rotation!; + } + }, }); this.addOptimizeGemsAction(); }