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

Prot Paladin: Libram of the Devoted + Libram of Avengement #1066

Merged
merged 13 commits into from
Sep 23, 2024

Conversation

wsphillips
Copy link
Contributor

Implements the Phase 4/5 Paladin librams.

@wsphillips wsphillips mentioned this pull request Sep 16, 2024
22 tasks
Comment on lines 264 to 295
paladin.OnSpellRegistered(func(spell *core.Spell) {
if spell.SpellCode == SpellCode_PaladinAvengersShield {
// Libram of Avenging causes Avenger's Shield to now hit the primary target
// twice (two projectiles). Note: Avenger's Shield cannot miss or be resisted.
results := make([]*core.SpellResult, 2)
lowDamage := 366 * paladin.baseRuneAbilityDamage() / 100
highDamage := 448 * paladin.baseRuneAbilityDamage() / 100

spell.ApplyEffects = func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
apBonus := 0.091 * spell.MeleeAttackPower()
for idx := range results {
baseDamage := sim.Roll(lowDamage, highDamage) + apBonus
// Avenger's Shield cannot miss and uses magic critical _chance_.
results[idx] = spell.CalcDamage(sim, target, baseDamage, spell.OutcomeMagicCrit)
}
// The second projectile fires after a fixed 1.5s delay (2nd autocast does not trigger GCD)

// First hit
spell.WaitTravelTime(sim, func(sim *core.Simulation) {
spell.DealDamage(sim, results[0])
})

// Second hit
timeToHit := spell.TravelTime() + time.Millisecond*1500
core.StartDelayedAction(sim, core.DelayedActionOptions{
DoAt: sim.CurrentTime + timeToHit,
OnAction: func(s *core.Simulation) {
spell.DealDamage(sim, results[1])
},
})
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this could just be a second cast of avenger's shield but then manually adjusting the cast metrics?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The base version of the spell is setup to bounce to neighboring enemies, so casting it twice on the same target would only behave correctly if you are simulating a single target encounter.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh gotcha. Hm, I wonder if this should just be a toggle on the avenging wrath spell then with an attribute you can override here? I don't love the spell's code being copied here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I can probably set it up as a branch in the code for the base spell that checks for the item effect (and have the item effect do basically nothing itself). Did it this way because I assumed you might prefer things like item effects to not be intermingled with base ability implementations.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah idk sometimes these effects are a total pain lol. You could just tie it to a paladin struct attribute and have the libram toggle that attribute on. Something like

paladin.DoRighteousShieldSingleTarget or something idk. In Wrath it was just a glyph IIRC

@kayla-glick kayla-glick merged commit c3b6ed6 into wowsims:master Sep 23, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants