Skip to content

Commit

Permalink
warlock T2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
kayla-glick committed Nov 17, 2024
1 parent c285031 commit d8fe2ec
Show file tree
Hide file tree
Showing 6 changed files with 153 additions and 26 deletions.
1 change: 1 addition & 0 deletions sim/warlock/conflagrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func (warlock *Warlock) getConflagrateConfig(rank int) core.SpellConfig {
spCoeff := 0.429

return core.SpellConfig{
SpellCode: SpellCode_WarlockConflagrate,
ActionID: core.ActionID{SpellID: spellId},
SpellSchool: core.SpellSchoolFire,
DefenseType: core.DefenseTypeMagic,
Expand Down
115 changes: 115 additions & 0 deletions sim/warlock/item_sets_pve.go
Original file line number Diff line number Diff line change
Expand Up @@ -486,3 +486,118 @@ var ItemSetDemoniacsThreads = core.NewItemSet(core.ItemSet{
},
},
})

///////////////////////////////////////////////////////////////////////////
// SoD Phase 5 Item Sets
///////////////////////////////////////////////////////////////////////////

var ItemSetDoomcallersCorruption = core.NewItemSet(core.ItemSet{
Name: "Doomcaller's Corruption",
Bonuses: map[int32]core.ApplyEffect{
// Reduces the cooldown on your Chaos Bolt by 50% and increases its damage done by 10%.
2: func(agent core.Agent) {
warlock := agent.(WarlockAgent).GetWarlock()
if !warlock.HasRune(proto.WarlockRune_RuneHandsChaosBolt) {
return
}

warlock.RegisterAura(core.Aura{
Label: "S03 - Item - TAQ - Warlock - Damage 2P Bonus",
OnInit: func(aura *core.Aura, sim *core.Simulation) {
warlock.ChaosBolt.CD.Duration /= 2
warlock.ChaosBolt.DamageMultiplier *= 1.10
},
})
},
// Each time you hit a target with Conflagrate, you gain 2% increased Fire damage for 20 sec, stacking up to 5 times.
4: func(agent core.Agent) {
warlock := agent.(WarlockAgent).GetWarlock()

buffAura := warlock.RegisterAura(core.Aura{
ActionID: core.ActionID{SpellID: 1214088},
Label: "Infernalist",
Duration: time.Second * 20,
MaxStacks: 5,
OnStacksChange: func(aura *core.Aura, sim *core.Simulation, oldStacks, newStacks int32) {
warlock.PseudoStats.SchoolDamageDealtMultiplier[stats.SchoolIndexFire] *= 1 + 0.02*(float64(newStacks-oldStacks))
},
})

core.MakePermanent(warlock.RegisterAura(core.Aura{
Label: "S03 - Item - TAQ - Warlock - Damage 4P Bonus",
OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if spell.SpellCode == SpellCode_WarlockConflagrate && result.Landed() {
buffAura.Activate(sim)
buffAura.AddStack(sim)
}
},
}))
},
},
})

var ItemSetDoomcallersMalevolence = core.NewItemSet(core.ItemSet{
Name: "Doomcaller's Malevolence",
Bonuses: map[int32]core.ApplyEffect{
// Reduces the cooldown on your Shadow Cleave by 1.5 sec.
2: func(agent core.Agent) {
warlock := agent.(WarlockAgent).GetWarlock()
if !warlock.HasRune(proto.WarlockRune_RuneHandsMetamorphosis) {
return
}

warlock.RegisterAura(core.Aura{
Label: "S03 - Item - TAQ - Warlock - Tank 2P Bonus",
OnInit: func(aura *core.Aura, sim *core.Simulation) {
for _, spell := range warlock.ShadowCleave {
spell.CD.Duration -= time.Millisecond * 1500
}
},
})
},
// You keep the benefits of your Master Demonologist talent while Demonic Sacrifice is active.
4: func(agent core.Agent) {
warlock := agent.(WarlockAgent).GetWarlock()
core.MakePermanent(warlock.RegisterAura(core.Aura{
Label: "S03 - Item - TAQ - Warlock - Tank 4P Bonus",
OnInit: func(aura *core.Aura, sim *core.Simulation) {
warlock.disableMasterDemonologistOnSacrifice = false
},
}))
},
},
})

