Skip to content

Commit

Permalink
Merge pull request #3397 from wowsims/apl
Browse files Browse the repository at this point in the history
Launch alpha APL for smite priests
  • Loading branch information
jimmyt857 authored Jul 30, 2023
2 parents b0f3093 + 22e14c5 commit c19de9e
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 77 deletions.
1 change: 1 addition & 0 deletions sim/priest/holy_fire.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion sim/priest/penance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions sim/priest/priest.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -130,7 +129,6 @@ func (priest *Priest) Initialize() {
priest.registerMindBlastSpell()
priest.registerShadowWordDeathSpell()
priest.registerShadowfiendSpell()
priest.registerStarshardsSpell()
priest.registerVampiricTouchSpell()
priest.registerDispersionSpell()

Expand Down
1 change: 1 addition & 0 deletions sim/priest/smite.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
52 changes: 0 additions & 52 deletions sim/priest/starshards.go

This file was deleted.

6 changes: 5 additions & 1 deletion ui/core/components/individual_sim_ui/apl_actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@ export class APLActionPicker extends Input<Player<any>, APLAction> {
}
}
}
this.setSourceValue(eventID, newSourceValue);
if (sourceValue) {
sourceValue.action = newSourceValue.action;
} else {
this.setSourceValue(eventID, newSourceValue);
}
} else {
sourceValue.action = {
oneofKind: newKind,
Expand Down
6 changes: 5 additions & 1 deletion ui/core/components/individual_sim_ui/apl_values.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,11 @@ export class APLValuePicker extends Input<Player<any>, APLValue | undefined> {
}
}
}
this.setSourceValue(eventID, newSourceValue);
if (sourceValue) {
sourceValue.value = newSourceValue.value;
} else {
this.setSourceValue(eventID, newSourceValue);
}
} else {
this.setSourceValue(eventID, undefined);
}
Expand Down
2 changes: 1 addition & 1 deletion ui/core/launched_sims.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const aplLaunchStatuses: Record<Spec, LaunchStatus> = {
[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,
Expand Down
39 changes: 35 additions & 4 deletions ui/smite_priest/presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
20 changes: 5 additions & 15 deletions ui/smite_priest/sim.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -125,6 +110,11 @@ export class SmitePriestSimUI extends IndividualSimUI<Spec.SpecSmitePriest> {
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,
Expand Down

0 comments on commit c19de9e

Please sign in to comment.