From c23707d957dda00ac2f7e4f91b674129f473f558 Mon Sep 17 00:00:00 2001 From: psiven Date: Sat, 11 Nov 2023 12:21:19 -0700 Subject: [PATCH 1/3] Reintroduce Simple Cooldown picker for Prot War --- ui/protection_warrior/inputs.ts | 89 ++++++++++++++++---------------- ui/protection_warrior/presets.ts | 5 +- ui/protection_warrior/sim.ts | 57 +++++++++++++++++--- 3 files changed, 99 insertions(+), 52 deletions(-) diff --git a/ui/protection_warrior/inputs.ts b/ui/protection_warrior/inputs.ts index 5c51790c84..e4699dc043 100644 --- a/ui/protection_warrior/inputs.ts +++ b/ui/protection_warrior/inputs.ts @@ -41,49 +41,50 @@ export const ShatteringThrow = InputHelpers.makeSpecOptionsBooleanIconInput({ - fieldName: 'customRotation', - numColumns: 3, - values: [ - { actionId: ActionId.fromSpellId(57823), value: SpellOption.Revenge }, - { actionId: ActionId.fromSpellId(47488), value: SpellOption.ShieldSlam }, - { actionId: ActionId.fromSpellId(47440), value: SpellOption.Shout }, - { actionId: ActionId.fromSpellId(47502), value: SpellOption.ThunderClap }, - { actionId: ActionId.fromSpellId(25203), value: SpellOption.DemoralizingShout }, - { actionId: ActionId.fromSpellId(47486), value: SpellOption.MortalStrike }, - { actionId: ActionId.fromSpellId(47498), value: SpellOption.Devastate }, - { actionId: ActionId.fromSpellId(47467), value: SpellOption.SunderArmor }, - { actionId: ActionId.fromSpellId(12809), value: SpellOption.ConcussionBlow }, - { actionId: ActionId.fromSpellId(46968), value: SpellOption.Shockwave }, - ], - }), - InputHelpers.makeRotationNumberInput({ - fieldName: 'hsRageThreshold', - label: 'HS rage threshold', - labelTooltip: 'Heroic Strike when rage is above:', - }), - InputHelpers.makeRotationBooleanInput({ - fieldName: 'prioSslamOnShieldBlock', - label: 'Prio SSlam on Shield Block', - labelTooltip: 'The rotation code will prio SSlam over Revenge during active shield block windows.', - }), - InputHelpers.makeRotationEnumInput({ - fieldName: 'demoShoutChoice', - label: 'Demo Shout', - values: [ - { name: 'Never', value: DemoShoutChoice.DemoShoutChoiceNone }, - { name: 'Maintain Debuff', value: DemoShoutChoice.DemoShoutChoiceMaintain }, - { name: 'Filler', value: DemoShoutChoice.DemoShoutChoiceFiller }, - ], - }), - InputHelpers.makeRotationEnumInput({ - fieldName: 'thunderClapChoice', - label: 'Thunder Clap', - values: [ - { name: 'Never', value: ThunderClapChoice.ThunderClapChoiceNone }, - { name: 'Maintain Debuff', value: ThunderClapChoice.ThunderClapChoiceMaintain }, - { name: 'On CD', value: ThunderClapChoice.ThunderClapChoiceOnCD }, - ], - }), + // TODO: Currently these are unhooked and not configurable in Simple mode. + // InputHelpers.makeCustomRotationInput({ + // fieldName: 'customRotation', + // numColumns: 3, + // values: [ + // { actionId: ActionId.fromSpellId(57823), value: SpellOption.Revenge }, + // { actionId: ActionId.fromSpellId(47488), value: SpellOption.ShieldSlam }, + // { actionId: ActionId.fromSpellId(47440), value: SpellOption.Shout }, + // { actionId: ActionId.fromSpellId(47502), value: SpellOption.ThunderClap }, + // { actionId: ActionId.fromSpellId(25203), value: SpellOption.DemoralizingShout }, + // { actionId: ActionId.fromSpellId(47486), value: SpellOption.MortalStrike }, + // { actionId: ActionId.fromSpellId(47498), value: SpellOption.Devastate }, + // { actionId: ActionId.fromSpellId(47467), value: SpellOption.SunderArmor }, + // { actionId: ActionId.fromSpellId(12809), value: SpellOption.ConcussionBlow }, + // { actionId: ActionId.fromSpellId(46968), value: SpellOption.Shockwave }, + // ], + // }), + // InputHelpers.makeRotationNumberInput({ + // fieldName: 'hsRageThreshold', + // label: 'HS rage threshold', + // labelTooltip: 'Heroic Strike when rage is above:', + // }), + // InputHelpers.makeRotationBooleanInput({ + // fieldName: 'prioSslamOnShieldBlock', + // label: 'Prio SSlam on Shield Block', + // labelTooltip: 'The rotation code will prio SSlam over Revenge during active shield block windows.', + // }), + // InputHelpers.makeRotationEnumInput({ + // fieldName: 'demoShoutChoice', + // label: 'Demo Shout', + // values: [ + // { name: 'Never', value: DemoShoutChoice.DemoShoutChoiceNone }, + // { name: 'Maintain Debuff', value: DemoShoutChoice.DemoShoutChoiceMaintain }, + // { name: 'Filler', value: DemoShoutChoice.DemoShoutChoiceFiller }, + // ], + // }), + // InputHelpers.makeRotationEnumInput({ + // fieldName: 'thunderClapChoice', + // label: 'Thunder Clap', + // values: [ + // { name: 'Never', value: ThunderClapChoice.ThunderClapChoiceNone }, + // { name: 'Maintain Debuff', value: ThunderClapChoice.ThunderClapChoiceMaintain }, + // { name: 'On CD', value: ThunderClapChoice.ThunderClapChoiceOnCD }, + // ], + // }), ], }; diff --git a/ui/protection_warrior/presets.ts b/ui/protection_warrior/presets.ts index 18e5a1cf08..4f42b6f4ab 100644 --- a/ui/protection_warrior/presets.ts +++ b/ui/protection_warrior/presets.ts @@ -8,6 +8,7 @@ import { Glyphs, GuardianElixir, Potions, + Spec, } from '../core/proto/common.js'; import { SavedTalents } from '../core/proto/ui.js'; @@ -58,7 +59,9 @@ export const DefaultRotation = ProtectionWarriorRotation.create({ hsRageThreshold: 30, }); -export const ROTATION_DEFAULT = PresetUtils.makePresetAPLRotation('Default', DefaultApl); +export const ROTATION_DEFAULT = PresetUtils.makePresetAPLRotation('Default APL', DefaultApl); +export const ROTATION_PRESET_SIMPLE = PresetUtils.makePresetSimpleRotation('Simple Cooldowns', Spec.SpecProtectionWarrior, DefaultRotation); + // 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/protection_warrior/sim.ts b/ui/protection_warrior/sim.ts index 6de21d26d6..924ed8b22d 100644 --- a/ui/protection_warrior/sim.ts +++ b/ui/protection_warrior/sim.ts @@ -1,12 +1,18 @@ -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 { + Cooldowns, + Debuffs, + IndividualBuffs, + PartyBuffs, + RaidBuffs, + Spec, + Stat, + PseudoStat, + TristateEffect +} from '../core/proto/common.js'; + import { APLAction, + APLPrepullAction, APLListItem, APLRotation, } from '../core/proto/apl.js'; @@ -18,6 +24,8 @@ import { ProtectionWarrior, ProtectionWarrior_Rotation as ProtectionWarriorRotat import * as IconInputs from '../core/components/icon_inputs.js'; import * as OtherInputs from '../core/components/other_inputs.js'; +import * as Tooltips from '../core/constants/tooltips.js'; +import * as AplUtils from '../core/proto_utils/apl_utils.js'; import * as ProtectionWarriorInputs from './inputs.js'; import * as Presets from './presets.js'; @@ -194,6 +202,7 @@ export class ProtectionWarriorSimUI extends IndividualSimUI): APLRotation => { return Presets.ROTATION_DEFAULT.rotation.rotation!; }, + + simpleRotation: (player: Player, simple: ProtectionWarriorRotation, cooldowns: Cooldowns): APLRotation => { + let [prepullActions, actions] = AplUtils.standardCooldownDefaults(cooldowns); + + const preShout = APLPrepullAction.fromJsonString(`{"action":{"castSpell":{"spellId":{"spellId":47440}}},"doAtValue":{"const":{"val":"-10s"}}}`); + + const heroicStrike = APLAction.fromJsonString(`{"condition":{"cmp":{"op":"OpGe","lhs":{"currentRage":{}},"rhs":{"const":{"val":"30"}}}},"castSpell":{"spellId":{"tag":1,"spellId":47450}}}`); + const shieldSlam = APLAction.fromJsonString(`{"castSpell":{"spellId":{"spellId":47488}}}`); + const revenge = APLAction.fromJsonString(`{"castSpell":{"spellId":{"spellId":57823}}}`); + const refreshShout = APLAction.fromJsonString(`{"condition":{"auraShouldRefresh":{"sourceUnit":{"type":"Self"},"auraId":{"spellId":47440},"maxOverlap":{"const":{"val":"3s"}}}},"castSpell":{"spellId":{"spellId":47440}}}`); + const refreshTclap = APLAction.fromJsonString(`{"condition":{"auraShouldRefresh":{"auraId":{"spellId":47502},"maxOverlap":{"const":{"val":"2s"}}}},"castSpell":{"spellId":{"spellId":47502}}}`); + const refreshDemo = APLAction.fromJsonString(`{"condition":{"auraShouldRefresh":{"auraId":{"spellId":47437},"maxOverlap":{"const":{"val":"2s"}}}},"castSpell":{"spellId":{"spellId":25203}}}`); + const devastate = APLAction.fromJsonString(`{"castSpell":{"spellId":{"spellId":47498}}}`); + + prepullActions.push(preShout); + + actions.push(...[ + heroicStrike, + shieldSlam, + revenge, + refreshShout, + refreshTclap, + refreshDemo, + devastate, + ].filter(a => a) as Array) + + return APLRotation.create({ + prepullActions: prepullActions, + priorityList: actions.map(action => APLListItem.create({ + action: action, + })) + }); + }, + }); } } From 6a11f78c164a32182d808d6b86a3b196357e210c Mon Sep 17 00:00:00 2001 From: psiven Date: Sat, 11 Nov 2023 14:10:42 -0700 Subject: [PATCH 2/3] New Presets for Prot Warr --- ui/protection_warrior/gear_sets/p3.gear.json | 19 +++++++++++++++++++ ui/protection_warrior/gear_sets/p4.gear.json | 19 +++++++++++++++++++ .../gear_sets/p4_preraid.gear.json | 19 +++++++++++++++++++ ui/protection_warrior/presets.ts | 12 +++++++++--- ui/protection_warrior/sim.ts | 5 ++++- 5 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 ui/protection_warrior/gear_sets/p3.gear.json create mode 100644 ui/protection_warrior/gear_sets/p4.gear.json create mode 100644 ui/protection_warrior/gear_sets/p4_preraid.gear.json diff --git a/ui/protection_warrior/gear_sets/p3.gear.json b/ui/protection_warrior/gear_sets/p3.gear.json new file mode 100644 index 0000000000..ecf8b4e772 --- /dev/null +++ b/ui/protection_warrior/gear_sets/p3.gear.json @@ -0,0 +1,19 @@ +{"items": [ + {"id":48433,"enchant":3818,"gems":[41380,40130]}, + {"id":47133,"gems":[40130]}, + {"id":48455,"enchant":3852,"gems":[40119]}, + {"id":47549,"enchant":3605,"gems":[40119]}, + {"id":46968,"enchant":3832,"gems":[40130,49110,36767]}, + {"id":47111,"enchant":3850,"gems":[40130,0]}, + {"id":48453,"enchant":3860,"gems":[40167,0]}, + {"id":47076,"enchant":3599,"gems":[40130,36767,36767]}, + {"id":48447,"enchant":3822,"gems":[40130,40119]}, + {"id":47003,"enchant":3232,"gems":[40130,40119]}, + {"id":45471,"gems":[40167]}, + {"id":47157,"gems":[40130]}, + {"id":45158}, + {"id":47088}, + {"id":47506,"enchant":3788,"gems":[40167]}, + {"id":46964,"enchant":3849,"gems":[40119]}, + {"id":47660} + ]} \ No newline at end of file diff --git a/ui/protection_warrior/gear_sets/p4.gear.json b/ui/protection_warrior/gear_sets/p4.gear.json new file mode 100644 index 0000000000..9bb047361c --- /dev/null +++ b/ui/protection_warrior/gear_sets/p4.gear.json @@ -0,0 +1,19 @@ +{"items": [ + {"id":50640,"enchant":3818,"gems":[41380,40130]}, + {"id":50682,"gems":[40130]}, + {"id":51224,"enchant":3852,"gems":[40130]}, + {"id":50718,"enchant":3605,"gems":[40119]}, + {"id":51220,"enchant":3832,"gems":[40130,40119]}, + {"id":50611,"enchant":3850,"gems":[40119,0]}, + {"id":51222,"enchant":3860,"gems":[40119,0]}, + {"id":50691,"enchant":3599,"gems":[40130,36767,0]}, + {"id":51223,"enchant":3822,"gems":[40167,40119]}, + {"id":50625,"enchant":3232,"gems":[40167,40119]}, + {"id":50622,"gems":[40130]}, + {"id":50642,"gems":[40130]}, + {"id":50364}, + {"id":50344}, + {"id":50738,"enchant":3788,"gems":[40119]}, + {"id":50729,"enchant":3849,"gems":[40130]}, + {"id":51834,"gems":[36767]} + ]} \ No newline at end of file diff --git a/ui/protection_warrior/gear_sets/p4_preraid.gear.json b/ui/protection_warrior/gear_sets/p4_preraid.gear.json new file mode 100644 index 0000000000..c708b5d03e --- /dev/null +++ b/ui/protection_warrior/gear_sets/p4_preraid.gear.json @@ -0,0 +1,19 @@ +{"items": [ + {"id":48430,"enchant":3818,"gems":[41380,40130]}, + {"id":47116}, + {"id":48454,"enchant":3852,"gems":[40119]}, + {"id":45496,"enchant":3605,"gems":[40130]}, + {"id":48450,"enchant":3832,"gems":[40167,40119]}, + {"id":47570,"enchant":3850,"gems":[40167,0]}, + {"id":48452,"enchant":3860,"gems":[40167,0]}, + {"id":47072,"enchant":3599,"gems":[40130,36767]}, + {"id":49904,"enchant":3822,"gems":[40130,40167,36767]}, + {"id":49907,"enchant":3232,"gems":[40167,36767]}, + {"id":45471,"gems":[40167]}, + {"id":47731}, + {"id":47216}, + {"id":47080}, + {"id":45876,"enchant":3788,"gems":[40130]}, + {"id":45877,"enchant":3849,"gems":[40119,40119]}, + {"id":47660} + ]} \ No newline at end of file diff --git a/ui/protection_warrior/presets.ts b/ui/protection_warrior/presets.ts index 4f42b6f4ab..0f960cbc28 100644 --- a/ui/protection_warrior/presets.ts +++ b/ui/protection_warrior/presets.ts @@ -26,8 +26,11 @@ import { import * as PresetUtils from '../core/preset_utils.js'; import PreraidBalancedGear from './gear_sets/preraid_balanced.gear.json'; +import PreraidP4Gear from './gear_sets/p4_preraid.gear.json'; import P1BalancedGear from './gear_sets/p1_balanced.gear.json'; import P2SurvivalGear from './gear_sets/p2_survival.gear.json'; +import P3Gear from './gear_sets/p3.gear.json'; +import P4Gear from './gear_sets/p4.gear.json'; import DefaultApl from './apls/default.apl.json'; @@ -35,9 +38,12 @@ import DefaultApl from './apls/default.apl.json'; // Eventually we will import these values for the raid sim too, so its good to // keep them in a separate file. -export const PRERAID_BALANCED_PRESET = PresetUtils.makePresetGear('PreRaid Balanced', PreraidBalancedGear); -export const P1_BALANCED_PRESET = PresetUtils.makePresetGear('P1 Balanced Preset', P1BalancedGear); -export const P2_SURVIVAL_PRESET = PresetUtils.makePresetGear('P2 Survival Preset', P2SurvivalGear); +export const PRERAID_BALANCED_PRESET = PresetUtils.makePresetGear('P1 PreRaid Preset', PreraidBalancedGear); +export const P4_PRERAID_PRESET = PresetUtils.makePresetGear('P4 PreRaid Preset', PreraidP4Gear); +export const P1_BALANCED_PRESET = PresetUtils.makePresetGear('P1 Preset', P1BalancedGear); +export const P2_SURVIVAL_PRESET = PresetUtils.makePresetGear('P2 Preset', P2SurvivalGear); +export const P3_PRESET = PresetUtils.makePresetGear('P3 Preset', P3Gear); +export const P4_PRESET = PresetUtils.makePresetGear('P4 Preset', P4Gear); export const DefaultRotation = ProtectionWarriorRotation.create({ customRotation: CustomRotation.create({ diff --git a/ui/protection_warrior/sim.ts b/ui/protection_warrior/sim.ts index 924ed8b22d..f86d495166 100644 --- a/ui/protection_warrior/sim.ts +++ b/ui/protection_warrior/sim.ts @@ -94,7 +94,7 @@ export class ProtectionWarriorSimUI extends IndividualSimUI Date: Sat, 11 Nov 2023 16:10:27 -0700 Subject: [PATCH 3/3] Updated Presets for Prot Pal --- ui/protection_paladin/gear_sets/p3.gear.json | 19 +++++++++++++++++++ ui/protection_paladin/gear_sets/p4.gear.json | 19 +++++++++++++++++++ .../gear_sets/p4_preraid.gear.json | 19 +++++++++++++++++++ ui/protection_paladin/presets.ts | 8 +++++++- ui/protection_paladin/sim.ts | 5 ++++- 5 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 ui/protection_paladin/gear_sets/p3.gear.json create mode 100644 ui/protection_paladin/gear_sets/p4.gear.json create mode 100644 ui/protection_paladin/gear_sets/p4_preraid.gear.json diff --git a/ui/protection_paladin/gear_sets/p3.gear.json b/ui/protection_paladin/gear_sets/p3.gear.json new file mode 100644 index 0000000000..7970cc5f5c --- /dev/null +++ b/ui/protection_paladin/gear_sets/p3.gear.json @@ -0,0 +1,19 @@ +{"items": [ + {"id":49475,"enchant":3878,"gems":[41380,40129]}, + {"id":47133,"gems":[40119]}, + {"id":48646,"enchant":3852,"gems":[40119]}, + {"id":47549,"enchant":3605,"gems":[40119]}, + {"id":46968,"enchant":3832,"gems":[40129,49110,40119]}, + {"id":47111,"enchant":3850,"gems":[40119,0]}, + {"id":45487,"enchant":3860,"gems":[40119,40119,0]}, + {"id":47076,"gems":[40129,40119,40119]}, + {"id":48645,"enchant":3822,"gems":[40129,40119]}, + {"id":47003,"enchant":3606,"gems":[40129,40119]}, + {"id":47157,"gems":[40119]}, + {"id":45471,"gems":[40166]}, + {"id":45158}, + {"id":47451}, + {"id":46097,"enchant":3788,"gems":[40119]}, + {"id":46964,"enchant":3849,"gems":[40119]}, + {"id":47661} + ]} \ No newline at end of file diff --git a/ui/protection_paladin/gear_sets/p4.gear.json b/ui/protection_paladin/gear_sets/p4.gear.json new file mode 100644 index 0000000000..ac024c858b --- /dev/null +++ b/ui/protection_paladin/gear_sets/p4.gear.json @@ -0,0 +1,19 @@ +{"items": [ + {"id":50640,"enchant":3818,"gems":[41380,40141]}, + {"id":50682,"gems":[40119]}, + {"id":50660,"enchant":3852,"gems":[40167,40119]}, + {"id":50718,"enchant":3605,"gems":[40119]}, + {"id":51265,"enchant":3297,"gems":[40141,40119]}, + {"id":51901,"enchant":3850,"gems":[40119,0]}, + {"id":51267,"enchant":3860,"gems":[40119,0]}, + {"id":50991,"enchant":3601,"gems":[40141,40119,40119]}, + {"id":49904,"enchant":3822,"gems":[40119,40119,40119]}, + {"id":50625,"enchant":3606,"gems":[40119,40119]}, + {"id":50642,"gems":[40119]}, + {"id":50622,"gems":[40119]}, + {"id":50364}, + {"id":50344}, + {"id":51893,"enchant":3788,"gems":[40119]}, + {"id":50729,"enchant":1071,"gems":[40119]}, + {"id":47661} + ]} \ No newline at end of file diff --git a/ui/protection_paladin/gear_sets/p4_preraid.gear.json b/ui/protection_paladin/gear_sets/p4_preraid.gear.json new file mode 100644 index 0000000000..4f01419ea2 --- /dev/null +++ b/ui/protection_paladin/gear_sets/p4_preraid.gear.json @@ -0,0 +1,19 @@ +{"items": [ + {"id":48639,"enchant":3818,"gems":[41380,40129]}, + {"id":45485,"gems":[40167]}, + {"id":48637,"enchant":3852,"gems":[40119]}, + {"id":45496,"enchant":1951,"gems":[40119]}, + {"id":48641,"enchant":1953,"gems":[40166,40119]}, + {"id":47570,"enchant":3850,"gems":[40166,0]}, + {"id":48640,"enchant":3860,"gems":[40166,0]}, + {"id":47072,"gems":[40119,40119]}, + {"id":49904,"enchant":3822,"gems":[40119,40119,40119]}, + {"id":49907,"enchant":3606,"gems":[40166,40119]}, + {"id":45471,"gems":[40119]}, + {"id":47149}, + {"id":47080}, + {"id":46021}, + {"id":46097,"enchant":3788,"gems":[40119]}, + {"id":46963,"enchant":3849}, + {"id":47661} + ]} \ No newline at end of file diff --git a/ui/protection_paladin/presets.ts b/ui/protection_paladin/presets.ts index 30894e3815..c0e6c47fe9 100644 --- a/ui/protection_paladin/presets.ts +++ b/ui/protection_paladin/presets.ts @@ -21,8 +21,11 @@ import { import * as PresetUtils from '../core/preset_utils.js'; import PreraidGear from './gear_sets/preraid.gear.json'; +import P4PreraidGear from './gear_sets/p4_preraid.gear.json'; import P1Gear from './gear_sets/p1.gear.json'; import P2Gear from './gear_sets/p2.gear.json'; +import P3Gear from './gear_sets/p3.gear.json'; +import P4Gear from './gear_sets/p4.gear.json'; import DefaultApl from './apls/default.apl.json'; @@ -30,9 +33,12 @@ import DefaultApl from './apls/default.apl.json'; // Eventually we will import these values for the raid sim too, so its good to // keep them in a separate file. -export const PRERAID_PRESET = PresetUtils.makePresetGear('PreRaid', PreraidGear); +export const PRERAID_PRESET = PresetUtils.makePresetGear('P1 PreRaid Preset', PreraidGear); +export const P4_PRERAID_PRESET = PresetUtils.makePresetGear('P4 PreRaid Preset', P4PreraidGear); export const P1_PRESET = PresetUtils.makePresetGear('P1 Preset', P1Gear); export const P2_PRESET = PresetUtils.makePresetGear('P2 Preset', P2Gear); +export const P3_PRESET = PresetUtils.makePresetGear('P3 Preset', P3Gear); +export const P4_PRESET = PresetUtils.makePresetGear('P4 Preset', P4Gear); export const DefaultRotation = ProtectionPaladinRotation.create({ hammerFirst: false, diff --git a/ui/protection_paladin/sim.ts b/ui/protection_paladin/sim.ts index 9a4615c472..091b7c2231 100644 --- a/ui/protection_paladin/sim.ts +++ b/ui/protection_paladin/sim.ts @@ -104,7 +104,7 @@ export class ProtectionPaladinSimUI extends IndividualSimUI