var ItemSetImplementsOfUnspokenNames = core.NewItemSet(core.ItemSet{
Name: "Implements of Unspoken Names",
Bonuses: map[int32]core.ApplyEffect{
// For 6 sec after using Shadowcleave, your Searing Pain strikes 1 additional target within melee range.
3: func(agent core.Agent) {
warlock := agent.(WarlockAgent).GetWarlock()
if !warlock.HasRune(proto.WarlockRune_RuneHandsMetamorphosis) || len(warlock.Env.Encounter.TargetUnits) <= 1 {
return
}

buffAura := warlock.RegisterAura(core.Aura{
ActionID: core.ActionID{SpellID: 1214156},
Label: "Spreading Pain",
Duration: time.Second * 6,
OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if spell.SpellCode == SpellCode_WarlockSearingPain {
aura.Deactivate(sim)
spell.ApplyEffects(sim, warlock.Env.NextTargetUnit(result.Target), spell)
}
},
})

core.MakePermanent(warlock.RegisterAura(core.Aura{
Label: "S03 - Item - RAQ - Warlock - Tank 3P Bonus",
OnCastComplete: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) {
if spell.SpellCode == SpellCode_WarlockShadowCleave {
buffAura.Activate(sim)
}
},
}))
},
},
})
6 changes: 6 additions & 0 deletions sim/warlock/pet.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ func (warlock *Warlock) setDefaultActivePet() {
}

func (warlock *Warlock) changeActivePet(sim *core.Simulation, newPet *WarlockPet, isSacrifice bool) {
hasMasterDemonologist := warlock.MasterDemonologistAura != nil

if warlock.ActivePet != nil {
warlock.ActivePet.Disable(sim)

Expand All @@ -59,6 +61,10 @@ func (warlock *Warlock) changeActivePet(sim *core.Simulation, newPet *WarlockPet
aura.Deactivate(sim)
}
}

if hasMasterDemonologist && (!isSacrifice || warlock.disableMasterDemonologistOnSacrifice) {
warlock.MasterDemonologistAura.Deactivate(sim)
}
}

warlock.ActivePet = newPet
Expand Down
8 changes: 5 additions & 3 deletions sim/warlock/talents.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ func (warlock *Warlock) applyMasterDemonologist() {
return
}

warlock.disableMasterDemonologistOnSacrifice = true

hasMetaRune := warlock.HasRune(proto.WarlockRune_RuneHandsMetamorphosis)

points := float64(warlock.Talents.MasterDemonologist)
Expand Down Expand Up @@ -344,21 +346,20 @@ func (warlock *Warlock) applyMasterDemonologist() {
},
}

lockAura := warlock.RegisterAura(masterDemonologistConfig)
warlock.MasterDemonologistAura = warlock.RegisterAura(masterDemonologistConfig)
for _, pet := range warlock.BasePets {
petAura := pet.RegisterAura(masterDemonologistConfig)

oldOnPetEnable := pet.OnPetEnable
pet.OnPetEnable = func(sim *core.Simulation) {
oldOnPetEnable(sim)
lockAura.Activate(sim)
warlock.MasterDemonologistAura.Activate(sim)
petAura.Activate(sim)
}

oldOnPetDisable := pet.OnPetDisable
pet.OnPetDisable = func(sim *core.Simulation) {
oldOnPetDisable(sim)
lockAura.Deactivate(sim)
petAura.Deactivate(sim)
}
}
Expand Down Expand Up @@ -504,6 +505,7 @@ func (warlock *Warlock) applyDemonicSacrifice() {
}

