Skip to content

Commit

Permalink
Merge pull request #1336 from wowsims/fix/rogue-fixes
Browse files Browse the repository at this point in the history
Fix mastery logic and slayers gear
  • Loading branch information
1337LutZ authored Feb 1, 2025
2 parents ee92f54 + e92734c commit 204c0c4
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 63 deletions.
4 changes: 2 additions & 2 deletions sim/core/spell_mod.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ var spellModMap = map[SpellModType]*SpellModFunctions{

SpellMod_DamageDone_Flat: {
Apply: applyDamageDoneAdd,
Remove: removeDamageDonAdd,
Remove: removeDamageDoneAdd,
},

SpellMod_PowerCost_Pct: {
Expand Down Expand Up @@ -401,7 +401,7 @@ func applyDamageDoneAdd(mod *SpellMod, spell *Spell) {
spell.DamageMultiplierAdditive += mod.floatValue
}

func removeDamageDonAdd(mod *SpellMod, spell *Spell) {
func removeDamageDoneAdd(mod *SpellMod, spell *Spell) {
spell.DamageMultiplierAdditive -= mod.floatValue
}

Expand Down
4 changes: 2 additions & 2 deletions sim/rogue/assassination/TestAssassination.results
Original file line number Diff line number Diff line change
Expand Up @@ -1520,8 +1520,8 @@ dps_results: {
dps_results: {
key: "TestAssassination-AllItems-Slayer'sArmor"
value: {
dps: 31867.52102
tps: 22625.93993
dps: 15764.06976
tps: 11192.48953
}
}
dps_results: {
Expand Down
39 changes: 7 additions & 32 deletions sim/rogue/assassination/assassination.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,40 +39,15 @@ func (sinRogue *AssassinationRogue) Initialize() {

// Apply Mastery
// As far as I am able to find, Asn's Mastery is an additive bonus. To be tested.
masteryEffect := sinRogue.GetMasteryBonusFromRating(sinRogue.GetStat(stats.MasteryRating))

for _, spell := range sinRogue.InstantPoison {
spell.DamageMultiplierAdditive += masteryEffect
}
for _, spell := range sinRogue.WoundPoison {
spell.DamageMultiplierAdditive += masteryEffect
}
sinRogue.DeadlyPoison.DamageMultiplierAdditive += masteryEffect
sinRogue.Envenom.DamageMultiplierAdditive += masteryEffect
if sinRogue.Talents.VenomousWounds > 0 {
sinRogue.VenomousWounds.DamageMultiplierAdditive += masteryEffect
}
masteryMod := sinRogue.AddDynamicMod(core.SpellModConfig{
Kind: core.SpellMod_DamageDone_Flat,
ClassMask: rogue.RogueSpellInstantPoison | rogue.RogueSpellWoundPoison | rogue.RogueSpellDeadlyPoison | rogue.RogueSpellEnvenom | rogue.RogueSpellVenomousWounds,
FloatValue: sinRogue.GetMasteryBonusFromRating(sinRogue.GetStat(stats.MasteryRating)),
})
masteryMod.Activate()

sinRogue.AddOnMasteryStatChanged(func(sim *core.Simulation, oldMastery, newMastery float64) {
masteryEffectOld := sinRogue.GetMasteryBonusFromRating(oldMastery)
masteryEffectNew := sinRogue.GetMasteryBonusFromRating(newMastery)

for _, spell := range sinRogue.InstantPoison {
spell.DamageMultiplierAdditive -= masteryEffectOld
spell.DamageMultiplierAdditive += masteryEffectNew
}
for _, spell := range sinRogue.WoundPoison {
spell.DamageMultiplierAdditive -= masteryEffectOld
spell.DamageMultiplierAdditive += masteryEffectNew
}
sinRogue.DeadlyPoison.DamageMultiplierAdditive -= masteryEffectOld
sinRogue.DeadlyPoison.DamageMultiplierAdditive += masteryEffectNew
sinRogue.Envenom.DamageMultiplierAdditive -= masteryEffectOld
sinRogue.Envenom.DamageMultiplierAdditive += masteryEffectNew
if sinRogue.Talents.VenomousWounds > 0 {
sinRogue.VenomousWounds.DamageMultiplierAdditive -= masteryEffectOld
sinRogue.VenomousWounds.DamageMultiplierAdditive += masteryEffectNew
}
masteryMod.UpdateFloatValue(sinRogue.GetMasteryBonusFromRating(newMastery))
})

// Assassin's Resolve: +20% Multiplicative physical damage (confirmed)
Expand Down
14 changes: 9 additions & 5 deletions sim/rogue/assassination/venomous_wounds.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package assassination

import "github.com/wowsims/cata/sim/core"
import (
"github.com/wowsims/cata/sim/core"
"github.com/wowsims/cata/sim/rogue"
)

func (sinRogue *AssassinationRogue) registerVenomousWounds() {
if sinRogue.Talents.VenomousWounds == 0 {
Expand Down Expand Up @@ -37,10 +40,11 @@ func (sinRogue *AssassinationRogue) registerVenomousWounds() {
}))

sinRogue.VenomousWounds = sinRogue.RegisterSpell(core.SpellConfig{
ActionID: vwActionID,
SpellSchool: core.SpellSchoolNature,
ProcMask: core.ProcMaskSpellDamage,
Flags: core.SpellFlagPassiveSpell,
ActionID: vwActionID,
ClassSpellMask: rogue.RogueSpellVenomousWounds,
SpellSchool: core.SpellSchoolNature,
ProcMask: core.ProcMaskSpellDamage,
Flags: core.SpellFlagPassiveSpell,

CritMultiplier: sinRogue.MeleeCritMultiplier(false),
ThreatMultiplier: 1,
Expand Down
4 changes: 2 additions & 2 deletions sim/rogue/combat/TestCombat.results
Original file line number Diff line number Diff line change
Expand Up @@ -1525,8 +1525,8 @@ dps_results: {
dps_results: {
key: "TestCombat-AllItems-Slayer'sArmor"
value: {
dps: 26739.33604
tps: 18984.92859
dps: 15771.72563
tps: 11197.9252
}
}
dps_results: {
Expand Down
2 changes: 1 addition & 1 deletion sim/rogue/items.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var Tier6 = core.NewItemSet(core.ItemSet{
setBonusAura.AttachSpellMod(core.SpellModConfig{
Kind: core.SpellMod_DamageDone_Flat,
ClassMask: RogueSpellBackstab | RogueSpellSinisterStrike | RogueSpellMutilate | RogueSpellHemorrhage,
FloatValue: 6.0,
FloatValue: .06,
})
},
},
Expand Down
4 changes: 2 additions & 2 deletions sim/rogue/subtlety/TestSubtlety.results
Original file line number Diff line number Diff line change
Expand Up @@ -1483,8 +1483,8 @@ dps_results: {
dps_results: {
key: "TestSubtlety-AllItems-Slayer'sArmor"
value: {
dps: 35940.15202
tps: 25517.50794
dps: 13584.97041
tps: 9645.32899
}
}
dps_results: {
Expand Down
26 changes: 11 additions & 15 deletions sim/rogue/subtlety/shadowstep.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,28 @@ import (

func (subRogue *SubtletyRogue) registerShadowstepCD() {
actionID := core.ActionID{SpellID: 36554}
var affectedSpells []*core.Spell

affectedSpellClassMasks := rogue.RogueSpellAmbush | rogue.RogueSpellGarrote
damageMultiMod := subRogue.AddDynamicMod(core.SpellModConfig{
ClassMask: affectedSpellClassMasks,
Kind: core.SpellMod_DamageDone_Pct,
FloatValue: 0.2,
})

subRogue.ShadowstepAura = subRogue.RegisterAura(core.Aura{
Label: "Shadowstep",
ActionID: actionID,
Duration: time.Second * 10,
OnInit: func(aura *core.Aura, sim *core.Simulation) {
affectedSpells = append(affectedSpells, subRogue.Ambush)
affectedSpells = append(affectedSpells, subRogue.Garrote)
},
OnGain: func(aura *core.Aura, sim *core.Simulation) {
// Damage of your next ability is increased by 20% and the threat caused is reduced by 50%.
for _, spell := range affectedSpells {
spell.DamageMultiplier *= 1.2
}
damageMultiMod.Activate()
},
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
for _, spell := range affectedSpells {
spell.DamageMultiplier *= 1 / 1.2
}
damageMultiMod.Deactivate()
},
OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
for _, affectedSpell := range affectedSpells {
if spell == affectedSpell {
aura.Deactivate(sim)
}
if spell.Matches(affectedSpellClassMasks) {
aura.Deactivate(sim)
}
},
})
Expand Down
5 changes: 3 additions & 2 deletions sim/rogue/subtlety/subtlety.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ func (subRogue *SubtletyRogue) Initialize() {

// Apply Mastery
masteryMod := subRogue.AddDynamicMod(core.SpellModConfig{
Kind: core.SpellMod_DamageDone_Flat,
ClassMask: rogue.RogueSpellRupture | rogue.RogueSpellEviscerate,
Kind: core.SpellMod_DamageDone_Flat,
ClassMask: rogue.RogueSpellRupture | rogue.RogueSpellEviscerate,
FloatValue: subRogue.GetMasteryBonus(),
})

subRogue.AddOnMasteryStatChanged(func(sim *core.Simulation, oldMastery, newMastery float64) {
Expand Down

0 comments on commit 204c0c4

Please sign in to comment.