Skip to content

Commit

Permalink
Merge branch 'master' into port_cata_drag_drop
Browse files Browse the repository at this point in the history
  • Loading branch information
hillerstorm authored Jan 4, 2025
2 parents d28b1d6 + c03724a commit 508f96e
Show file tree
Hide file tree
Showing 46 changed files with 1,412 additions and 1,396 deletions.
46 changes: 24 additions & 22 deletions sim/common/itemhelpers/stat_bonus_procs.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@ import (
)

type ProcStatBonusEffect struct {
Name string
ID int32
AuraID int32
Bonus stats.Stats
Duration time.Duration
Callback core.AuraCallback
ProcMask core.ProcMask
Outcome core.HitOutcome
Harmful bool
ProcChance float64
PPM float64
ICD time.Duration
Name string
ID int32
AuraID int32
Bonus stats.Stats
Duration time.Duration
Callback core.AuraCallback
ProcMask core.ProcMask
CanProcFromProcs bool // Can Proc From Procs flag
Outcome core.HitOutcome
Harmful bool
ProcChance float64
PPM float64
ICD time.Duration

// For ignoring a hardcoded spell.
IgnoreSpellID int32
Expand Down Expand Up @@ -48,16 +49,17 @@ func newProcStatBonusEffect(config ProcStatBonusEffect) {
}

triggerAura := core.MakeProcTriggerAura(&character.Unit, core.ProcTrigger{
ActionID: core.ActionID{ItemID: config.ID},
Name: config.Name,
Callback: config.Callback,
ProcMask: config.ProcMask,
Outcome: config.Outcome,
Harmful: config.Harmful,
ProcChance: config.ProcChance,
PPM: config.PPM,
ICD: config.ICD,
Handler: handler,
ActionID: core.ActionID{ItemID: config.ID},
Name: config.Name,
Callback: config.Callback,
ProcMask: config.ProcMask,
CanProcFromProcs: config.CanProcFromProcs,
Outcome: config.Outcome,
Harmful: config.Harmful,
ProcChance: config.ProcChance,
PPM: config.PPM,
ICD: config.ICD,
Handler: handler,
})
procAura.Icd = triggerAura.Icd
})
Expand Down
30 changes: 16 additions & 14 deletions sim/common/sod/crafted/phase_3.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,14 @@ func init() {
}

core.MakeProcTriggerAura(&character.Unit, core.ProcTrigger{
ActionID: core.ActionID{SpellID: 446620},
Name: "Echoes of the Damned",
Callback: core.CallbackOnCastComplete,
ProcMask: core.ProcMaskMeleeOrRanged,
ProcChance: 0.3,
ICD: time.Second * 40,
Handler: handler,
ActionID: core.ActionID{SpellID: 446620},
Name: "Echoes of the Damned",
Callback: core.CallbackOnCastComplete,
ProcMask: core.ProcMaskMeleeOrRanged,
SpellFlagsExclude: core.SpellFlagSuppressEquipProcs,
ProcChance: 0.3,
ICD: time.Second * 40,
Handler: handler,
})
})

Expand Down Expand Up @@ -239,12 +240,13 @@ func echoesOfDreadEffect(agent core.Agent) {
}

core.MakeProcTriggerAura(&character.Unit, core.ProcTrigger{
ActionID: core.ActionID{SpellID: 446579},
Name: "Echoes of Dread",
Callback: core.CallbackOnCastComplete,
ProcMask: core.ProcMaskMelee,
ProcChance: 0.3,
ICD: time.Second * 40,
Handler: handler,
ActionID: core.ActionID{SpellID: 446579},
Name: "Echoes of Dread",
Callback: core.CallbackOnSpellHitDealt,
ProcMask: core.ProcMaskMelee,
SpellFlagsExclude: core.SpellFlagSuppressEquipProcs,
ProcChance: 0.3,
ICD: time.Second * 40,
Handler: handler,
})
}
11 changes: 6 additions & 5 deletions sim/common/sod/crafted/phase_4.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,12 @@ var ItemSetVolcanicArmor = core.NewItemSet(core.ItemSet{
})

