Skip to content

Commit

Permalink
Merge pull request #1334 from wowsims/feature/warlock-p4
Browse files Browse the repository at this point in the history
[WARLOCK] P4 WIP
  • Loading branch information
1337LutZ authored Jan 31, 2025
2 parents 133f86b + 4d7f2c8 commit 194d040
Show file tree
Hide file tree
Showing 13 changed files with 155 additions and 48 deletions.
2 changes: 1 addition & 1 deletion sim/druid/feral/apl_values.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func (action *APLActionCatOptimalRotationAction) Execute(sim *core.Simulation) {
cat.Enrage.Cast(sim, nil)
}

if cat.Maul.CanCast(sim, cat.CurrentTarget) && ((cat.CurrentRage() >= cat.Maul.DefaultCast.Cost + cat.MangleBear.DefaultCast.Cost) || (cat.AutoAttacks.NextAttackAt() < cat.NextGCDAt())) {
if cat.Maul.CanCast(sim, cat.CurrentTarget) && ((cat.CurrentRage() >= cat.Maul.DefaultCast.Cost+cat.MangleBear.DefaultCast.Cost) || (cat.AutoAttacks.NextAttackAt() < cat.NextGCDAt())) {
cat.Maul.Cast(sim, cat.CurrentTarget)
}
}
Expand Down
4 changes: 2 additions & 2 deletions sim/druid/feral/rotation.go
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ func (cat *FeralDruid) doRotation(sim *core.Simulation) (bool, time.Duration) {
projectedEnergy := curEnergy + minRunOutSeconds*regenRate

if tfActive && cat.PrimalMadnessAura.IsActive() {
latestCharge := sim.CurrentTime + core.DurationFromSeconds((cat.CatCharge.MinRange + 1 - cat.DistanceFromTarget) / cat.GetMovementSpeed()) + cat.ReactionTime*2
latestCharge := sim.CurrentTime + core.DurationFromSeconds((cat.CatCharge.MinRange+1-cat.DistanceFromTarget)/cat.GetMovementSpeed()) + cat.ReactionTime*2

if cat.TigersFuryAura.ExpiresAt() < latestCharge {
projectedEnergy -= cat.primalMadnessBonus
Expand All @@ -744,7 +744,7 @@ func (cat *FeralDruid) doRotation(sim *core.Simulation) (bool, time.Duration) {
return false, 0
}
timeToNextAction = core.DurationFromSeconds((cat.CurrentMangleCatCost() - excessE) / regenRate)
} else if !t11RefreshNext && (isClearcast || !ripRefreshPending || !cat.tempSnapshotAura.IsActive() || (ripRefreshTime + cat.ReactionTime - sim.CurrentTime > core.GCDMin)) {
} else if !t11RefreshNext && (isClearcast || !ripRefreshPending || !cat.tempSnapshotAura.IsActive() || (ripRefreshTime+cat.ReactionTime-sim.CurrentTime > core.GCDMin)) {
if excessE >= cat.CurrentShredCost() || isClearcast {
cat.Shred.Cast(sim, cat.CurrentTarget)
return false, 0
Expand Down
2 changes: 1 addition & 1 deletion sim/druid/forms.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (druid *Druid) RegisterCatFormAura() {
srm := druid.GetSavageRoarMultiplier()

statBonus := stats.Stats{
stats.AttackPower: -20, // This offset is needed because the first 10 points of Agility do not contribute any Attack Power.
stats.AttackPower: -20, // This offset is needed because the first 10 points of Agility do not contribute any Attack Power.
}

agiApDep := druid.NewDynamicStatDependency(stats.Agility, stats.AttackPower, 2)
Expand Down
2 changes: 1 addition & 1 deletion sim/druid/items.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ var ItemSetDeepEarthBattlegarb = core.NewItemSet(core.ItemSet{
// Rather than creating a whole extra Execute phase category just for this bonus, we will instead scale up ExecuteProportion_25 using linear interpolation. Note that we use ExecuteProportion_90 for Predatory Strikes (< 80%), which is why the math below looks funny.
oldExecuteProportion_25 := druid.Env.Encounter.ExecuteProportion_25
oldExecuteProportion_35 := druid.Env.Encounter.ExecuteProportion_35
newExecuteProportion_25 := oldExecuteProportion_35 * (1.0 - (60.0 - 35.0) / (80.0 - 35.0)) + druid.Env.Encounter.ExecuteProportion_90 * ((60.0 - 35.0) / (80.0 - 35.0))
newExecuteProportion_25 := oldExecuteProportion_35*(1.0-(60.0-35.0)/(80.0-35.0)) + druid.Env.Encounter.ExecuteProportion_90*((60.0-35.0)/(80.0-35.0))
newExecuteProportion_35 := 0.5 * (newExecuteProportion_25 + druid.Env.Encounter.ExecuteProportion_90) // We don't use this field anywhere, just need it to be any value above ExecuteProportion_25 but below ExecuteProportion_90 so that the transitions work properly.

setBonusAura.ApplyOnGain(func(_ *core.Aura, _ *core.Simulation) {
Expand Down
10 changes: 5 additions & 5 deletions sim/druid/talents.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func (druid *Druid) applyThickHide() {
}

druid.ApplyEquipScaling(stats.Armor, []float64{1.0, 1.04, 1.07, 1.1}[numPoints])
druid.PseudoStats.ReducedCritTakenChance += 0.02*float64(numPoints)
druid.PseudoStats.ReducedCritTakenChance += 0.02 * float64(numPoints)

if !druid.InForm(Bear) {
return
Expand Down Expand Up @@ -191,14 +191,14 @@ func (druid *Druid) applyStarlightWrath() {

func (druid *Druid) applyNaturesMajesty() {
if druid.Talents.NaturesMajesty > 0 {
druid.AddStat(stats.SpellCritPercent, 2 * float64(druid.Talents.NaturesMajesty))
druid.AddStat(stats.SpellCritPercent, 2*float64(druid.Talents.NaturesMajesty))
}
}

func (druid *Druid) applyMoonglow() {
if druid.Talents.Moonglow > 0 {
druid.AddStaticMod(core.SpellModConfig{
ClassMask: DruidDamagingSpells | DruidHealingSpells,
ClassMask: DruidDamagingSpells | DruidHealingSpells,
FloatValue: -0.03 * float64(druid.Talents.Moonglow),
Kind: core.SpellMod_PowerCost_Pct,
})
Expand Down Expand Up @@ -905,7 +905,7 @@ func (druid *Druid) applyNaturalReaction() {
actionID := core.ActionID{SpellID: 59071}
rageMetrics := druid.NewRageMetrics(actionID)
numPoints := float64(druid.Talents.NaturalReaction)
rageAdded := 1.0 + 2.0*(numPoints - 1.0)
rageAdded := 1.0 + 2.0*(numPoints-1.0)

core.MakeProcTriggerAura(&druid.Unit, core.ProcTrigger{
Name: "Natural Reaction Trigger",
Expand All @@ -918,7 +918,7 @@ func (druid *Druid) applyNaturalReaction() {
},
})

druid.BearFormAura.AttachMultiplicativePseudoStatBuff(&druid.PseudoStats.DamageTakenMultiplier, 1.0 - 0.09*numPoints)
druid.BearFormAura.AttachMultiplicativePseudoStatBuff(&druid.PseudoStats.DamageTakenMultiplier, 1.0-0.09*numPoints)
druid.BearFormAura.AttachAdditivePseudoStatBuff(&druid.PseudoStats.BaseDodgeChance, 0.03*numPoints)
}

Expand Down
2 changes: 1 addition & 1 deletion sim/rogue/combat/killing_spree.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (comRogue *CombatRogue) registerKillingSpreeCD() {
ActionID: core.ActionID{SpellID: 51690},
Duration: time.Second*2 + 1,
OnGain: func(aura *core.Aura, sim *core.Simulation) {
comRogue.SetGCDTimer(sim, sim.CurrentTime + aura.Duration)
comRogue.SetGCDTimer(sim, sim.CurrentTime+aura.Duration)
comRogue.PseudoStats.DamageDealtMultiplier *= auraDamageMult
core.StartPeriodicAction(sim, core.PeriodicActionOptions{
Period: time.Millisecond * 500,
Expand Down
16 changes: 8 additions & 8 deletions sim/warlock/demonology/TestDemonology.results
Original file line number Diff line number Diff line change
Expand Up @@ -627,8 +627,8 @@ dps_results: {
dps_results: {
key: "TestDemonology-AllItems-FoulGiftoftheDemonLord-72898"
value: {
dps: 39025.62064
tps: 19701.60115
dps: 39620.53921
tps: 20100.43657
}
}
dps_results: {
Expand Down Expand Up @@ -1462,8 +1462,8 @@ dps_results: {
dps_results: {
key: "TestDemonology-AllItems-SoulshifterVortex-77206"
value: {
dps: 37913.05767
tps: 19031.97122
dps: 39397.18075
tps: 19921.33846
}
}
dps_results: {
Expand All @@ -1476,8 +1476,8 @@ dps_results: {
dps_results: {
key: "TestDemonology-AllItems-SoulshifterVortex-77990"
value: {
dps: 37935.35481
tps: 19053.59413
dps: 39592.13786
tps: 19974.04063
}
}
dps_results: {
Expand Down Expand Up @@ -1623,8 +1623,8 @@ dps_results: {
dps_results: {
key: "TestDemonology-AllItems-Theralion'sMirror-65105"
value: {
dps: 38905.25314
tps: 19696.34805
dps: 40052.13418
tps: 20281.37111
}
}
dps_results: {
Expand Down
34 changes: 19 additions & 15 deletions ui/warlock/demonology/apls/incinerate.apl.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
{
"type": "TypeAPL",
"prepullActions": [
{"action":{"itemSwap":{"swapSet":"Swap1"}},"doAtValue":{"const":{"val":"-60s"}}},
{"action":{"castSpell":{"spellId":{"itemId":70142}}},"doAtValue":{"const":{"val":"-22.5"}}},
{"action":{"castSpell":{"spellId":{"spellId":30146}}},"doAtValue":{"const":{"val":"-10s"}}},
{"action":{"castSpell":{"spellId":{"spellId":77801}}},"doAtValue":{"const":{"val":"-4.01s"}},"hide":true},
{"action":{"castSpell":{"spellId":{"spellId":74434}}},"doAtValue":{"const":{"val":"-4.01s"}},"hide":true},
{"action":{"castSpell":{"spellId":{"spellId":691}}},"doAtValue":{"const":{"val":"-4.01s"}},"hide":true},
{"action":{"activateAura":{"auraId":{"spellId":74221,"tag":1}}},"doAtValue":{"const":{"val":"-2.51s"}}},
{"action":{"castSpell":{"spellId":{"otherId":"OtherActionPotion"}}},"doAtValue":{"const":{"val":"-2.51s"}}},
{"action":{"castSpell":{"spellId":{"spellId":59672}}},"doAtValue":{"const":{"val":"-2.51s"}}},
{"action":{"castSpell":{"spellId":{"spellId":82174}}},"doAtValue":{"const":{"val":"-2.49s"}}},
{"action":{"itemSwap":{"swapSet":"Main"}},"doAtValue":{"const":{"val":"-2.49s"}}},
{"action":{"castSpell":{"spellId":{"spellId":686}}},"doAtValue":{"const":{"val":"-2.49s"}}},
{"action":{"castSpell":{"spellId":{"spellId":33697}}},"doAtValue":{"const":{"val":"-0.5s"}}},
{"action":{"castSpell":{"spellId":{"spellId":348}}},"doAtValue":{"const":{"val":"-0.5s"}}}
],
{"action":{"itemSwap":{"swapSet":"Swap1"}},"doAtValue":{"const":{"val":"-120s"}}},
{"action":{"castSpell":{"spellId":{"itemId":70142}}},"doAtValue":{"const":{"val":"-22.5"}}},
{"action":{"castSpell":{"spellId":{"spellId":30146}}},"doAtValue":{"const":{"val":"-10s"}}},
{"action":{"castSpell":{"spellId":{"spellId":77801}}},"doAtValue":{"const":{"val":"-4.01s"}},"hide":true},
{"action":{"castSpell":{"spellId":{"spellId":74434}}},"doAtValue":{"const":{"val":"-4.01s"}},"hide":true},
{"action":{"castSpell":{"spellId":{"spellId":691}}},"doAtValue":{"const":{"val":"-4.01s"}},"hide":true},
{"action":{"activateAura":{"auraId":{"spellId":102662}}},"doAtValue":{"const":{"val":"-2.51s"}}},
{"action":{"activateAura":{"auraId":{"spellId":107986}}},"doAtValue":{"const":{"val":"-2.51s"}}},
{"action":{"activateAura":{"auraId":{"spellId":109776}}},"doAtValue":{"const":{"val":"-2.51s"}}},
{"action":{"activateAura":{"auraId":{"spellId":92320}}},"doAtValue":{"const":{"val":"-2.51s"}}},
{"action":{"activateAura":{"auraId":{"spellId":74221,"tag":1}}},"doAtValue":{"const":{"val":"-2.51s"}}},
{"action":{"castSpell":{"spellId":{"otherId":"OtherActionPotion"}}},"doAtValue":{"const":{"val":"-2.51s"}}},
{"action":{"castSpell":{"spellId":{"spellId":59672}}},"doAtValue":{"const":{"val":"-2.51s"}}},
{"action":{"castSpell":{"spellId":{"spellId":82174}}},"doAtValue":{"const":{"val":"-2.49s"}}},
{"action":{"itemSwap":{"swapSet":"Main"}},"doAtValue":{"const":{"val":"-2.49s"}}},
{"action":{"castSpell":{"spellId":{"spellId":686}}},"doAtValue":{"const":{"val":"-2.49s"}}},
{"action":{"castSpell":{"spellId":{"spellId":33697}}},"doAtValue":{"const":{"val":"-0.5s"}}},
{"action":{"castSpell":{"spellId":{"spellId":348}}},"doAtValue":{"const":{"val":"-0.5s"}}}
],
"priorityList": [
{"action":{"autocastOtherCooldowns":{}}},
{"action":{"condition":{"and":{"vals":[{"spellIsReady":{"spellId":{"spellId":59672}}},{"cmp":{"op":"OpGe","lhs":{"currentTime":{}},"rhs":{"const":{"val":"70s"}}}}]}},"castSpell":{"spellId":{"spellId":59672}}}},
Expand Down
26 changes: 15 additions & 11 deletions ui/warlock/demonology/apls/shadow-bolt.apl.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
{
"type": "TypeAPL",
"prepullActions": [
{"action":{"itemSwap":{"swapSet":"Swap1"}},"doAtValue":{"const":{"val":"-60s"}}},
{"action":{"castSpell":{"spellId":{"itemId":70142}}},"doAtValue":{"const":{"val":"-22.5"}}},
{"action":{"castSpell":{"spellId":{"spellId":30146}}},"doAtValue":{"const":{"val":"-10s"}}},
{"action":{"castSpell":{"spellId":{"spellId":77801}}},"doAtValue":{"const":{"val":"-4.01s"}},"hide":true},
{"action":{"castSpell":{"spellId":{"spellId":74434}}},"doAtValue":{"const":{"val":"-4.01s"}},"hide":true},
{"action":{"castSpell":{"spellId":{"spellId":691}}},"doAtValue":{"const":{"val":"-4.01s"}},"hide":true},
{"action":{"activateAura":{"auraId":{"spellId":74221,"tag":1}}},"doAtValue":{"const":{"val":"-2.51s"}}},
{"action":{"castSpell":{"spellId":{"otherId":"OtherActionPotion"}}},"doAtValue":{"const":{"val":"-2.51s"}}},
{"action":{"castSpell":{"spellId":{"spellId":59672}}},"doAtValue":{"const":{"val":"-2.51s"}}},
{"action":{"castSpell":{"spellId":{"spellId":82174}}},"doAtValue":{"const":{"val":"-2.49s"}}},
{"action":{"itemSwap":{"swapSet":"Main"}},"doAtValue":{"const":{"val":"-2.49s"}}},
{"action":{"itemSwap":{"swapSet":"Swap1"}},"doAtValue":{"const":{"val":"-120s"}}},
{"action":{"castSpell":{"spellId":{"itemId":70142}}},"doAtValue":{"const":{"val":"-22.5"}}},
{"action":{"castSpell":{"spellId":{"spellId":30146}}},"doAtValue":{"const":{"val":"-10s"}}},
{"action":{"castSpell":{"spellId":{"spellId":77801}}},"doAtValue":{"const":{"val":"-4.01s"}},"hide":true},
{"action":{"castSpell":{"spellId":{"spellId":74434}}},"doAtValue":{"const":{"val":"-4.01s"}},"hide":true},
{"action":{"castSpell":{"spellId":{"spellId":691}}},"doAtValue":{"const":{"val":"-4.01s"}},"hide":true},
{"action":{"activateAura":{"auraId":{"spellId":102662}}},"doAtValue":{"const":{"val":"-2.51s"}}},
{"action":{"activateAura":{"auraId":{"spellId":107986}}},"doAtValue":{"const":{"val":"-2.51s"}}},
{"action":{"activateAura":{"auraId":{"spellId":109776}}},"doAtValue":{"const":{"val":"-2.51s"}}},
{"action":{"activateAura":{"auraId":{"spellId":92320}}},"doAtValue":{"const":{"val":"-2.51s"}}},
{"action":{"activateAura":{"auraId":{"spellId":74221,"tag":1}}},"doAtValue":{"const":{"val":"-2.51s"}}},
{"action":{"castSpell":{"spellId":{"otherId":"OtherActionPotion"}}},"doAtValue":{"const":{"val":"-2.51s"}}},
{"action":{"castSpell":{"spellId":{"spellId":59672}}},"doAtValue":{"const":{"val":"-2.51s"}}},
{"action":{"castSpell":{"spellId":{"spellId":82174}}},"doAtValue":{"const":{"val":"-2.49s"}}},
{"action":{"itemSwap":{"swapSet":"Main"}},"doAtValue":{"const":{"val":"-2.49s"}}},
{"action":{"castSpell":{"spellId":{"spellId":686}}},"doAtValue":{"const":{"val":"-2.49s"}}},
{"action":{"castSpell":{"spellId":{"spellId":33697}}},"doAtValue":{"const":{"val":"-0.5s"}}},
{"action":{"castSpell":{"spellId":{"spellId":348}}},"doAtValue":{"const":{"val":"-0.5s"}}}
Expand Down
21 changes: 21 additions & 0 deletions ui/warlock/demonology/gear_sets/p4.gear.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"items": [
{ "id": 78702, "enchant": 4207, "gems": [68780, 71881], "reforging": 144 },
{ "id": 71472, "gems": [71881], "reforging": 165 },
{ "id": 78749, "enchant": 4200, "gems": [71881, 71881], "reforging": 145 },
{ "id": 77098, "enchant": 4115, "gems": [71881], "reforging": 167 },
{ "id": 78730, "enchant": 4102, "gems": [71881, 71881, 71850] },
{ "id": 78417, "enchant": 4257, "gems": [71881, 0], "reforging": 151 },
{ "id": 78461, "enchant": 4107, "gems": [71881, 71881, 0], "reforging": 144 },
{ "id": 78391, "gems": [71881, 71881, 71881], "reforging": 144 },
{ "id": 78721, "enchant": 4112, "gems": [71881, 71881, 71854], "reforging": 165 },
{ "id": 78449, "enchant": 4104, "gems": [71881, 71881], "reforging": 144 },
{ "id": 78419, "gems": [71881], "reforging": 165 },
{ "id": 78490, "gems": [71881], "reforging": 145 },
{ "id": 77995 },
{ "id": 78000 },
{ "id": 71086, "enchant": 4097, "gems": [71881, 71881, 71881] },
{},
{ "id": 78392, "reforging": 165 }
]
}
74 changes: 74 additions & 0 deletions ui/warlock/demonology/gear_sets/p4_item_swap.gear.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"items": [
{
"id": 77146,
"enchant": 4208,
"gems": [52289, 71877]
},
{
"id": 71563
},
{
"id": 78749,
"enchant": 4204,
"gems": [71877, 71877]
},
{
"id": 77098,
"enchant": 3722,
"gems": [71877]
},
{
"id": 71407,
"enchant": 4102,
"gems": [71877, 71877]
},
{
"id": 71989,
"enchant": 4257,
"gems": [71877, 71877, 0]
},
{
"id": 78681,
"enchant": 4107,
"gems": [71877, 0]
},
{
"id": 77179,
"gems": [71877, 71877, 71877]
},
{
"id": 78721,
"enchant": 4112,
"gems": [71877, 71877, 71877]
},
{
"id": 65116,
"enchant": 4094,
"gems": [71877]
},
{
"id": 78432,
"gems": [71877]
},
{
"id": 78493,
"gems": [71877]
},
{
"id": 77990
},
{
"id": 65105
},
{
"id": 78401,
"enchant": 4083,
"gems": [71877]
},
{},
{
"id": 78392
}
]
}
6 changes: 5 additions & 1 deletion ui/warlock/demonology/presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ import ShadowBoltAPL from './apls/shadow-bolt.apl.json';
import P1Gear from './gear_sets/p1.gear.json';
import P3Gear from './gear_sets/p3.gear.json';
import ItemSwapP3 from './gear_sets/p3_item_swap.gear.json';
import P4Gear from './gear_sets/p4.gear.json';
import ItemSwapP4 from './gear_sets/p4_item_swap.gear.json';
import PreraidGear from './gear_sets/preraid.gear.json';

// Preset options for this spec.
Expand All @@ -37,8 +39,10 @@ import PreraidGear from './gear_sets/preraid.gear.json';
export const PRERAID_PRESET = PresetUtils.makePresetGear('Pre-raid', PreraidGear);
export const P1_PRESET = PresetUtils.makePresetGear('P1 - BIS', P1Gear);
export const P3_PRESET = PresetUtils.makePresetGear('P3 - BIS', P3Gear);
export const P4_PRESET = PresetUtils.makePresetGear('P4 - WIP', P4Gear);

export const P3_ITEM_SWAP = PresetUtils.makePresetItemSwapGear('P3 - Item Swap - Mastery', ItemSwapP3);
export const P3_ITEM_SWAP = PresetUtils.makePresetItemSwapGear('P3 - Mastery', ItemSwapP3);
export const P4_ITEM_SWAP = PresetUtils.makePresetItemSwapGear('P4 - WIP - Mastery', ItemSwapP4);

export const APL_ShadowBolt = PresetUtils.makePresetAPLRotation('Shadow Bolt', ShadowBoltAPL);
export const APL_Incinerate = PresetUtils.makePresetAPLRotation('Incinerate', IncinerateAPL);
Expand Down
4 changes: 2 additions & 2 deletions ui/warlock/demonology/sim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecDemonologyWarlock, {
rotations: [Presets.APL_ShadowBolt, Presets.APL_Incinerate],

// Preset gear configurations that the user can quickly select.
gear: [Presets.PRERAID_PRESET, Presets.P1_PRESET, Presets.P3_PRESET],
itemSwaps: [Presets.P3_ITEM_SWAP],
gear: [Presets.PRERAID_PRESET, Presets.P1_PRESET, Presets.P3_PRESET, Presets.P4_PRESET],
itemSwaps: [Presets.P3_ITEM_SWAP,Presets.P4_ITEM_SWAP],

builds: [Presets.PRESET_BUILD_SHADOWBOLT, Presets.PRESET_BUILD_INCINERATE],
},
Expand Down

0 comments on commit 194d040

Please sign in to comment.