Skip to content

Commit

Permalink
Merge pull request #1180 from hillerstorm/fix_coil_prepull
Browse files Browse the repository at this point in the history
[Unholy] Change prepull Death Coil to its own spell to avoid dmg procs
  • Loading branch information
hillerstorm authored Nov 7, 2024
2 parents fb371d8 + c19e8a5 commit 60c0520
Show file tree
Hide file tree
Showing 8 changed files with 952 additions and 928 deletions.
50 changes: 34 additions & 16 deletions sim/death_knight/death_coil.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,43 @@ import (
var DeathCoilActionID = core.ActionID{SpellID: 47541}

func (dk *DeathKnight) registerDeathCoilSpell() {
rpMetrics := dk.NewRunicPowerMetrics(DeathCoilActionID)
rpMetrics := dk.NewRunicPowerMetrics(core.ActionID{SpellID: 58679})
hasGlyphOfDeathsEmbrace := dk.HasMinorGlyph(proto.DeathKnightMinorGlyph_GlyphOfDeathSEmbrace)

// Death Coil Heal
dk.RegisterSpell(core.SpellConfig{
ActionID: DeathCoilActionID.WithTag(2),
SpellSchool: core.SpellSchoolShadow,
ProcMask: core.ProcMaskSpellHealing,
ClassSpellMask: DeathKnightSpellDeathCoilHeal,
Flags: core.SpellFlagAPL | core.SpellFlagPrepullOnly | core.SpellFlagNoMetrics,

RuneCost: core.RuneCostOptions{
RunicPowerCost: 40,
},
Cast: core.CastConfig{
DefaultCast: core.Cast{
GCD: core.GCDDefault,
},
},

DamageMultiplier: 3.5,
CritMultiplier: dk.DefaultMeleeCritMultiplier(),
ThreatMultiplier: 1.0,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseHealing := dk.ClassSpellScaling*0.87599998713 + spell.MeleeAttackPower()*0.23
spell.CalcAndDealHealing(sim, target, baseHealing, spell.OutcomeHealingCrit)

if hasGlyphOfDeathsEmbrace {
dk.AddRunicPower(sim, 20, rpMetrics)
}
},
})

dk.RegisterSpell(core.SpellConfig{
ActionID: DeathCoilActionID,
Flags: core.SpellFlagAPL,
Flags: core.SpellFlagAPL | core.SpellFlagEncounterOnly,
SpellSchool: core.SpellSchoolShadow,
ProcMask: core.ProcMaskSpellDamage,
ClassSpellMask: DeathKnightSpellDeathCoil,
Expand All @@ -32,21 +63,8 @@ func (dk *DeathKnight) registerDeathCoilSpell() {
ThreatMultiplier: 1.0,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
var baseDamage float64
if hasGlyphOfDeathsEmbrace && sim.CurrentTime < 0 {
baseDamage = 0
} else {
baseDamage = dk.ClassSpellScaling*0.87599998713 + spell.MeleeAttackPower()*0.23
}

baseDamage := dk.ClassSpellScaling*0.87599998713 + spell.MeleeAttackPower()*0.23
spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeMagicHitAndCrit)

// Instead of actually healing the ghoul, we just add the runic power
// to not have to deal with healing metrics and other weird stuff.
// Damage doesn't count before 0 anyway.
if hasGlyphOfDeathsEmbrace && sim.CurrentTime < 0 {
dk.AddRunicPower(sim, 20, rpMetrics)
}
},
})
}
Expand Down
1 change: 1 addition & 0 deletions sim/death_knight/death_knight.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ const (
DeathKnightSpellFlagNone int64 = 0
DeathKnightSpellIcyTouch int64 = 1 << iota
DeathKnightSpellDeathCoil
DeathKnightSpellDeathCoilHeal
DeathKnightSpellDeathAndDecay
DeathKnightSpellOutbreak
DeathKnightSpellEmpowerRuneWeapon
Expand Down
2 changes: 1 addition & 1 deletion sim/death_knight/glyphs.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func (dk *DeathKnight) ApplyGlyphs() {
if dk.HasPrimeGlyph(proto.DeathKnightPrimeGlyph_GlyphOfDeathCoil) {
dk.AddStaticMod(core.SpellModConfig{
Kind: core.SpellMod_DamageDone_Flat,
ClassMask: DeathKnightSpellDeathCoil,
ClassMask: DeathKnightSpellDeathCoil | DeathKnightSpellDeathCoilHeal,
FloatValue: 0.15,
})
}
Expand Down
2 changes: 1 addition & 1 deletion sim/death_knight/items.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var ItemSetMagmaPlatedBattlegear = core.NewItemSet(core.ItemSet{
// Increases the critical strike chance of your Death Coil and Frost Strike abilities by 5%.
agent.GetCharacter().AddStaticMod(core.SpellModConfig{
Kind: core.SpellMod_BonusCrit_Percent,
ClassMask: DeathKnightSpellDeathCoil | DeathKnightSpellFrostStrike,
ClassMask: DeathKnightSpellDeathCoil | DeathKnightSpellDeathCoilHeal | DeathKnightSpellFrostStrike,
FloatValue: 5,
})
},
Expand Down
10 changes: 5 additions & 5 deletions sim/death_knight/talents_unholy.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (dk *DeathKnight) ApplyUnholyTalents() {
if dk.Talents.Morbidity > 0 {
dk.AddStaticMod(core.SpellModConfig{
Kind: core.SpellMod_DamageDone_Flat,
ClassMask: DeathKnightSpellDeathCoil,
ClassMask: DeathKnightSpellDeathCoil | DeathKnightSpellDeathCoilHeal,
FloatValue: 0.05 * float64(dk.Talents.Morbidity),
})

Expand Down Expand Up @@ -111,7 +111,7 @@ func (dk *DeathKnight) applyRunicEmpowerementCorruption() {
if dk.Talents.RunicCorruption > 0 {
dk.AddStaticMod(core.SpellModConfig{
Kind: core.SpellMod_RunicPowerCost_Flat,
ClassMask: DeathKnightSpellDeathCoil,
ClassMask: DeathKnightSpellDeathCoil | DeathKnightSpellDeathCoilHeal,
FloatValue: -3.0 * float64(dk.Talents.RunicCorruption),
})

Expand Down Expand Up @@ -279,7 +279,7 @@ func (dk *DeathKnight) applySuddenDoom() {

mod := dk.AddDynamicMod(core.SpellModConfig{
Kind: core.SpellMod_PowerCost_Pct,
ClassMask: DeathKnightSpellDeathCoil,
ClassMask: DeathKnightSpellDeathCoil | DeathKnightSpellDeathCoilHeal,
FloatValue: -1,
})

Expand Down Expand Up @@ -374,8 +374,8 @@ func (dk *DeathKnight) applyShadowInfusion() *core.Aura {

core.MakeProcTriggerAura(&dk.Unit, core.ProcTrigger{
Name: "Shadow Infusion",
Callback: core.CallbackOnSpellHitDealt,
ClassSpellMask: DeathKnightSpellDeathCoil,
Callback: core.CallbackOnSpellHitDealt | core.CallbackOnHealDealt,
ClassSpellMask: DeathKnightSpellDeathCoil | DeathKnightSpellDeathCoilHeal,
Outcome: core.OutcomeLanded,
ProcChance: []float64{0.0, 0.33, 0.66, 1.0}[dk.Talents.ShadowInfusion],

Expand Down
Loading

0 comments on commit 60c0520

Please sign in to comment.