diff --git a/sim/core/buffs.go b/sim/core/buffs.go index b8dea46dd0..c70d57e862 100644 --- a/sim/core/buffs.go +++ b/sim/core/buffs.go @@ -890,18 +890,24 @@ func applyPetBuffEffects(petAgent PetAgent, playerFaction proto.Faction, raidBuf } func SanctityAuraAura(character *Character) *Aura { - return character.GetOrRegisterAura(Aura{ + aura := MakePermanent(character.GetOrRegisterAura(Aura{ Label: "Sanctity Aura", ActionID: ActionID{SpellID: 20218}, - Duration: NeverExpires, - OnReset: func(aura *Aura, sim *Simulation) { - aura.Activate(sim) - }, - OnGain: func(aura *Aura, sim *Simulation) { - character.PseudoStats.SchoolDamageDealtMultiplier[stats.SchoolIndexHoly] *= 1.1 + })) + + ExclusiveHolyDamageDealtAura(aura, 1.1) + + return aura +} + +func ExclusiveHolyDamageDealtAura(aura *Aura, multiplier float64) { + aura.NewExclusiveEffect("HolyDamageDealt", false, ExclusiveEffect{ + Priority: multiplier, + OnGain: func(ee *ExclusiveEffect, sim *Simulation) { + aura.Unit.PseudoStats.SchoolDamageDealtMultiplier[stats.SchoolIndexHoly] *= multiplier }, - OnExpire: func(aura *Aura, sim *Simulation) { - character.PseudoStats.SchoolDamageDealtMultiplier[stats.SchoolIndexHoly] /= 1.1 + OnExpire: func(ee *ExclusiveEffect, sim *Simulation) { + aura.Unit.PseudoStats.SchoolDamageDealtMultiplier[stats.SchoolIndexHoly] /= multiplier }, }) } diff --git a/sim/paladin/holy_shock.go b/sim/paladin/holy_shock.go index 67befa4e19..4d0a1fcdbb 100644 --- a/sim/paladin/holy_shock.go +++ b/sim/paladin/holy_shock.go @@ -39,7 +39,7 @@ func (paladin *Paladin) registerHolyShock() { {level: 56, spellID: 20930, manaCost: 325, minDamage: 365, maxDamage: 395}, } - damageMultiplier := core.TernaryFloat64(hasInfusionOfLight, 1.5, 1.0) + damageMultiplierAdditive := core.TernaryFloat64(hasInfusionOfLight, 1.5, 1.0) //hasArtOfWar := paladin.hasRune(proto.PaladinRune_RuneFeetTheArtOfWar) manaCostMultiplier := int32(100) //core.TernaryFloat64(hasArtOfWar, 0.2, 1.0) @@ -78,9 +78,10 @@ func (paladin *Paladin) registerHolyShock() { CD: *paladin.holyShockCooldown, }, - DamageMultiplier: damageMultiplier, - ThreatMultiplier: 1, - BonusCoefficient: 0.429, + DamageMultiplier: 1, + DamageMultiplierAdditive: damageMultiplierAdditive, + ThreatMultiplier: 1, + BonusCoefficient: 0.429, ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) { baseDamage := sim.Roll(rank.minDamage, rank.maxDamage) diff --git a/sim/paladin/item_sets_pve.go b/sim/paladin/item_sets_pve.go index 9099fae536..20afc4ba95 100644 --- a/sim/paladin/item_sets_pve.go +++ b/sim/paladin/item_sets_pve.go @@ -233,7 +233,7 @@ var ItemSetFreethinkersArmor = core.NewItemSet(core.ItemSet{ paladin.OnSpellRegistered(func(spell *core.Spell) { if spell.SpellCode == SpellCode_PaladinHolyShock { //Damage multiplier is Additive with Infusion of Light rather than multiplicitive - spell.DamageMultiplier += 0.5 + spell.DamageMultiplierAdditive += 0.5 } }) }, @@ -245,7 +245,7 @@ var ItemSetFreethinkersArmor = core.NewItemSet(core.ItemSet{ OnInit: func(aura *core.Aura, sim *core.Simulation) { for _, spell := range paladin.exorcism { spell.CD.Duration -= time.Second * 3 - spell.DamageMultiplier *= 1.50 + spell.DamageMultiplierAdditive += 0.5 } }, }) @@ -270,7 +270,7 @@ var ItemSetMercifulJudgement = core.NewItemSet(core.ItemSet{ paladin := agent.GetCharacter() paladin.OnSpellRegistered(func(spell *core.Spell) { if spell.SpellCode == SpellCode_PaladinConsecration { - spell.AOEDot().DamageMultiplier *= 1.5 + spell.AOEDot().DamageMultiplier += 0.5 } }) }, @@ -293,7 +293,7 @@ var ItemSetRadiantJudgement = core.NewItemSet(core.ItemSet{ OnInit: func(aura *core.Aura, sim *core.Simulation) { for _, judgeSpells := range paladin.allJudgeSpells { for _, judgeRankSpell := range judgeSpells { - judgeRankSpell.DamageMultiplier *= 1.2 + judgeRankSpell.DamageMultiplierAdditive += 0.2 } } @@ -450,7 +450,7 @@ var ItemSetAvengersRadiance = core.NewItemSet(core.ItemSet{ //"S03 - Item - TAQ - Paladin - Retribution 2P Bonus", if spell.SpellCode == SpellCode_PaladinCrusaderStrike { // 2 Set: Increases Crusader Strike Damage by 50% - spell.DamageMultiplier *= 1.5 + spell.DamageMultiplier += 0.5 } }) }, diff --git a/sim/paladin/items.go b/sim/paladin/items.go index a908da961e..968fe228d3 100644 --- a/sim/paladin/items.go +++ b/sim/paladin/items.go @@ -28,6 +28,9 @@ const ( ZandalarFreethinkersBreastplate = 231329 ZandalarFreethinkersBelt = 231330 LibramOfWrath = 232420 + LibramOfTheExorcist = 234475 + LibramOfSanctity = 234476 + LibramOfRighteousness = 234477 ) func init() { @@ -210,11 +213,11 @@ func init() { core.Each(holyWrathSpells, func(spell *core.Spell) { spell.CastTimeMultiplier += (0.2 * float64(oldStacks)) spell.Cost.Multiplier += int32(100.0 * (0.2 * float64(oldStacks))) - spell.DamageMultiplier -= (0.2 * float64(oldStacks)) + spell.DamageMultiplierAdditive -= (0.2 * float64(oldStacks)) spell.CastTimeMultiplier -= (0.2 * float64(newStacks)) spell.Cost.Multiplier -= int32(100.0 * (0.2 * float64(newStacks))) - spell.DamageMultiplier += (0.2 * float64(newStacks)) + spell.DamageMultiplierAdditive += (0.2 * float64(newStacks)) }) }, @@ -257,6 +260,51 @@ func init() { }, })) }) + + core.NewItemEffect(LibramOfTheExorcist, func(agent core.Agent) { + paladin := agent.(PaladinAgent).GetPaladin() + paladin.OnSpellRegistered(func(spell *core.Spell) { + if spell.SpellCode == SpellCode_PaladinCrusaderStrike || spell.SpellCode == SpellCode_PaladinExorcism { + // Increases the damage of Exorcism and Crusader Strike by 3%. + spell.DamageMultiplierAdditive += 0.03 + } + }) + }) + + core.NewItemEffect(LibramOfSanctity, func(agent core.Agent) { + paladin := agent.(PaladinAgent).GetPaladin() + + buffAura := core.MakePermanent(paladin.RegisterAura(core.Aura{ + ActionID: core.ActionID{SpellID: 1214298}, + Label: "Libram of Sanctity", + Duration: time.Minute, + })) + core.ExclusiveHolyDamageDealtAura(buffAura, 1.1) + + paladin.OnSpellRegistered(func(spell *core.Spell) { + if spell.SpellCode == SpellCode_PaladinHolyShock { + // Increases the damage of Holy Shock by 3%, and your Shock and Awe buff now also grants 10% increased Holy Damage. (This effect does not stack with Sanctity Aura). + spell.DamageMultiplierAdditive += 0.03 + + originalApplyEffects := spell.ApplyEffects + spell.ApplyEffects = func(sim *core.Simulation, target *core.Unit, spell *core.Spell) { + originalApplyEffects(sim, target, spell) + buffAura.Activate(sim) + } + } + }) + }) + + core.NewItemEffect(LibramOfRighteousness, func(agent core.Agent) { + paladin := agent.(PaladinAgent).GetPaladin() + paladin.OnSpellRegistered(func(spell *core.Spell) { + if spell.SpellCode == SpellCode_PaladinHammerOfTheRighteous || spell.SpellCode == SpellCode_PaladinShieldOfRighteousness { + // Increases the damage of Hammer of the Righteous and Shield of Righteousness by 3%. + spell.DamageMultiplierAdditive += 0.03 + } + }) + }) + } // https://www.wowhead.com/classic/spell=465414/crusaders-zeal @@ -290,7 +338,7 @@ func crusadersZealAura465414(character *core.Character) *core.Aura { Outcome: core.OutcomeLanded, ProcMask: core.ProcMaskMelee, SpellFlagsExclude: core.SpellFlagSuppressWeaponProcs, - PPM: 2.0, // TBD + PPM: 2.0, Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) { procAura.Activate(sim) }, diff --git a/sim/paladin/paladin.go b/sim/paladin/paladin.go index 882c4db5e6..ba598b3e35 100644 --- a/sim/paladin/paladin.go +++ b/sim/paladin/paladin.go @@ -30,6 +30,8 @@ const ( SpellCode_PaladinLayOnHands SpellCode_PaladinHammerOfWrath SpellCode_PaladinCrusaderStrike + SpellCode_PaladinHammerOfTheRighteous + SpellCode_PaladinShieldOfRighteousness ) type SealJudgeCode uint8