Skip to content

Commit

Permalink
add naglering, drillborer disk, razorbramble items
Browse files Browse the repository at this point in the history
  • Loading branch information
kayla-glick committed Jan 12, 2025
1 parent 3a750ee commit b56c84c
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 124 deletions.
155 changes: 56 additions & 99 deletions sim/common/sod/item_effects/phase_6.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package item_effects

import (
"fmt"
"math"
"time"

Expand All @@ -18,6 +19,9 @@ const (
RobesOfTheBattleguard = 233575
RazorspikeShoulderplates = 233793
RazorspikeHeadcage = 233795
RazorbrambleShoulderpads = 233804
RazorbrambleCowl = 233808
RazorbrambleLeathers = 233813
LodestoneOfRetaliation = 233992

// Obsidian Weapons
Expand Down Expand Up @@ -179,31 +183,7 @@ func init() {
// When struck in combat inflicts 80 Nature damage to the attacker.
// Causes twice as much threat as damage dealt.
core.NewItemEffect(LodestoneOfRetaliation, func(agent core.Agent) {
character := agent.GetCharacter()
character.PseudoStats.ThornsDamage += 80

procSpell := character.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{ItemID: LodestoneOfRetaliation},
SpellSchool: core.SpellSchoolNature,
ProcMask: core.ProcMaskEmpty,
Flags: core.SpellFlagBinary | core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell,

DamageMultiplier: 1,
ThreatMultiplier: 2,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
spell.CalcAndDealDamage(sim, target, 80, spell.OutcomeMagicHit)
},
})

core.MakePermanent(character.GetOrRegisterAura(core.Aura{
Label: "Damage Shield Dmg +80 (Lodestone of Retaliation)",
OnSpellHitTaken: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if result.Landed() && spell.ProcMask.Matches(core.ProcMaskMelee) {
procSpell.Cast(sim, spell.Unit)
}
},
}))
thornsNatureDamageEffect(agent, LodestoneOfRetaliation, "Lodestone of Retaliation", 80)
})

///////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -330,97 +310,46 @@ func init() {
})
})

// https://www.wowhead.com/classic/item=233492/razorspike-battleplate
// https://www.wowhead.com/classic/item=233808/razorbramble-cowl
// When struck in combat inflicts 100 Nature damage to the attacker.
// Causes twice as much threat as damage dealt.
core.NewItemEffect(RazorspikeBattleplate, func(agent core.Agent) {
character := agent.GetCharacter()
character.PseudoStats.ThornsDamage += 100

procSpell := character.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{ItemID: RazorspikeBattleplate},
SpellSchool: core.SpellSchoolNature,
ProcMask: core.ProcMaskEmpty,
Flags: core.SpellFlagBinary | core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell,
core.NewItemEffect(RazorbrambleCowl, func(agent core.Agent) {
thornsNatureDamageEffect(agent, RazorbrambleCowl, "Razorbramble Cowl", 100)
})

DamageMultiplier: 1,
ThreatMultiplier: 2,
// https://www.wowhead.com/classic/item=233813/razorbramble-leathers
// When struck in combat inflicts 100 Nature damage to the attacker.
// Causes twice as much threat as damage dealt.
core.NewItemEffect(RazorbrambleLeathers, func(agent core.Agent) {
thornsNatureDamageEffect(agent, RazorbrambleLeathers, "Razorbramble Leathers", 100)
})

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
spell.CalcAndDealDamage(sim, target, 100, spell.OutcomeMagicHit)
},
})
// https://www.wowhead.com/classic/item=233804/razorbramble-shoulderpads
// When struck in combat inflicts 80 Nature damage to the attacker.
// Causes twice as much threat as damage dealt.
core.NewItemEffect(RazorbrambleShoulderpads, func(agent core.Agent) {
thornsNatureDamageEffect(agent, RazorbrambleShoulderpads, "Razorbramble Shoulderpads", 80)
})

