Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/mlizard32/wowsims_sod
Browse files Browse the repository at this point in the history
  • Loading branch information
mlizard32 committed Sep 2, 2024
2 parents 7406121 + 144d277 commit 9c7d170
Show file tree
Hide file tree
Showing 126 changed files with 3,916 additions and 1,619 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,7 @@
"tinsert",
"UIParent"
],
"[go]": {
"editor.defaultFormatter": "golang.go"
}
}
59 changes: 59 additions & 0 deletions proto/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ message ActionMetrics {
// Note that some spells are untargeted, these will always have a single
// element in this array.
repeated TargetedActionMetrics targets = 3;

int32 spell_school = 4;

// True if action is applied/cast as a result of another action
bool is_passive = 5;
}

// Metrics for a specific action, when cast at a particular target.
Expand All @@ -151,9 +156,27 @@ message TargetedActionMetrics {
// # of times this action hit a target. For cleave spells this can be larger than casts.
int32 hits = 2;

// # of times this action resisted hit a target.
int32 resisted_hits = 25;

// # of times this action was a critical strike.
int32 crits = 3;

// # of times this action resisted crit a target.
int32 resisted_crits = 26;

// # of times this action ticked on a target.
int32 ticks = 21;

// # of times this action resisted ticked a target.
int32 resisted_ticks = 27;

// # of times this action was a critical tick on a target.
int32 crit_ticks = 22;

// # of times this action was a resisted tick on a target.
int32 resisted_crit_ticks = 28;

// # of times this action was a Miss or Resist.
int32 misses = 4;

Expand All @@ -166,18 +189,54 @@ message TargetedActionMetrics {
// # of times this action was a Block.
int32 blocks = 7;

// # of times this action was a Critical Block.
int32 crit_blocks = 20;

// # of times this action was a Glance.
int32 glances = 8;

// Total damage done to this target by this action.
double damage = 9;

// Total resisted damage done to this target by this action.
double resisted_damage = 29;

// Total critical damage done to this target by this action.
double crit_damage = 15;

// Total resisted critical damage done to this target by this action.
double resisted_crit_damage = 30;

// Total tick damage done to this target by this action.
double tick_damage = 23;

// Total resisted tick damage done to this target by this action.
double resisted_tick_damage = 31;

// Total critical tick damage done to this target by this action.
double crit_tick_damage = 24;

// Total resisted critical tick damage done to this target by this action.
double resisted_crit_tick_damage = 32;

// Total glancing damage done to this target by this action.
double glance_damage = 17;

// Total block damage done to this target by this action.
double block_damage = 18;

// Total critical block damage done to this target by this action.
double crit_block_damage = 19;

// Total threat done to this target by this action.
double threat = 10;

// Total healing done to this target by this action.
double healing = 11;

// Total critical healing done to this target by this action.
double crit_healing = 16;

// Total shielding done to this target by this action.
double shielding = 13;

Expand Down
2 changes: 2 additions & 0 deletions sim/common/itemhelpers/weaponprocs.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func CreateWeaponProcDamage(itemId int32, itemName string, ppm float64, spellId
SpellSchool: school,
DefenseType: defType,
ProcMask: core.ProcMaskEmpty,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell,

DamageMultiplier: 1,
ThreatMultiplier: 1,
Expand Down Expand Up @@ -75,6 +76,7 @@ func CreateWeaponProcSpell(itemId int32, itemName string, ppm float64, procSpell
character := agent.GetCharacter()

procSpell := procSpellGenerator(character)
procSpell.Flags |= core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell

procMask := character.GetProcMaskForItem(itemId)
ppmm := character.AutoAttacks.NewPPMManager(ppm, procMask)
Expand Down
4 changes: 2 additions & 2 deletions sim/common/sod/crafted/phase_2.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func init() {
SpellSchool: core.SpellSchoolArcane,
ProcMask: core.ProcMaskEmpty,
// TODO: Verify if SP affects the damage
Flags: core.SpellFlagNoMetrics | core.SpellFlagIgnoreAttackerModifiers,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagNoMetrics | core.SpellFlagIgnoreAttackerModifiers,

Cast: core.CastConfig{
CD: core.Cooldown{
Expand Down Expand Up @@ -252,7 +252,7 @@ func init() {
SpellSchool: core.SpellSchoolArcane,
ProcMask: core.ProcMaskEmpty,
// TODO: Verify if SP affects the damage
Flags: core.SpellFlagNoMetrics | core.SpellFlagIgnoreAttackerModifiers,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell | core.SpellFlagNoMetrics | core.SpellFlagIgnoreAttackerModifiers,

Cast: core.CastConfig{
CD: core.Cooldown{
Expand Down
4 changes: 2 additions & 2 deletions sim/common/sod/item_effects/phase_2.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func init() {
SpellSchool: core.SpellSchoolNature,
DefenseType: core.DefenseTypeMagic,
ProcMask: core.ProcMaskEmpty,
Flags: core.SpellFlagNoOnCastComplete,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell,

DamageMultiplier: 1,
ThreatMultiplier: 1,
Expand Down Expand Up @@ -147,7 +147,7 @@ func init() {

regChannel := character.GetOrRegisterSpell(core.SpellConfig{
ActionID: actionID,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagChanneled,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell | core.SpellFlagChanneled,

Cast: core.CastConfig{
CD: core.Cooldown{
Expand Down
8 changes: 5 additions & 3 deletions sim/common/sod/item_effects/phase_3.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ func init() {
SpellSchool: core.SpellSchoolShadow,
DefenseType: core.DefenseTypeMagic,
ProcMask: core.ProcMaskEmpty,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell,

DamageMultiplier: 1,
ThreatMultiplier: 1,
Expand All @@ -256,7 +257,7 @@ func init() {
SpellSchool: core.SpellSchoolShadow,
DefenseType: core.DefenseTypeMagic,
ProcMask: core.ProcMaskEmpty,
Flags: core.SpellFlagBinary,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell | core.SpellFlagBinary,

DamageMultiplier: 1,
ThreatMultiplier: 1,
Expand Down Expand Up @@ -320,6 +321,7 @@ func init() {
SpellSchool: core.SpellSchoolNature,
DefenseType: core.DefenseTypeMagic,
ProcMask: core.ProcMaskEmpty,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell,

DamageMultiplier: 1,
ThreatMultiplier: 1,
Expand Down Expand Up @@ -468,7 +470,7 @@ func init() {
}

if ppmm.Proc(sim, procMask, "Cobra Fang Claw Extra Attack") {
character.AutoAttacks.ExtraMHAttackProc(sim , 1, core.ActionID{SpellID: 220588}, spell)
character.AutoAttacks.ExtraMHAttackProc(sim, 1, core.ActionID{SpellID: 220588}, spell)
}
},
})
Expand All @@ -482,7 +484,7 @@ func init() {
SpellSchool: core.SpellSchoolNature,
DefenseType: core.DefenseTypeMagic,
ProcMask: core.ProcMaskEmpty,
Flags: core.SpellFlagPoison,
Flags: core.SpellFlagPoison | core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell,

DamageMultiplier: 1,
ThreatMultiplier: 1,
Expand Down
Loading

0 comments on commit 9c7d170

Please sign in to comment.