Skip to content

Commit

Permalink
Merge pull request #435 from wowsims/rogue-tank-sim
Browse files Browse the repository at this point in the history
Rogue tank sim UI
  • Loading branch information
catszeid authored Mar 22, 2024
2 parents da616e5 + 9c3ef32 commit ee707ff
Show file tree
Hide file tree
Showing 19 changed files with 728 additions and 250 deletions.
1 change: 1 addition & 0 deletions sim/core/avoid_dr.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const Diminish_kCm_Nondruid = (Diminish_k_Nondruid * Diminish_Cm)

// Diminishing Returns for tank avoidance
// Non-diminishing sources are added separately in spell outcome funcs
// TODO: Fully refactor these functions and the Parry/Dodge stats

func (unit *Unit) GetDiminishedDodgeChance() float64 {

Expand Down
15 changes: 15 additions & 0 deletions sim/core/base_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,21 @@ var CritPerIntAtLevel = map[proto.Class]map[int]float64{
proto.Class_ClassDruid: {25: 0.0427, 40: 0.0260, 50: 0.0208, 60: 0.0167},
}

// Dodge agility scaling
// TODO: Scaling for all classes and for past level 50
var DodgePerAgiAtLevel = map[proto.Class]map[int32]float64{
proto.Class_ClassUnknown: {25: 0.0, 40: 0.0, 50: 0.0, 60: 0.0},
proto.Class_ClassWarrior: {25: 0.0, 40: 0.0, 50: 0.0, 60: 0.0},
proto.Class_ClassPaladin: {25: 0.0, 40: 0.0, 50: 0.0, 60: 0.0},
proto.Class_ClassHunter: {25: 0.0, 40: 0.0, 50: 0.0, 60: 0.0},
proto.Class_ClassRogue: {25: float64(1 / 5.429), 40: 0.111, 50: 0.0, 60: 0},
proto.Class_ClassPriest: {25: 0.0, 40: 0.0, 50: 0.0, 60: 0.0},
proto.Class_ClassShaman: {25: 0.0, 40: 0.0, 50: 0.0, 60: 0.0},
proto.Class_ClassMage: {25: 0.0, 40: 0.0, 50: 0.0, 60: 0.0},
proto.Class_ClassWarlock: {25: 0.0, 40: 0.0, 50: 0.0, 60: 0.0},
proto.Class_ClassDruid: {25: 0.0, 40: 0.0, 50: 0.0, 60: 0.0},
}

var ClassBaseStats = map[proto.Class]map[int]stats.Stats{
proto.Class_ClassUnknown: {},
proto.Class_ClassWarrior: {
Expand Down
1 change: 1 addition & 0 deletions sim/core/character.go
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ func (character *Character) GetPseudoStatsProto() []float64 {
proto.PseudoStat_PseudoStatRangedDps: character.AutoAttacks.Ranged().DPS(),
proto.PseudoStat_PseudoStatBlockValueMultiplier: character.PseudoStats.BlockValueMultiplier,
// Base values are modified by Enemy attackTables, but we display for LVL 80 enemy as paperdoll default
// TODO: Fix Dodge and Parry
proto.PseudoStat_PseudoStatDodge: character.PseudoStats.BaseDodge + character.GetDiminishedDodgeChance(),
proto.PseudoStat_PseudoStatParry: character.PseudoStats.BaseParry + character.GetDiminishedParryChance(),
proto.PseudoStat_PseudoStatAxesSkill: float64(character.PseudoStats.AxesSkill),
Expand Down
4 changes: 3 additions & 1 deletion sim/register_all.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package sim
import (
_ "github.com/wowsims/sod/sim/common"
"github.com/wowsims/sod/sim/druid/balance"
dpsrogue "github.com/wowsims/sod/sim/rogue/dps_rogue"
"github.com/wowsims/sod/sim/paladin/retribution"
dpsrogue "github.com/wowsims/sod/sim/rogue/dps_rogue"
tankrogue "github.com/wowsims/sod/sim/rogue/tank_rogue"
"github.com/wowsims/sod/sim/shaman/elemental"
"github.com/wowsims/sod/sim/shaman/enhancement"

Expand Down Expand Up @@ -48,6 +49,7 @@ func RegisterAll() {
// healingPriest.RegisterHealingPriest()
shadow.RegisterShadowPriest()
dpsrogue.RegisterDpsRogue()
tankrogue.RegisterTankRogue()
dpsWarrior.RegisterDpsWarrior()
// protectionWarrior.RegisterProtectionWarrior()
// holyPaladin.RegisterHolyPaladin()
Expand Down
1 change: 1 addition & 0 deletions sim/rogue/rogue.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ func NewRogue(character *core.Character, options *proto.Player, rogueOptions *pr

// Passive rogue threat reduction: https://wotlk.wowhead.com/spell=21184/rogue-passive-dnd
rogue.PseudoStats.ThreatMultiplier *= 0.71
// TODO: Be able to Parry based on results
rogue.PseudoStats.CanParry = true
maxEnergy := 100.0
if rogue.Talents.Vigor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ package tankrogue
import (
"github.com/wowsims/sod/sim/core"
"github.com/wowsims/sod/sim/core/proto"
"github.com/wowsims/sod/sim/core/stats"
"github.com/wowsims/sod/sim/rogue"
)

func RegisterTankRogue() {
core.RegisterAgentFactory(
proto.Player_Rogue{},
proto.Player_TankRogue{},
proto.Spec_SpecTankRogue,
func(character *core.Character, options *proto.Player) core.Agent {
return NewTankRogue(character, options)
},
func(player *proto.Player, spec interface{}) {
playerSpec, ok := spec.(*proto.Player_Rogue)
playerSpec, ok := spec.(*proto.Player_TankRogue)
if !ok {
panic("Invalid spec value for Rogue!")
}
Expand All @@ -29,9 +30,14 @@ type TankRogue struct {

func NewTankRogue(character *core.Character, options *proto.Player) *TankRogue {
tank := &TankRogue{
Rogue: rogue.NewRogue(character, options, options.GetRogue().Options),
Rogue: rogue.NewRogue(character, options, options.GetTankRogue().Options),
}

tank.AddStatDependency(stats.Agility, stats.Dodge, core.DodgePerAgiAtLevel[character.Class][int32(tank.Level)])
tank.AddStatDependency(stats.BonusArmor, stats.Armor, 1)

tank.PseudoStats.InFrontOfTarget = true

return tank
}

Expand Down
2 changes: 1 addition & 1 deletion ui/core/launched_sims.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const simLaunchStatuses: Record<Spec, SimStatus> = {
status: LaunchStatus.Alpha,
},
[Spec.SpecTankRogue]: {
phase: Phase.Phase1,
phase: Phase.Phase2,
status: LaunchStatus.Unlaunched,
},
[Spec.SpecHolyPaladin]: {
Expand Down
Loading

0 comments on commit ee707ff

Please sign in to comment.