Skip to content

Commit b00c0f4

Browse files
committed
Merge branch 'master' into feature/warlock
2 parents 05421a7 + 157e526 commit b00c0f4

34 files changed

Lines changed: 53 additions & 76 deletions

sim/core/consumes.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ func registerExplosivesCD(agent Agent, consumes *proto.ConsumesSpec) {
329329
ActionID: BigDaddyActionID,
330330
SpellSchool: SpellSchoolFire,
331331
ProcMask: ProcMaskEmpty,
332+
Flags: SpellFlagAoE,
332333

333334
Cast: CastConfig{
334335
CD: Cooldown{
@@ -353,9 +354,8 @@ func registerExplosivesCD(agent Agent, consumes *proto.ConsumesSpec) {
353354
ThreatMultiplier: 1,
354355

355356
ApplyEffects: func(sim *Simulation, target *Unit, spell *Spell) {
356-
baseDamage := 5006 * sim.Encounter.AOECapMultiplier()
357357
for _, aoeTarget := range sim.Encounter.TargetUnits {
358-
spell.CalcAndDealDamage(sim, aoeTarget, baseDamage, spell.OutcomeMagicHitAndCrit)
358+
spell.CalcAndDealDamage(sim, aoeTarget, 5006, spell.OutcomeMagicHitAndCrit)
359359
}
360360
},
361361
})

sim/core/flags.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ const (
206206
SpellFlagPassiveSpell // Indicates this spell is applied/cast as a result of another spell
207207
SpellFlagSupressDoTApply // If present this spell will not apply dots (Used for DTR dot supression)
208208
SpellFlagSwapped // Indicates that this spell is not useable because it is from a currently swapped item
209+
SpellFlagAoE // Indicates that this spell is an AoE spell. Spells flagged with this will use the AoE Cap multiplier when calculating damage.
209210
SpellFlagRanged
210211

211212
// Used to let agents categorize their spells.

sim/core/spell_result.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ func (spell *Spell) ApplyPostOutcomeDamageModifiers(sim *Simulation, result *Spe
164164
for i := range result.Target.DynamicDamageTakenModifiers {
165165
result.Target.DynamicDamageTakenModifiers[i](sim, spell, result)
166166
}
167+
if spell.Flags.Matches(SpellFlagAoE) {
168+
result.Damage *= sim.Encounter.AOECapMultiplier()
169+
}
167170
result.Damage = max(0, result.Damage)
168171
}
169172

sim/death_knight/_blood_boil.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ func (dk *DeathKnight) registerBloodBoilSpell() {
1111
results := make([]*core.SpellResult, dk.Env.GetNumTargets())
1212
dk.RegisterSpell(core.SpellConfig{
1313
ActionID: BloodBoilActionID,
14-
Flags: core.SpellFlagAPL,
14+
Flags: core.SpellFlagAoE | core.SpellFlagAPL,
1515
SpellSchool: core.SpellSchoolShadow,
1616
ProcMask: core.ProcMaskSpellDamage,
1717
ClassSpellMask: DeathKnightSpellBloodBoil,
@@ -34,7 +34,6 @@ func (dk *DeathKnight) registerBloodBoilSpell() {
3434
for idx, aoeTarget := range sim.Encounter.TargetUnits {
3535
baseDamage := dk.ClassSpellScaling*0.31700000167 + 0.08*spell.MeleeAttackPower()
3636
baseDamage *= core.TernaryFloat64(dk.DiseasesAreActive(aoeTarget), 1.5, 1.0)
37-
baseDamage *= sim.Encounter.AOECapMultiplier()
3837

3938
results[idx] = spell.CalcDamage(sim, aoeTarget, baseDamage, spell.OutcomeMagicHitAndCrit)
4039
anyHit = anyHit || results[idx].Landed()
@@ -56,13 +55,13 @@ func (dk *DeathKnight) registerDrwBloodBoilSpell() *core.Spell {
5655
return dk.RuneWeapon.RegisterSpell(core.SpellConfig{
5756
ActionID: BloodBoilActionID,
5857
SpellSchool: core.SpellSchoolShadow,
58+
Flags: core.SpellFlagAoE,
5959
ProcMask: core.ProcMaskSpellDamage,
6060

6161
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
6262
for idx, aoeTarget := range sim.Encounter.TargetUnits {
6363
baseDamage := dk.ClassSpellScaling*0.31700000167 + 0.08*spell.MeleeAttackPower()
6464
baseDamage *= core.TernaryFloat64(dk.RuneWeapon.DiseasesAreActive(aoeTarget), 1.5, 1.0)
65-
baseDamage *= sim.Encounter.AOECapMultiplier()
6665

6766
results[idx] = spell.CalcDamage(sim, aoeTarget, baseDamage, spell.OutcomeMagicHitAndCrit)
6867
}

sim/death_knight/_howling_blast.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func (dk *DeathKnight) registerHowlingBlastSpell() {
1515

1616
dk.RegisterSpell(core.SpellConfig{
1717
ActionID: HowlingBlastActionID,
18-
Flags: core.SpellFlagAPL,
18+
Flags: core.SpellFlagAoE | core.SpellFlagAPL,
1919
SpellSchool: core.SpellSchoolFrost,
2020
ProcMask: core.ProcMaskSpellDamage,
2121
ClassSpellMask: DeathKnightSpellHowlingBlast,

sim/death_knight/death_and_decay.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
func (dk *DeathKnight) registerDeathAndDecaySpell() {
1010
dk.RegisterSpell(core.SpellConfig{
1111
ActionID: core.ActionID{SpellID: 43265},
12-
Flags: core.SpellFlagAPL,
12+
Flags: core.SpellFlagAoE | core.SpellFlagAPL,
1313
SpellSchool: core.SpellSchoolShadow,
1414
ProcMask: core.ProcMaskEmpty, // D&D doesn't seem to proc things in game.
1515
ClassSpellMask: DeathKnightSpellDeathAndDecay,

sim/druid/_thrash.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func (druid *Druid) registerThrashBearSpell() {
2222
ActionID: core.ActionID{SpellID: 77758},
2323
SpellSchool: core.SpellSchoolPhysical,
2424
ProcMask: core.ProcMaskMeleeMHSpecial,
25-
Flags: core.SpellFlagMeleeMetrics | core.SpellFlagIgnoreResists | core.SpellFlagAPL,
25+
Flags: core.SpellFlagAoE | core.SpellFlagMeleeMetrics | core.SpellFlagIgnoreResists | core.SpellFlagAPL,
2626

2727
RageCost: core.RageCostOptions{
2828
Cost: 25,
@@ -63,7 +63,7 @@ func (druid *Druid) registerThrashBearSpell() {
6363
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
6464
baseDamage := flatBaseDamage + 0.0982*spell.MeleeAttackPower()
6565
for _, aoeTarget := range sim.Encounter.TargetUnits {
66-
perTargetDamage := (baseDamage + (sim.RandomFloat("Thrash") * damageSpread)) * sim.Encounter.AOECapMultiplier()
66+
perTargetDamage := (baseDamage + (sim.RandomFloat("Thrash") * damageSpread))
6767
if druid.BleedCategories.Get(aoeTarget).AnyActive() {
6868
perTargetDamage *= 1.3
6969
}

sim/druid/_typhoon.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func (druid *Druid) registerTyphoonSpell() {
2020
SpellSchool: core.SpellSchoolNature,
2121
ProcMask: core.ProcMaskSpellDamage,
2222
ClassSpellMask: DruidSpellTyphoon,
23-
Flags: core.SpellFlagAPL | SpellFlagOmenTrigger,
23+
Flags: core.SpellFlagAoE | core.SpellFlagAPL | SpellFlagOmenTrigger,
2424

2525
ManaCost: core.ManaCostOptions{
2626
BaseCostPercent: 16,
@@ -44,7 +44,6 @@ func (druid *Druid) registerTyphoonSpell() {
4444
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
4545
spell.WaitTravelTime(sim, func(sim *core.Simulation) {
4646
baseDamage := core.CalcScalingSpellAverageEffect(proto.Class_ClassDruid, 1.316)
47-
baseDamage *= sim.Encounter.AOECapMultiplier()
4847
for _, aoeTarget := range sim.Encounter.TargetUnits {
4948
spell.CalcAndDealDamage(sim, aoeTarget, baseDamage, spell.OutcomeMagicHitAndCrit)
5049
}

sim/druid/hurricane.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ func (druid *Druid) registerHurricaneSpell() {
1111
ActionID: core.ActionID{SpellID: 42231},
1212
SpellSchool: core.SpellSchoolNature,
1313
ProcMask: core.ProcMaskSpellProc,
14-
Flags: SpellFlagOmenTrigger,
14+
Flags: core.SpellFlagAoE | SpellFlagOmenTrigger,
1515
ClassSpellMask: DruidSpellHurricane,
1616

1717
CritMultiplier: druid.DefaultCritMultiplier(),
@@ -21,7 +21,6 @@ func (druid *Druid) registerHurricaneSpell() {
2121

2222
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
2323
damage := 0.327 * druid.ClassSpellScaling
24-
damage *= sim.Encounter.AOECapMultiplier()
2524

2625
for _, aoeTarget := range sim.Encounter.TargetUnits {
2726
spell.CalcAndDealDamage(sim, aoeTarget, damage, spell.OutcomeMagicHitAndCrit)

sim/druid/swipe.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func (druid *Druid) registerSwipeBearSpell() {
1313
ActionID: core.ActionID{SpellID: 779},
1414
SpellSchool: core.SpellSchoolPhysical,
1515
ProcMask: core.ProcMaskMeleeMHSpecial,
16-
Flags: core.SpellFlagMeleeMetrics | core.SpellFlagAPL,
16+
Flags: core.SpellFlagAoE | core.SpellFlagMeleeMetrics | core.SpellFlagAPL,
1717

1818
RageCost: core.RageCostOptions{
1919
Cost: 15,
@@ -36,7 +36,6 @@ func (druid *Druid) registerSwipeBearSpell() {
3636

3737
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
3838
baseDamage := flatBaseDamage + 0.123*spell.MeleeAttackPower()
39-
baseDamage *= sim.Encounter.AOECapMultiplier()
4039
for _, aoeTarget := range sim.Encounter.TargetUnits {
4140
spell.CalcAndDealDamage(sim, aoeTarget, baseDamage, spell.OutcomeMeleeSpecialHitAndCrit)
4241
}
@@ -51,7 +50,7 @@ func (druid *Druid) registerSwipeCatSpell() {
5150
ActionID: core.ActionID{SpellID: 62078},
5251
SpellSchool: core.SpellSchoolPhysical,
5352
ProcMask: core.ProcMaskMeleeMHSpecial,
54-
Flags: core.SpellFlagMeleeMetrics | core.SpellFlagAPL,
53+
Flags: core.SpellFlagAoE | core.SpellFlagMeleeMetrics | core.SpellFlagAPL,
5554

5655
EnergyCost: core.EnergyCostOptions{
5756
Cost: 45,
@@ -70,15 +69,13 @@ func (druid *Druid) registerSwipeCatSpell() {
7069

7170
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
7271
baseDamage := spell.Unit.MHWeaponDamage(sim, spell.MeleeAttackPower())
73-
baseDamage *= sim.Encounter.AOECapMultiplier()
7472
for _, aoeTarget := range sim.Encounter.TargetUnits {
7573
spell.CalcAndDealDamage(sim, aoeTarget, baseDamage, spell.OutcomeMeleeWeaponSpecialHitAndCrit)
7674
}
7775
},
7876

7977
ExpectedInitialDamage: func(sim *core.Simulation, target *core.Unit, spell *core.Spell, _ bool) *core.SpellResult {
8078
baseDamage := spell.Unit.AutoAttacks.MH().CalculateAverageWeaponDamage(spell.MeleeAttackPower())
81-
baseDamage *= sim.Encounter.AOECapMultiplier()
8279
return spell.CalcDamage(sim, target, baseDamage, spell.OutcomeExpectedMeleeWeaponSpecialHitAndCrit)
8380
},
8481
})

0 commit comments

Comments
 (0)