core.MakePermanent(character.GetOrRegisterAura(core.Aura{
Label: "Damage Shield Dmg +100 (Razorspike Battleplate)",
OnSpellHitTaken: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if result.Landed() && spell.ProcMask.Matches(core.ProcMaskMelee) {
procSpell.Cast(sim, spell.Unit)
}
},
}))
// https://www.wowhead.com/classic/item=233492/razorspike-battleplate
// When struck in combat inflicts 100 Nature damage to the attacker.
// Causes twice as much threat as damage dealt.
core.NewItemEffect(RazorspikeBattleplate, func(agent core.Agent) {
thornsNatureDamageEffect(agent, RazorspikeBattleplate, "Razorspike Battleplate", 100)
})

// https://www.wowhead.com/classic/item=233795/razorspike-headcage
// When struck in combat inflicts 100 Nature damage to the attacker.
// Causes twice as much threat as damage dealt.
core.NewItemEffect(RazorspikeHeadcage, func(agent core.Agent) {
character := agent.GetCharacter()
character.PseudoStats.ThornsDamage += 100

procSpell := character.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{ItemID: RazorspikeHeadcage},
SpellSchool: core.SpellSchoolNature,
ProcMask: core.ProcMaskEmpty,
Flags: core.SpellFlagBinary | core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell,

DamageMultiplier: 1,
ThreatMultiplier: 2,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
spell.CalcAndDealDamage(sim, target, 100, spell.OutcomeMagicHit)
},
})

core.MakePermanent(character.GetOrRegisterAura(core.Aura{
Label: "Damage Shield Dmg +100 (Razorspike Headcage)",
OnSpellHitTaken: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if result.Landed() && spell.ProcMask.Matches(core.ProcMaskMelee) {
procSpell.Cast(sim, spell.Unit)
}
},
}))
thornsNatureDamageEffect(agent, RazorspikeHeadcage, "Razorspike Headcage", 100)
})

// https://www.wowhead.com/classic/item=233793/razorspike-shoulderplates
// When struck in combat inflicts 80 Nature damage to the attacker.
// Causes twice as much threat as damage dealt.
core.NewItemEffect(RazorspikeShoulderplates, func(agent core.Agent) {
character := agent.GetCharacter()
character.PseudoStats.ThornsDamage += 80

procSpell := character.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{ItemID: RazorspikeShoulderplates},
SpellSchool: core.SpellSchoolNature,
ProcMask: core.ProcMaskEmpty,
Flags: core.SpellFlagBinary | core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell,

DamageMultiplier: 1,
ThreatMultiplier: 2,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
spell.CalcAndDealDamage(sim, target, 80, spell.OutcomeMagicHit)
},
})

core.MakePermanent(character.GetOrRegisterAura(core.Aura{
Label: "Damage Shield Dmg +80 (Razorspike Shoulderplates)",
OnSpellHitTaken: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if result.Landed() && spell.ProcMask.Matches(core.ProcMaskMelee) {
procSpell.Cast(sim, spell.Unit)
}
},
}))
thornsNatureDamageEffect(agent, RazorspikeShoulderplates, "Razorspike Shoulderplates", 80)
})

// https://www.wowhead.com/classic/item=233575/robes-of-the-battleguard
Expand Down Expand Up @@ -668,3 +597,31 @@ func TimewornStrikeAura(agent core.Agent) {
},
})
}

func thornsNatureDamageEffect(agent core.Agent, itemID int32, itemName string, damage float64) {
character := agent.GetCharacter()
character.PseudoStats.ThornsDamage += damage

procSpell := character.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{ItemID: itemID},
SpellSchool: core.SpellSchoolNature,
ProcMask: core.ProcMaskEmpty,
Flags: core.SpellFlagBinary | core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell,

DamageMultiplier: 1,
ThreatMultiplier: 2,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
spell.CalcAndDealDamage(sim, target, damage, spell.OutcomeMagicHit)
},
})