core.MakeProcTriggerAura(&character.Unit, core.ProcTrigger{
Name: "Firebolt Trigger (Volcanic Armor)",
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeLanded,
ProcMask: core.ProcMaskMelee,
ProcChance: .05,
Name: "Firebolt Trigger (Volcanic Armor)",
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeLanded,
ProcMask: core.ProcMaskMelee,
SpellFlagsExclude: core.SpellFlagSuppressEquipProcs,
ProcChance: .05,
Handler: func(sim *core.Simulation, _ *core.Spell, result *core.SpellResult) {
procSpell.Cast(sim, result.Target)
},
Expand Down
7 changes: 3 additions & 4 deletions sim/common/sod/item_effects.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,10 @@ func StormhammerChainLightningProcAura(agent core.Agent) {
ProcMask: core.ProcMaskSpellDamage,
ProcChance: .1,
Handler: func(sim *core.Simulation, _ *core.Spell, result *core.SpellResult) {
if !icd.IsReady(sim) {
return
if icd.IsReady(sim) {
procSpell.Cast(sim, result.Target)
icd.Use(sim)
}
procSpell.Cast(sim, result.Target)
icd.Use(sim)
},
})
}
54 changes: 29 additions & 25 deletions sim/common/sod/item_effects/phase_3.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,12 @@ func init() {

procAura := character.NewTemporaryStatsAura("Roar of the Dream", core.ActionID{SpellID: 446706}, stats.Stats{stats.SpellDamage: 66}, time.Second*10)
core.MakeProcTriggerAura(&character.Unit, core.ProcTrigger{
ActionID: core.ActionID{SpellID: 446705},
Name: "Roar of the Dream Trigger",
Callback: core.CallbackOnCastComplete,
ProcMask: core.ProcMaskSpellOrSpellProc,
ProcChance: 0.05,
ActionID: core.ActionID{SpellID: 446705},
Name: "Roar of the Dream Trigger",
Callback: core.CallbackOnCastComplete,
ProcMask: core.ProcMaskSpellDamage,
CanProcFromProcs: true,
ProcChance: 0.05,
Handler: func(sim *core.Simulation, spell *core.Spell, _ *core.SpellResult) {
procAura.Activate(sim)
},
Expand Down Expand Up @@ -298,13 +299,14 @@ func init() {
}

hitAura := core.MakeProcTriggerAura(&character.Unit, core.ProcTrigger{
ActionID: core.ActionID{SpellID: 446392},
Name: "DMC Decay Spell Hit",
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeLanded,
ProcMask: core.ProcMaskMelee | core.ProcMaskRanged,
PPM: 7.0, // Estimate from log
Handler: handler,
ActionID: core.ActionID{SpellID: 446392},
Name: "DMC Decay Spell Hit",
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeLanded,
ProcMask: core.ProcMaskMelee | core.ProcMaskRanged,
SpellFlagsExclude: core.SpellFlagSuppressEquipProcs,
PPM: 7.0, // Estimate from log
Handler: handler,
})
hitAura.Icd = &icd

Expand Down Expand Up @@ -385,13 +387,14 @@ func init() {
}

hitAura := core.MakeProcTriggerAura(&character.Unit, core.ProcTrigger{
ActionID: core.ActionID{SpellID: 446389},
Name: "Sandstorm Spell Hit",
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeLanded,
ProcMask: core.ProcMaskMelee | core.ProcMaskRanged,
PPM: 10.0, // Estimate from log
Handler: handler,
ActionID: core.ActionID{SpellID: 446389},
Name: "Sandstorm Spell Hit",
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeLanded,
ProcMask: core.ProcMaskMelee | core.ProcMaskRanged,
SpellFlagsExclude: core.SpellFlagSuppressEquipProcs,
PPM: 10.0, // Estimate from log
Handler: handler,
})
hitAura.Icd = &icd

Expand Down Expand Up @@ -438,12 +441,13 @@ func init() {
procMask := character.GetProcMaskForItem(DragonsCry)

core.MakeProcTriggerAura(&character.Unit, core.ProcTrigger{
Name: "Emerald Dragon Whelp Proc",
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeLanded,
ProcMask: procMask,
PPM: 1.0, // Reported by armaments discord
ICD: time.Minute * 1,
Name: "Emerald Dragon Whelp Proc",
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeLanded,
ProcMask: procMask,
SpellFlagsExclude: core.SpellFlagSuppressEquipProcs,
PPM: 1.0, // Reported by armaments discord
ICD: time.Minute * 1,
Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
for _, petAgent := range character.PetAgents {
if whelp, ok := petAgent.(*guardians.EmeraldDragonWhelp); ok {
Expand Down
18 changes: 9 additions & 9 deletions sim/common/sod/item_effects/phase_5.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,12 @@ func init() {
})

core.MakeProcTriggerAura(&character.Unit, core.ProcTrigger{
Name: "Lightning's Cell Trigger",
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeCrit,
ProcMask: core.ProcMaskSpellDamage | core.ProcMaskSpellDamageProc, // Procs on procs
ICD: time.Millisecond * 2000,
Name: "Lightning's Cell Trigger",
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeCrit,
ProcMask: core.ProcMaskSpellDamage,
CanProcFromProcs: true,
ICD: time.Millisecond * 2000,
Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
chargeAura.Activate(sim)
chargeAura.AddStack(sim)
Expand All @@ -185,7 +186,7 @@ func init() {
})

// https://www.wowhead.com/classic/item=230253/hearstriker
// Equip: 2% chance on ranged hit to gain 1 extra attack. (Proc chance: 1%, 1s cooldown) // obviously something wrong here lol
// Equip: 2% chance on ranged hit to gain 1 extra attack. (Proc chance: 2%, 1s cooldown)
core.NewItemEffect(Heartstriker, func(agent core.Agent) {
character := agent.GetCharacter()
if !character.AutoAttacks.AutoSwingRanged {
Expand All @@ -197,10 +198,9 @@ func init() {
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeLanded,
ProcMask: core.ProcMaskRanged,
SpellFlagsExclude: core.SpellFlagSuppressWeaponProcs,
ProcChance: 0.02,
ICD: time.Second * 1,
SpellFlagsExclude: core.SpellFlagSuppressEquipProcs,

Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
spell.Unit.AutoAttacks.ExtraRangedAttack(sim, 1, core.ActionID{SpellID: 461164}, spell.ActionID)
},
Expand Down Expand Up @@ -371,7 +371,7 @@ func ClawOfChromaggusEffect(character *core.Character) {
}

core.MakeProcTriggerAura(&character.Unit, core.ProcTrigger{
Name: "Claw of the Chromatic Trigger",
Name: "Claw of the Chromaggus Trigger",
Callback: core.CallbackOnCastComplete,
ProcMask: core.ProcMaskSpellDamage,
ICD: time.Millisecond * 9500,
Expand Down
26 changes: 14 additions & 12 deletions sim/common/sod/item_effects/phase_6.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,13 @@ func init() {
})

core.MakeProcTriggerAura(&agent.GetCharacter().Unit, core.ProcTrigger{
Name: "Swarming Thoughts Trigger",
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeLanded,
ProcMask: core.ProcMaskSpellDamage,
ProcChance: 1.00,
ICD: time.Second * 15,
Name: "Swarming Thoughts Trigger",
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeLanded,
ProcMask: core.ProcMaskSpellDamage,
CanProcFromProcs: true,
ProcChance: 1.00,
ICD: time.Second * 15,
Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
buffAura.Activate(sim)
},
Expand Down Expand Up @@ -309,12 +310,13 @@ func init() {
})

core.MakeProcTriggerAura(&agent.GetCharacter().Unit, core.ProcTrigger{
Name: "Resolve of the Battleguard Trigger",
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeLanded,
ProcMask: core.ProcMaskSpellDamage,
ProcChance: 1.00,
ICD: time.Second * 15,
Name: "Resolve of the Battleguard Trigger",
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeLanded,
ProcMask: core.ProcMaskSpellDamage,
CanProcFromProcs: true,
ProcChance: 1.00,
ICD: time.Second * 15,
Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
buffAura.Activate(sim)
},
Expand Down
28 changes: 15 additions & 13 deletions sim/common/sod/items_sets/dungeon_set_1.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,13 +330,14 @@ var ItemSetTheElements = core.NewItemSet(core.ItemSet{
}

core.MakeProcTriggerAura(&c.Unit, core.ProcTrigger{
ActionID: actionID,
Name: "Item - The Furious Storm Proc (MH Auto)",
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeLanded,
ProcMask: core.ProcMaskMeleeMHAuto,
ProcChance: 0.06,
Handler: handler,
ActionID: actionID,
Name: "Item - The Furious Storm Proc (MH Auto)",
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeLanded,
ProcMask: core.ProcMaskMeleeMHAuto,
SpellFlagsExclude: core.SpellFlagSuppressEquipProcs,
ProcChance: 0.06,
Handler: handler,
})
core.MakeProcTriggerAura(&c.Unit, core.ProcTrigger{
ActionID: actionID,
Expand Down Expand Up @@ -429,12 +430,13 @@ var ItemSetBattlegearOfValor = core.NewItemSet(core.ItemSet{
rageMetrics := c.NewRageMetrics(core.ActionID{SpellID: 450589})

core.MakeProcTriggerAura(&c.Unit, core.ProcTrigger{
ActionID: actionID,
Name: "S03 - Warrior Armor Heal Trigger - Battlegear of Valor",
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeLanded,
ProcMask: core.ProcMaskMelee,
PPM: 1,
ActionID: actionID,
Name: "S03 - Warrior Armor Heal Trigger - Battlegear of Valor",
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeLanded,
ProcMask: core.ProcMaskMelee,
SpellFlagsExclude: core.SpellFlagSuppressEquipProcs,
PPM: 1,
Handler: func(sim *core.Simulation, spell *core.Spell, _ *core.SpellResult) {
c.GainHealth(sim, sim.Roll(88, 132), healthMetrics)
if c.HasRageBar() {
Expand Down
Loading

0 comments on commit 508f96e

Please sign in to comment.