Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 23 additions & 14 deletions sim/core/spell_mod.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package core
import (
"strconv"
"time"

"github.com/wowsims/sod/sim/core/proto"
)

/*
Expand All @@ -12,13 +14,14 @@ SpellMod implementation.
type SpellModConfig struct {
Kind SpellModType

ClassMask uint64 // Only apply to spells that have a matching ClassSpellMask
ClassSpellsOnly bool // Only apply to spells that have a ClassSpellMask set
School SpellSchool // Only apply to spells that have a matching SpellSchool
SpellFlags SpellFlag // Only apply to spells that have a matching SpellFlags
SpellFlagsExclude SpellFlag // Only apply to spells that do NOT have a matching SpellFlags
DefenseType DefenseType // Only apply to spells that have a matching DefenseType
ProcMask ProcMask // Only apply to spells that have a matching ProcMask
ClassMask uint64 // Only apply to spells that have a matching ClassSpellMask
ClassSpellsOnly bool // Only apply to spells that have a ClassSpellMask set
School SpellSchool // Only apply to spells that have a matching SpellSchool
SpellFlags SpellFlag // Only apply to spells that have a matching SpellFlags
SpellFlagsExclude SpellFlag // Only apply to spells that do NOT have a matching SpellFlags
DefenseType DefenseType // Only apply to spells that have a matching DefenseType
ProcMask ProcMask // Only apply to spells that have a matching ProcMask
CastType proto.CastType // Only apply to spells that have a matching CastType

IntValue int64
TimeValue time.Duration
Expand All @@ -31,13 +34,14 @@ type SpellModConfig struct {
type SpellMod struct {
Kind SpellModType

ClassMask uint64 // Only apply to spells that have a matching ClassSpellMask
ClassSpellsOnly bool // Only apply to spells that have a ClassSpellMask set
School SpellSchool // Only apply to spells that have a matching SpellSchool
SpellFlags SpellFlag // Only apply to spells that have a matching SpellFlags
SpellFlagsExclude SpellFlag // Only apply to spells that do NOT have a matching SpellFlags
DefenseType DefenseType // Only apply to spells that have a matching DefenseType
ProcMask ProcMask // Only apply to spells that have a matching ProcMask
ClassMask uint64 // Only apply to spells that have a matching ClassSpellMask
ClassSpellsOnly bool // Only apply to spells that have a ClassSpellMask set
School SpellSchool // Only apply to spells that have a matching SpellSchool
SpellFlags SpellFlag // Only apply to spells that have a matching SpellFlags
SpellFlagsExclude SpellFlag // Only apply to spells that do NOT have a matching SpellFlags
DefenseType DefenseType // Only apply to spells that have a matching DefenseType
ProcMask ProcMask // Only apply to spells that have a matching ProcMask
CastType proto.CastType // Only apply to spells that have a matching CastType

floatValue float64
intValue int64
Expand Down Expand Up @@ -86,6 +90,7 @@ func buildMod(unit *Unit, config SpellModConfig) *SpellMod {
SpellFlagsExclude: config.SpellFlagsExclude,
DefenseType: config.DefenseType,
ProcMask: config.ProcMask,
CastType: config.CastType,
floatValue: config.FloatValue,
intValue: config.IntValue,
timeValue: config.TimeValue,
Expand Down Expand Up @@ -151,6 +156,10 @@ func shouldApply(spell *Spell, mod *SpellMod) bool {
return false
}

if mod.CastType > 0 && !(spell.CastType == mod.CastType) {
return false
}

return true
}

Expand Down
2 changes: 2 additions & 0 deletions sim/hunter/item_sets_pve_phase_5.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"time"

"github.com/wowsims/sod/sim/core"
"github.com/wowsims/sod/sim/core/proto"
"github.com/wowsims/sod/sim/core/stats"
)

Expand Down Expand Up @@ -82,6 +83,7 @@ func (hunter *Hunter) applyT2Melee4PBonus() {
Label: label,
}).AttachSpellMod(core.SpellModConfig{
Kind: core.SpellMod_DamageDone_Pct,
CastType: proto.CastType_CastTypeMainHand,
ClassMask: ClassSpellMask_HunterRaptorStrike | ClassSpellMask_HunterRaptorStrikeHit | ClassSpellMask_HunterWyvernStrike,
FloatValue: 1.20,
}))
Expand Down
1 change: 1 addition & 0 deletions sim/hunter/wyvern_strike.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func (hunter *Hunter) getWyvernStrikeConfig(rank int) core.SpellConfig {
SpellSchool: core.SpellSchoolPhysical,
DefenseType: core.DefenseTypeMelee,
ProcMask: core.ProcMaskMeleeMHSpecial,
CastType: proto.CastType_CastTypeMainHand,
Flags: core.SpellFlagMeleeMetrics | core.SpellFlagAPL | SpellFlagStrike,

Rank: rank,
Expand Down
Loading