From 730c3260314ea9a9b1be16c217efab5b0811c3e5 Mon Sep 17 00:00:00 2001 From: Kayla Glick Date: Fri, 27 Dec 2024 01:39:06 -0500 Subject: [PATCH] paladin tier 3 --- sim/paladin/avenging_wrath.go | 4 +- sim/paladin/item_sets_pve_phase_7.go | 208 +++++++++++++++++++++++++++ sim/paladin/lay_on_hands.go | 6 +- sim/paladin/paladin.go | 21 +-- sim/priest/item_sets_pve_phase_7.go | 10 +- 5 files changed, 232 insertions(+), 17 deletions(-) create mode 100644 sim/paladin/item_sets_pve_phase_7.go diff --git a/sim/paladin/avenging_wrath.go b/sim/paladin/avenging_wrath.go index 142a5d7b80..08c05622a0 100644 --- a/sim/paladin/avenging_wrath.go +++ b/sim/paladin/avenging_wrath.go @@ -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, @@ -41,7 +41,7 @@ func (paladin *Paladin) registerAvengingWrath() { }) paladin.AddMajorCooldown(core.MajorCooldown{ - Spell: AvengingWrath, + Spell: paladin.avengingWrath, Type: core.CooldownTypeDPS, }) } diff --git a/sim/paladin/item_sets_pve_phase_7.go b/sim/paladin/item_sets_pve_phase_7.go new file mode 100644 index 0000000000..e40ac0fb41 --- /dev/null +++ b/sim/paladin/item_sets_pve_phase_7.go @@ -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 + }, + }) +} diff --git a/sim/paladin/lay_on_hands.go b/sim/paladin/lay_on_hands.go index fb0d532fbc..c0f5b82da8 100644 --- a/sim/paladin/lay_on_hands.go +++ b/sim/paladin/lay_on_hands.go @@ -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 @@ -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, @@ -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 { diff --git a/sim/paladin/paladin.go b/sim/paladin/paladin.go index ba598b3e35..8c0306e996 100644 --- a/sim/paladin/paladin.go +++ b/sim/paladin/paladin.go @@ -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 diff --git a/sim/priest/item_sets_pve_phase_7.go b/sim/priest/item_sets_pve_phase_7.go index 3a5dc3a4de..fa4d7021db 100644 --- a/sim/priest/item_sets_pve_phase_7.go +++ b/sim/priest/item_sets_pve_phase_7.go @@ -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 } } },