diff --git a/sim/priest/holy_fire.go b/sim/priest/holy_fire.go index 81450073fd..0490636cb6 100644 --- a/sim/priest/holy_fire.go +++ b/sim/priest/holy_fire.go @@ -14,6 +14,7 @@ func (priest *Priest) RegisterHolyFireSpell(memeDream bool) { ActionID: core.ActionID{SpellID: 48135}, SpellSchool: core.SpellSchoolHoly, ProcMask: core.ProcMaskSpellDamage, + Flags: core.SpellFlagAPL, ManaCost: core.ManaCostOptions{ BaseCost: 0.11, diff --git a/sim/priest/penance.go b/sim/priest/penance.go index b654d2f4f0..fb3eb199ae 100644 --- a/sim/priest/penance.go +++ b/sim/priest/penance.go @@ -21,7 +21,7 @@ func (priest *Priest) makePenanceSpell(isHeal bool) *core.Spell { } var procMask core.ProcMask - flags := core.SpellFlagChanneled + flags := core.SpellFlagChanneled | core.SpellFlagAPL if isHeal { flags |= core.SpellFlagHelpful procMask = core.ProcMaskSpellHealing diff --git a/sim/priest/priest.go b/sim/priest/priest.go index 90e0fff7b4..be211f5517 100644 --- a/sim/priest/priest.go +++ b/sim/priest/priest.go @@ -54,7 +54,6 @@ type Priest struct { ShadowWordDeath *core.Spell Shadowfiend *core.Spell Smite *core.Spell - Starshards *core.Spell VampiricTouch *core.Spell Dispersion *core.Spell @@ -130,7 +129,6 @@ func (priest *Priest) Initialize() { priest.registerMindBlastSpell() priest.registerShadowWordDeathSpell() priest.registerShadowfiendSpell() - priest.registerStarshardsSpell() priest.registerVampiricTouchSpell() priest.registerDispersionSpell() diff --git a/sim/priest/smite.go b/sim/priest/smite.go index bbc9895943..0cc95b84ca 100644 --- a/sim/priest/smite.go +++ b/sim/priest/smite.go @@ -11,6 +11,7 @@ func (priest *Priest) RegisterSmiteSpell(memeDream bool) { ActionID: core.ActionID{SpellID: 48123}, SpellSchool: core.SpellSchoolHoly, ProcMask: core.ProcMaskSpellDamage, + Flags: core.SpellFlagAPL, ManaCost: core.ManaCostOptions{ BaseCost: 0.15, diff --git a/sim/priest/starshards.go b/sim/priest/starshards.go deleted file mode 100644 index 7f2c7789d9..0000000000 --- a/sim/priest/starshards.go +++ /dev/null @@ -1,52 +0,0 @@ -package priest - -import ( - "time" - - "github.com/wowsims/wotlk/sim/core" -) - -func (priest *Priest) registerStarshardsSpell() { - priest.Starshards = priest.RegisterSpell(core.SpellConfig{ - ActionID: core.ActionID{SpellID: 25446}, - SpellSchool: core.SpellSchoolArcane, - ProcMask: core.ProcMaskSpellDamage, - - Cast: core.CastConfig{ - DefaultCast: core.Cast{ - GCD: core.GCDDefault, - }, - CD: core.Cooldown{ - Timer: priest.NewTimer(), - Duration: time.Second * 30, - }, - }, - - DamageMultiplier: 1, - ThreatMultiplier: 1, - - Dot: core.DotConfig{ - Aura: core.Aura{ - Label: "Starshards", - }, - NumberOfTicks: 5, - TickLength: time.Second * 3, - - OnSnapshot: func(sim *core.Simulation, target *core.Unit, dot *core.Dot, _ bool) { - dot.SnapshotBaseDamage = 785/5 + 0.167*dot.Spell.SpellPower() - dot.SnapshotAttackerMultiplier = dot.Spell.AttackerDamageMultiplier(dot.Spell.Unit.AttackTables[target.UnitIndex]) - }, - OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) { - dot.CalcAndDealPeriodicSnapshotDamage(sim, target, dot.OutcomeTick) - }, - }, - - ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) { - result := spell.CalcOutcome(sim, target, spell.OutcomeMagicHit) - if result.Landed() { - spell.Dot(target).Apply(sim) - } - spell.DealOutcome(sim, result) - }, - }) -} diff --git a/ui/core/components/individual_sim_ui/apl_actions.ts b/ui/core/components/individual_sim_ui/apl_actions.ts index 5dd000caa5..0e6cda3470 100644 --- a/ui/core/components/individual_sim_ui/apl_actions.ts +++ b/ui/core/components/individual_sim_ui/apl_actions.ts @@ -111,7 +111,11 @@ export class APLActionPicker extends Input, APLAction> { } } } - this.setSourceValue(eventID, newSourceValue); + if (sourceValue) { + sourceValue.action = newSourceValue.action; + } else { + this.setSourceValue(eventID, newSourceValue); + } } else { sourceValue.action = { oneofKind: newKind, diff --git a/ui/core/components/individual_sim_ui/apl_values.ts b/ui/core/components/individual_sim_ui/apl_values.ts index 48a2fcbadb..47508c22c9 100644 --- a/ui/core/components/individual_sim_ui/apl_values.ts +++ b/ui/core/components/individual_sim_ui/apl_values.ts @@ -128,7 +128,11 @@ export class APLValuePicker extends Input, APLValue | undefined> { } } } - this.setSourceValue(eventID, newSourceValue); + if (sourceValue) { + sourceValue.value = newSourceValue.value; + } else { + this.setSourceValue(eventID, newSourceValue); + } } else { this.setSourceValue(eventID, undefined); } diff --git a/ui/core/launched_sims.ts b/ui/core/launched_sims.ts index a0b74fd1de..b08129d838 100644 --- a/ui/core/launched_sims.ts +++ b/ui/core/launched_sims.ts @@ -55,7 +55,7 @@ export const aplLaunchStatuses: Record = { [Spec.SpecRetributionPaladin]: LaunchStatus.Alpha, [Spec.SpecHealingPriest]: LaunchStatus.Unlaunched, [Spec.SpecShadowPriest]: LaunchStatus.Alpha, - [Spec.SpecSmitePriest]: LaunchStatus.Unlaunched, + [Spec.SpecSmitePriest]: LaunchStatus.Alpha, [Spec.SpecWarlock]: LaunchStatus.Alpha, [Spec.SpecWarrior]: LaunchStatus.Unlaunched, [Spec.SpecProtectionWarrior]: LaunchStatus.Unlaunched, diff --git a/ui/smite_priest/presets.ts b/ui/smite_priest/presets.ts index 8a4ecae4ec..0c80264b27 100644 --- a/ui/smite_priest/presets.ts +++ b/ui/smite_priest/presets.ts @@ -3,16 +3,14 @@ import { EquipmentSpec } from '../core/proto/common.js'; import { Flask } from '../core/proto/common.js'; import { Food } from '../core/proto/common.js'; import { Glyphs } from '../core/proto/common.js'; -import { ItemSpec } from '../core/proto/common.js'; import { Potions } from '../core/proto/common.js'; -import { Faction } from '../core/proto/common.js'; import { RaidBuffs } from '../core/proto/common.js'; import { IndividualBuffs } from '../core/proto/common.js'; import { Debuffs } from '../core/proto/common.js'; import { UnitReference } from '../core/proto/common.js'; import { TristateEffect } from '../core/proto/common.js'; -import { SavedTalents } from '../core/proto/ui.js'; -import { Player } from '../core/player.js'; +import { APLRotation } from '../core/proto/apl.js'; +import { SavedRotation, SavedTalents } from '../core/proto/ui.js'; import { SmitePriest_Rotation as Rotation, @@ -49,6 +47,39 @@ export const DefaultRotation = Rotation.create({ useShadowWordDeath: false, useMindBlast: false, }); +export const ROTATION_PRESET_LEGACY_DEFAULT = { + name: 'Legacy Default', + rotation: SavedRotation.create({ + specRotationOptionsJson: Rotation.toJsonString(DefaultRotation), + }), +} +export const ROTATION_PRESET_APL = { + name: 'APL', + rotation: SavedRotation.create({ + specRotationOptionsJson: Rotation.toJsonString(Rotation.create()), + rotation: APLRotation.fromJsonString(`{ + "enabled": true, + "prepullActions": [ + {"action":{"castSpell":{"spellId":{"otherId":"OtherActionPotion"}}},"doAtValue":{"const":{"val":"-1s"}}} + ], + "priorityList": [ + {"action":{"autocastOtherCooldowns":{}}}, + {"action":{"condition":{"and":{"vals":[{"dotIsActive":{"spellId":{"spellId":48135}}},{"cmp":{"op":"OpLe","lhs":{"spellCastTime":{"spellId":{"spellId":48123}}},"rhs":{"dotRemainingTime":{"spellId":{"spellId":48135}}}}}]}},"castSpell":{"spellId":{"spellId":14751}}}}, + {"action":{"condition":{"and":{"vals":[{"dotIsActive":{"spellId":{"spellId":48135}}},{"cmp":{"op":"OpLe","lhs":{"spellCastTime":{"spellId":{"spellId":48123}}},"rhs":{"dotRemainingTime":{"spellId":{"spellId":48135}}}}}]}},"castSpell":{"spellId":{"spellId":48123}}}}, + {"action":{"condition":{"not":{"val":{"dotIsActive":{"spellId":{"spellId":48300}}}}},"castSpell":{"spellId":{"spellId":48300}}}}, + {"action":{"condition":{"not":{"val":{"dotIsActive":{"spellId":{"spellId":48125}}}}},"castSpell":{"spellId":{"spellId":48125}}}}, + {"action":{"castSpell":{"spellId":{"spellId":48135}}}}, + {"action":{"condition":{"and":{"vals":[{"not":{"val":{"spellIsReady":{"spellId":{"spellId":48135}}}}},{"cmp":{"op":"OpLe","lhs":{"spellTimeToReady":{"spellId":{"spellId":48135}}},"rhs":{"const":{"val":"50ms"}}}}]}},"wait":{"duration":{"spellTimeToReady":{"spellId":{"spellId":48135}}}}}}, + {"hide":true,"action":{"condition":{"auraIsActive":{"auraId":{"spellId":59000}}},"castSpell":{"spellId":{"spellId":48123}}}}, + {"hide":true,"action":{"castSpell":{"spellId":{"spellId":53007}}}}, + {"hide":true,"action":{"castSpell":{"spellId":{"spellId":48158}}}}, + {"hide":true,"action":{"castSpell":{"spellId":{"spellId":48127}}}}, + {"hide":true,"action":{"castSpell":{"spellId":{"tag":3,"spellId":48156}}}}, + {"action":{"castSpell":{"spellId":{"spellId":48123}}}} + ] + }`), + }), +}; export const DefaultOptions = Options.create({ useInnerFire: true, diff --git a/ui/smite_priest/sim.ts b/ui/smite_priest/sim.ts index 53c0fbc38d..0e4fa26fa6 100644 --- a/ui/smite_priest/sim.ts +++ b/ui/smite_priest/sim.ts @@ -1,27 +1,12 @@ -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 { Class } from '../core/proto/common.js'; -import { Consumes } from '../core/proto/common.js'; -import { Encounter } from '../core/proto/common.js'; -import { ItemSlot } from '../core/proto/common.js'; -import { MobType } from '../core/proto/common.js'; -import { UnitReference } from '../core/proto/common.js'; import { Spec } from '../core/proto/common.js'; import { Stat } from '../core/proto/common.js'; -import { TristateEffect } from '../core/proto/common.js' import { Stats } from '../core/proto_utils/stats.js'; import { Player } from '../core/player.js'; -import { Sim } from '../core/sim.js'; import { IndividualSimUI } from '../core/individual_sim_ui.js'; -import { SmitePriest, SmitePriest_Rotation as Rotation, SmitePriest_Options as Options, SmitePriest_Rotation } from '../core/proto/priest.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'; -import * as Tooltips from '../core/constants/tooltips.js'; import * as SmitePriestInputs from './inputs.js'; import * as Presets from './presets.js'; @@ -125,6 +110,11 @@ export class SmitePriestSimUI extends IndividualSimUI { talents: [ Presets.StandardTalents, ], + // Preset rotations that the user can quickly select. + rotations: [ + Presets.ROTATION_PRESET_LEGACY_DEFAULT, + Presets.ROTATION_PRESET_APL, + ], // Preset gear configurations that the user can quickly select. gear: [ Presets.PRERAID_PRESET,