From ea478a37da9fa745c7798afe8219c6b13773e292 Mon Sep 17 00:00:00 2001 From: rosenrusinov Date: Sun, 12 Mar 2023 17:37:01 +0100 Subject: [PATCH] tank rota adjustements --- sim/deathknight/deathknight.go | 6 ++++- sim/deathknight/dps/dps_deathknight.go | 5 +--- sim/deathknight/summon_gargoyle.go | 10 ++++--- sim/deathknight/talents_blood.go | 5 ++-- sim/deathknight/tank/openers.go | 34 ++++++++++++++++-------- sim/deathknight/tank/tank_deathknight.go | 2 +- 6 files changed, 38 insertions(+), 24 deletions(-) diff --git a/sim/deathknight/deathknight.go b/sim/deathknight/deathknight.go index fdbe4cd590..19011f98cd 100644 --- a/sim/deathknight/deathknight.go +++ b/sim/deathknight/deathknight.go @@ -383,7 +383,7 @@ func (dk *Deathknight) HasMinorGlyph(glyph proto.DeathknightMinorGlyph) bool { return dk.HasGlyph(int32(glyph)) } -func NewDeathknight(character core.Character, inputs DeathknightInputs, talents string) *Deathknight { +func NewDeathknight(character core.Character, inputs DeathknightInputs, talents string, preNerfedGargoyle bool) *Deathknight { dk := &Deathknight{ Character: character, Talents: &proto.DeathknightTalents{}, @@ -438,6 +438,10 @@ func NewDeathknight(character core.Character, inputs DeathknightInputs, talents dk.PseudoStats.MeleeHasteRatingPerHastePercent /= 1.3 + if dk.Talents.SummonGargoyle { + dk.Gargoyle = dk.NewGargoyle(!preNerfedGargoyle) + } + dk.Ghoul = dk.NewGhoulPet(dk.Talents.MasterOfGhouls) dk.OnGargoyleStartFirstCast = func() {} dk.GargoyleSummonDelay = time.Millisecond * 2500 diff --git a/sim/deathknight/dps/dps_deathknight.go b/sim/deathknight/dps/dps_deathknight.go index 95c89ad524..42c7ff6b08 100644 --- a/sim/deathknight/dps/dps_deathknight.go +++ b/sim/deathknight/dps/dps_deathknight.go @@ -58,12 +58,9 @@ func NewDpsDeathknight(character core.Character, player *proto.Player) *DpsDeath UseAMS: dk.Rotation.UseAms, AvgAMSSuccessRate: dk.Rotation.AvgAmsSuccessRate, AvgAMSHit: dk.Rotation.AvgAmsHit, - }, player.TalentsString), + }, player.TalentsString, dk.Rotation.PreNerfedGargoyle), Rotation: dk.Rotation, } - if dpsDk.Talents.SummonGargoyle { - dpsDk.Gargoyle = dpsDk.NewGargoyle(!dk.Rotation.PreNerfedGargoyle) - } dpsDk.Inputs.UnholyFrenzyTarget = dk.Options.UnholyFrenzyTarget diff --git a/sim/deathknight/summon_gargoyle.go b/sim/deathknight/summon_gargoyle.go index 9e67f65dfe..ad49ff3824 100644 --- a/sim/deathknight/summon_gargoyle.go +++ b/sim/deathknight/summon_gargoyle.go @@ -63,13 +63,15 @@ func (dk *Deathknight) registerSummonGargoyleCD() { }, }) - // We use this for defining the min cast time of gargoyle - // but we dont cast it with the MCD system dk.AddMajorCooldown(core.MajorCooldown{ Spell: dk.SummonGargoyle, - Type: core.CooldownTypeUnknown, + Type: core.CooldownTypeDPS, }) - dk.GetMajorCooldown(dk.SummonGargoyle.ActionID).Disable() + if dk.Inputs.IsDps { + // We use this for defining the min cast time of gargoyle + // but we dont cast it with the MCD system in the dps sim + dk.GetMajorCooldown(dk.SummonGargoyle.ActionID).Disable() + } } type GargoylePet struct { diff --git a/sim/deathknight/talents_blood.go b/sim/deathknight/talents_blood.go index d64f0a5fb2..27ffeb6929 100644 --- a/sim/deathknight/talents_blood.go +++ b/sim/deathknight/talents_blood.go @@ -354,9 +354,8 @@ func (dk *Deathknight) applyBloodGorged() { return } - bonusDamage := 1.1 - - armorPenRating := 10.0 * core.ArmorPenPerPercentArmor + bonusDamage := 1.0 + 0.02*float64(dk.Talents.BloodGorged) + armorPenRating := float64(dk.Talents.BloodGorged) * 2.0 * core.ArmorPenPerPercentArmor dk.AddStat(stats.ArmorPenetration, armorPenRating) procAura := core.MakePermanent(dk.RegisterAura(core.Aura{ diff --git a/sim/deathknight/tank/openers.go b/sim/deathknight/tank/openers.go index 1d9acb9ba8..541916c760 100644 --- a/sim/deathknight/tank/openers.go +++ b/sim/deathknight/tank/openers.go @@ -21,33 +21,45 @@ func (dk *TankDeathknight) TankRA_FuSpell(sim *core.Simulation, target *core.Uni return -1 } +func (dk *TankDeathknight) TankRA_IT(sim *core.Simulation, target *core.Unit, s *deathknight.Sequence) time.Duration { + casted := dk.IcyTouch.Cast(sim, target) + if !casted && dk.Talents.UnbreakableArmor && !dk.UnbreakableArmor.IsReady(sim) { + s.Advance() + return -1 + } + advance := dk.LastOutcome.Matches(core.OutcomeLanded) + + s.ConditionalAdvance(casted && advance) + return -1 +} + func (dk *TankDeathknight) setupTankRegularERWOpener() { dk.RotationSequence. - NewAction(dk.RotationActionCallback_IT). + NewAction(dk.TankRA_IT). NewAction(dk.RotationActionCallback_PS). NewAction(dk.TankRA_FuSpell). NewAction(dk.RotationActionCallback_BT). - NewAction(dk.RotationActionCallback_IT). + NewAction(dk.TankRA_IT). NewAction(dk.TankRA_BloodSpell). NewAction(dk.RotationActionCallback_ERW). NewAction(dk.RotationActionCallback_Pesti). - NewAction(dk.RotationActionCallback_IT). - NewAction(dk.RotationActionCallback_IT). - NewAction(dk.RotationActionCallback_IT). + NewAction(dk.TankRA_IT). + NewAction(dk.TankRA_IT). + NewAction(dk.TankRA_IT). NewAction(dk.RotationActionCallback_RD). NewAction(dk.TankRA_FuSpell) } func (dk *TankDeathknight) setupTankThreatERWOpener() { dk.RotationSequence. - NewAction(dk.RotationActionCallback_IT). - NewAction(dk.RotationActionCallback_IT). + NewAction(dk.TankRA_IT). + NewAction(dk.TankRA_IT). NewAction(dk.RotationActionCallback_BT). - NewAction(dk.RotationActionCallback_IT). + NewAction(dk.TankRA_IT). NewAction(dk.RotationActionCallback_ERW). - NewAction(dk.RotationActionCallback_IT). - NewAction(dk.RotationActionCallback_IT). - NewAction(dk.RotationActionCallback_IT). + NewAction(dk.TankRA_IT). + NewAction(dk.TankRA_IT). + NewAction(dk.TankRA_IT). NewAction(dk.RotationActionCallback_PS). NewAction(dk.TankRA_BloodSpell) } diff --git a/sim/deathknight/tank/tank_deathknight.go b/sim/deathknight/tank/tank_deathknight.go index fbf0936cf4..b99d20cf56 100644 --- a/sim/deathknight/tank/tank_deathknight.go +++ b/sim/deathknight/tank/tank_deathknight.go @@ -40,7 +40,7 @@ func NewTankDeathknight(character core.Character, options *proto.Player) *TankDe Deathknight: deathknight.NewDeathknight(character, deathknight.DeathknightInputs{ IsDps: false, StartingRunicPower: dkOptions.Options.StartingRunicPower, - }, options.TalentsString), + }, options.TalentsString, false), Rotation: dkOptions.Rotation, }