Skip to content

Commit

Permalink
[Prot] Use shared ignite helper for T12 prot 2pc
Browse files Browse the repository at this point in the history
  • Loading branch information
hillerstorm committed Oct 20, 2024
1 parent f039584 commit a999fc4
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 65 deletions.
53 changes: 14 additions & 39 deletions sim/warrior/items.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package warrior
import (
"time"

"github.com/wowsims/cata/sim/common/cata"
"github.com/wowsims/cata/sim/core"
"github.com/wowsims/cata/sim/core/proto"
"github.com/wowsims/cata/sim/core/stats"
Expand Down Expand Up @@ -175,48 +176,22 @@ var ItemSetMoltenGiantBattleplate = core.NewItemSet(core.ItemSet{
Bonuses: map[int32]core.ApplyEffect{
2: func(agent core.Agent) {
character := agent.GetCharacter()
actionID := core.ActionID{SpellID: 23922} // Actual 99240

// TODO (4.2): Test if this rolls damage over like deep wounds or just resets it
var shieldSlamDamage float64 = 0.0
debuff := character.RegisterSpell(core.SpellConfig{
ActionID: actionID.WithTag(3),
SpellSchool: core.SpellSchoolFire,
ProcMask: core.ProcMaskEmpty,
Flags: core.SpellFlagPassiveSpell,

DamageMultiplier: 1,
ThreatMultiplier: 1,

Dot: core.DotConfig{
Aura: core.Aura{
Label: "Combust",
},
NumberOfTicks: 2,
TickLength: 2 * time.Second,
OnSnapshot: func(sim *core.Simulation, target *core.Unit, dot *core.Dot, isRollover bool) {
dot.Snapshot(target, shieldSlamDamage/float64(dot.BaseTickCount))
},
OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) {
dot.CalcAndDealPeriodicSnapshotDamage(sim, target, dot.OutcomeTick)
},
cata.RegisterIgniteEffect(&character.Unit, cata.IgniteConfig{
ActionID: core.ActionID{SpellID: 23922}.WithTag(3), // actual 99240
DisableCastMetrics: true,
DotAuraLabel: "Combust",
IncludeAuraDelay: true,

ProcTrigger: core.ProcTrigger{
Name: "Combust",
Callback: core.CallbackOnSpellHitDealt,
ClassSpellMask: SpellMaskShieldSlam,
Outcome: core.OutcomeLanded,
},

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
spell.Dot(target).Apply(sim)
},
})

core.MakeProcTriggerAura(&character.Unit, core.ProcTrigger{
Name: "Combust Trigger",
ActionID: actionID,
Callback: core.CallbackOnSpellHitDealt,
ClassSpellMask: SpellMaskShieldSlam,
Outcome: core.OutcomeLanded,

Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
shieldSlamDamage = result.Damage * 0.2
debuff.Cast(sim, result.Target)
DamageCalculator: func(result *core.SpellResult) float64 {
return result.Damage * 0.2
},
})
},
Expand Down
52 changes: 26 additions & 26 deletions sim/warrior/protection/TestProtectionWarrior.results
Original file line number Diff line number Diff line change
Expand Up @@ -1123,8 +1123,8 @@ dps_results: {
dps_results: {
key: "TestProtectionWarrior-AllItems-MoltenGiantBattleplate"
value: {
dps: 5044.57919
tps: 30516.38722
dps: 5023.20322
tps: 30409.40756
}
}
dps_results: {
Expand Down Expand Up @@ -2069,43 +2069,43 @@ dps_results: {
dps_results: {
key: "TestProtectionWarrior-Settings-Human-p3_bis-Basic-default-FullBuffs-0.0yards-LongMultiTarget"
value: {
dps: 25641.10591
tps: 145950.33798
dps: 25615.50923
tps: 145822.13337
}
}
dps_results: {
key: "TestProtectionWarrior-Settings-Human-p3_bis-Basic-default-FullBuffs-0.0yards-LongSingleTarget"
value: {
dps: 5800.72955
tps: 34840.55799
dps: 5773.897
tps: 34706.49422
}
}
dps_results: {
key: "TestProtectionWarrior-Settings-Human-p3_bis-Basic-default-FullBuffs-0.0yards-ShortSingleTarget"
value: {
dps: 6396.45309
tps: 37971.28923
dps: 6370.37611
tps: 37841.47825
}
}
dps_results: {
key: "TestProtectionWarrior-Settings-Human-p3_bis-Basic-default-NoBuffs-0.0yards-LongMultiTarget"
value: {
dps: 18296.89947
tps: 104123.35134
dps: 18297.87324
tps: 104127.95654
}
}
dps_results: {
key: "TestProtectionWarrior-Settings-Human-p3_bis-Basic-default-NoBuffs-0.0yards-LongSingleTarget"
value: {
dps: 3819.66316
tps: 23202.53361
dps: 3819.22274
tps: 23200.13983
}
}
dps_results: {
key: "TestProtectionWarrior-Settings-Human-p3_bis-Basic-default-NoBuffs-0.0yards-ShortSingleTarget"
value: {
dps: 3640.94977
tps: 22271.69597
dps: 3638.6381
tps: 22260.20379
}
}
dps_results: {
Expand Down Expand Up @@ -2195,43 +2195,43 @@ dps_results: {
dps_results: {
key: "TestProtectionWarrior-Settings-Orc-p3_bis-Basic-default-FullBuffs-0.0yards-LongMultiTarget"
value: {
dps: 25543.64701
tps: 145434.50454
dps: 25518.20279
tps: 145306.96788
}
}
dps_results: {
key: "TestProtectionWarrior-Settings-Orc-p3_bis-Basic-default-FullBuffs-0.0yards-LongSingleTarget"
value: {
dps: 5793.91896
tps: 34719.11325
dps: 5767.81545
tps: 34588.36099
}
}
dps_results: {
key: "TestProtectionWarrior-Settings-Orc-p3_bis-Basic-default-FullBuffs-0.0yards-ShortSingleTarget"
value: {
dps: 6373.89475
tps: 37823.93446
dps: 6346.61215
tps: 37688.03007
}
}
dps_results: {
key: "TestProtectionWarrior-Settings-Orc-p3_bis-Basic-default-NoBuffs-0.0yards-LongMultiTarget"
value: {
dps: 18297.38881
tps: 104217.73551
dps: 18299.51151
tps: 104228.06764
}
}
dps_results: {
key: "TestProtectionWarrior-Settings-Orc-p3_bis-Basic-default-NoBuffs-0.0yards-LongSingleTarget"
value: {
dps: 3800.42633
tps: 23101.41961
dps: 3800.26892
tps: 23100.4514
}
}
dps_results: {
key: "TestProtectionWarrior-Settings-Orc-p3_bis-Basic-default-NoBuffs-0.0yards-ShortSingleTarget"
value: {
dps: 3608.4368
tps: 22056.34953
dps: 3606.6331
tps: 22047.45829
}
}
dps_results: {
Expand Down

0 comments on commit a999fc4

Please sign in to comment.