Skip to content

Commit

Permalink
add force reactive disk items
Browse files Browse the repository at this point in the history
  • Loading branch information
kayla-glick committed Jan 12, 2025
1 parent 4308831 commit 92ac0e0
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 0 deletions.
80 changes: 80 additions & 0 deletions sim/common/sod/item_effects/phase_6.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const (
RazorbrambleShoulderpads = 233804
RazorbrambleCowl = 233808
RazorbrambleLeathers = 233813
TunedForceReactiveDisk = 233988
LodestoneOfRetaliation = 233992

// Obsidian Weapons
Expand Down Expand Up @@ -384,6 +385,85 @@ func init() {
})
})

// https://www.wowhead.com/classic/item=233988/tuned-force-reactive-disk
// Equip: When the shield blocks it releases an electrical charge that damages all nearby enemies. (1s cooldown)
// Use: Charge up the energy within the shield for 3 sec to deal 450 to 750 Nature damage to all nearby enemies. After use, the shield needs 10 sec to recharge. (2 Min Cooldown)
core.NewItemEffect(TunedForceReactiveDisk, func(agent core.Agent) {
character := agent.GetCharacter()

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

DamageMultiplier: 1,
ThreatMultiplier: 1,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
for _, aoeTarget := range sim.Encounter.TargetUnits {
spell.CalcAndDealDamage(sim, aoeTarget, 35, spell.OutcomeMagicHitAndCrit)
}
},
})

procTriggerAura := core.MakeProcTriggerAura(&character.Unit, core.ProcTrigger{
Name: "Force Reactive Disk",
Callback: core.CallbackOnSpellHitTaken,
ProcMask: core.ProcMaskMelee,
Outcome: core.OutcomeBlock,
ICD: time.Second,
Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
procSpell.Cast(sim, spell.Unit)
},
})

spell := character.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 1213967},
SpellSchool: core.SpellSchoolNature,
DefenseType: core.DefenseTypeMagic,
ProcMask: core.ProcMaskEmpty,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell,

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

DamageMultiplier: 1,
ThreatMultiplier: 1,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
sim.AddPendingAction(&core.PendingAction{
NextActionAt: sim.CurrentTime + time.Second*3,
OnAction: func(sim *core.Simulation) {
for _, aoeTarget := range sim.Encounter.TargetUnits {
spell.CalcAndDealDamage(sim, aoeTarget, sim.Roll(450, 750), spell.OutcomeMagicHitAndCrit)
}

spell.CD.Use(sim)

procTriggerAura.Deactivate(sim)
sim.AddPendingAction(&core.PendingAction{
NextActionAt: sim.CurrentTime + time.Second*10,
OnAction: func(sim *core.Simulation) {
procTriggerAura.Activate(sim)
},
})
},
})
},
})

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

core.AddEffectsToTest = true
}

Expand Down
35 changes: 35 additions & 0 deletions sim/common/vanilla/item_effects.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const (
ThrashBlade = 17705
SatyrsLash = 17752
MarkOfTheChosen = 17774
ForceReactiveDisk = 18168
RazorGauntlets = 18326
Nightfall = 19169
EbonHand = 19170
Expand Down Expand Up @@ -2912,6 +2913,40 @@ func init() {
thornsArcaneDamageEffect(agent, DrillborerDiskMolten, "Drillborer Disk (Molten)", 3)
})

// https://www.wowhead.com/classic/item=18168/force-reactive-disk
// Equip: When the shield blocks it releases an electrical charge that damages all nearby enemies. (1s cooldown)
core.NewItemEffect(ForceReactiveDisk, func(agent core.Agent) {
character := agent.GetCharacter()

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

DamageMultiplier: 1,
ThreatMultiplier: 1,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
for _, aoeTarget := range sim.Encounter.TargetUnits {
spell.CalcAndDealDamage(sim, aoeTarget, 25, spell.OutcomeMagicHitAndCrit)
}
},
})

core.MakeProcTriggerAura(&character.Unit, core.ProcTrigger{
Name: "Force Reactive Disk",
Callback: core.CallbackOnSpellHitTaken,
ProcMask: core.ProcMaskMelee,
Outcome: core.OutcomeBlock,
ICD: time.Second,
Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
procSpell.Cast(sim, spell.Unit)
},
})
})

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

0 comments on commit 92ac0e0

Please sign in to comment.