Skip to content

Commit

Permalink
paladin tier 3
Browse files Browse the repository at this point in the history
  • Loading branch information
kayla-glick committed Dec 27, 2024
1 parent 1b6bc31 commit 730c326
Show file tree
Hide file tree
Showing 5 changed files with 232 additions and 17 deletions.
4 changes: 2 additions & 2 deletions sim/paladin/avenging_wrath.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (paladin *Paladin) registerAvengingWrath() {
})
core.RegisterPercentDamageModifierEffect(AvengingWrathAura, 1.2)

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

Expand All @@ -41,7 +41,7 @@ func (paladin *Paladin) registerAvengingWrath() {
})

paladin.AddMajorCooldown(core.MajorCooldown{
Spell: AvengingWrath,
Spell: paladin.avengingWrath,
Type: core.CooldownTypeDPS,
})
}
208 changes: 208 additions & 0 deletions sim/paladin/item_sets_pve_phase_7.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
package paladin

import (
"time"

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

var ItemSetRedemptionWarplate = core.NewItemSet(core.ItemSet{
Name: "Redemption Warplate",
Bonuses: map[int32]core.ApplyEffect{
2: func(agent core.Agent) {
paladin := agent.(PaladinAgent).GetPaladin()
paladin.applyNaxxramasRetribution2PBonus()
},
4: func(agent core.Agent) {
paladin := agent.(PaladinAgent).GetPaladin()
paladin.applyNaxxramasRetribution4PBonus()
},
6: func(agent core.Agent) {
paladin := agent.(PaladinAgent).GetPaladin()
paladin.applyNaxxramasRetribution6PBonus()
},
},
})

// Increases the damage done by your Divine Storm ability by 20%.
func (paladin *Paladin) applyNaxxramasRetribution2PBonus() {
if !paladin.hasRune(proto.PaladinRune_RuneChestDivineStorm) {
return
}

label := "S03 - Item - Naxxramas - Paladin - Retribution 2P Bonus"
if paladin.HasAura(label) {
return
}

paladin.RegisterAura(core.Aura{
Label: label,
OnInit: func(aura *core.Aura, sim *core.Simulation) {
paladin.divineStorm.DamageMultiplierAdditive += 0.20
},
})
}

// Reduces the cast time of your Holy Wrath ability by 100% and reduces the cooldown of your Holy Wrath ability by 60%.
func (paladin *Paladin) applyNaxxramasRetribution4PBonus() {
label := "S03 - Item - Naxxramas - Paladin - Retribution 4P Bonus"
if paladin.HasAura(label) {
return
}

paladin.RegisterAura(core.Aura{
Label: label,
OnInit: func(aura *core.Aura, sim *core.Simulation) {
for _, spell := range paladin.holyWrath {
spell.CastTimeMultiplier -= 1
spell.CD.Multiplier -= 60
}
},
})
}

// Your Exorcism and Holy Wrath abilities deal increased damage to Undead equal to their critical strike chance.
func (paladin *Paladin) applyNaxxramasRetribution6PBonus() {
label := "S03 - Item - Naxxramas - Paladin - Retribution 6P Bonus"
if paladin.HasAura(label) {
return
}

paladin.RegisterAura(core.Aura{
Label: label,
OnInit: func(aura *core.Aura, sim *core.Simulation) {
affectedSpells := paladin.exorcism
affectedSpells = append(affectedSpells, paladin.holyWrath...)

for _, spell := range affectedSpells {
oldApplyEffects := spell.ApplyEffects
spell.ApplyEffects = func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
critChanceBonus := 0.0
if target.MobType == proto.MobType_MobTypeUndead {
critChanceBonus = paladin.GetStat(stats.SpellCrit) / 100
}

spell.DamageMultiplierAdditive += critChanceBonus
oldApplyEffects(sim, target, spell)
spell.DamageMultiplierAdditive -= critChanceBonus
}
}
},
})
}

var ItemSetRedemptionBulwark = core.NewItemSet(core.ItemSet{
Name: "Redemption Bulwark",
Bonuses: map[int32]core.ApplyEffect{
2: func(agent core.Agent) {
paladin := agent.(PaladinAgent).GetPaladin()
paladin.applyNaxxramasProtection2PBonus()
},
4: func(agent core.Agent) {
paladin := agent.(PaladinAgent).GetPaladin()
paladin.applyNaxxramasProtection4PBonus()
},
6: func(agent core.Agent) {
paladin := agent.(PaladinAgent).GetPaladin()
paladin.applyNaxxramasProtection6PBonus()
},
},
})

// Your Hand of Reckoning ability never misses, and your chance to be Dodged or Parried is reduced by 2%.
func (paladin *Paladin) applyNaxxramasProtection2PBonus() {
label := "S03 - Item - Naxxramas - Paladin - Protection 2P Bonus"
if paladin.HasAura(label) {
return
}

bonusStats := stats.Stats{stats.Expertise: 2 * core.ExpertiseRatingPerExpertiseChance}

core.MakePermanent(paladin.RegisterAura(core.Aura{
Label: label,
BuildPhase: core.CharacterBuildPhaseBuffs,
OnGain: func(aura *core.Aura, sim *core.Simulation) {
if aura.Unit.Env.MeasuringStats && aura.Unit.Env.State != core.Finalized {
aura.Unit.AddStats(bonusStats)
} else {
aura.Unit.AddStatsDynamic(sim, bonusStats)
}
},
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
if aura.Unit.Env.MeasuringStats && aura.Unit.Env.State != core.Finalized {
aura.Unit.AddStats(bonusStats.Invert())
} else {
aura.Unit.AddStatsDynamic(sim, bonusStats.Invert())
}
},
}))
}

