Skip to content

Commit

Permalink
Merge pull request #3449 from wowsims/apl
Browse files Browse the repository at this point in the history
Fix shouts, stances, and hs/cleave for warrior APL, and add preset fo…
  • Loading branch information
jimmyt857 authored Aug 13, 2023
2 parents 834804a + b5535fb commit f8e9945
Show file tree
Hide file tree
Showing 25 changed files with 1,691 additions and 1,783 deletions.
104 changes: 94 additions & 10 deletions sim/core/buffs.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,11 @@ func applyBuffEffects(agent Agent, raidBuffs *proto.RaidBuffs, partyBuffs *proto
})
}

if raidBuffs.BloodPact > 0 || raidBuffs.CommandingShout > 0 {
health := GetTristateValueFloat(raidBuffs.BloodPact, 1330, 1330*1.3)
health2 := GetTristateValueFloat(raidBuffs.CommandingShout, 2255, 2255*1.25)
character.AddStat(stats.Health, MaxFloat(health, health2))
if raidBuffs.CommandingShout > 0 {
MakePermanent(CommandingShoutAura(&character.Unit, GetTristateValueInt32(raidBuffs.CommandingShout, 0, 5), 0, false))
}
if raidBuffs.BloodPact > 0 {
MakePermanent(BloodPactAura(&character.Unit, GetTristateValueInt32(raidBuffs.BloodPact, 0, 3)))
}

if raidBuffs.PowerWordFortitude != proto.TristateEffect_TristateEffectMissing {
Expand Down Expand Up @@ -199,12 +200,11 @@ func applyBuffEffects(agent Agent, raidBuffs *proto.RaidBuffs, partyBuffs *proto
RetributionAura(character, raidBuffs.SanctifiedRetribution)
}

if raidBuffs.BattleShout > 0 || individualBuffs.BlessingOfMight > 0 {
bonusAP := 550 * GetTristateValueFloat(MaxTristate(raidBuffs.BattleShout, individualBuffs.BlessingOfMight), 1, 1.25)
character.AddStats(stats.Stats{
stats.AttackPower: math.Floor(bonusAP),
stats.RangedAttackPower: math.Floor(bonusAP),
})
if raidBuffs.BattleShout > 0 {
MakePermanent(BattleShoutAura(&character.Unit, GetTristateValueInt32(raidBuffs.BattleShout, 0, 5), 0, false))
}
if individualBuffs.BlessingOfMight > 0 {
MakePermanent(BlessingOfMightAura(&character.Unit, GetTristateValueInt32(individualBuffs.BlessingOfMight, 0, 2)))
}

if raidBuffs.FlametongueTotem {
Expand Down Expand Up @@ -1255,6 +1255,90 @@ func spellPowerBonusEffect(aura *Aura, spellPowerBonus float64) *ExclusiveEffect
})
}

func BattleShoutAura(unit *Unit, commandingPresencePts int32, boomingVoicePts int32, minorGlyph bool) *Aura {
aura := unit.GetOrRegisterAura(Aura{
Label: "Battle Shout",
ActionID: ActionID{SpellID: 47436},
Duration: time.Duration(float64(time.Minute*2)*(1+0.25*float64(boomingVoicePts))) + TernaryDuration(minorGlyph, 2*time.Minute, 0),
BuildPhase: CharacterBuildPhaseBuffs,
})
attackPowerBonusEffect(aura, math.Floor(550*(1+0.05*float64(commandingPresencePts))))
return aura
}

func BlessingOfMightAura(unit *Unit, impBomPts int32) *Aura {
aura := unit.GetOrRegisterAura(Aura{
Label: "Blessing of Might",
ActionID: ActionID{SpellID: 48932},
Duration: NeverExpires,
BuildPhase: CharacterBuildPhaseBuffs,
OnReset: func(aura *Aura, sim *Simulation) {
aura.Activate(sim)
},
})
attackPowerBonusEffect(aura, math.Floor(550*(1+GetTristateValueFloat(proto.TristateEffect(impBomPts), 0.12, 0.25))))
return aura
}

func attackPowerBonusEffect(aura *Aura, apBonus float64) *ExclusiveEffect {
return aura.NewExclusiveEffect("AttackPowerBonus", false, ExclusiveEffect{
Priority: apBonus,
OnGain: func(ee *ExclusiveEffect, sim *Simulation) {
ee.Aura.Unit.AddStatsDynamic(sim, stats.Stats{
stats.AttackPower: ee.Priority,
stats.RangedAttackPower: ee.Priority,
})
},
OnExpire: func(ee *ExclusiveEffect, sim *Simulation) {
ee.Aura.Unit.AddStatsDynamic(sim, stats.Stats{
stats.AttackPower: -ee.Priority,
stats.RangedAttackPower: -ee.Priority,
})
},
})
}

func CommandingShoutAura(unit *Unit, commandingPresencePts int32, boomingVoicePts int32, minorGlyph bool) *Aura {
aura := unit.GetOrRegisterAura(Aura{
Label: "Commanding Shout",
ActionID: ActionID{SpellID: 47440},
Duration: time.Duration(float64(time.Minute*2)*(1+0.25*float64(boomingVoicePts))) + TernaryDuration(minorGlyph, 2*time.Minute, 0),
BuildPhase: CharacterBuildPhaseBuffs,
})
healthBonusEffect(aura, 2255*(1+0.05*float64(commandingPresencePts)))
return aura
}

func BloodPactAura(unit *Unit, impImpPts int32) *Aura {
aura := unit.GetOrRegisterAura(Aura{
Label: "Blood Pact",
ActionID: ActionID{SpellID: 47982},
Duration: NeverExpires,
BuildPhase: CharacterBuildPhaseBuffs,
OnReset: func(aura *Aura, sim *Simulation) {
aura.Activate(sim)
},
})
healthBonusEffect(aura, 1330*(1+0.1*float64(impImpPts)))
return aura
}

func healthBonusEffect(aura *Aura, healthBonus float64) *ExclusiveEffect {
return aura.NewExclusiveEffect("HealthBonus", false, ExclusiveEffect{
Priority: healthBonus,
OnGain: func(ee *ExclusiveEffect, sim *Simulation) {
ee.Aura.Unit.AddStatsDynamic(sim, stats.Stats{
stats.Health: ee.Priority,
})
},
OnExpire: func(ee *ExclusiveEffect, sim *Simulation) {
ee.Aura.Unit.AddStatsDynamic(sim, stats.Stats{
stats.Health: -ee.Priority,
})
},
})
}

func FocusMagicAura(caster *Unit, target *Unit) (*Aura, *Aura) {
actionID := ActionID{SpellID: 54648}

Expand Down
91 changes: 0 additions & 91 deletions sim/deathknight/dps/TestBlood.results
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,6 @@ dps_results: {
tps: 3056.65868
}
}
dps_results: {
key: "TestBlood-AllItems-DeadlyGladiator'sSigilofStrife-42620"
value: {
dps: 7310.694
tps: 3614.97286
}
}
dps_results: {
key: "TestBlood-AllItems-Death'sChoice-47464"
value: {
Expand Down Expand Up @@ -368,13 +361,6 @@ dps_results: {
tps: 3595.99061
}
}
dps_results: {
key: "TestBlood-AllItems-FuriousGladiator'sSigilofStrife-42621"
value: {
dps: 7312.07604
tps: 3615.45198
}
}
dps_results: {
key: "TestBlood-AllItems-FuryoftheFiveFlights-40431"
value: {
Expand Down Expand Up @@ -410,13 +396,6 @@ dps_results: {
tps: 3551.08226
}
}
dps_results: {
key: "TestBlood-AllItems-HatefulGladiator'sSigilofStrife-42619"
value: {
dps: 7305.81839
tps: 3613.64772
}
}
dps_results: {
key: "TestBlood-AllItems-IllustrationoftheDragonSoul-40432"
value: {
Expand Down Expand Up @@ -572,13 +551,6 @@ dps_results: {
tps: 3671.42095
}
}
dps_results: {
key: "TestBlood-AllItems-RelentlessGladiator'sSigilofStrife-42622"
value: {
dps: 7313.68843
tps: 3616.01095
}
}
dps_results: {
key: "TestBlood-AllItems-RevitalizingSkyflareDiamond"
value: {
Expand All @@ -593,13 +565,6 @@ dps_results: {
tps: 3475.9395
}
}
dps_results: {
key: "TestBlood-AllItems-SavageGladiator'sSigilofStrife-42618"
value: {
dps: 7305.58806
tps: 3613.52654
}
}
dps_results: {
key: "TestBlood-AllItems-ScourgeborneBattlegear"
value: {
Expand Down Expand Up @@ -649,55 +614,6 @@ dps_results: {
tps: 3475.9395
}
}
dps_results: {
key: "TestBlood-AllItems-SigilofDeflection-45144"
value: {
dps: 7303.78378
tps: 3612.57727
}
}
dps_results: {
key: "TestBlood-AllItems-SigilofHauntedDreams-40715"
value: {
dps: 7331.86443
tps: 3628.1546
}
}
dps_results: {
key: "TestBlood-AllItems-SigilofInsolence-47672"
value: {
dps: 7303.78378
tps: 3612.57727
}
}
dps_results: {
key: "TestBlood-AllItems-SigilofVirulence-47673"
value: {
dps: 7637.06987
tps: 3780.59019
}
}
dps_results: {
key: "TestBlood-AllItems-SigiloftheBoneGryphon-50462"
value: {
dps: 7303.78378
tps: 3612.57727
}
}
dps_results: {
key: "TestBlood-AllItems-SigiloftheHangedMan-50459"
value: {
dps: 7641.29245
tps: 3785.73995
}
}
dps_results: {
key: "TestBlood-AllItems-SigiloftheUnfalteringKnight-40714"
value: {
dps: 7303.78378
tps: 3612.57727
}
}
dps_results: {
key: "TestBlood-AllItems-Sindragosa'sFlawlessFang-50361"
value: {
Expand Down Expand Up @@ -894,13 +810,6 @@ dps_results: {
tps: 3475.9395
}
}
dps_results: {
key: "TestBlood-AllItems-WrathfulGladiator'sSigilofStrife-51417"
value: {
dps: 7315.53115
tps: 3616.64977
}
}
dps_results: {
key: "TestBlood-Average-Default"
value: {
Expand Down
Loading

0 comments on commit f8e9945

Please sign in to comment.