Skip to content

Commit

Permalink
Add SpellMod_DotTickLength_Flat
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Ellermann committed Apr 16, 2024
1 parent c991880 commit 5177e2e
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
34 changes: 34 additions & 0 deletions sim/core/spell_mod.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ const (
// Add/subtract to the casts gcd
// Uses: TimeValue
SpellMod_GlobalCooldown_Flat

// Add/substrct to the base tick frequency
// Uses: TimeValue
SpellMod_DotTickLength_Flat
)

var spellModMap = map[SpellModType]*SpellModFunctions{
Expand Down Expand Up @@ -282,6 +286,10 @@ var spellModMap = map[SpellModType]*SpellModFunctions{
Apply: applyGlobalCooldownFlat,
Remove: removeGlobalCooldownFlat,
},
SpellMod_DotTickLength_Flat: {
Apply: applyDotTickLengthFlat,
Remove: removeDotTickLengthFlat,
},
}

func applyDamageDonePercent(mod *SpellMod, spell *Spell) {
Expand Down Expand Up @@ -401,3 +409,29 @@ func applyGlobalCooldownFlat(mod *SpellMod, spell *Spell) {
func removeGlobalCooldownFlat(mod *SpellMod, spell *Spell) {
spell.DefaultCast.GCD -= mod.timeValue
}

func applyDotTickLengthFlat(mod *SpellMod, spell *Spell) {
if spell.dots != nil {
for _, dot := range spell.dots {
if dot != nil {
dot.TickLength += mod.timeValue
}
}
}
if spell.aoeDot != nil {
spell.aoeDot.TickLength += mod.timeValue
}
}

func removeDotTickLengthFlat(mod *SpellMod, spell *Spell) {
if spell.dots != nil {
for _, dot := range spell.dots {
if dot != nil {
dot.TickLength -= mod.timeValue
}
}
}
if spell.aoeDot != nil {
spell.aoeDot.TickLength -= mod.timeValue
}
}
7 changes: 6 additions & 1 deletion sim/priest/items.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,12 @@ var ItemSetCrimsonAcolyte = core.NewItemSet(core.ItemSet{
})
},
4: func(agent core.Agent) {
// TODO: Implemement proper aura mod to mod total duration
character := agent.GetCharacter()
character.AddStaticMod(core.SpellModConfig{
Kind: core.SpellMod_DotTickLength_Flat,
TimeValue: -time.Millisecond * 170,
ClassMask: PriestSpellMindFlay,
})
},
},
})
Expand Down
4 changes: 2 additions & 2 deletions sim/priest/shadow/TestShadow.results
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,8 @@ dps_results: {
dps_results: {
key: "TestShadow-AllItems-CrimsonAcolyte'sRegalia"
value: {
dps: 17447.05826
tps: 16603.95236
dps: 17616.72371
tps: 16814.33155
}
}
dps_results: {
Expand Down

0 comments on commit 5177e2e

Please sign in to comment.