Skip to content

Commit

Permalink
add more ZG trinkets
Browse files Browse the repository at this point in the history
  • Loading branch information
kayla-glick committed Sep 29, 2024
1 parent 3447fc5 commit 74a95a4
Show file tree
Hide file tree
Showing 2 changed files with 177 additions and 9 deletions.
18 changes: 12 additions & 6 deletions sim/common/sod/item_effects/phase_3.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ func init() {
// Trinkets
///////////////////////////////////////////////////////////////////////////

// https://www.wowhead.com/classic/item=220632/atalai-blood-ritual-medallion
// Increases your melee and ranged damage by 20 for 20 sec. Every time you hit a target, this bonus is reduced by 1.
core.NewItemEffect(AtalaiBloodRitualMedallion, func(agent core.Agent) {
character := agent.GetCharacter()

Expand Down Expand Up @@ -115,12 +117,14 @@ func init() {
})

character.AddMajorCooldown(core.MajorCooldown{
Spell: triggerSpell,
Priority: core.CooldownPriorityDefault,
Type: core.CooldownTypeDPS,
Spell: triggerSpell,
Type: core.CooldownTypeDPS,
})
})

// https://www.wowhead.com/classic/item=220633/atalai-blood-ritual-badge
// Increases your armor by 1000 and defense skill by 20 for 20 sec.
// Every time you take melee or ranged damage, this bonus is reduced by 100 armor and 2 defense.
core.NewItemEffect(AtalaiBloodRitualBadge, func(agent core.Agent) {
character := agent.GetCharacter()

Expand Down Expand Up @@ -168,12 +172,14 @@ func init() {
})

character.AddMajorCooldown(core.MajorCooldown{
Spell: triggerSpell,
Priority: core.CooldownPriorityDefault,
Type: core.CooldownTypeSurvival,
Spell: triggerSpell,
Type: core.CooldownTypeSurvival,
})
})

// https://www.wowhead.com/classic/item=220634/atalai-blood-ritual-charm
// Increases your spell damage by up to 96 and your healing by up to 192 for 20 sec.
// Every time you cast a spell, the bonus is reduced by 8 spell damage and 16 healing.
core.NewItemEffect(AtalaiBloodRitualCharm, func(agent core.Agent) {
character := agent.GetCharacter()

Expand Down
168 changes: 165 additions & 3 deletions sim/common/vanilla/item_effects.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@ const (
ThrashBlade = 17705
SatyrsLash = 17752
MarkOfTheChosen = 17774
Thunderfury = 230224 // 19019
Nightfall = 19169
EbonHand = 19170
DarkmoonCardHeroism = 19287
DarkmoonCardBlueDragon = 19288
DarkmoonCardMaelstrom = 19289
Nightfall = 19169
RuneOfTheDawn = 19812
ZandalariHeroBadge = 19948
ZandalariHeroMedallion = 19949
ZandalariHeroCharm = 19950
ScarabBrooch = 21625
MarkOfTheChampionPhys = 23206
MarkOfTheChampionSpell = 23207
Expand Down Expand Up @@ -113,7 +115,9 @@ const (
Felstriker = 228757 // 12590
GutgoreRipperMolten = 229372
EskhandarsRightClawMolten = 229379
Thunderfury = 230224 // 19019
TheUntamedBlade = 230242 // 19334
NatPaglesBrokenReel = 231271 // 19947
)

func init() {
Expand Down Expand Up @@ -2419,6 +2423,12 @@ func init() {
}))
})

// https://www.wowhead.com/classic/item=231271/nat-pagles-broken-reel
core.NewSimpleStatOffensiveTrinketEffect(NatPaglesBrokenReel, stats.Stats{
stats.SpellHit: 10 * core.SpellHitRatingPerHitChance,
stats.MeleeHit: 10 * core.MeleeHitRatingPerHitChance,
}, time.Second*15, time.Second*90)

