Skip to content

Commit

Permalink
Merge pull request wowsims#732 from wowsims/tank_runeforges
Browse files Browse the repository at this point in the history
Tank runeforges
  • Loading branch information
Alexandre-M-Silva authored Aug 21, 2022
2 parents c20e2d0 + 6772f9d commit b92c390
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 44 deletions.
28 changes: 28 additions & 0 deletions sim/common/wotlk/enchant_effects.go
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,34 @@ func init() {
})
})

core.NewItemEffect(70164, func(agent core.Agent) {
character := agent.GetCharacter()
mh := character.Equip[proto.ItemSlot_ItemSlotMainHand].Enchant.ID == 70164
oh := character.Equip[proto.ItemSlot_ItemSlotOffHand].Enchant.ID == 70164
if !mh && !oh {
return
}

character.AddStat(stats.Defense, 13)
character.MultiplyStat(stats.Stamina, 1.01)
})

core.NewItemEffect(62158, func(agent core.Agent) {
character := agent.GetCharacter()
mh := character.Equip[proto.ItemSlot_ItemSlotMainHand].Enchant.ID == 62158
oh := character.Equip[proto.ItemSlot_ItemSlotOffHand].Enchant.ID == 62158
if !mh {
return
}

if oh {
return
}

character.AddStat(stats.Defense, 25)
character.MultiplyStat(stats.Stamina, 1.02)
})

