Skip to content

Commit

Permalink
Remove SoD item code from classes
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixPflaum committed Nov 20, 2024
1 parent 186db04 commit cefe945
Show file tree
Hide file tree
Showing 46 changed files with 141 additions and 253 deletions.
33 changes: 0 additions & 33 deletions sim/common/vanilla/enchant_effects.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,38 +334,5 @@ func init() {
})
})

core.NewEnchantEffect(7649, func(agent core.Agent) {
character := agent.GetCharacter()
actionID := core.ActionID{SpellID: 1213833}

procSpell := character.RegisterSpell(core.SpellConfig{
ActionID: actionID,
SpellSchool: core.SpellSchoolNature,
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, 20, spell.OutcomeMagicHit)
},
})

character.GetOrRegisterAura(core.Aura{
Label: "Thorns +20",
Duration: core.NeverExpires,
OnReset: func(aura *core.Aura, sim *core.Simulation) {
aura.Activate(sim)
},
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)
}
},
})
})


core.AddEffectsToTest = true
}
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion sim/druid/druid.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ func (druid *Druid) Initialize() {

druid.registerFaerieFireSpell()
druid.registerInnervateCD()
druid.registerCatnipCD()
}

func (druid *Druid) RegisterBalanceSpells() {
Expand Down
3 changes: 1 addition & 2 deletions sim/druid/forms.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package druid

import (
"github.com/wowsims/classic/sim/common/sod"
"github.com/wowsims/classic/sim/core"
"github.com/wowsims/classic/sim/core/proto"
"github.com/wowsims/classic/sim/core/stats"
Expand Down Expand Up @@ -217,7 +216,7 @@ func (druid *Druid) registerCatFormSpell() {
furorProcChance := 0.2 * float64(druid.Talents.Furor)

hasWolfheadBonus := false
if head := druid.Equipment.Head(); head != nil && (head.ID == WolfsheadHelm || head.Enchant.EffectID == sod.WolfsheadTrophy) {
if head := druid.Equipment.Head(); head != nil && (head.ID == WolfsheadHelm) {
hasWolfheadBonus = true
}

Expand Down
70 changes: 30 additions & 40 deletions sim/druid/items.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,42 @@ package druid

import (
"slices"
"time"

"github.com/wowsims/classic/sim/common/sod"
"github.com/wowsims/classic/sim/core"
"github.com/wowsims/classic/sim/core/stats"
)

// Totem Item IDs
const (
WolfsheadHelm = 8345
IdolOfFerocity = 22397
IdolOfTheMoon = 23197
IdolOfBrutality = 23198
IdolMindExpandingMushroom = 209576
Catnip = 213407
IdolOfWrath = 216490
BloodBarkCrusher = 216499
IdolOfTheDream = 220606
RitualistsHammer = 221446
Glasir = 224281
Raelar = 224282
IdolOfExsanguinationCat = 228181
IdolOfTheSwarm = 228180
IdolOfExsanguinationBear = 228182
BloodGuardDragonhideGrips = 227180
KnightLieutenantsDragonhideGrips = 227183
WushoolaysCharmOfNature = 231280
PristineEnchantedSouthSeasKelp = 231316
IdolOfCelestialFocus = 232390
IdolOfFelineFocus = 232391
IdolOfUrsinPower = 234468
IdolOfFelineFerocity = 234469
IdolOfSiderealWrath = 234474
WolfsheadHelm = 8345
IdolOfFerocity = 22397
IdolOfTheMoon = 23197
IdolOfBrutality = 23198
// IdolMindExpandingMushroom = 209576
// Catnip = 213407
// IdolOfWrath = 216490
// BloodBarkCrusher = 216499
// IdolOfTheDream = 220606
// RitualistsHammer = 221446
// Glasir = 224281
// Raelar = 224282
// IdolOfExsanguinationCat = 228181
// IdolOfTheSwarm = 228180
// IdolOfExsanguinationBear = 228182
// BloodGuardDragonhideGrips = 227180
// KnightLieutenantsDragonhideGrips = 227183
// WushoolaysCharmOfNature = 231280
// PristineEnchantedSouthSeasKelp = 231316
// IdolOfCelestialFocus = 232390
// IdolOfFelineFocus = 232391
// IdolOfUrsinPower = 234468
// IdolOfFelineFerocity = 234469
// IdolOfSiderealWrath = 234474
)

func init() {
core.AddEffectsToTest = false

core.NewItemEffect(BloodBarkCrusher, func(agent core.Agent) {
/* core.NewItemEffect(BloodBarkCrusher, func(agent core.Agent) {
druid := agent.(DruidAgent).GetDruid()
druid.newBloodbarkCleaveItem(BloodBarkCrusher)
})
Expand Down Expand Up @@ -168,7 +165,7 @@ func init() {
}
},
}))
})
}) */

// https://www.wowhead.com/classic/item=22397/idol-of-ferocity
// Equip: Reduces the energy cost of Claw and Rake by 3.
Expand Down Expand Up @@ -201,7 +198,7 @@ func init() {
// Implemented in maul.go and swipe.go
})

core.NewItemEffect(IdolMindExpandingMushroom, func(agent core.Agent) {
/* core.NewItemEffect(IdolMindExpandingMushroom, func(agent core.Agent) {
character := agent.GetCharacter()
character.AddStat(stats.Spirit, 5)
})
Expand Down Expand Up @@ -441,20 +438,12 @@ func init() {
Priority: core.CooldownPriorityBloodlust,
Type: core.CooldownTypeDPS,
})
})
}) */

core.AddEffectsToTest = true
}

// https://www.wowhead.com/classic/item=213407/catnip
func (druid *Druid) registerCatnipCD() {
if druid.Consumes.MiscConsumes == nil || !druid.Consumes.MiscConsumes.Catnip {
return
}
sod.RegisterFiftyPercentHasteBuffCD(&druid.Character, core.ActionID{ItemID: Catnip})
}

func (druid *Druid) newBloodbarkCleaveItem(itemID int32) {
/* func (druid *Druid) newBloodbarkCleaveItem(itemID int32) {
auraActionID := core.ActionID{SpellID: 436482}
results := make([]*core.SpellResult, min(3, druid.Env.GetNumTargets()))
Expand Down Expand Up @@ -550,3 +539,4 @@ func registerDragonHideGripsAura(druid *Druid) {
},
})
}
*/
8 changes: 1 addition & 7 deletions sim/druid/rake.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ func (druid *Druid) registerRakeSpell() {
}

func (druid *Druid) newRakeSpellConfig(rakeRank RakeRankInfo) core.SpellConfig {
has4PCenarionCunning := druid.HasSetBonus(ItemSetCenarionCunning, 4)

baseDamageInitial := rakeRank.initialDamage * RakeBaseDmgMultiplier
baseDamageTick := rakeRank.dotTickDamage * RakeBaseDmgMultiplier
energyCost := 40 - float64(druid.Talents.Ferocity)
Expand Down Expand Up @@ -105,11 +103,7 @@ func (druid *Druid) newRakeSpellConfig(rakeRank RakeRankInfo) core.SpellConfig {
dot.Snapshot(target, damage, isRollover)
},
OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) {
if has4PCenarionCunning {
dot.CalcAndDealPeriodicSnapshotDamage(sim, target, dot.OutcomeSnapshotCrit)
} else {
dot.CalcAndDealPeriodicSnapshotDamage(sim, target, dot.OutcomeTick)
}
dot.CalcAndDealPeriodicSnapshotDamage(sim, target, dot.OutcomeTick)
},
},

Expand Down
7 changes: 1 addition & 6 deletions sim/druid/rip.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ func (druid *Druid) registerRipSpell() {
}

func (druid *Druid) newRipSpellConfig(ripRank RipRankInfo) core.SpellConfig {
has4PCenarionCunning := druid.HasSetBonus(ItemSetCenarionCunning, 4)
energyCost := 30.0

return core.SpellConfig{
Expand Down Expand Up @@ -121,11 +120,7 @@ func (druid *Druid) newRipSpellConfig(ripRank RipRankInfo) core.SpellConfig {
dot.Snapshot(target, baseDamage, isRollover)
},
OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) {
if has4PCenarionCunning {
dot.CalcAndDealPeriodicSnapshotDamage(sim, target, dot.OutcomeSnapshotCrit)
} else {
dot.CalcAndDealPeriodicSnapshotDamage(sim, target, dot.OutcomeTick)
}
dot.CalcAndDealPeriodicSnapshotDamage(sim, target, dot.OutcomeTick)
},
},

Expand Down
8 changes: 4 additions & 4 deletions sim/druid/shred.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ func (druid *Druid) registerShredSpell() {
60: 80,
}[druid.Level] * ShredFlatDmgMultiplier

if druid.Ranged().ID == IdolOfTheDream {
damageMultiplier *= 1.02
flatDamageBonus *= 1.02
}
// if druid.Ranged().ID == IdolOfTheDream {
// damageMultiplier *= 1.02
// flatDamageBonus *= 1.02
// }

// In-game testing concluded that, unintuitively, Idol of the Drea's 1.02x damage applies to the original 2.25x
// Shred mod, and to the flat damage bonus, but that the .75x SoD buff happens additively after Idol
Expand Down
3 changes: 0 additions & 3 deletions sim/druid/starfire.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package druid
import (
"time"

item_sets "github.com/wowsims/classic/sim/common/sod/items_sets"
"github.com/wowsims/classic/sim/core"
)

Expand Down Expand Up @@ -57,8 +56,6 @@ func (druid *Druid) newStarfireSpellConfig(rank int) core.SpellConfig {
},
},

BonusCritRating: core.TernaryFloat64(druid.HasSetBonus(item_sets.ItemSetInsulatedSorcerorLeather, 3), 2, 0) * core.CritRatingPerCritChance,

DamageMultiplier: 1,
ThreatMultiplier: 1,
BonusCoefficient: 1,
Expand Down
5 changes: 1 addition & 4 deletions sim/druid/wrath.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package druid
import (
"time"

item_sets "github.com/wowsims/classic/sim/common/sod/items_sets"
"github.com/wowsims/classic/sim/core"
)

Expand Down Expand Up @@ -60,9 +59,7 @@ func (druid *Druid) newWrathSpellConfig(rank int) core.SpellConfig {
},
},

BonusCritRating: core.TernaryFloat64(druid.HasSetBonus(item_sets.ItemSetInsulatedSorcerorLeather, 3), 2, 0) * core.CritRatingPerCritChance,

DamageMultiplier: 1 + core.Ternary(druid.Ranged().ID == IdolOfWrath, .02, 0),
DamageMultiplier: 1, // + core.Ternary(druid.Ranged().ID == IdolOfWrath, .02, 0),
ThreatMultiplier: 1,
BonusCoefficient: spellCoeff,

Expand Down
File renamed without changes.
File renamed without changes.
5 changes: 0 additions & 5 deletions sim/hunter/aimed_shot.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ func (hunter *Hunter) getAimedShotConfig(rank int, timer *core.Timer) core.Spell
manaCost := [7]float64{0, 75, 115, 160, 210, 260, 310}[rank]
level := [7]int{0, 0, 28, 36, 44, 52, 60}[rank]

has2PDragonStalkerPursuit := hunter.HasSetBonus(ItemSetDragonstalkerPursuit, 2)

return core.SpellConfig{
SpellCode: SpellCode_HunterAimedShot,
ActionID: core.ActionID{SpellID: spellId},
Expand Down Expand Up @@ -65,9 +63,6 @@ func (hunter *Hunter) getAimedShotConfig(rank int, timer *core.Timer) core.Spell
hunter.AmmoDamageBonus +
baseDamage

if has2PDragonStalkerPursuit && (target.HasActiveAuraWithTag("ImmolationTrap") || hunter.HasActiveAuraWithTag("ExplosiveTrap")) {
baseDamage *= 1.20
}
result := spell.CalcDamage(sim, target, baseDamage, spell.OutcomeRangedHitAndCrit)
spell.WaitTravelTime(sim, func(s *core.Simulation) {
spell.DealDamage(sim, result)
Expand Down
63 changes: 31 additions & 32 deletions sim/hunter/items.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,39 @@ package hunter
import (
"time"

"github.com/wowsims/classic/sim/common/itemhelpers"
"github.com/wowsims/classic/sim/core"
"github.com/wowsims/classic/sim/core/stats"
)

const (
DevilsaurEye = 19991
DevilsaurTooth = 19992
SignetOfBeasts = 209823
BloodlashBow = 216516
GurubashiPitFightersBow = 221450
BloodChainVices = 227075
KnightChainVices = 227077
BloodChainGrips = 227081
KnightChainGrips = 227087
WhistleOfTheBeast = 228432
ArcaneInfusedGem = 230237
RenatakisCharmOfRavaging = 231288
MaelstromsWrath = 231320
ZandalarPredatorsMantle = 231321
ZandalarPredatorsBelt = 231322
ZandalarPredatorsBracers = 231323
MarshalChainGrips = 231560
GeneralChainGrips = 231569
GeneralChainVices = 231575
MarshalChainVices = 231578
Kestrel = 231754
Peregrine = 231755
CloakOfTheUnseenPath = 233420
ScytheOfTheUnseenPath = 233421
SignetOfTheUnseenPath = 233422
DevilsaurEye = 19991
DevilsaurTooth = 19992
// SignetOfBeasts = 209823
// BloodlashBow = 216516
// GurubashiPitFightersBow = 221450
// BloodChainVices = 227075
// KnightChainVices = 227077
// BloodChainGrips = 227081
// KnightChainGrips = 227087
// WhistleOfTheBeast = 228432
// ArcaneInfusedGem = 230237
// RenatakisCharmOfRavaging = 231288
// MaelstromsWrath = 231320
// ZandalarPredatorsMantle = 231321
// ZandalarPredatorsBelt = 231322
// ZandalarPredatorsBracers = 231323
// MarshalChainGrips = 231560
// GeneralChainGrips = 231569
// GeneralChainVices = 231575
// MarshalChainVices = 231578
// Kestrel = 231754
// Peregrine = 231755
// CloakOfTheUnseenPath = 233420
// ScytheOfTheUnseenPath = 233421
// SignetOfTheUnseenPath = 233422
)

func applyRaptorStrikeDamageEffect(agent core.Agent, multiplier float64) {
/* func applyRaptorStrikeDamageEffect(agent core.Agent, multiplier float64) {
hunter := agent.(HunterAgent).GetHunter()
hunter.OnSpellRegistered(func(spell *core.Spell) {
if spell.SpellCode == SpellCode_HunterRaptorStrikeHit {
Expand All @@ -52,7 +51,7 @@ func applyMultiShotDamageEffect(agent core.Agent, multiplier float64) {
spell.DamageMultiplier *= multiplier
}
})
}
} */

func init() {
core.NewItemEffect(DevilsaurEye, func(agent core.Agent) {
Expand Down Expand Up @@ -171,7 +170,7 @@ func init() {
})
})

core.NewItemEffect(SignetOfBeasts, func(agent core.Agent) {
/* core.NewItemEffect(SignetOfBeasts, func(agent core.Agent) {
hunter := agent.(HunterAgent).GetHunter()
if hunter.pet != nil {
hunter.pet.PseudoStats.DamageDealtMultiplier *= 1.01
Expand Down Expand Up @@ -538,10 +537,10 @@ func init() {
}
hunter.pet.PseudoStats.DamageDealtMultiplier *= 1.02
})
}) */
}

func (hunter *Hunter) newBloodlashProcItem(bonusStrength float64, spellId int32) {
/* func (hunter *Hunter) newBloodlashProcItem(bonusStrength float64, spellId int32) {
procAura := hunter.NewTemporaryStatsAura("Bloodlash", core.ActionID{SpellID: spellId}, stats.Stats{stats.Strength: bonusStrength}, time.Second*15)
ppm := hunter.AutoAttacks.NewPPMManager(1.0, core.ProcMaskMeleeOrRanged)
core.MakePermanent(hunter.GetOrRegisterAura(core.Aura{
Expand All @@ -552,4 +551,4 @@ func (hunter *Hunter) newBloodlashProcItem(bonusStrength float64, spellId int32)
}
},
}))
}
} */
Loading

0 comments on commit cefe945

Please sign in to comment.