diff --git a/sim/deathknight/blood_boil.go b/sim/deathknight/blood_boil.go index 4aa88b1023..6fb6b7ffce 100644 --- a/sim/deathknight/blood_boil.go +++ b/sim/deathknight/blood_boil.go @@ -30,12 +30,18 @@ func (dk *Deathknight) registerBloodBoilSpell() { ThreatMultiplier: 1.0, ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) { + dk.AoESpellNumTargetsHit = 0 + for _, aoeTarget := range sim.Encounter.TargetUnits { baseDamage := (sim.Roll(180, 220) + 0.06*dk.getImpurityBonus(spell)) * dk.RoRTSBonus(aoeTarget) * core.TernaryFloat64(dk.DiseasesAreActive(aoeTarget), 1.5, 1.0) baseDamage *= sim.Encounter.AOECapMultiplier() result := spell.CalcAndDealDamage(sim, aoeTarget, baseDamage, spell.OutcomeMagicHitAndCrit) + if result.Landed() { + dk.AoESpellNumTargetsHit++ + } + if aoeTarget == target { spell.SpendRefundableCost(sim, result) dk.LastOutcome = result.Outcome diff --git a/sim/deathknight/frost_strike.go b/sim/deathknight/frost_strike.go index b90cd5a3c5..39382fe0b4 100644 --- a/sim/deathknight/frost_strike.go +++ b/sim/deathknight/frost_strike.go @@ -5,13 +5,20 @@ import ( "github.com/wowsims/wotlk/sim/core/proto" ) -var FrostStrikeActionID = core.ActionID{SpellID: 55268} +var frostStrikeActionID = core.ActionID{SpellID: 55268} +var FrostStrikeMHActionID = frostStrikeActionID.WithTag(1) +var FrostStrikeOHActionID = frostStrikeActionID.WithTag(2) func (dk *Deathknight) newFrostStrikeHitSpell(isMH bool) *core.Spell { bonusBaseDamage := dk.sigilOfTheVengefulHeartFrostStrike() + actionID := FrostStrikeMHActionID + if !isMH { + actionID = FrostStrikeOHActionID + } + conf := core.SpellConfig{ - ActionID: FrostStrikeActionID.WithTag(core.TernaryInt32(isMH, 1, 2)), + ActionID: actionID, SpellSchool: core.SpellSchoolFrost, ProcMask: dk.threatOfThassarianProcMask(isMH), Flags: core.SpellFlagMeleeMetrics, diff --git a/sim/deathknight/howling_blast.go b/sim/deathknight/howling_blast.go index c5dfc1aedf..dc68b74e42 100644 --- a/sim/deathknight/howling_blast.go +++ b/sim/deathknight/howling_blast.go @@ -43,6 +43,8 @@ func (dk *Deathknight) registerHowlingBlastSpell() { ThreatMultiplier: 1, ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) { + dk.AoESpellNumTargetsHit = 0 + for _, aoeTarget := range sim.Encounter.TargetUnits { baseDamage := (sim.Roll(518, 562) + 0.2*dk.getImpurityBonus(spell)) * dk.glacielRotBonus(aoeTarget) * @@ -52,6 +54,10 @@ func (dk *Deathknight) registerHowlingBlastSpell() { result := spell.CalcDamage(sim, aoeTarget, baseDamage, spell.OutcomeMagicHitAndCrit) + if result.Landed() { + dk.AoESpellNumTargetsHit++ + } + if aoeTarget == target { spell.SpendRefundableCost(sim, result) dk.LastOutcome = result.Outcome diff --git a/sim/deathknight/items.go b/sim/deathknight/items.go index 09da5d06d0..5affd79462 100644 --- a/sim/deathknight/items.go +++ b/sim/deathknight/items.go @@ -534,7 +534,7 @@ func init() { consumeSpells := [5]core.ActionID{ BloodBoilActionID, DeathCoilActionID, - FrostStrikeActionID, + FrostStrikeMHActionID, HowlingBlastActionID, IcyTouchActionID, } @@ -558,13 +558,25 @@ func init() { dk.modifyShadowDamageModifier(-0.2) }, OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) { + if spell.ActionID == HowlingBlastActionID || spell.ActionID == BloodBoilActionID { + if result.Target.Index == sim.GetNumTargets()-1 { + // Last target, consume a stack for every target hit + for i := int32(0); i < dk.AoESpellNumTargetsHit; i++ { + if aura.IsActive() { + aura.RemoveStack(sim) + } + } + } + return + } + if !result.Outcome.Matches(core.OutcomeLanded) { return } shouldConsume := false for _, consumeSpell := range consumeSpells { - if spell.ActionID.SameActionIgnoreTag(consumeSpell) { + if spell.ActionID == consumeSpell { shouldConsume = true break } diff --git a/sim/deathknight/rotation_helper.go b/sim/deathknight/rotation_helper.go index 2f99609a9e..cd2a5254b5 100644 --- a/sim/deathknight/rotation_helper.go +++ b/sim/deathknight/rotation_helper.go @@ -72,7 +72,8 @@ func (s *Sequence) Clear() *Sequence { type RotationHelper struct { RotationSequence *Sequence - LastOutcome core.HitOutcome - LastCast *core.Spell - NextCast *core.Spell + LastOutcome core.HitOutcome + LastCast *core.Spell + NextCast *core.Spell + AoESpellNumTargetsHit int32 }