Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/wowsims/sod
Browse files Browse the repository at this point in the history
  • Loading branch information
kayla-glick committed Nov 23, 2024
2 parents 2324670 + fa85a17 commit fa99973
Show file tree
Hide file tree
Showing 11 changed files with 191 additions and 188 deletions.
2 changes: 1 addition & 1 deletion sim/core/debuffs.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ func applyDebuffEffects(target *Unit, targetIdx int, debuffs *proto.Debuffs, rai
if debuffs.DemoralizingShout != proto.TristateEffect_TristateEffectMissing {
MakePermanent(DemoralizingShoutAura(target, 0, GetTristateValueInt32(debuffs.DemoralizingShout, 0, 5), level))
}
if debuffs.AtrophicPoison{
if debuffs.AtrophicPoison {
MakePermanent(AtrophicPoisonAura(target))
}

Expand Down
2 changes: 1 addition & 1 deletion sim/rogue/envenom.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (rogue *Rogue) registerEnvenom() {
} else if rogue.usingDeadly {
consumed = min(rogue.deadlyPoisonTick.Dot(target).GetStacks(), comboPoints)
}

baseDamage := baseAbilityDamage*float64(consumed)*0.8 + 0.072*float64(consumed)*spell.MeleeAttackPower()

result := spell.CalcDamage(sim, target, baseDamage, spell.OutcomeMeleeSpecialHitAndCrit)
Expand Down
119 changes: 59 additions & 60 deletions sim/rogue/items_sets_pve.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,17 +415,16 @@ var ItemSetDeathdealersThrill = core.NewItemSet(core.ItemSet{
// Increases Saber Slash damage by 20%
2: func(agent core.Agent) {
rogue := agent.(RogueAgent).GetRogue()
if !rogue.HasRune(proto.RogueRune_RuneSaberSlash) {
return
}
rogue.RegisterAura(core.Aura{
Label: "S03 - Item - TAQ - Rogue - Damage 2P Bonus",
OnInit: func(aura *core.Aura, sim *core.Simulation) {
rogue.SaberSlash.DamageMultiplier *= 1.20
rogue.saberSlashTick.DamageMultiplier *= 1.20
if rogue.HasRune(proto.RogueRune_RuneSaberSlash) {
rogue.SaberSlash.DamageMultiplier *= 1.20
rogue.saberSlashTick.DamageMultiplier *= 1.20
}
rogue.SinisterStrike.DamageMultiplier *= 1.20
},
})
})
},
// Reduces the cooldown on Adrenaline Rush by 4 minutes.
4: func(agent core.Agent) {
Expand All @@ -437,7 +436,7 @@ var ItemSetDeathdealersThrill = core.NewItemSet(core.ItemSet{
Label: "S03 - Item - TAQ - Rogue - Damage 4P Bonus",
OnInit: func(aura *core.Aura, sim *core.Simulation) {
rogue.AdrenalineRush.CD.Duration -= time.Second * 240
},
},
})
},
},
Expand All @@ -446,14 +445,14 @@ var ItemSetDeathdealersThrill = core.NewItemSet(core.ItemSet{
var ItemSetDeathdealersBattlearmor = core.NewItemSet(core.ItemSet{
Name: "Deathdealer's Battlearmor",
Bonuses: map[int32]core.ApplyEffect{
// Your Main Gauche now strikes 1 additional nearby target and also causes your Sinister Strike to strike 1 additional nearby target.
// Your Main Gauche now strikes 1 additional nearby target and also causes your Sinister Strike to strike 1 additional nearby target.
// These additional strikes are not duplicated by Blade Flurry.
2: func(agent core.Agent) {
rogue := agent.(RogueAgent).GetRogue()
if !rogue.HasRune(proto.RogueRune_RuneMainGauche) {
return
}

if rogue.Env.GetNumTargets() == 1 {
return
}
Expand All @@ -465,15 +464,15 @@ var ItemSetDeathdealersBattlearmor = core.NewItemSet(core.ItemSet{
SpellSchool: core.SpellSchoolPhysical,
ProcMask: core.ProcMaskEmpty,
Flags: core.SpellFlagMeleeMetrics | core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell,

DamageMultiplier: 1,
ThreatMultiplier: 1,

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

cleaveAura := rogue.RegisterAura(core.Aura{
Label: "2P Cleave Buff",
Duration: time.Second * 10,
Expand All @@ -484,66 +483,66 @@ var ItemSetDeathdealersBattlearmor = core.NewItemSet(core.ItemSet{
cleaveHit.SpellMetrics[result.Target.UnitIndex].Casts--
}
},
})
})

core.MakePermanent(rogue.RegisterAura(core.Aura{
Label: "S03 - Item - TAQ - Rogue - Tank 2P Bonus",
Label: "S03 - Item - TAQ - Rogue - Tank 2P Bonus",
OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if result.Landed() && spell.SpellCode == SpellCode_RogueMainGauche {
cleaveAura.Activate(sim)
curDmg = result.Damage / result.ResistanceMultiplier
cleaveHit.Cast(sim, rogue.Env.NextTargetUnit(result.Target))
cleaveHit.SpellMetrics[result.Target.UnitIndex].Casts--
curDmg = result.Damage / result.ResistanceMultiplier
cleaveHit.Cast(sim, rogue.Env.NextTargetUnit(result.Target))
cleaveHit.SpellMetrics[result.Target.UnitIndex].Casts--
}
},
}))

},
// While active, your Main Gauche also causes you to heal for 10% of all damage done by Sinister Strike.
// While active, your Main Gauche also causes you to heal for 10% of all damage done by Sinister Strike.
// Any excess healing becomes a Blood Barrier, absorbing damage up to 20% of your maximum health.
// Shield appear to not be fully implemented in SoD commenting out until fixed
4: func(agent core.Agent) {
// rogue := agent.(RogueAgent).GetRogue()
// if !rogue.HasRune(proto.RogueRune_RuneMainGauche) {
// return
// }
// shieldSpell := rogue.GetOrRegisterSpell(core.SpellConfig{
// ActionID: core.ActionID{SpellID: 1213761},
// SpellSchool: core.SpellSchoolPhysical,
// ProcMask: core.ProcMaskSpellHealing,
// Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell | core.SpellFlagHelpful,
//
// DamageMultiplier: 1,
// ThreatMultiplier: 1,
//
// Shield: core.ShieldConfig{
// Aura: core.Aura{
// Label: "Blood Barrier",
// Duration: time.Second * 15,
// },
// },
// })
//
// activeAura := core.MakeProcTriggerAura(&rogue.Unit, core.ProcTrigger{
// Name: "Main Gauche - Blood Barrier",
// ActionID: core.ActionID{SpellID: 1213762},
// Callback: core.CallbackOnSpellHitDealt,
// Duration: time.Second * 15,
// Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
// if result.Landed() && spell.SpellCode == SpellCode_RogueSinisterStrike{
// shieldSpell.Shield(&rogue.Unit).Apply(sim, result.Damage*0.15)
// }
// },
// })
//
// core.MakePermanent(rogue.RegisterAura(core.Aura{
// Label: "S03 - Item - TAQ - Rogue - Tank 4P Bonus",
// OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
// if result.Landed() && spell.SpellCode == SpellCode_RogueMainGauche {
// activeAura.Activate(sim)
// }
// },
// }))
// rogue := agent.(RogueAgent).GetRogue()
// if !rogue.HasRune(proto.RogueRune_RuneMainGauche) {
// return
// }
// shieldSpell := rogue.GetOrRegisterSpell(core.SpellConfig{
// ActionID: core.ActionID{SpellID: 1213761},
// SpellSchool: core.SpellSchoolPhysical,
// ProcMask: core.ProcMaskSpellHealing,
// Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell | core.SpellFlagHelpful,
//
// DamageMultiplier: 1,
// ThreatMultiplier: 1,
//
// Shield: core.ShieldConfig{
// Aura: core.Aura{
// Label: "Blood Barrier",
// Duration: time.Second * 15,
// },
// },
// })
//
// activeAura := core.MakeProcTriggerAura(&rogue.Unit, core.ProcTrigger{
// Name: "Main Gauche - Blood Barrier",
// ActionID: core.ActionID{SpellID: 1213762},
// Callback: core.CallbackOnSpellHitDealt,
// Duration: time.Second * 15,
// Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
// if result.Landed() && spell.SpellCode == SpellCode_RogueSinisterStrike{
// shieldSpell.Shield(&rogue.Unit).Apply(sim, result.Damage*0.15)
// }
// },
// })
//
// core.MakePermanent(rogue.RegisterAura(core.Aura{
// Label: "S03 - Item - TAQ - Rogue - Tank 4P Bonus",
// OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
// if result.Landed() && spell.SpellCode == SpellCode_RogueMainGauche {
// activeAura.Activate(sim)
// }
// },
// }))
},
},
})
6 changes: 5 additions & 1 deletion sim/rogue/main_gauche.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@ func (rogue *Rogue) registerMainGaucheSpell() {
if hasPKRune {
rogue.PoisonedKnife.Cost.FlatModifier -= 20
rogue.PoisonedKnife.ThreatMultiplier *= 2.0
rogue.PoisonedKnife.DamageMultiplier *= 1.5
}

if hasQDRune {
rogue.QuickDraw.Cost.FlatModifier -= 20
rogue.QuickDraw.ThreatMultiplier *= 2.0
rogue.QuickDraw.DamageMultiplier *= 1.5
}
},
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
Expand All @@ -61,11 +63,13 @@ func (rogue *Rogue) registerMainGaucheSpell() {
if hasPKRune {
rogue.PoisonedKnife.Cost.FlatModifier += 20
rogue.PoisonedKnife.ThreatMultiplier /= 2.0
rogue.PoisonedKnife.DamageMultiplier /= 1.5
}

if hasQDRune {
rogue.QuickDraw.Cost.FlatModifier += 20
rogue.QuickDraw.ThreatMultiplier /= 2.0
rogue.QuickDraw.DamageMultiplier /= 1.5
}
},
})
Expand Down Expand Up @@ -104,7 +108,7 @@ func (rogue *Rogue) registerMainGaucheSpell() {
baseDamage := spell.Unit.OHNormalizedWeaponDamage(sim, spell.MeleeAttackPower())

result := spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeMeleeSpecialHitAndCrit)

