-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #845 from hillerstorm/prot-pala
- Loading branch information
Showing
8 changed files
with
245 additions
and
270 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
package paladin | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/wowsims/cata/sim/core" | ||
"github.com/wowsims/cata/sim/core/proto" | ||
"github.com/wowsims/cata/sim/core/stats" | ||
) | ||
|
||
func (paladin *Paladin) registerDivineProtectionSpell() { | ||
glyphOfDivineProtection := paladin.HasMajorGlyph(proto.PaladinMajorGlyph_GlyphOfDivineProtection) | ||
|
||
actionID := core.ActionID{SpellID: 498} | ||
paladin.DivineProtectionAura = paladin.RegisterAura(core.Aura{ | ||
Label: "Divine Protection", | ||
ActionID: actionID, | ||
Duration: time.Second * 10, | ||
|
||
OnGain: func(aura *core.Aura, sim *core.Simulation) { | ||
if glyphOfDivineProtection { | ||
paladin.PseudoStats.SchoolDamageTakenMultiplier[stats.SchoolIndexArcane] *= 0.6 | ||
paladin.PseudoStats.SchoolDamageTakenMultiplier[stats.SchoolIndexFire] *= 0.6 | ||
paladin.PseudoStats.SchoolDamageTakenMultiplier[stats.SchoolIndexFrost] *= 0.6 | ||
paladin.PseudoStats.SchoolDamageTakenMultiplier[stats.SchoolIndexHoly] *= 0.6 | ||
paladin.PseudoStats.SchoolDamageTakenMultiplier[stats.SchoolIndexNature] *= 0.6 | ||
paladin.PseudoStats.SchoolDamageTakenMultiplier[stats.SchoolIndexShadow] *= 0.6 | ||
} else { | ||
paladin.PseudoStats.DamageTakenMultiplier *= 0.8 | ||
} | ||
}, | ||
OnExpire: func(aura *core.Aura, sim *core.Simulation) { | ||
if glyphOfDivineProtection { | ||
paladin.PseudoStats.SchoolDamageTakenMultiplier[stats.SchoolIndexArcane] /= 0.6 | ||
paladin.PseudoStats.SchoolDamageTakenMultiplier[stats.SchoolIndexFire] /= 0.6 | ||
paladin.PseudoStats.SchoolDamageTakenMultiplier[stats.SchoolIndexFrost] /= 0.6 | ||
paladin.PseudoStats.SchoolDamageTakenMultiplier[stats.SchoolIndexHoly] /= 0.6 | ||
paladin.PseudoStats.SchoolDamageTakenMultiplier[stats.SchoolIndexNature] /= 0.6 | ||
paladin.PseudoStats.SchoolDamageTakenMultiplier[stats.SchoolIndexShadow] /= 0.6 | ||
} else { | ||
paladin.PseudoStats.DamageTakenMultiplier /= 0.8 | ||
} | ||
}, | ||
}) | ||
|
||
paladin.DivineProtection = paladin.RegisterSpell(core.SpellConfig{ | ||
ActionID: actionID, | ||
Flags: core.SpellFlagAPL, | ||
ClassSpellMask: SpellMaskDivineProtection, | ||
|
||
ManaCost: core.ManaCostOptions{ | ||
BaseCost: 0.03, | ||
}, | ||
Cast: core.CastConfig{ | ||
DefaultCast: core.Cast{ | ||
NonEmpty: true, | ||
}, | ||
CD: core.Cooldown{ | ||
Timer: paladin.NewTimer(), | ||
Duration: time.Minute * 1, | ||
}, | ||
}, | ||
|
||
ApplyEffects: func(sim *core.Simulation, _ *core.Unit, spell *core.Spell) { | ||
paladin.DivineProtectionAura.Activate(sim) | ||
}, | ||
}) | ||
|
||
paladin.AddMajorCooldown(core.MajorCooldown{ | ||
Spell: paladin.DivineProtection, | ||
Type: core.CooldownTypeSurvival, | ||
ShouldActivate: func(sim *core.Simulation, character *core.Character) bool { | ||
return character.Spec == proto.Spec_SpecProtectionPaladin | ||
}, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.