warlock.GetOrRegisterSpell(core.SpellConfig{
SpellCode: SpellCode_WarlockDemonicSacrifice,
ActionID: core.ActionID{SpellID: 18788},
SpellSchool: core.SpellSchoolShadow,
Flags: core.SpellFlagAPL,
Expand Down
32 changes: 16 additions & 16 deletions sim/warlock/tank/TestDemonology.results
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ dps_results: {
key: "TestDemonology-Phase4-Lvl60-AllItems-BloodGuard'sDreadweave"
value: {
dps: 1179.29768
tps: 437.92396
tps: 433.61142
hps: 232.83312
}
}
Expand All @@ -286,15 +286,15 @@ dps_results: {
key: "TestDemonology-Phase4-Lvl60-AllItems-EmeraldEnchantedVestments"
value: {
dps: 1166.37178
tps: 434.52995
tps: 430.1719
hps: 232.49417
}
}
dps_results: {
key: "TestDemonology-Phase4-Lvl60-AllItems-InfernalPactEssence-216509"
value: {
dps: 2253.2068
tps: 4568.09681
tps: 4592.07365
hps: 402.51414
}
}
Expand All @@ -310,103 +310,103 @@ dps_results: {
key: "TestDemonology-Phase4-Lvl60-AllItems-Kezan'sUnstoppableTaint-231346"
value: {
dps: 2326.0892
tps: 4523.43017
tps: 4547.47334
hps: 395.53501
}
}
dps_results: {
key: "TestDemonology-Phase4-Lvl60-AllItems-Knight-Lieutenant'sDreadweave"
value: {
dps: 1179.29768
tps: 437.92396
tps: 433.61142
hps: 232.83312
}
}
dps_results: {
key: "TestDemonology-Phase4-Lvl60-AllItems-MalevolentProphet'sVestments"
value: {
dps: 1253.43066
tps: 1367.75994
tps: 1376.93708
hps: 220.31534
}
}
dps_results: {
key: "TestDemonology-Phase4-Lvl60-AllItems-NightmareProphet'sGarb"
value: {
dps: 1245.71217
tps: 1380.29722
tps: 1389.78133
hps: 219.05612
}
}
dps_results: {
key: "TestDemonology-Phase4-Lvl60-AllItems-ZilaGular-223214"
value: {
dps: 2253.2068
tps: 4568.09681
tps: 4592.07365
hps: 402.51414
}
}
dps_results: {
key: "TestDemonology-Phase4-Lvl60-Average-Default"
value: {
dps: 2261.35125
tps: 4601.90748
tps: 4625.87505
hps: 410.19321
}
}
dps_results: {
key: "TestDemonology-Phase4-Lvl60-Settings-Orc-p4_demo_tank-Demonology Warlock-p4_demo_tank-FullBuffs-P4-Consumes-LongMultiTarget"
value: {
dps: 2846.62906
tps: 8651.48467
tps: 9134.65909
hps: 413.40117
}
}
dps_results: {
key: "TestDemonology-Phase4-Lvl60-Settings-Orc-p4_demo_tank-Demonology Warlock-p4_demo_tank-FullBuffs-P4-Consumes-LongSingleTarget"
value: {
dps: 2199.06432
tps: 4424.2536
tps: 4447.82641
hps: 411.69711
}
}
dps_results: {
key: "TestDemonology-Phase4-Lvl60-Settings-Orc-p4_demo_tank-Demonology Warlock-p4_demo_tank-FullBuffs-P4-Consumes-ShortSingleTarget"
value: {
dps: 2171.73853
tps: 4402.40423
tps: 4420.23142
hps: 403.79946
}
}
dps_results: {
key: "TestDemonology-Phase4-Lvl60-Settings-Orc-p4_demo_tank-Demonology Warlock-p4_demo_tank-NoBuffs-P4-Consumes-LongMultiTarget"
value: {
dps: 1189.69605
tps: 5384.36731
tps: 5890.09727
hps: 212.13146
}
}
dps_results: {
key: "TestDemonology-Phase4-Lvl60-Settings-Orc-p4_demo_tank-Demonology Warlock-p4_demo_tank-NoBuffs-P4-Consumes-LongSingleTarget"
value: {
dps: 896.88394
tps: 2054.89898
tps: 2079.88969
hps: 219.54433
}
}
dps_results: {
key: "TestDemonology-Phase4-Lvl60-Settings-Orc-p4_demo_tank-Demonology Warlock-p4_demo_tank-NoBuffs-P4-Consumes-ShortSingleTarget"
value: {
dps: 899.15945
tps: 2099.53256
tps: 2120.97008
hps: 215.97381
}
}
dps_results: {
key: "TestDemonology-Phase4-Lvl60-SwitchInFrontOfTarget-Default"
value: {
dps: 2216.22136
tps: 4486.33777
tps: 4510.2395
hps: 402.96262
}
}
17 changes: 10 additions & 7 deletions sim/warlock/warlock.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ const (
const (
SpellCode_WarlockNone int32 = iota

SpellCode_WarlockConflagrate
SpellCode_WarlockCorruption
SpellCode_WarlockCurseOfAgony
SpellCode_WarlockCurseOfDoom
SpellCode_WarlockDeathCoil
SpellCode_WarlockDemonicSacrifice
SpellCode_WarlockDrainLife
SpellCode_WarlockDrainSoul
SpellCode_WarlockHaunt
Expand Down Expand Up @@ -113,21 +115,22 @@ type Warlock struct {
MarkOfChaosAuras core.AuraArray
SoulLinkAura *core.Aura
DecimationAura *core.Aura
MasterDemonologistAura *core.Aura
zilaGularAura *core.Aura
shadowSparkAura *core.Aura
defendersResolveAura *core.Aura

// The sum total of demonic pact spell power * seconds.
DPSPAggregate float64

// Extra state and logic variables
demonicKnowledgeSp float64
masterDemonologistBonus float64 // Bonus multiplier applied to the Master Demonologist talent
nightfallProcChance float64
demonicKnowledgeSp float64
masterDemonologistBonus float64 // Bonus multiplier applied to the Master Demonologist talent
disableMasterDemonologistOnSacrifice bool // Whether to disable the Master Demonologist buff after Sacrificing a pet. Used by TAQ 4pc
nightfallProcChance float64
// For effects that buff the damage of shadow bolt for each active Warlock effect on the target, e.g. 2pc DPS 6pc
shadowBoltActiveEffectMultiplierPer float64
shadowBoltActiveEffectMultiplierMax float64

zilaGularAura *core.Aura
shadowSparkAura *core.Aura
defendersResolveAura *core.Aura
}

func (warlock *Warlock) GetCharacter() *core.Character {
Expand Down

0 comments on commit d8fe2ec

Please sign in to comment.