// Reduces the cooldown on your Divine Protection ability by 3 min and reduces the cooldown on your Avenging Wrath ability by 2 min.
func (paladin *Paladin) applyNaxxramasProtection4PBonus() {
label := "S03 - Item - Naxxramas - Paladin - Protection 4P Bonus"
if paladin.HasAura(label) {
return
}

paladin.RegisterAura(core.Aura{
Label: label,
OnInit: func(aura *core.Aura, sim *core.Simulation) {
// TODO: Divine Protection

if paladin.avengingWrath != nil {
paladin.avengingWrath.CD.FlatModifier -= time.Minute * 2
}
},
})
}

// When damage from an Undead enemy takes you below 35% health, the effect from Hand of Reckoning and Righteous Fury now reduces that damage by 50%.
func (paladin *Paladin) applyNaxxramasProtection6PBonus() {
label := "S03 - Item - Naxxramas - Paladin - Protection 6P Bonus"
if paladin.HasAura(label) {
return
}

paladin.RegisterAura(core.Aura{
Label: label,
OnInit: func(aura *core.Aura, sim *core.Simulation) {
// TODO
},
})
}

var ItemSetRedemptionArmor = core.NewItemSet(core.ItemSet{
Name: "Redemption Armor",
Bonuses: map[int32]core.ApplyEffect{
2: func(agent core.Agent) {
paladin := agent.(PaladinAgent).GetPaladin()
paladin.applyNaxxramasHoly2PBonus()
},
// Your Flash of Light Rank 6 and Holy Light Rank 8 and Rank 9 spells have a 10% chance to imbue your target with Holy Power.
4: func(agent core.Agent) {
},
// Your Beacon of Light target takes 20% reduced damage from Undead enemies.
6: func(agent core.Agent) {
},
},
})

// Reduces the cooldown on your Lay on Hands ability by 35 min, and your Lay on Hands now restores you to 30% of your maximum Mana when used.
func (paladin *Paladin) applyNaxxramasHoly2PBonus() {
label := "S03 - Item - Naxxramas - Paladin - Holy 2P Bonus"
if paladin.HasAura(label) {
return
}

paladin.RegisterAura(core.Aura{
Label: label,
OnInit: func(aura *core.Aura, sim *core.Simulation) {
paladin.layOnHands.CD.FlatModifier -= time.Minute * 35

// TODO: Mana return
},
})
}
6 changes: 3 additions & 3 deletions sim/paladin/lay_on_hands.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
)

func (paladin *Paladin) registerLayOnHands() {

minLevels := []int32{50, 30, 10}
idx := slices.IndexFunc(minLevels, func(level int32) bool {
return paladin.Level >= level
Expand All @@ -25,7 +24,8 @@ func (paladin *Paladin) registerLayOnHands() {
actionID := core.ActionID{SpellID: spellID}
layOnHandsManaMetrics := paladin.NewManaMetrics(actionID)
layOnHandsHealthMetrics := paladin.NewHealthMetrics(actionID)
layOnHands := paladin.RegisterSpell(core.SpellConfig{

paladin.layOnHands = paladin.RegisterSpell(core.SpellConfig{
ActionID: actionID,
ProcMask: core.ProcMaskSpellHealing,
Flags: core.SpellFlagAPL | core.SpellFlagMCD,
Expand All @@ -48,7 +48,7 @@ func (paladin *Paladin) registerLayOnHands() {
})

paladin.AddMajorCooldown(core.MajorCooldown{
Spell: layOnHands,
Spell: paladin.layOnHands,
Priority: core.CooldownPriorityBloodlust,
Type: core.CooldownTypeSurvival,
ShouldActivate: func(sim *core.Simulation, character *core.Character) bool {
Expand Down
21 changes: 12 additions & 9 deletions sim/paladin/paladin.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,18 @@ type Paladin struct {
// Active abilities and shared cooldowns that are externally manipulated.
holyShockCooldown *core.Cooldown
exorcismCooldown *core.Cooldown
crusaderStrike *core.Spell
divineStorm *core.Spell
exorcism []*core.Spell
judgement *core.Spell
rv *core.Spell
holyShieldAura [3]*core.Aura
holyShieldProc [3]*core.Spell
redoubtAura *core.Aura
holyWrath []*core.Spell

avengingWrath *core.Spell
crusaderStrike *core.Spell
divineStorm *core.Spell
exorcism []*core.Spell
judgement *core.Spell
layOnHands *core.Spell
rv *core.Spell
holyShieldAura [3]*core.Aura
holyShieldProc [3]*core.Spell
redoubtAura *core.Aura
holyWrath []*core.Spell

// highest rank seal spell if available
sealOfRighteousness *core.Spell
Expand Down
10 changes: 7 additions & 3 deletions sim/priest/item_sets_pve_phase_7.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,14 @@ func (priest *Priest) applyNaxxramasShadow6PBonus() {

oldApplyEffects := spell.ApplyEffects
spell.ApplyEffects = func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
critChance := priest.GetStat(stats.SpellCrit) / 100
spell.DamageMultiplierAdditive += critChance
critChanceBonus := 0.0
if target.MobType == proto.MobType_MobTypeUndead {
critChanceBonus = priest.GetStat(stats.SpellCrit) / 100
}

spell.DamageMultiplierAdditive += critChanceBonus
oldApplyEffects(sim, target, spell)
spell.DamageMultiplierAdditive -= critChance
spell.DamageMultiplierAdditive -= critChanceBonus
}
}
},
Expand Down

0 comments on commit 730c326

Please sign in to comment.