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

Phase 7 Shoulder "Runes" #1197

Merged
merged 7 commits into from
Dec 23, 2024
Merged

Phase 7 Shoulder "Runes" #1197

merged 7 commits into from
Dec 23, 2024

Conversation

kayla-glick
Copy link
Collaborator

@kayla-glick kayla-glick commented Dec 23, 2024

image

@kayla-glick kayla-glick changed the title Phase 7 Sshould "Runes" Phase 7 Shoulder "Runes" Dec 23, 2024
Comment on lines 67 to 73
RuneShouldersChieftain = 1220266;
RuneShouldersRagingFlame = 1220279;
RuneShouldersRefined = 1220034;
RuneShouldersShieldMaster = 1220234;
RuneShouldersTotemicProtector = 1220236;
RuneShouldersVolcano = 1220278;
RuneShouldersWindwalker = 1220232;
Copy link
Collaborator Author

@kayla-glick kayla-glick Dec 23, 2024

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

@@ -0,0 +1,307 @@
package shaman
Copy link
Collaborator Author

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

Comment on lines 80 to 95
// 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)
}
},
}))
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Bonus defined as follows:

  1. Comment with the spell tooltip description
  2. Class method apply[Tier#][SpecName][#Pieces]Bonus()
  3. 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

Comment on lines 54 to 75
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()
}
}
Copy link
Collaborator Author

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)
Copy link
Collaborator Author

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

@kayla-glick kayla-glick merged commit 0e02060 into master Dec 23, 2024
1 check passed
@kayla-glick kayla-glick deleted the phase-7 branch December 23, 2024 22:43
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.

1 participant