// Auras gained regardless of landed hit.
mainGaucheAura.Activate(sim)
mainGaucheSSAura.Activate(sim)
Expand Down
10 changes: 5 additions & 5 deletions sim/rogue/poisoned_knife.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func (rogue *Rogue) registerPoisonedKnife() {
poisonedKnifeMetrics := rogue.NewEnergyMetrics(core.ActionID{SpellID: 425012})
hasDeadlyBrew := rogue.HasRune(proto.RogueRune_RuneDeadlyBrew)
hasJustAFleshWound := rogue.HasRune(proto.RogueRune_RuneJustAFleshWound)

// Poisoned Knife /might/ scale with BonusWeaponDamage, if it's using https://www.wowhead.com/classic/spell=425013/poisoned-knife
rogue.PoisonedKnife = rogue.RegisterSpell(core.SpellConfig{
SpellCode: SpellCode_RoguePoisonedKnife,
Expand Down Expand Up @@ -59,14 +59,14 @@ func (rogue *Rogue) registerPoisonedKnife() {

if result.Landed() {
rogue.AddComboPoints(sim, 1, target, spell.ComboPointMetrics())

if rogue.usingOccult {
numStacks = float64(rogue.occultPoisonTick.Dot(target).GetStacks())
} else if rogue.usingDeadly {
numStacks = float64(rogue.deadlyPoisonTick.Dot(target).GetStacks())
}
rogue.AddEnergy(sim, numStacks * 5, poisonedKnifeMetrics)

rogue.AddEnergy(sim, numStacks*5, poisonedKnifeMetrics)

// 100% application of OH poison (except for 1%? It can resist extremely rarely)
switch rogue.Consumes.OffHandImbue {
Expand All @@ -79,7 +79,7 @@ func (rogue *Rogue) registerPoisonedKnife() {
case proto.WeaponImbue_OccultPoison:
rogue.OccultPoison[ShivProc].Cast(sim, target)
case proto.WeaponImbue_SebaciousPoison:
rogue.SebaciousPoison[ShivProc].Cast(sim, target)
rogue.SebaciousPoison[ShivProc].Cast(sim, target)
// Add new alternative poisons as they are implemented
default:
if hasDeadlyBrew {
Expand Down
Loading

0 comments on commit fa99973

Please sign in to comment.