// https://www.wowhead.com/classic/item=19812/rune-of-the-dawn
// Equip: Increases damage done to Undead by magical spells and effects by up to 48.
core.NewItemEffect(RuneOfTheDawn, func(agent core.Agent) {
Expand Down Expand Up @@ -2571,6 +2581,159 @@ func init() {
// Use: Increases damage and healing done by magical spells and effects by up to 184 for 15 sec. (1 Min, 30 Sec Cooldown)
core.NewSimpleStatOffensiveTrinketEffect(TalismanOfEphemeralPower, stats.Stats{stats.SpellPower: 184}, time.Second*15, time.Second*90)

// https://www.wowhead.com/classic/item=19948/zandalarian-hero-badge
// Increases your armor by 2000 and defense skill by 30 for 20 sec.
// Every time you take melee or ranged damage, this bonus is reduced by 200 armor and 3 defense.
core.NewItemEffect(ZandalariHeroBadge, func(agent core.Agent) {
character := agent.GetCharacter()

actionID := core.ActionID{ItemID: ZandalariHeroBadge}
bonusPerStack := stats.Stats{
stats.Armor: 200,
stats.Defense: 3,
}

buffAura := character.GetOrRegisterAura(core.Aura{
Label: "Fragile Armor",
ActionID: actionID,
Duration: time.Second * 20,
MaxStacks: 10,
OnGain: func(aura *core.Aura, sim *core.Simulation) {
aura.SetStacks(sim, aura.MaxStacks)
},
OnStacksChange: func(aura *core.Aura, sim *core.Simulation, oldStacks, newStacks int32) {
bonusStats := bonusPerStack.Multiply(float64(newStacks - oldStacks))
character.AddStatsDynamic(sim, bonusStats)
},
OnSpellHitTaken: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if !spell.ProcMask.Matches(core.ProcMaskMeleeOrRanged) {
return
}
aura.RemoveStack(sim)
},
})

cdSpell := character.GetOrRegisterSpell(core.SpellConfig{
ActionID: actionID,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagOffensiveEquipment,

Cast: core.CastConfig{
CD: core.Cooldown{
Timer: character.NewTimer(),
Duration: time.Minute * 2,
},
},

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
buffAura.Activate(sim)
},
})

character.AddMajorCooldown(core.MajorCooldown{
Spell: cdSpell,
Type: core.CooldownTypeSurvival,
})
})

// https://www.wowhead.com/classic/item=19950/zandalarian-hero-charm
// Increases your spell damage by up to 204 and your healing by up to 408 for 20 sec.
// Every time you cast a spell, the bonus is reduced by 17 spell damage and 34 healing.
core.NewItemEffect(ZandalariHeroCharm, func(agent core.Agent) {
character := agent.GetCharacter()

actionID := core.ActionID{ItemID: TalismanOfEphemeralPower}
bonusPerStack := stats.Stats{
stats.SpellDamage: 17,
stats.HealingPower: 34,
}

buffAura := character.GetOrRegisterAura(core.Aura{
ActionID: actionID,
Label: "Unstable Power",
Duration: time.Second * 20,
MaxStacks: 12,
OnGain: func(aura *core.Aura, sim *core.Simulation) {
aura.SetStacks(sim, aura.MaxStacks)
},
OnStacksChange: func(aura *core.Aura, sim *core.Simulation, oldStacks, newStacks int32) {
bonusStats := bonusPerStack.Multiply(float64(newStacks - oldStacks))
character.AddStatsDynamic(sim, bonusStats)
},
OnCastComplete: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) {
if !spell.ProcMask.Matches(core.ProcMaskSpellDamage) {
return
}
aura.RemoveStack(sim)
},
})

cdSpell := character.GetOrRegisterSpell(core.SpellConfig{
ActionID: actionID,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagOffensiveEquipment,

Cast: core.CastConfig{
CD: core.Cooldown{
Timer: character.NewTimer(),
Duration: time.Minute * 2,
},
},

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
buffAura.Activate(sim)
},
})

character.AddMajorCooldown(core.MajorCooldown{
Spell: cdSpell,
Type: core.CooldownTypeDPS,
})
})

core.NewItemEffect(ZandalariHeroMedallion, func(agent core.Agent) {
character := agent.GetCharacter()

actionID := core.ActionID{ItemID: ZandalariHeroMedallion}

buffAura := character.GetOrRegisterAura(core.Aura{
ActionID: actionID,
Label: "Restless Strength",
Duration: time.Second * 20,
MaxStacks: 20,
OnGain: func(aura *core.Aura, sim *core.Simulation) {
aura.SetStacks(sim, aura.MaxStacks)
},
OnStacksChange: func(aura *core.Aura, sim *core.Simulation, oldStacks, newStacks int32) {
character.PseudoStats.BonusDamage += 2 * float64(newStacks-oldStacks)
},
OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if result.Landed() && spell.ProcMask.Matches(core.ProcMaskMeleeOrRanged) {
aura.RemoveStack(sim)
}
},
})

cdSpell := character.GetOrRegisterSpell(core.SpellConfig{
ActionID: actionID,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagOffensiveEquipment,

Cast: core.CastConfig{
CD: core.Cooldown{
Timer: character.NewTimer(),
Duration: time.Minute * 2,
},
},

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
buffAura.Activate(sim)
},
})

character.AddMajorCooldown(core.MajorCooldown{
Spell: cdSpell,
Type: core.CooldownTypeDPS,
})
})

///////////////////////////////////////////////////////////////////////////
// Other
///////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -2663,7 +2826,6 @@ func enrageAura446327(character *core.Character) *core.Aura {
}

func BlazefuryTriggerAura(character *core.Character, spellID int32, spellSchool core.SpellSchool, damage float64) *core.Aura {

procSpell := character.GetOrRegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: spellID},
SpellSchool: spellSchool,
Expand Down

0 comments on commit 74a95a4

Please sign in to comment.