Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First pass at warrior #39

Merged
merged 12 commits into from
Dec 23, 2024
8 changes: 4 additions & 4 deletions sim/warlock/dps/TestWarlockDSRuin.results
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ dps_results: {
dps_results: {
key: "TestWarlockDSRuin-Phase1-AllItems-DeathmistRaiment"
value: {
dps: 861.87319
tps: 922.49357
dps: 793.71062
tps: 846.83968
}
}
dps_results: {
Expand Down Expand Up @@ -155,8 +155,8 @@ dps_results: {
dps_results: {
key: "TestWarlockDSRuin-Phase1-AllItems-PlagueheartRaiment"
value: {
dps: 1007.47674
tps: 1069.18079
dps: 941.36791
tps: 996.27398
}
}
dps_results: {
Expand Down
8 changes: 4 additions & 4 deletions sim/warlock/dps/TestWarlockSMRuin.results
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ dps_results: {
dps_results: {
key: "TestWarlockSMRuin-Phase1-AllItems-DeathmistRaiment"
value: {
dps: 1080.97179
tps: 903.66134
dps: 993.7709
tps: 821.18879
}
}
dps_results: {
Expand Down Expand Up @@ -155,8 +155,8 @@ dps_results: {
dps_results: {
key: "TestWarlockSMRuin-Phase1-AllItems-PlagueheartRaiment"
value: {
dps: 1235.01715
tps: 1049.06851
dps: 1138.48078
tps: 955.41236
}
}
dps_results: {
Expand Down
9 changes: 4 additions & 5 deletions sim/warrior/deep_wounds.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (warrior *Warrior) applyDeepWounds() {
},

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
spell.Dot(target).ApplyOrRefresh(sim)
spell.Dot(target).Apply(sim)
spell.CalcAndDealOutcome(sim, target, spell.OutcomeAlwaysHitNoHitCounter)
},
})
Expand All @@ -66,16 +66,15 @@ func (warrior *Warrior) applyDeepWounds() {
}))
}

// Needs confirmation on classic functionality. It is regular dot instead of a stacking one and if so does that mean it is only overwritten by a "higher" crit?
sanguinerarogue marked this conversation as resolved.
Show resolved Hide resolved
func (warrior *Warrior) procDeepWounds(sim *core.Simulation, target *core.Unit, isOh bool) {
dot := warrior.DeepWounds.Dot(target)

outstandingDamage := core.TernaryFloat64(dot.IsActive(), dot.SnapshotBaseDamage*float64(dot.NumberOfTicks-dot.TickCount), 0)

var awd float64
if isOh {
attackTableOh := warrior.AttackTables[target.UnitIndex][proto.CastType_CastTypeOffHand]
adm := warrior.AutoAttacks.OHAuto().AttackerDamageMultiplier(attackTableOh)
awd = warrior.AutoAttacks.OH().CalculateAverageWeaponDamage(dot.Spell.MeleeAttackPower()) * 0.5 * adm
awd = warrior.AutoAttacks.OH().CalculateAverageWeaponDamage(dot.Spell.MeleeAttackPower()) * 0.5 * adm // Does this not include the DWS talent?
sanguinerarogue marked this conversation as resolved.
Show resolved Hide resolved
} else { // MH
attackTableMh := warrior.AttackTables[target.UnitIndex][proto.CastType_CastTypeMainHand]
adm := warrior.AutoAttacks.MHAuto().AttackerDamageMultiplier(attackTableMh)
Expand All @@ -84,7 +83,7 @@ func (warrior *Warrior) procDeepWounds(sim *core.Simulation, target *core.Unit,

newDamage := awd * 0.2 * float64(warrior.Talents.DeepWounds)

dot.SnapshotBaseDamage = (outstandingDamage + newDamage) / float64(dot.NumberOfTicks)
dot.SnapshotBaseDamage = newDamage // / float64(dot.NumberOfTicks)
dot.SnapshotAttackerMultiplier = 1

warrior.DeepWounds.Cast(sim, target)
Expand Down
64 changes: 32 additions & 32 deletions sim/warrior/dps_warrior/TestP1DPSWarrior.results
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ character_stats_results: {
stat_weights_results: {
key: "TestP1DPSWarrior-Phase1-StatWeights-Default"
value: {
weights: 0.44532
weights: 0.13025
weights: 0.39666
weights: 0.07969
weights: 0
weights: 0
weights: 0
Expand All @@ -67,9 +67,9 @@ stat_weights_results: {
weights: 0
weights: 0
weights: 0
weights: 0.39162
weights: 0.26669
weights: 0
weights: 2.74696
weights: 1.70977
weights: 0
weights: 0
weights: 0
Expand Down Expand Up @@ -99,98 +99,98 @@ stat_weights_results: {
dps_results: {
key: "TestP1DPSWarrior-Phase1-Average-Default"
value: {
dps: 251.86628
tps: 220.05239
dps: 235.27671
tps: 228.53922
}
}
dps_results: {
key: "TestP1DPSWarrior-Phase1-Settings-Human-p0.bis-DPS-p1-FullBuffs-P1-Consumes-LongMultiTarget"
value: {
dps: 35.95075
tps: 121.17562
dps: 37.15578
tps: 126.45111
}
}
dps_results: {
key: "TestP1DPSWarrior-Phase1-Settings-Human-p0.bis-DPS-p1-FullBuffs-P1-Consumes-LongSingleTarget"
value: {
dps: 32.91426
tps: 33.524
dps: 34.11929
tps: 38.79949
}
}
dps_results: {
key: "TestP1DPSWarrior-Phase1-Settings-Human-p0.bis-DPS-p1-FullBuffs-P1-Consumes-ShortSingleTarget"
value: {
dps: 88.77662
tps: 81.49139
dps: 84.5334
tps: 85.77948
}
}
dps_results: {
key: "TestP1DPSWarrior-Phase1-Settings-Human-p0.bis-DPS-p1-NoBuffs-P1-Consumes-LongMultiTarget"
value: {
dps: 17.18813
tps: 106.16552
dps: 17.3583
tps: 110.61313
}
}
dps_results: {
key: "TestP1DPSWarrior-Phase1-Settings-Human-p0.bis-DPS-p1-NoBuffs-P1-Consumes-LongSingleTarget"
value: {
dps: 14.89313
tps: 19.1071
dps: 15.0633
tps: 23.5547
}
}
dps_results: {
key: "TestP1DPSWarrior-Phase1-Settings-Human-p0.bis-DPS-p1-NoBuffs-P1-Consumes-ShortSingleTarget"
value: {
dps: 42.96501
tps: 44.8421
dps: 41.23016
tps: 51.13688
}
}
dps_results: {
key: "TestP1DPSWarrior-Phase1-Settings-Orc-p0.bis-DPS-p1-FullBuffs-P1-Consumes-LongMultiTarget"
value: {
dps: 37.75094
tps: 122.61577
dps: 38.91529
tps: 127.85871
}
}
dps_results: {
key: "TestP1DPSWarrior-Phase1-Settings-Orc-p0.bis-DPS-p1-FullBuffs-P1-Consumes-LongSingleTarget"
value: {
dps: 34.71445
tps: 34.96415
dps: 35.87879
tps: 40.20709
}
}
dps_results: {
key: "TestP1DPSWarrior-Phase1-Settings-Orc-p0.bis-DPS-p1-FullBuffs-P1-Consumes-ShortSingleTarget"
value: {
dps: 91.92593
tps: 84.01084
dps: 86.69236
tps: 87.50664
}
}
dps_results: {
key: "TestP1DPSWarrior-Phase1-Settings-Orc-p0.bis-DPS-p1-NoBuffs-P1-Consumes-LongMultiTarget"
value: {
dps: 18.37064
tps: 107.11153
dps: 18.46606
tps: 111.49933
}
}
dps_results: {
key: "TestP1DPSWarrior-Phase1-Settings-Orc-p0.bis-DPS-p1-NoBuffs-P1-Consumes-LongSingleTarget"
value: {
dps: 16.07564
tps: 20.0531
dps: 16.17106
tps: 24.4409
}
}
dps_results: {
key: "TestP1DPSWarrior-Phase1-Settings-Orc-p0.bis-DPS-p1-NoBuffs-P1-Consumes-ShortSingleTarget"
value: {
dps: 46.51015
tps: 47.67821
dps: 44.00168
tps: 53.3541
}
}
dps_results: {
key: "TestP1DPSWarrior-Phase1-SwitchInFrontOfTarget-Default"
value: {
dps: 198.04954
tps: 174.84326
dps: 192.89083
tps: 189.33816
}
}
27 changes: 4 additions & 23 deletions sim/warrior/execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,13 @@ package warrior

import (
"github.com/wowsims/classic/sim/core"
"github.com/wowsims/classic/sim/core/proto"
)

func (warrior *Warrior) registerExecuteSpell() {
hasSuddenDeathRune := warrior.HasRune(proto.WarriorRune_RuneSuddenDeath)

flatDamage := map[int32]float64{
25: 125,
40: 325,
50: 450,
60: 600,
}[warrior.Level]

convertedRageDamage := map[int32]float64{
25: 3,
40: 9,
50: 12,
60: 15,
}[warrior.Level]

spellID := map[int32]int32{
25: 5308,
40: 20660,
50: 20661,
60: 20662,
}[warrior.Level]
flatDamage := 600.0
convertedRageDamage := 15.0
spellID := int32(20662)

var rageMetrics *core.ResourceMetrics
warrior.Execute = warrior.RegisterSpell(BattleStance|BerserkerStance, core.SpellConfig{
Expand All @@ -48,7 +29,7 @@ func (warrior *Warrior) registerExecuteSpell() {
},
},
ExtraCastCondition: func(sim *core.Simulation, target *core.Unit) bool {
return sim.IsExecutePhase20() || (hasSuddenDeathRune && warrior.SuddenDeathAura.IsActive())
return sim.IsExecutePhase20()
},

CritDamageBonus: warrior.impale(),
Expand Down
23 changes: 3 additions & 20 deletions sim/warrior/hamstring.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,9 @@ import (
)

func (warrior *Warrior) registerHamstringSpell() {
damage := map[int32]float64{
25: 5,
40: 18,
50: 18,
60: 45,
}[warrior.Level]

spellID := map[int32]int32{
25: 1715,
40: 7372,
50: 7372,
60: 27584,
}[warrior.Level]

spell_level := map[int32]int32{
25: 8,
40: 32,
50: 32,
60: 54,
}[warrior.Level]
damage := 45.0
spellID := int32(27584)
spell_level := 54.0

warrior.Hamstring = warrior.RegisterSpell(BattleStance|BerserkerStance, core.SpellConfig{
ActionID: core.ActionID{SpellID: spellID},
Expand Down
46 changes: 6 additions & 40 deletions sim/warrior/heroic_strike_cleave.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,10 @@ import (
)

func (warrior *Warrior) registerHeroicStrikeSpell(realismICD *core.Cooldown) {
flatDamageBonus := map[int32]float64{
25: 44,
40: 80,
50: 111,
60: core.TernaryFloat64(core.IncludeAQ, 157, 138),
}[warrior.Level]

spellID := map[int32]int32{
25: 1608,
40: 11565,
50: 11566,
60: core.TernaryInt32(core.IncludeAQ, 25286, 11567),
}[warrior.Level]

flatDamageBonus := core.TernaryFloat64(core.IncludeAQ, 157, 138)
spellID := core.TernaryInt32(core.IncludeAQ, 25286, 11567)
// No known equation
threat := map[int32]float64{
25: 68, //guess
40: 103, //guess
50: 120,
60: core.TernaryFloat64(core.IncludeAQ, 173, 145),
}[warrior.Level]
threat := core.TernaryFloat64(core.IncludeAQ, 173, 145)

warrior.HeroicStrike = warrior.RegisterSpell(AnyStance, core.SpellConfig{
ActionID: core.ActionID{SpellID: spellID},
Expand Down Expand Up @@ -64,26 +47,9 @@ func (warrior *Warrior) registerHeroicStrikeSpell(realismICD *core.Cooldown) {
}

func (warrior *Warrior) registerCleaveSpell(realismICD *core.Cooldown) {
flatDamageBonus := map[int32]float64{
25: 5,
40: 18,
50: 32,
60: 50,
}[warrior.Level]

spellID := map[int32]int32{
25: 845,
40: 11608,
50: 11609,
60: 20569,
}[warrior.Level]

threat := map[int32]float64{
25: 20, //guess
40: 60, //guess
50: 80,
60: 100,
}[warrior.Level]
flatDamageBonus := 50.0
spellID := int32(20569)
threat := 100.0

flatDamageBonus *= []float64{1, 1.4, 1.8, 2.2}[warrior.Talents.ImprovedCleave]

Expand Down
12 changes: 2 additions & 10 deletions sim/warrior/mortal_strike.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,9 @@ func (warrior *Warrior) registerMortalStrikeSpell(cdTimer *core.Timer) {
return
}

bonusDamage := map[int32]float64{
40: 85,
50: 110,
60: 160,
}[warrior.Level]
bonusDamage := 160.0

spellID := map[int32]int32{
40: 12294,
50: 21551,
60: 21553,
}[warrior.Level]
spellID := int32(21553)

warrior.MortalStrike = warrior.RegisterSpell(AnyStance, core.SpellConfig{
SpellCode: SpellCode_WarriorMortalStrike,
Expand Down
Loading
Loading