-
Notifications
You must be signed in to change notification settings - Fork 51
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
Phase 7 Shoulder "Runes" #1197
Phase 7 Shoulder "Runes" #1197
Conversation
kayla-glick
commented
Dec 23, 2024
•
edited
Loading
edited
proto/shaman.proto
Outdated
RuneShouldersChieftain = 1220266; | ||
RuneShouldersRagingFlame = 1220279; | ||
RuneShouldersRefined = 1220034; | ||
RuneShouldersShieldMaster = 1220234; | ||
RuneShouldersTotemicProtector = 1220236; | ||
RuneShouldersVolcano = 1220278; | ||
RuneShouldersWindwalker = 1220232; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Storing the rune spell IDs as proto values for consistency. I left out the SoulOfThe
because that's just text bloat
sim/shaman/item_sets_phase_4.go
Outdated
@@ -0,0 +1,307 @@ | |||
package shaman |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With these changes we're going to be breaking out a lot of functions so I think it would be good to separate PvE sets by phase at least starting with Phase 4
sim/shaman/item_sets_phase_4.go
Outdated
// Your Lightning Bolt critical strikes have a 35% chance to reset the cooldown on Lava Burst and Chain Lightning and make the next Lava Burst, Chain Heal, or Chain Lightning within 10 sec instant. | ||
func (shaman *Shaman) applyT1Elemental4PBonus() { | ||
label := "S03 - Item - T1 - Shaman - Elemental 4P Bonus" | ||
if shaman.HasAura(label) { | ||
return | ||
} | ||
|
||
core.MakePermanent(shaman.RegisterAura(core.Aura{ | ||
Label: label, | ||
OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) { | ||
if spell.SpellCode == SpellCode_ShamanLightningBolt && spell.ProcMask.Matches(core.ProcMaskSpellDamage) && result.DidCrit() && sim.Proc(.35, "Power Surge") { | ||
shaman.PowerSurgeDamageAura.Activate(sim) | ||
} | ||
}, | ||
})) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bonus defined as follows:
- Comment with the spell tooltip description
- Class method
apply[Tier#][SpecName][#Pieces]Bonus()
- Define the label then return if the character already has the aura registered. This is more important for more complex bonuses where
GetOrRegisterAura
may not necessarily prevent other side effects and is a more reliable pattern we can follow
sim/shaman/runes.go
Outdated
func (shaman *Shaman) applyShoulderRuneEffect() { | ||
if shaman.Equipment.Shoulders().Rune == int32(proto.ShamanRune_RuneNone) { | ||
return | ||
} | ||
|
||
switch shaman.Equipment.Shoulders().Rune { | ||
case int32(proto.ShamanRune_RuneShouldersVolcano): | ||
shaman.applyT1Elemental4PBonus() | ||
case int32(proto.ShamanRune_RuneShouldersRagingFlame): | ||
shaman.applyT1Elemental4PBonus() | ||
case int32(proto.ShamanRune_RuneShouldersRefined): | ||
shaman.applyT1Enhancement4PBonus() | ||
case int32(proto.ShamanRune_RuneShouldersChieftain): | ||
shaman.applyT1Enhancement6PBonus() | ||
case int32(proto.ShamanRune_RuneShouldersWindwalker): | ||
shaman.applyT1Tank2PBonus() | ||
case int32(proto.ShamanRune_RuneShouldersShieldMaster): | ||
shaman.applyT1Tank4PBonus() | ||
case int32(proto.ShamanRune_RuneShouldersTotemicProtector): | ||
shaman.applyT1Tank6PBonus() | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should runes get a method inside of runes.go
with a switch statement. I ordered these by Tier #, then Spec, then # of pieces
@@ -18,6 +18,7 @@ type OnInit func(aura *Aura, sim *Simulation) | |||
type OnReset func(aura *Aura, sim *Simulation) | |||
type OnDoneIteration func(aura *Aura, sim *Simulation) | |||
type OnGain func(aura *Aura, sim *Simulation) | |||
type OnRefresh func(aura *Aura, sim *Simulation) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New callback used to handle some effects that we can't quite handle through a buff aura, e.g. Shield Mastery restoring mana on apply/refresh