From d229f99adcf419e1f16da78840fed1516a626ec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Hillerstr=C3=B6m?= Date: Wed, 25 Dec 2024 16:40:59 +0100 Subject: [PATCH 1/2] [Warrior] Add Pummel --- sim/warrior/pummel.go | 48 ++++++++++++++++++++++++++++++++++++++++++ sim/warrior/warrior.go | 1 + 2 files changed, 49 insertions(+) create mode 100644 sim/warrior/pummel.go diff --git a/sim/warrior/pummel.go b/sim/warrior/pummel.go new file mode 100644 index 000000000..2f932cd79 --- /dev/null +++ b/sim/warrior/pummel.go @@ -0,0 +1,48 @@ +package warrior + +import ( + "time" + + "github.com/wowsims/classic/sim/core" +) + +func (warrior *Warrior) registerPummelSpell() { + damage := 50.0 + + warrior.Hamstring = warrior.RegisterSpell(BerserkerStance, core.SpellConfig{ + ActionID: core.ActionID{SpellID: 6554}, + SpellSchool: core.SpellSchoolPhysical, + DefenseType: core.DefenseTypeMelee, + ProcMask: core.ProcMaskMeleeMHSpecial, + Flags: core.SpellFlagMeleeMetrics | core.SpellFlagAPL | core.SpellFlagBinary | SpellFlagOffensive, + + RageCost: core.RageCostOptions{ + Cost: 10, + Refund: 0.8, + }, + Cast: core.CastConfig{ + DefaultCast: core.Cast{ + GCD: core.GCDDefault, + }, + IgnoreHaste: true, + CD: core.Cooldown{ + Timer: warrior.NewTimer(), + Duration: time.Second * 10, + }, + }, + + CritDamageBonus: warrior.impale(), + + DamageMultiplier: 1, + ThreatMultiplier: 1, + BonusCoefficient: 1, + + ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) { + result := spell.CalcAndDealDamage(sim, target, damage, spell.OutcomeMeleeWeaponSpecialHitAndCrit) + + if !result.Landed() { + spell.IssueRefund(sim) + } + }, + }) +} diff --git a/sim/warrior/warrior.go b/sim/warrior/warrior.go index 0873d8a9a..c4dd17fc7 100644 --- a/sim/warrior/warrior.go +++ b/sim/warrior/warrior.go @@ -184,6 +184,7 @@ func (warrior *Warrior) Initialize() { warrior.registerWhirlwindSpell() warrior.registerRendSpell() warrior.registerHamstringSpell() + warrior.registerPummelSpell() // The sim often re-enables heroic strike in an unrealistic amount of time. // This can cause an unrealistic immediate double-hit around wild strikes procs From c859fa947057aa9a595041c265307ad3cb9aa4cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Hillerstr=C3=B6m?= Date: Wed, 25 Dec 2024 17:48:29 +0100 Subject: [PATCH 2/2] Remove incorrect assignment --- sim/warrior/pummel.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sim/warrior/pummel.go b/sim/warrior/pummel.go index 2f932cd79..ca664df83 100644 --- a/sim/warrior/pummel.go +++ b/sim/warrior/pummel.go @@ -9,7 +9,7 @@ import ( func (warrior *Warrior) registerPummelSpell() { damage := 50.0 - warrior.Hamstring = warrior.RegisterSpell(BerserkerStance, core.SpellConfig{ + warrior.RegisterSpell(BerserkerStance, core.SpellConfig{ ActionID: core.ActionID{SpellID: 6554}, SpellSchool: core.SpellSchoolPhysical, DefenseType: core.DefenseTypeMelee,