Skip to content

Commit

Permalink
Merge pull request #1940 from wowsims/fixes
Browse files Browse the repository at this point in the history
Fix bug with ff and cow clobbering each other
  • Loading branch information
jimmyt857 authored Nov 26, 2022
2 parents 3608eeb + 212df3e commit fb10306
Show file tree
Hide file tree
Showing 17 changed files with 553 additions and 546 deletions.
35 changes: 21 additions & 14 deletions sim/core/debuffs.go
Original file line number Diff line number Diff line change
Expand Up @@ -569,13 +569,10 @@ func FaerieFireAura(target *Unit, imp bool) *Aura {
},
OnExpire: func(aura *Aura, sim *Simulation) {
aura.Unit.PseudoStats.BonusSpellHitRatingTaken -= 3 * SpellHitRatingPerHitChance
if mainAura.IsActive() {
mainAura.Deactivate(sim)
}
},
})

}

mainAura = target.GetOrRegisterAura(Aura{
Label: label,
Tag: MinorArmorReductionAuraTag,
Expand All @@ -584,15 +581,12 @@ func FaerieFireAura(target *Unit, imp bool) *Aura {
Duration: time.Minute * 5,
OnGain: func(aura *Aura, sim *Simulation) {
aura.Unit.PseudoStats.ArmorMultiplier *= 1.0 - armorReduction
if imp {
if secondaryAura != nil {
secondaryAura.Activate(sim)
}
},
OnExpire: func(aura *Aura, sim *Simulation) {
aura.Unit.PseudoStats.ArmorMultiplier /= 1.0 - armorReduction
if imp && secondaryAura.IsActive() {
secondaryAura.Deactivate(sim)
}
},
})
return mainAura
Expand Down Expand Up @@ -669,23 +663,36 @@ func ExposeArmorAura(target *Unit, hasGlyph bool) *Aura {
}

func CurseOfWeaknessAura(target *Unit, points int32) *Aura {
APReduction := 478 * (1 + 0.1*float64(points))
bonus := stats.Stats{stats.AttackPower: -APReduction}
apReduction := 478 * (1 + 0.1*float64(points))
bonus := stats.Stats{stats.AttackPower: -apReduction}
armorReduction := 0.05

return target.GetOrRegisterAura(Aura{
Label: "Curse of Weakness",
secondaryAura := target.GetOrRegisterAura(Aura{
Label: "Curse of Weakness Secondary",
Tag: MinorArmorReductionAuraTag,
Duration: time.Minute * 2,
Priority: armorReduction,
// no ActionID to hide this secondary effect from stats
OnGain: func(aura *Aura, sim *Simulation) {
aura.Unit.PseudoStats.ArmorMultiplier *= 1.0 - armorReduction
},
OnExpire: func(aura *Aura, sim *Simulation) {
aura.Unit.PseudoStats.ArmorMultiplier /= 1.0 - armorReduction
},
})

return target.GetOrRegisterAura(Aura{
Label: "Curse of Weakness" + strconv.Itoa(int(points)),
Tag: APReductionAuraTag,
Priority: apReduction,
ActionID: ActionID{SpellID: 50511},
Duration: time.Minute * 2,
OnGain: func(aura *Aura, sim *Simulation) {
aura.Unit.AddStatsDynamic(sim, bonus)
aura.Unit.PseudoStats.ArmorMultiplier *= 1.0 - armorReduction
secondaryAura.Activate(sim)
},
OnExpire: func(aura *Aura, sim *Simulation) {
aura.Unit.AddStatsDynamic(sim, bonus.Multiply(-1))
aura.Unit.PseudoStats.ArmorMultiplier /= 1.0 - armorReduction
},
})
}
Expand Down
44 changes: 22 additions & 22 deletions sim/deathknight/dps/TestFrost.results
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ dps_results: {
dps_results: {
key: "TestFrost-AllItems-Bandit'sInsignia-40371"
value: {
dps: 7693.22518
tps: 4553.0875
dps: 7693.25744
tps: 4553.10685
}
}
dps_results: {
Expand All @@ -73,22 +73,22 @@ dps_results: {
dps_results: {
key: "TestFrost-AllItems-BlessedBattlegearofUndeadSlaying"
value: {
dps: 6479.20171
tps: 3828.83106
dps: 6479.2423
tps: 3828.85541
}
}
dps_results: {
key: "TestFrost-AllItems-BlessedGarboftheUndeadSlayer"
value: {
dps: 6372.33043
tps: 3767.70098
dps: 6372.36982
tps: 3767.72462
}
}
dps_results: {
key: "TestFrost-AllItems-BlessedRegaliaofUndeadCleansing"
value: {
dps: 6083.46024
tps: 3593.78618
dps: 6083.47932
tps: 3593.79763
}
}
dps_results: {
Expand Down Expand Up @@ -143,8 +143,8 @@ dps_results: {
dps_results: {
key: "TestFrost-AllItems-DarkrunedPlate"
value: {
dps: 6442.79042
tps: 3803.79028
dps: 6442.82689
tps: 3803.81216
}
}
dps_results: {
Expand Down Expand Up @@ -213,8 +213,8 @@ dps_results: {
dps_results: {
key: "TestFrost-AllItems-ExtractofNecromanticPower-40373"
value: {
dps: 7664.45475
tps: 4535.64719
dps: 7664.48655
tps: 4535.66627
}
}
dps_results: {
Expand Down Expand Up @@ -451,8 +451,8 @@ dps_results: {
dps_results: {
key: "TestFrost-AllItems-Scourgelord'sPlate"
value: {
dps: 6801.28343
tps: 4015.05563
dps: 6801.31665
tps: 4015.07557
}
}
dps_results: {
Expand Down Expand Up @@ -549,8 +549,8 @@ dps_results: {
dps_results: {
key: "TestFrost-AllItems-Thassarian'sPlate"
value: {
dps: 6493.21993
tps: 3833.9854
dps: 6493.26289
tps: 3834.01118
}
}
dps_results: {
Expand Down Expand Up @@ -612,8 +612,8 @@ dps_results: {
dps_results: {
key: "TestFrost-AllItems-UndeadSlayer'sBlessedArmor"
value: {
dps: 6343.4093
tps: 3750.22163
dps: 6343.43841
tps: 3750.2391
}
}
dps_results: {
Expand All @@ -633,8 +633,8 @@ dps_results: {
dps_results: {
key: "TestFrost-Average-Default"
value: {
dps: 7928.30373
tps: 4686.86215
dps: 7928.72144
tps: 4687.11278
}
}
dps_results: {
Expand Down Expand Up @@ -689,8 +689,8 @@ dps_results: {
dps_results: {
key: "TestFrost-Settings-Orc-Frost P1-Basic-FullBuffs-LongSingleTarget"
value: {
dps: 5854.77216
tps: 3441.72566
dps: 5854.79944
tps: 3441.74203
}
}
dps_results: {
Expand Down
24 changes: 12 additions & 12 deletions sim/deathknight/dps/TestUnholy.results
Original file line number Diff line number Diff line change
Expand Up @@ -413,16 +413,16 @@ dps_results: {
dps_results: {
key: "TestUnholy-AllItems-ReignoftheDead-47316"
value: {
dps: 7618.4798
tps: 4812.25314
dps: 7618.48484
tps: 4812.25818
hps: 271.6243
}
}
dps_results: {
key: "TestUnholy-AllItems-ReignoftheDead-47477"
value: {
dps: 7627.82044
tps: 4820.40637
dps: 7627.82548
tps: 4820.41141
hps: 271.6243
}
}
Expand Down Expand Up @@ -469,8 +469,8 @@ dps_results: {
dps_results: {
key: "TestUnholy-AllItems-ScourgeborneBattlegear"
value: {
dps: 7333.18228
tps: 4629.19123
dps: 7333.18494
tps: 4629.19388
hps: 264.53762
}
}
Expand Down Expand Up @@ -549,8 +549,8 @@ dps_results: {
dps_results: {
key: "TestUnholy-AllItems-SparkofLife-37657"
value: {
dps: 7651.5033
tps: 4804.98183
dps: 7651.50607
tps: 4804.9846
hps: 273.52599
}
}
Expand Down Expand Up @@ -701,8 +701,8 @@ dps_results: {
dps_results: {
key: "TestUnholy-Average-Default"
value: {
dps: 8156.17497
tps: 5096.02619
dps: 8156.44922
tps: 5096.20758
hps: 272.96251
}
}
Expand All @@ -717,8 +717,8 @@ dps_results: {
dps_results: {
key: "TestUnholy-Settings-Human-Unholy P1 -Basic-FullBuffs-LongSingleTarget"
value: {
dps: 7570.171
tps: 4848.73011
dps: 7570.17605
tps: 4848.73515
hps: 205.8913
}
}
Expand Down
4 changes: 2 additions & 2 deletions sim/deathknight/tank/TestBloodTank.results
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,8 @@ dps_results: {
dps_results: {
key: "TestBloodTank-Average-Default"
value: {
dps: 1822.94347
tps: 6341.91876
dps: 1823.03019
tps: 6342.16547
dtps: 252.2295
}
}
Expand Down
38 changes: 19 additions & 19 deletions sim/druid/balance/TestBalance.results
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ dps_results: {
key: "TestBalance-AllItems-BlessedRegaliaofUndeadCleansing"
value: {
dps: 5631.46644
tps: 5470.82133
tps: 5470.79933
}
}
dps_results: {
Expand Down Expand Up @@ -157,8 +157,8 @@ dps_results: {
dps_results: {
key: "TestBalance-AllItems-DreamwalkerBattlegear"
value: {
dps: 4139.45764
tps: 3972.99655
dps: 4139.45742
tps: 3972.78084
}
}
dps_results: {
Expand Down Expand Up @@ -255,8 +255,8 @@ dps_results: {
dps_results: {
key: "TestBalance-AllItems-Gladiator'sSanctuary"
value: {
dps: 4366.58527
tps: 4204.75537
dps: 4366.56737
tps: 4204.54982
}
}
dps_results: {
Expand Down Expand Up @@ -346,8 +346,8 @@ dps_results: {
dps_results: {
key: "TestBalance-AllItems-LasherweaveBattlegear"
value: {
dps: 4177.6554
tps: 4011.50755
dps: 4177.60171
tps: 4011.3542
}
}
dps_results: {
Expand All @@ -374,8 +374,8 @@ dps_results: {
dps_results: {
key: "TestBalance-AllItems-Malfurion'sBattlegear"
value: {
dps: 4533.56148
tps: 4372.41588
dps: 4533.53933
tps: 4372.17242
}
}
dps_results: {
Expand All @@ -396,7 +396,7 @@ dps_results: {
key: "TestBalance-AllItems-NightsongBattlegear"
value: {
dps: 4304.45146
tps: 4140.21605
tps: 4140.10605
}
}
dps_results: {
Expand Down Expand Up @@ -486,8 +486,8 @@ dps_results: {
dps_results: {
key: "TestBalance-AllItems-Runetotem'sBattlegear"
value: {
dps: 4533.56148
tps: 4372.41588
dps: 4533.53933
tps: 4372.17242
}
}
dps_results: {
Expand Down Expand Up @@ -542,8 +542,8 @@ dps_results: {
dps_results: {
key: "TestBalance-AllItems-StormshroudArmor"
value: {
dps: 4784.91802
tps: 4617.94478
dps: 4784.86133
tps: 4617.70044
}
}
dps_results: {
Expand Down Expand Up @@ -571,14 +571,14 @@ dps_results: {
key: "TestBalance-AllItems-ThunderheartHarness"
value: {
dps: 3249.44
tps: 3085.48725
tps: 3085.35977
}
}
dps_results: {
key: "TestBalance-AllItems-ThunderheartRegalia"
value: {
dps: 5019.94218
tps: 4863.88809
tps: 4863.84409
}
}
dps_results: {
Expand Down Expand Up @@ -634,7 +634,7 @@ dps_results: {
key: "TestBalance-AllItems-UndeadSlayer'sBlessedArmor"
value: {
dps: 4831.7008
tps: 4665.20016
tps: 4665.04486
}
}
dps_results: {
Expand All @@ -647,8 +647,8 @@ dps_results: {
dps_results: {
key: "TestBalance-Average-Default"
value: {
dps: 7521.76793
tps: 7362.81356
dps: 7528.35553
tps: 7369.3019
}
}
dps_results: {
Expand Down
Loading

0 comments on commit fb10306

Please sign in to comment.