Skip to content

Commit

Permalink
Merge pull request wowsims#1 from ironclad88/BearStuffStoic
Browse files Browse the repository at this point in the history
Bear stuff stoic
  • Loading branch information
emsimpson92 authored Dec 1, 2024
2 parents 070660e + 7d01959 commit a05feb5
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 4 deletions.
47 changes: 47 additions & 0 deletions sim/common/vanilla/item_effects.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ const (
KalimdorsRevenge = 233621
JomGabbar = 233627 // 23570
NeretzekBloodDrinker = 233647
RazorbrambleShoulderpads = 233804
RazorbrambleCowl = 233808
RazorbrambleLeathers = 233813
Speedstone = 233990
LodestoneofRetaliation = 233992
ManslayerOfTheQiraji = 234067
EyeOfMoam = 234080 // 21473
DarkmoonCardHeroism = 234176 // 19287
Expand Down Expand Up @@ -2406,6 +2410,21 @@ func init() {
})
})

// https://www.wowhead.com/classic/item=228293/essence-of-the-pure-flame
// Equip: When struck in combat inflicts 100 Nature damage to the attacker. Causes twice as much threat as damage dealt.
core.NewItemEffect(RazorbrambleLeathers, func(agent core.Agent) {
DamageShieldWithThreatMod(agent.GetCharacter(), 1213813, 100, 2, "Damage Shield Razorbramble Leathers")
})
core.NewItemEffect(RazorbrambleShoulderpads, func(agent core.Agent) {
DamageShieldWithThreatMod(agent.GetCharacter(), 1213816, 80, 2, "Damage Shield Razorbramble Shoulderpads")
})
core.NewItemEffect(RazorbrambleCowl, func(agent core.Agent) {
DamageShieldWithThreatMod(agent.GetCharacter(), 1213813, 100, 2, "Damage Shield Razorbramble Cowl")
})
core.NewItemEffect(LodestoneofRetaliation, func(agent core.Agent) {
DamageShieldWithThreatMod(agent.GetCharacter(), 1213816, 80, 2, "Damage Shield Lodestone of Retaliation")
})

// https://www.wowhead.com/classic/item=234080/eye-of-moam
// Use: Increases damage done by magical spells and effects by up to 150, and decreases the magical resistances of your spell targets by 100 for 30 sec. (3 Min Cooldown)
core.NewSimpleStatOffensiveTrinketEffect(EyeOfMoam, stats.Stats{stats.SpellDamage: 150, stats.SpellPenetration: 100}, time.Second*30, time.Minute*3)
Expand Down Expand Up @@ -3296,3 +3315,31 @@ func manslayerOfTheQirajiAura(character *core.Character) *core.Aura {
},
})
}

func DamageShieldWithThreatMod(character *core.Character, spellID int32, damage float64, threatMod float64, procName string) {

procSpell := character.GetOrRegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: spellID},
SpellSchool: core.SpellSchoolNature,
DefenseType: core.DefenseTypeMagic,
ProcMask: core.ProcMaskEmpty,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell,

DamageMultiplier: 1,
ThreatMultiplier: threatMod,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
spell.CalcAndDealDamage(sim, target, damage, spell.OutcomeAlwaysHit)
},
})

core.MakeProcTriggerAura(&character.Unit, core.ProcTrigger{
Name: procName,
Callback: core.CallbackOnSpellHitTaken,
Outcome: core.OutcomeLanded,
ProcMask: core.ProcMaskMelee, // TODO: Unsure if this means melee attacks or all attacks
Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
procSpell.Cast(sim, spell.Unit)
},
})
}
3 changes: 1 addition & 2 deletions sim/druid/lacerate.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ func (druid *Druid) registerLacerateSpell() {
if !druid.HasRune(proto.DruidRune_RuneLegsLacerate) {
return
}
initialDamage := 149.0
initialDamageMul := 1.0

switch druid.Ranged().ID {
Expand Down Expand Up @@ -42,7 +41,7 @@ func (druid *Druid) registerLacerateSpell() {
// TODO: Berserk 3 target lacerate cleave - Saeyon

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := initialDamage + (spell.Unit.MHWeaponDamage(sim, spell.MeleeAttackPower())*.2)*float64(druid.LacerateBleed.Dot(target).GetStacks())
baseDamage := (spell.Unit.MHWeaponDamage(sim, spell.MeleeAttackPower()) * .2) * float64(druid.LacerateBleed.Dot(target).GetStacks())

spell.DamageMultiplier = initialDamageMul
result := spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeMeleeSpecialHitAndCrit)
Expand Down
7 changes: 5 additions & 2 deletions sim/druid/mangle.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ func (druid *Druid) registerMangleBearSpell() {
}

baseMultiplier := 1.0
rageCostReduction := float64(druid.Talents.Ferocity)

switch druid.Ranged().ID {
case IdolOfUrsinPower:
baseMultiplier += .03
case IdolOfBrutality:
rageCostReduction += 3
}

mangleAuras := druid.NewEnemyAuraArray(core.MangleAura)
Expand All @@ -30,7 +33,7 @@ func (druid *Druid) registerMangleBearSpell() {
Flags: SpellFlagOmen | core.SpellFlagMeleeMetrics | core.SpellFlagAPL,

RageCost: core.RageCostOptions{
Cost: 15 - float64(druid.Talents.Ferocity),
Cost: 15 - rageCostReduction,
Refund: 0.8,
},
Cast: core.CastConfig{
Expand All @@ -45,7 +48,7 @@ func (druid *Druid) registerMangleBearSpell() {
},
// TODO: Berserk 3 target mangle cleave - Saeyon

DamageMultiplier: 1.6 + 0.1*float64(druid.Talents.SavageFury)*baseMultiplier,
DamageMultiplier: (1.6 + 0.1*float64(druid.Talents.SavageFury)) * baseMultiplier,
ThreatMultiplier: 1.5,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
Expand Down
2 changes: 2 additions & 0 deletions sim/druid/tank/tank.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ func NewFeralTankDruid(character *core.Character, options *proto.Player) *FeralT
}
}

bear.PseudoStats.FeralCombatEnabled = true

return bear
}

Expand Down

0 comments on commit a05feb5

Please sign in to comment.