core.MakePermanent(character.GetOrRegisterAura(core.Aura{
Label: fmt.Sprintf("Damage Shield Dmg +%f (%s)", damage, itemName),
OnSpellHitTaken: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if result.Landed() && spell.ProcMask.Matches(core.ProcMaskMelee) {
procSpell.Cast(sim, spell.Unit)
}
},
}))
}
65 changes: 40 additions & 25 deletions sim/common/vanilla/item_effects.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ const (
FiendishMachete = 228056 // 18310
RefinedArcaniteChampion = 228125
TalismanOfEphemeralPower = 228255 // 18820
DrillborerDisk = 228266 // 17066
GutgoreRipper = 228267 // 17071
Shadowstrike = 228272 // 17074
Thunderstrike = 228273 // 17223
Expand All @@ -106,6 +107,7 @@ const (
SeepingWillow = 228666 // 12969
DraconicInfusedEmblem = 228678 // 22268
QuelSerrar = 228679 // 18348
DrillborerDiskMolten = 228702
HandOfJustice = 228722 // 11815
Felstriker = 228757 // 12590
GutgoreRipperMolten = 229372
Expand Down Expand Up @@ -2899,34 +2901,19 @@ func init() {
BlazefuryTriggerAura(character, 7712, core.SpellSchoolFire, 2)
})

// https://www.wowhead.com/classic/item=228266/drillborer-disk
// When struck in combat inflicts 3 Arcane damage to the attacker.
core.NewItemEffect(DrillborerDisk, func(agent core.Agent) {
thornsArcaneDamageEffect(agent, DrillborerDisk, "Drillborer Disk", 3)
})
core.NewItemEffect(DrillborerDiskMolten, func(agent core.Agent) {
thornsArcaneDamageEffect(agent, DrillborerDiskMolten, "Drillborer Disk (Molten)", 3)
})

// https://www.wowhead.com/classic/item=11669/naglering
// When struck in combat inflicts 3 Arcane damage to the attacker.
core.NewItemEffect(Naglering, func(agent core.Agent) {
character := agent.GetCharacter()
character.PseudoStats.ThornsDamage += 3

procSpell := character.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{ItemID: Naglering},
SpellSchool: core.SpellSchoolArcane,
ProcMask: core.ProcMaskEmpty,
Flags: core.SpellFlagBinary | core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell,

DamageMultiplier: 1,
ThreatMultiplier: 1,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
spell.CalcAndDealDamage(sim, target, 3, spell.OutcomeMagicHit)
},
})

core.MakePermanent(character.GetOrRegisterAura(core.Aura{
Label: "Thorns (Naglering)",
OnSpellHitTaken: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if result.Landed() && spell.ProcMask.Matches(core.ProcMaskMelee) {
procSpell.Cast(sim, spell.Unit)
}
},
}))
thornsArcaneDamageEffect(agent, Naglering, "Naglering", 3)
})

// https://www.wowhead.com/classic/item=1168/skullflame-shield
Expand Down Expand Up @@ -3148,6 +3135,34 @@ func dreadbladeOfTheDestructorEffect(character *core.Character) *core.Spell {
})
}

func thornsArcaneDamageEffect(agent core.Agent, itemID int32, itemName string, damage float64) {
character := agent.GetCharacter()
character.PseudoStats.ThornsDamage += damage

procSpell := character.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{ItemID: itemID},
SpellSchool: core.SpellSchoolArcane,
ProcMask: core.ProcMaskEmpty,
Flags: core.SpellFlagBinary | core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell,

DamageMultiplier: 1,
ThreatMultiplier: 1,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
spell.CalcAndDealDamage(sim, target, damage, spell.OutcomeMagicHit)
},
})

core.MakePermanent(character.GetOrRegisterAura(core.Aura{
Label: fmt.Sprintf("Thorns (%s)", itemName),
OnSpellHitTaken: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if result.Landed() && spell.ProcMask.Matches(core.ProcMaskMelee) {
procSpell.Cast(sim, spell.Unit)
}
},
}))
}

func eskhandarsRightClawAura(character *core.Character) *core.Aura {
return character.GetOrRegisterAura(core.Aura{
Label: "Eskhandar's Rage",
Expand Down

0 comments on commit b56c84c

Please sign in to comment.