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({ - 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..0f960cbc28 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'; @@ -25,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'; @@ -34,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({ @@ -58,7 +65,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..f86d495166 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'; @@ -86,7 +94,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, + })) + }); + }, + }); } }