Skip to content

Commit

Permalink
Merge pull request #112 from wowsims/shaman
Browse files Browse the repository at this point in the history
Fix Elemental Mastery, Molten Blast, and apply stats.SpellDamage and stats.Healing correctly
  • Loading branch information
kayla-glick authored Feb 7, 2024
2 parents 57a3e0a + afbb568 commit 04a6fd2
Show file tree
Hide file tree
Showing 65 changed files with 208 additions and 195 deletions.
6 changes: 5 additions & 1 deletion sim/core/spell_result.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ func (spell *Spell) SpellPower() float64 {
spell.Unit.PseudoStats.MobTypeSpellPower
}

func (spell *Spell) SpellDamage() float64 {
return spell.SpellPower() + spell.Unit.GetStat(stats.SpellDamage)
}

func (spell *Spell) SpellPowerSchool() float64 {
switch spell.SpellSchool {
case SpellSchoolArcane:
Expand Down Expand Up @@ -173,7 +177,7 @@ func (spell *Spell) MagicCritCheck(sim *Simulation, target *Unit) bool {
}

func (spell *Spell) HealingPower(target *Unit) float64 {
return spell.SpellPower() + target.PseudoStats.BonusHealingTaken
return spell.SpellPower() + spell.Unit.GetStat(stats.Healing) + target.PseudoStats.BonusHealingTaken
}
func (spell *Spell) healingCritRating() float64 {
return spell.Unit.GetStat(stats.SpellCrit) + spell.BonusCritRating
Expand Down
2 changes: 1 addition & 1 deletion sim/druid/_hurricane.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func (druid *Druid) registerHurricaneSpell() {
DamageMultiplier: 1,
ThreatMultiplier: 1,
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
damage := 451 + 0.129*spell.SpellPower()
damage := 451 + 0.129*spell.SpellDamage()
// damage *= sim.Encounter.AOECapMultiplier()
for _, aoeTarget := range sim.Encounter.TargetUnits {
spell.CalcAndDealDamage(sim, aoeTarget, damage, spell.OutcomeMagicHitAndCrit)
Expand Down
2 changes: 1 addition & 1 deletion sim/druid/_insect_swarm.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (druid *Druid) registerInsectSwarmSpell() {
TickLength: time.Second * 2,

OnSnapshot: func(sim *core.Simulation, target *core.Unit, dot *core.Dot, isRollover bool) {
dot.SnapshotBaseDamage = 215 + 0.2*(dot.Spell.SpellPower()+idolSpellPower)
dot.SnapshotBaseDamage = 215 + 0.2*(dot.Spell.SpellDamage()+idolSpellPower)
dot.SnapshotAttackerMultiplier = dot.Spell.AttackerDamageMultiplier(dot.Spell.Unit.AttackTables[target.UnitIndex])
},
OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) {
Expand Down
4 changes: 2 additions & 2 deletions sim/druid/moonfire.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (druid *Druid) getMoonfireBaseConfig(rank int) core.SpellConfig {
NumberOfTicks: ticks,
TickLength: time.Second * 3,
OnSnapshot: func(sim *core.Simulation, target *core.Unit, dot *core.Dot, _ bool) {
dot.SnapshotBaseDamage = (baseDotDamage / float64(ticks)) + spellDotCoeff*dot.Spell.SpellPower()
dot.SnapshotBaseDamage = (baseDotDamage / float64(ticks)) + spellDotCoeff*dot.Spell.SpellDamage()
dot.SnapshotAttackerMultiplier = 1 // dot.Spell.AttackerDamageMultiplier(dot.Spell.Unit.AttackTables[target.UnitIndex])
},
OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) {
Expand All @@ -82,7 +82,7 @@ func (druid *Druid) getMoonfireBaseConfig(rank int) core.SpellConfig {
ThreatMultiplier: 1,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := sim.Roll(baseDamageLow, baseDamageHigh) + spellCoeff*spell.SpellPower()
baseDamage := sim.Roll(baseDamageLow, baseDamageHigh) + spellCoeff*spell.SpellDamage()
result := spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeMagicHitAndCrit)

if result.Landed() {
Expand Down
6 changes: 3 additions & 3 deletions sim/druid/runes.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (druid *Druid) applySunfire() {
NumberOfTicks: ticks,
TickLength: time.Second * 3,
OnSnapshot: func(sim *core.Simulation, target *core.Unit, dot *core.Dot, _ bool) {
dot.SnapshotBaseDamage = baseDotDamage + 0.13*dot.Spell.SpellPower()
dot.SnapshotBaseDamage = baseDotDamage + 0.13*dot.Spell.SpellDamage()
dot.SnapshotAttackerMultiplier = 1
},
OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) {
Expand All @@ -83,7 +83,7 @@ func (druid *Druid) applySunfire() {
ThreatMultiplier: 1,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := sim.Roll(baseLowDamage, baseHighDamage) + 0.15*spell.SpellPower()
baseDamage := sim.Roll(baseLowDamage, baseHighDamage) + 0.15*spell.SpellDamage()
result := spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeMagicHitAndCrit)

if result.Landed() {
Expand Down Expand Up @@ -130,7 +130,7 @@ func (druid *Druid) applyStarsurge() {
ThreatMultiplier: 1,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := sim.Roll(baseLowDamage, baseHighDamage) + spell.SpellPower()
baseDamage := sim.Roll(baseLowDamage, baseHighDamage) + spell.SpellDamage()
spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeMagicHitAndCrit)
},
})
Expand Down
2 changes: 1 addition & 1 deletion sim/druid/starfire.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (druid *Druid) newStarfireSpellConfig(rank int) core.SpellConfig {
ThreatMultiplier: 1,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := sim.Roll(baseDamageLow, baseDamageHigh) + spell.SpellPower()
baseDamage := sim.Roll(baseDamageLow, baseDamageHigh) + spell.SpellDamage()
spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeMagicHitAndCrit)
},
}
Expand Down
2 changes: 1 addition & 1 deletion sim/druid/wrath.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (druid *Druid) newWrathSpellConfig(rank int) core.SpellConfig {
ThreatMultiplier: 1,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := sim.Roll(baseDamageLow, baseDamageHigh) + spellCoeff*spell.SpellPower()
baseDamage := sim.Roll(baseDamageLow, baseDamageHigh) + spellCoeff*spell.SpellDamage()
result := spell.CalcDamage(sim, target, baseDamage, spell.OutcomeMagicHitAndCrit)

spell.WaitTravelTime(sim, func(sim *core.Simulation) {
Expand Down
2 changes: 1 addition & 1 deletion sim/mage/_arcane_explosion.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (mage *Mage) registerArcaneExplosionSpell() {
ThreatMultiplier: 1 - 0.2*float64(mage.Talents.ArcaneSubtlety),

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
dmgFromSP := (1.5 / 3.5 / 2) * spell.SpellPower()
dmgFromSP := (1.5 / 3.5 / 2) * spell.SpellDamage()
for _, aoeTarget := range sim.Encounter.TargetUnits {
baseDamage := sim.Roll(538, 582) + dmgFromSP
baseDamage *= sim.Encounter.AOECapMultiplier()
Expand Down
2 changes: 1 addition & 1 deletion sim/mage/_blast_wave.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (mage *Mage) registerBlastWaveSpell() {
ThreatMultiplier: 1 - 0.1*float64(mage.Talents.BurningSoul),
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
for _, aoeTarget := range sim.Encounter.TargetUnits {
baseDamage := sim.Roll(1047, 1233) + 0.193*spell.SpellPower()
baseDamage := sim.Roll(1047, 1233) + 0.193*spell.SpellDamage()
baseDamage *= sim.Encounter.AOECapMultiplier()
spell.CalcAndDealDamage(sim, aoeTarget, baseDamage, spell.OutcomeMagicHitAndCrit)
}
Expand Down
2 changes: 1 addition & 1 deletion sim/mage/_blizzard.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (mage *Mage) registerBlizzardSpell() {
DamageMultiplier: 1,
ThreatMultiplier: 1 - (0.1/3)*float64(mage.Talents.FrostChanneling),
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
damage := 426 + (4.0/3.5/8)*spell.SpellPower()
damage := 426 + (4.0/3.5/8)*spell.SpellDamage()
damage *= sim.Encounter.AOECapMultiplier()
for _, aoeTarget := range sim.Encounter.TargetUnits {
spell.CalcAndDealDamage(sim, aoeTarget, damage, spell.OutcomeMagicHitAndCrit)
Expand Down
4 changes: 2 additions & 2 deletions sim/mage/_flamestrike.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (mage *Mage) registerFlamestrikeSpell(rank8 bool) *core.Spell {
TickLength: time.Second * 2,
OnSnapshot: func(sim *core.Simulation, _ *core.Unit, dot *core.Dot, _ bool) {
target := mage.CurrentTarget
dot.SnapshotBaseDamage = dotDamage + 0.122*dot.Spell.SpellPower()*spCoeffMultiplier
dot.SnapshotBaseDamage = dotDamage + 0.122*dot.Spell.SpellDamage()*spCoeffMultiplier
dot.SnapshotAttackerMultiplier = dot.Spell.AttackerDamageMultiplier(dot.Spell.Unit.AttackTables[target.UnitIndex])
},
OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) {
Expand All @@ -67,7 +67,7 @@ func (mage *Mage) registerFlamestrikeSpell(rank8 bool) *core.Spell {
},

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
dmgFromSP := 0.243 * spell.SpellPower() * spCoeffMultiplier
dmgFromSP := 0.243 * spell.SpellDamage() * spCoeffMultiplier
for _, aoeTarget := range sim.Encounter.TargetUnits {
baseDamage := sim.Roll(minDamage, maxDamage) + dmgFromSP
baseDamage *= sim.Encounter.AOECapMultiplier()
Expand Down
4 changes: 2 additions & 2 deletions sim/mage/_pyroblast.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (mage *Mage) registerPyroblastSpell() {
NumberOfTicks: 4,
TickLength: time.Second * 3,
OnSnapshot: func(sim *core.Simulation, target *core.Unit, dot *core.Dot, _ bool) {
dot.SnapshotBaseDamage = 113.0 + tickCoeff*dot.Spell.SpellPower()
dot.SnapshotBaseDamage = 113.0 + tickCoeff*dot.Spell.SpellDamage()
dot.SnapshotAttackerMultiplier = dot.Spell.AttackerDamageMultiplier(dot.Spell.Unit.AttackTables[target.UnitIndex])
},
OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) {
Expand All @@ -69,7 +69,7 @@ func (mage *Mage) registerPyroblastSpell() {
},

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := sim.Roll(1210, 1531) + spellCoeff*spell.SpellPower()
baseDamage := sim.Roll(1210, 1531) + spellCoeff*spell.SpellDamage()
result := spell.CalcDamage(sim, target, baseDamage, spell.OutcomeMagicHitAndCrit)
spell.WaitTravelTime(sim, func(sim *core.Simulation) {
if result.Landed() {
Expand Down
2 changes: 1 addition & 1 deletion sim/mage/arcane_blast.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (mage *Mage) registerArcaneBlastSpell() {
ThreatMultiplier: 1 - 0.15*float64(mage.Talents.BurningSoul),

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := sim.Roll(baseLowDamage, baseHighDamage) + .714*spell.SpellPower()
baseDamage := sim.Roll(baseLowDamage, baseHighDamage) + .714*spell.SpellDamage()
result := spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeMagicHitAndCrit)

if result.Landed() {
Expand Down
4 changes: 2 additions & 2 deletions sim/mage/arcane_missiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (mage *Mage) getArcaneMissilesTickSpell(rank int, numTicks int32, baseDotDa
CritMultiplier: 1, // No crit on channels
ThreatMultiplier: 1 - 0.2*float64(mage.Talents.ArcaneSubtlety),
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
damage := baseDotDamage + (spellCoeff * spell.SpellPower())
damage := baseDotDamage + (spellCoeff * spell.SpellDamage())

// TODO: Classic review Arcane missiles snap shot mechanics for Arcane Blast rune
if mage.ArcaneBlastAura != nil && mage.ArcaneBlastAura.IsActive() {
Expand Down Expand Up @@ -95,7 +95,7 @@ func (mage *Mage) getArcaneMissilesSpellConfig(rank int) core.SpellConfig {
spell.DealOutcome(sim, result)
},
ExpectedTickDamage: func(sim *core.Simulation, target *core.Unit, spell *core.Spell, _ bool) *core.SpellResult {
baseDamage := (baseDotDamage + (spellCoeff * spell.SpellPower()))
baseDamage := (baseDotDamage + (spellCoeff * spell.SpellDamage()))

return spell.CalcPeriodicDamage(sim, target, baseDamage, spell.OutcomeExpectedTick)
},
Expand Down
4 changes: 2 additions & 2 deletions sim/mage/fire_blast.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ func (mage *Mage) getFireBlastBaseConfig(rank int, cdTimer *core.Timer) core.Spe
CritMultiplier: mage.DefaultSpellCritMultiplier(),
ThreatMultiplier: 1 - 0.15*float64(mage.Talents.BurningSoul),
ExpectedInitialDamage: func(sim *core.Simulation, target *core.Unit, spell *core.Spell, _ bool) *core.SpellResult {
baseDamageCacl := (baseDamage[0]+baseDamage[1])/2 + spellCoeff*spell.SpellPower()
baseDamageCacl := (baseDamage[0]+baseDamage[1])/2 + spellCoeff*spell.SpellDamage()
return spell.CalcDamage(sim, target, baseDamageCacl, spell.OutcomeExpectedMagicHitAndCrit)
},
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := sim.Roll(baseDamage[0], baseDamage[1]) + spellCoeff*spell.SpellPower()
baseDamage := sim.Roll(baseDamage[0], baseDamage[1]) + spellCoeff*spell.SpellDamage()

spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeMagicHitAndCrit)
},
Expand Down
2 changes: 1 addition & 1 deletion sim/mage/fireball.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (mage *Mage) getFireballBaseConfig(rank int) core.SpellConfig {
ThreatMultiplier: 1 - (0.15 * float64(mage.Talents.BurningSoul)),

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := sim.Roll(baseDamage[0], baseDamage[1]) + spellCoeff*spell.SpellPower()
baseDamage := sim.Roll(baseDamage[0], baseDamage[1]) + spellCoeff*spell.SpellDamage()
result := spell.CalcDamage(sim, target, baseDamage, spell.OutcomeMagicHitAndCrit)
spell.WaitTravelTime(sim, func(sim *core.Simulation) {
if result.Landed() {
Expand Down
2 changes: 1 addition & 1 deletion sim/mage/frostbolt.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (mage *Mage) getFrostboltBaseConfig(rank int) core.SpellConfig {
ThreatMultiplier: 1 - (0.1 * float64(mage.Talents.FrostChanneling)),

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := sim.Roll(baseDamage[0], baseDamage[1]) + spellCoeff*spell.SpellPower()
baseDamage := sim.Roll(baseDamage[0], baseDamage[1]) + spellCoeff*spell.SpellDamage()
result := spell.CalcDamage(sim, target, baseDamage, spell.OutcomeMagicHitAndCrit)

spell.WaitTravelTime(sim, func(sim *core.Simulation) {
Expand Down
2 changes: 1 addition & 1 deletion sim/mage/ice_lance.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (mage *Mage) registerIceLanceSpell() {
ThreatMultiplier: 1 - 0.1*float64(mage.Talents.FrostChanneling),

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := sim.Roll(55, 66) + 0.143*spell.SpellPower() // https://www.wowhead.com/classic/spell=400640/ice-lance
baseDamage := sim.Roll(55, 66) + 0.143*spell.SpellDamage() // https://www.wowhead.com/classic/spell=400640/ice-lance
baseDamage *= core.TernaryFloat64(mage.FingersOfFrostAura.IsActive(), 3, 1)
result := spell.CalcDamage(sim, target, baseDamage, spell.OutcomeMagicHitAndCrit)

Expand Down
4 changes: 2 additions & 2 deletions sim/mage/living_bomb.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (mage *Mage) registerLivingBombSpell() {
ThreatMultiplier: 1 - 0.1*float64(mage.Talents.BurningSoul),

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := baseExplosionDamage + 0.4*spell.SpellPower()
baseDamage := baseExplosionDamage + 0.4*spell.SpellDamage()
// baseDamage *= sim.Encounter.AOECapMultiplier()
for _, aoeTarget := range sim.Encounter.TargetUnits {
spell.CalcAndDealDamage(sim, aoeTarget, baseDamage, spell.OutcomeExpectedMagicCrit)
Expand Down Expand Up @@ -73,7 +73,7 @@ func (mage *Mage) registerLivingBombSpell() {
TickLength: time.Second * 3,

OnSnapshot: func(sim *core.Simulation, target *core.Unit, dot *core.Dot, _ bool) {
dot.SnapshotBaseDamage = (baseDotDamage / float64(ticks)) + 0.2*dot.Spell.SpellPower()
dot.SnapshotBaseDamage = (baseDotDamage / float64(ticks)) + 0.2*dot.Spell.SpellDamage()
dot.SnapshotAttackerMultiplier = 1 // dot.Spell.AttackerDamageMultiplier(dot.Spell.Unit.AttackTables[target.UnitIndex])
},
OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) {
Expand Down
2 changes: 1 addition & 1 deletion sim/mage/living_flame.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (mage *Mage) registerLivingFlameSpell() {
TickLength: time.Second * 1,

OnSnapshot: func(sim *core.Simulation, target *core.Unit, dot *core.Dot, _ bool) {
dot.SnapshotBaseDamage = baseDamage + 0.143*dot.Spell.SpellPower()
dot.SnapshotBaseDamage = baseDamage + 0.143*dot.Spell.SpellDamage()
dot.SnapshotAttackerMultiplier = 1
},
OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) {
Expand Down
2 changes: 1 addition & 1 deletion sim/mage/scorch.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (mage *Mage) getScorchConfig(rank int) core.SpellConfig {
ThreatMultiplier: 1 - (0.15 * float64(mage.Talents.BurningSoul)),

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := sim.Roll(baseDamage[0], baseDamage[1]) + spellCoeff*spell.SpellPower()
baseDamage := sim.Roll(baseDamage[0], baseDamage[1]) + spellCoeff*spell.SpellDamage()
spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeMagicHitAndCrit)
},
}
Expand Down
4 changes: 2 additions & 2 deletions sim/priest/devouring_plague.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (priest *Priest) getDevouringPlagueConfig(rank int, cdTimer *core.Timer) co
TickLength: time.Second * 3,

OnSnapshot: func(sim *core.Simulation, target *core.Unit, dot *core.Dot, isRollover bool) {
dot.SnapshotBaseDamage = baseDamage/8 + (spellCoeff * dot.Spell.SpellPower())
dot.SnapshotBaseDamage = baseDamage/8 + (spellCoeff * dot.Spell.SpellDamage())
dot.SnapshotAttackerMultiplier = 1
},
OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) {
Expand All @@ -74,7 +74,7 @@ func (priest *Priest) getDevouringPlagueConfig(rank int, cdTimer *core.Timer) co
dot := spell.Dot(target)
return dot.CalcSnapshotDamage(sim, target, dot.Spell.OutcomeExpectedMagicAlwaysHit)
} else {
baseDamage := baseDamage/8 + (spellCoeff * spell.SpellPower())
baseDamage := baseDamage/8 + (spellCoeff * spell.SpellDamage())
return spell.CalcPeriodicDamage(sim, target, baseDamage, spell.OutcomeExpectedMagicAlwaysHit)
}
},
Expand Down
4 changes: 2 additions & 2 deletions sim/priest/holy_fire.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (priest *Priest) getHolyFireConfig(rank int) core.SpellConfig {
NumberOfTicks: 5,
TickLength: time.Second * 2,
OnSnapshot: func(sim *core.Simulation, target *core.Unit, dot *core.Dot, _ bool) {
dot.SnapshotBaseDamage = dotDamage + dotCoeff*dot.Spell.SpellPower()
dot.SnapshotBaseDamage = dotDamage + dotCoeff*dot.Spell.SpellDamage()
dot.SnapshotAttackerMultiplier = dot.Spell.AttackerDamageMultiplier(dot.Spell.Unit.AttackTables[target.UnitIndex])
},
OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) {
Expand All @@ -54,7 +54,7 @@ func (priest *Priest) getHolyFireConfig(rank int) core.SpellConfig {
},

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := sim.Roll(baseDamage[0], baseDamage[1]) + directCoeff*spell.SpellPower()
baseDamage := sim.Roll(baseDamage[0], baseDamage[1]) + directCoeff*spell.SpellDamage()
result := spell.CalcDamage(sim, target, baseDamage, spell.OutcomeMagicHitAndCrit)
if result.Landed() {
spell.Dot(target).Apply(sim)
Expand Down
4 changes: 2 additions & 2 deletions sim/priest/mind_blast.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ func (priest *Priest) getMindBlastBaseConfig(rank int, cdTimer *core.Timer) core
CritMultiplier: priest.DefaultSpellCritMultiplier(),
ThreatMultiplier: 1 - 0.08*float64(priest.Talents.ShadowAffinity),
ExpectedInitialDamage: func(sim *core.Simulation, target *core.Unit, spell *core.Spell, _ bool) *core.SpellResult {
baseDamageCacl := (baseDamage[0]+baseDamage[1])/2 + spellCoeff*spell.SpellPower()
baseDamageCacl := (baseDamage[0]+baseDamage[1])/2 + spellCoeff*spell.SpellDamage()
return spell.CalcDamage(sim, target, baseDamageCacl, spell.OutcomeExpectedMagicHitAndCrit)
},
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := sim.Roll(baseDamage[0], baseDamage[1]) + spellCoeff*spell.SpellPower()
baseDamage := sim.Roll(baseDamage[0], baseDamage[1]) + spellCoeff*spell.SpellDamage()
baseDamage *= priest.MindBlastModifier

result := spell.CalcDamage(sim, target, baseDamage, spell.OutcomeMagicHitAndCrit)
Expand Down
4 changes: 2 additions & 2 deletions sim/priest/mind_flay.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (priest *Priest) getMindFlayTickSpell(rank int, numTicks int32, baseDamage
CritMultiplier: 1.0,
ThreatMultiplier: 1 - 0.08*float64(priest.Talents.ShadowAffinity),
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
damage := baseDamage/3 + (spellCoeff * spell.SpellPower())
damage := baseDamage/3 + (spellCoeff * spell.SpellDamage())
damage *= priest.MindFlayModifier
result := spell.CalcAndDealDamage(sim, target, damage, spell.OutcomeExpectedMagicAlwaysHit)

Expand Down Expand Up @@ -84,7 +84,7 @@ func (priest *Priest) getMindFlaySpellConfig(rank int) core.SpellConfig {
spell.DealOutcome(sim, result)
},
ExpectedTickDamage: func(sim *core.Simulation, target *core.Unit, spell *core.Spell, _ bool) *core.SpellResult {
baseDamage := (baseDamage + (spellCoeff * spell.SpellPower())) / 3
baseDamage := (baseDamage + (spellCoeff * spell.SpellDamage())) / 3

return spell.CalcPeriodicDamage(sim, target, baseDamage, spell.OutcomeExpectedMagicAlwaysHit)
},
Expand Down
Loading

0 comments on commit 04a6fd2

Please sign in to comment.