core.NewItemEffect(55642, func(agent core.Agent) {
character := agent.GetCharacter()

Expand Down
1 change: 1 addition & 0 deletions sim/core/stats/deps.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ var safeDepsOrder []Stat = []Stat{
Block,
BlockValue,
Dodge,
Parry,
}

const invalidDep = -1
Expand Down
1 change: 1 addition & 0 deletions sim/deathknight/deathknight.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ func NewDeathknight(character core.Character, talents proto.DeathknightTalents,
dk.AddStatDependency(stats.Agility, stats.MeleeCrit, core.CritRatingPerCritChance/62.5)
dk.AddStatDependency(stats.Agility, stats.Dodge, core.DodgeRatingPerDodgeChance/84.74576271)
dk.AddStatDependency(stats.Strength, stats.AttackPower, 2)
dk.AddStatDependency(stats.Strength, stats.Parry, 0.25)

dk.PseudoStats.MeleeHasteRatingPerHastePercent /= 1.3

Expand Down
2 changes: 1 addition & 1 deletion sim/deathknight/dps/TestFrost.results
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ character_stats_results: {
final_stats: 0
final_stats: 0
final_stats: 471.2154000067
final_stats: 0
final_stats: 410.696
final_stats: 0
final_stats: 22703
final_stats: 75
Expand Down
2 changes: 1 addition & 1 deletion sim/deathknight/dps/TestUnholy.results
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ character_stats_results: {
final_stats: 0
final_stats: 0
final_stats: 471.2154000067
final_stats: 0
final_stats: 423.01688
final_stats: 0
final_stats: 22703
final_stats: 75
Expand Down
77 changes: 41 additions & 36 deletions sim/deathknight/tank/rotation_blood_tank_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,48 +33,53 @@ func (dk *TankDeathknight) RotationActionCallback_TankBlood_PrioRotation(sim *co
bp := dk.BloodPlagueDisease[target.Index].IsActive()
fbAt := core.MinDuration(dk.FrostFeverDisease[target.Index].ExpiresAt(), dk.BloodPlagueDisease[target.Index].ExpiresAt())

casted := false
if dk.VampiricBlood.CanCast(sim) && dk.CurrentHealthPercent() < 0.1 {
dk.VampiricBlood.Cast(sim, target)
casted = dk.VampiricBlood.Cast(sim, target)
} else if dk.RuneTap.CanCast(sim) && dk.CurrentHealthPercent() < 0.1 {
dk.RuneTap.Cast(sim, target)
} else if dk.NextCast == dk.BloodStrike && dk.CurrentHealthPercent() > 0.6 {
if dk.NormalCurrentBloodRunes() > 0 {
dk.BloodStrike.Cast(sim, target)
dk.NextCast = nil
}
} else {
if !ff && dk.IcyTouch.CanCast(sim) {
dk.IcyTouch.Cast(sim, target)
} else if !bp && dk.PlagueStrike.CanCast(sim) {
dk.PlagueStrike.Cast(sim, target)
} else if !dk.btr.itCycle && dk.DeathStrike.CanCast(sim) && sim.CurrentTime+attackGcd < fbAt {
casted := dk.DeathStrike.Cast(sim, target)
if casted && dk.LastOutcome.Matches(core.OutcomeLanded) {
dk.btr.dsCount++
}

if dk.btr.dsCount == 4 {
dk.btr.dsCount = 0
dk.btr.itCount = 0
dk.btr.itCycle = true
}
} else if dk.btr.itCycle && dk.IcyTouch.CanCast(sim) && sim.CurrentTime+attackGcd < fbAt {
casted := dk.IcyTouch.Cast(sim, target)
if casted && dk.LastOutcome.Matches(core.OutcomeLanded) {
dk.btr.itCount++
}
casted = dk.RuneTap.Cast(sim, target)
}

if dk.btr.itCount == 4 {
dk.btr.dsCount = 0
dk.btr.itCount = 0
dk.btr.itCycle = false
if !casted {
if dk.NextCast == dk.BloodStrike && dk.CurrentHealthPercent() > 0.6 {
if dk.NormalCurrentBloodRunes() > 0 {
dk.BloodStrike.Cast(sim, target)
dk.NextCast = nil
}
} else {
if sim.CurrentTime < fbAt-2*spellGcd {
waitUntil = fbAt - 2*spellGcd
if !ff && dk.IcyTouch.CanCast(sim) {
dk.IcyTouch.Cast(sim, target)
} else if !bp && dk.PlagueStrike.CanCast(sim) {
dk.PlagueStrike.Cast(sim, target)
} else if !dk.btr.itCycle && dk.DeathStrike.CanCast(sim) && sim.CurrentTime+attackGcd < fbAt {
casted = dk.DeathStrike.Cast(sim, target)
if casted && dk.LastOutcome.Matches(core.OutcomeLanded) {
dk.btr.dsCount++
}

if dk.btr.dsCount == 4 {
dk.btr.dsCount = 0
dk.btr.itCount = 0
dk.btr.itCycle = true
}
} else if dk.btr.itCycle && dk.IcyTouch.CanCast(sim) && sim.CurrentTime+attackGcd < fbAt {
casted := dk.IcyTouch.Cast(sim, target)
if casted && dk.LastOutcome.Matches(core.OutcomeLanded) {
dk.btr.itCount++
}

if dk.btr.itCount == 4 {
dk.btr.dsCount = 0
dk.btr.itCount = 0
dk.btr.itCycle = false
}
} else {
dk.Pestilence.Cast(sim, target)
dk.NextCast = dk.BloodStrike
if sim.CurrentTime < fbAt-2*spellGcd {
waitUntil = fbAt - 2*spellGcd
} else {
dk.Pestilence.Cast(sim, target)
dk.NextCast = dk.BloodStrike
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions ui/tank_deathknight/presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ export const DefaultOptions = TankDeathKnightOptions.create({
});

export const DefaultConsumes = Consumes.create({
flask: Flask.FlaskOfFortification,
flask: Flask.FlaskOfStoneblood,
food: Food.FoodDragonfinFilet,
defaultPotion: Potions.PotionOfSpeed,
defaultPotion: Potions.IndestructiblePotion,
prepopPotion: Potions.IndestructiblePotion,
});

Expand Down
10 changes: 6 additions & 4 deletions ui/tank_deathknight/sim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ export class TankDeathknightSimUI extends IndividualSimUI<Spec.SpecTankDeathknig
Stat.StatArmor,
Stat.StatArmorPenetration,
Stat.StatDefense,
Stat.StatBlock,
Stat.StatBlockValue,
Stat.StatDodge,
Stat.StatParry,
Stat.StatResilience,
Expand All @@ -71,8 +69,6 @@ export class TankDeathknightSimUI extends IndividualSimUI<Spec.SpecTankDeathknig
Stat.StatMeleeHaste,
Stat.StatArmorPenetration,
Stat.StatDefense,
Stat.StatBlock,
Stat.StatBlockValue,
Stat.StatDodge,
Stat.StatParry,
Stat.StatResilience,
Expand Down Expand Up @@ -108,6 +104,8 @@ export class TankDeathknightSimUI extends IndividualSimUI<Spec.SpecTankDeathknig
specOptions: Presets.DefaultOptions,
// Default raid/party buffs settings.
raidBuffs: RaidBuffs.create({
retributionAura: true,
powerWordFortitude: TristateEffect.TristateEffectImproved,
giftOfTheWild: TristateEffect.TristateEffectImproved,
swiftRetribution: true,
strengthOfEarthTotem: TristateEffect.TristateEffectImproved,
Expand All @@ -134,6 +132,10 @@ export class TankDeathknightSimUI extends IndividualSimUI<Spec.SpecTankDeathknig
ebonPlaguebringer: true,
mangle: true,
heartOfTheCrusader: true,
demoralizingShout: TristateEffect.TristateEffectImproved,
frostFever: TristateEffect.TristateEffectImproved,
insectSwarm: true,
judgementOfLight: true,
}),
},

Expand Down

0 comments on commit b92c390

Please sign in to comment.