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

Adding p4 features in relation to holy shock #867

Merged
merged 10 commits into from
Jul 7, 2024
1 change: 1 addition & 0 deletions proto/paladin.proto
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ enum PaladinRune {

RuneCloakShieldOfRighteousness = 440658;
RuneCloakVindicator = 440666;
RuneCloakShockAndAwe = 462834;
RuneCloakRighteousVengeance = 440672;

RuneChestDivineStorm = 407778;
Expand Down
49 changes: 49 additions & 0 deletions sim/paladin/avenging_wrath.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package paladin

import (
"time"

"github.com/wowsims/sod/sim/core"
)

func (paladin *Paladin) registerAvengingWrath() {
actionID := core.ActionID{SpellID: 407788}

AvengingWrathAura := paladin.RegisterAura(core.Aura{
Label: "Avenging Wrath",
ActionID: actionID,
Duration: time.Second * 20,
OnGain: func(aura *core.Aura, sim *core.Simulation) {
aura.Unit.PseudoStats.DamageDealtMultiplier *= 1.2
},
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
aura.Unit.PseudoStats.DamageDealtMultiplier /= 1.2
},
})
core.RegisterPercentDamageModifierEffect(AvengingWrathAura, 1.2)

AvengingWrath := paladin.RegisterSpell(core.SpellConfig{
ActionID: actionID,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagAPL,

ManaCost: core.ManaCostOptions{
BaseCost: 0.08,
},
Cast: core.CastConfig{
CD: core.Cooldown{
Timer: paladin.NewTimer(),
Duration: time.Minute*3,
},

},
ApplyEffects: func(sim *core.Simulation, _ *core.Unit, _ *core.Spell) {
AvengingWrathAura.Activate(sim)
},
})

paladin.AddMajorCooldown(core.MajorCooldown{
Spell: AvengingWrath,
Type: core.CooldownTypeDPS,

})
}
21 changes: 15 additions & 6 deletions sim/paladin/holy_shock.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,18 @@ import (
)

func (paladin *Paladin) registerHolyShock() {

hasInfusionOfLight := paladin.hasRune(proto.PaladinRune_RuneWaistInfusionOfLight)

cdTime := time.Second * 30
if hasInfusionOfLight {
cdTime = time.Second * 6
}


paladin.holyShockCooldown = &core.Cooldown{
Timer: paladin.NewTimer(),
Duration: time.Second * 15,
Duration: cdTime,
}

if !paladin.Talents.HolyShock {
Expand All @@ -30,11 +39,11 @@ func (paladin *Paladin) registerHolyShock() {
{level: 56, spellID: 20930, manaCost: 325, minDamage: 365, maxDamage: 395},
}

hasInfusionOfLight := paladin.hasRune(proto.PaladinRune_RuneWaistInfusionOfLight)
damageMultiplier := core.TernaryFloat64(hasInfusionOfLight, 1.2, 1.0)

damageMultiplier := core.TernaryFloat64(hasInfusionOfLight, 1.5, 1.0)

hasArtOfWar := paladin.hasRune(proto.PaladinRune_RuneFeetTheArtOfWar)
manaCostMultiplier := core.TernaryFloat64(hasArtOfWar, 0.2, 1.0)
//hasArtOfWar := paladin.hasRune(proto.PaladinRune_RuneFeetTheArtOfWar)
manaCostMultiplier := 1.0//core.TernaryFloat64(hasArtOfWar, 0.2, 1.0)

hasWrath := paladin.hasRune(proto.PaladinRune_RuneHeadWrath)

Expand Down Expand Up @@ -88,7 +97,7 @@ func (paladin *Paladin) registerHolyShock() {
if hasInfusionOfLight && result.Outcome.Matches(core.OutcomeCrit) {
paladin.AddMana(sim, rank.manaCost, manaMetrics)
paladin.holyShockCooldown.Reset()
paladin.exorcismCooldown.Reset()
//paladin.exorcismCooldown.Reset()
}
},
})
Expand Down
1 change: 1 addition & 0 deletions sim/paladin/paladin.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func (paladin *Paladin) Initialize() {
paladin.registerDivineFavor()
paladin.registerHammerOfWrath()
paladin.registerHolyWrath()
paladin.registerAvengingWrath()
}

func (paladin *Paladin) Reset(_ *core.Simulation) {
Expand Down
Loading
Loading