From b23495497742e19c37101e4961c93dabd9331af3 Mon Sep 17 00:00:00 2001 From: Josh Date: Mon, 30 Oct 2023 21:11:16 -0400 Subject: [PATCH] fix auto rotation, update presets, 4p fix (#3984) --- sim/deathknight/dps/TestBlood.results | 4 ++-- sim/deathknight/dps/TestFrost.results | 4 ++-- sim/deathknight/dps/TestUnholy.results | 4 ++-- sim/deathknight/horn_of_winter.go | 2 +- sim/deathknight/items.go | 5 +++++ sim/deathknight/tank/TestBloodTank.results | 4 ++-- ui/core/proto_utils/utils.ts | 5 ++++- ui/deathknight/apls/frost_bl_pesti.apl.json | 6 ++++-- ui/deathknight/apls/frost_uh_pesti.apl.json | 16 +++++++++------- 9 files changed, 31 insertions(+), 19 deletions(-) diff --git a/sim/deathknight/dps/TestBlood.results b/sim/deathknight/dps/TestBlood.results index 2fe368f482..15d81f2aec 100644 --- a/sim/deathknight/dps/TestBlood.results +++ b/sim/deathknight/dps/TestBlood.results @@ -589,8 +589,8 @@ dps_results: { dps_results: { key: "TestBlood-AllItems-Scourgelord'sBattlegear" value: { - dps: 10625.29982 - tps: 5436.49585 + dps: 10625.9448 + tps: 5436.88283 } } dps_results: { diff --git a/sim/deathknight/dps/TestFrost.results b/sim/deathknight/dps/TestFrost.results index 3496f59453..870b101b53 100644 --- a/sim/deathknight/dps/TestFrost.results +++ b/sim/deathknight/dps/TestFrost.results @@ -624,8 +624,8 @@ dps_results: { dps_results: { key: "TestFrost-AllItems-Scourgelord'sBattlegear" value: { - dps: 11273.11189 - tps: 6620.89809 + dps: 11273.41052 + tps: 6621.07727 } } dps_results: { diff --git a/sim/deathknight/dps/TestUnholy.results b/sim/deathknight/dps/TestUnholy.results index 2dd0a67431..581053d811 100644 --- a/sim/deathknight/dps/TestUnholy.results +++ b/sim/deathknight/dps/TestUnholy.results @@ -702,8 +702,8 @@ dps_results: { dps_results: { key: "TestUnholy-AllItems-Scourgelord'sBattlegear" value: { - dps: 11190.97744 - tps: 7505.09301 + dps: 11191.0836 + tps: 7505.19865 hps: 335.91246 } } diff --git a/sim/deathknight/horn_of_winter.go b/sim/deathknight/horn_of_winter.go index 5ede9be2fe..7cea15ace5 100644 --- a/sim/deathknight/horn_of_winter.go +++ b/sim/deathknight/horn_of_winter.go @@ -40,7 +40,7 @@ func (dk *Deathknight) registerHornOfWinterSpell() { dk.HornOfWinter = dk.RegisterSpell(core.SpellConfig{ ActionID: actionID, - Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagAPL, + Flags: core.SpellFlagAPL, Cast: core.CastConfig{ DefaultCast: core.Cast{ GCD: core.GCDDefault, diff --git a/sim/deathknight/items.go b/sim/deathknight/items.go index 0c4abacd01..0bdc00211e 100644 --- a/sim/deathknight/items.go +++ b/sim/deathknight/items.go @@ -218,6 +218,11 @@ func (dk *Deathknight) registerScourgelordsBattlegearProc() { OnExpire: func(aura *core.Aura, sim *core.Simulation) { aura.Unit.PseudoStats.DamageDealtMultiplier /= bonusCoeff }, + OnCastComplete: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) { + if spell.DefaultCast.GCD > 0 && dk.AllRunesSpent() { + aura.Refresh(sim) + } + }, }) dk.onRuneSpendT10 = func(sim *core.Simulation, changeType core.RuneChangeType) { diff --git a/sim/deathknight/tank/TestBloodTank.results b/sim/deathknight/tank/TestBloodTank.results index 81d2c66df1..4b2e9b3497 100644 --- a/sim/deathknight/tank/TestBloodTank.results +++ b/sim/deathknight/tank/TestBloodTank.results @@ -596,8 +596,8 @@ dps_results: { dps_results: { key: "TestBloodTank-AllItems-Scourgelord'sBattlegear" value: { - dps: 2822.71725 - tps: 8787.55673 + dps: 2823.02717 + tps: 8788.19934 } } dps_results: { diff --git a/ui/core/proto_utils/utils.ts b/ui/core/proto_utils/utils.ts index 9bdaa0a0e4..403ddfba4d 100644 --- a/ui/core/proto_utils/utils.ts +++ b/ui/core/proto_utils/utils.ts @@ -300,7 +300,10 @@ export const raidSimLabel: string = 'Full Raid Sim'; // Converts '1231321-12313123-0' to [40, 21, 0]. export function getTalentTreePoints(talentsString: string): Array { const trees = talentsString.split('-'); - return trees.map(tree => sum([...tree].map(char => parseInt(char)))); + if (trees.length == 2) { + trees.push('0') + } + return trees.map(tree => sum([...tree].map(char => parseInt(char) || 0))); } export function getTalentPoints(talentsString: string): number { diff --git a/ui/deathknight/apls/frost_bl_pesti.apl.json b/ui/deathknight/apls/frost_bl_pesti.apl.json index d6128ea0c6..d03b94ea82 100644 --- a/ui/deathknight/apls/frost_bl_pesti.apl.json +++ b/ui/deathknight/apls/frost_bl_pesti.apl.json @@ -18,11 +18,13 @@ {"action":{"condition":{"cmp":{"op":"OpLe","lhs":{"remainingTime":{}},"rhs":{"const":{"val":"3s"}}}},"castSpell":{"spellId":{"spellId":49930,"tag":1}}}}, {"action":{"condition":{"or":{"vals":[{"cmp":{"op":"OpEq","lhs":{"currentTime":{}},"rhs":{"const":{"val":"0"}}}},{"not":{"val":{"dotIsActive":{"spellId":{"spellId":55095}}}}}]}},"castSpell":{"spellId":{"spellId":59131}}}}, {"action":{"condition":{"not":{"val":{"dotIsActive":{"spellId":{"spellId":55078}}}}},"castSpell":{"spellId":{"spellId":49921,"tag":1}}}}, - {"action":{"condition":{"cmp":{"op":"OpLe","lhs":{"currentTime":{}},"rhs":{"const":{"val":"19s"}}}},"strictSequence":{"actions":[{"castSpell":{"spellId":{"spellId":45529}}},{"castSpell":{"spellId":{"spellId":51271}}},{"castSpell":{"spellId":{"spellId":54758}}},{"castSpell":{"spellId":{"spellId":33697}}},{"castSpell":{"spellId":{"spellId":51425,"tag":1}}},{"castSpell":{"spellId":{"spellId":55268,"tag":1}}},{"castSpell":{"spellId":{"spellId":50842}}},{"castSpell":{"spellId":{"spellId":47568}}},{"castSpell":{"spellId":{"spellId":51425,"tag":1}}},{"castSpell":{"spellId":{"spellId":55268,"tag":1}}},{"castSpell":{"spellId":{"spellId":51425,"tag":1}}},{"castSpell":{"spellId":{"spellId":51425,"tag":1}}},{"castSpell":{"spellId":{"spellId":46584}}},{"castSpell":{"spellId":{"spellId":55268,"tag":1}}},{"castSpell":{"spellId":{"spellId":55268,"tag":1}}},{"castSpell":{"spellId":{"spellId":51425,"tag":1}}},{"castSpell":{"spellId":{"spellId":51425,"tag":1}}}]}}}, + {"action":{"condition":{"cmp":{"op":"OpLe","lhs":{"currentTime":{}},"rhs":{"const":{"val":"19s"}}}},"strictSequence":{"actions":[{"castSpell":{"spellId":{"spellId":45529}}},{"castSpell":{"spellId":{"spellId":51271}}},{"castSpell":{"spellId":{"spellId":54758}}},{"castSpell":{"spellId":{"spellId":33697}}},{"castSpell":{"spellId":{"spellId":26297}}},{"castSpell":{"spellId":{"spellId":20594}}},{"castSpell":{"spellId":{"spellId":51425,"tag":1}}},{"castSpell":{"spellId":{"spellId":55268,"tag":1}}},{"castSpell":{"spellId":{"spellId":50842}}},{"castSpell":{"spellId":{"spellId":47568}}},{"castSpell":{"spellId":{"spellId":51425,"tag":1}}},{"castSpell":{"spellId":{"spellId":55268,"tag":1}}},{"castSpell":{"spellId":{"spellId":51425,"tag":1}}},{"castSpell":{"spellId":{"spellId":51425,"tag":1}}},{"castSpell":{"spellId":{"spellId":46584}}},{"castSpell":{"spellId":{"spellId":55268,"tag":1}}},{"castSpell":{"spellId":{"spellId":55268,"tag":1}}},{"castSpell":{"spellId":{"spellId":51425,"tag":1}}},{"castSpell":{"spellId":{"spellId":51425,"tag":1}}}]}}}, {"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpLe","lhs":{"dotRemainingTime":{"spellId":{"spellId":55095}}},"rhs":{"const":{"val":"1.5s"}}}},{"dotIsActive":{"spellId":{"spellId":55095}}}]}},"castSpell":{"spellId":{"spellId":50842}}}}, {"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpLe","lhs":{"spellTimeToReady":{"spellId":{"spellId":51271}}},"rhs":{"const":{"val":"1.5s"}}}},{"currentRuneDeath":{"runeSlot":"SlotLeftBlood"}},{"currentRuneDeath":{"runeSlot":"SlotRightBlood"}},{"currentRuneActive":{"runeSlot":"SlotLeftBlood"}},{"cmp":{"op":"OpLe","lhs":{"runeSlotCooldown":{"runeSlot":"SlotRightBlood"}},"rhs":{"const":{"val":"1.5s"}}}},{"not":{"val":{"currentRuneActive":{"runeSlot":"SlotLeftFrost"}}}},{"not":{"val":{"currentRuneActive":{"runeSlot":"SlotRightFrost"}}}}]}},"strictSequence":{"actions":[{"castSpell":{"spellId":{"spellId":50842}}},{"castSpell":{"spellId":{"spellId":51271}}}]}}}, - {"action":{"condition":{"and":{"vals":[{"auraIsActive":{"auraId":{"spellId":51271}}},{"spellIsReady":{"spellId":{"spellId":33697}}}]}},"castSpell":{"spellId":{"otherId":"OtherActionPotion"}}}}, + {"action":{"condition":{"and":{"vals":[{"auraIsActive":{"auraId":{"spellId":51271}}},{"or":{"vals":[{"spellIsReady":{"spellId":{"spellId":33697}}},{"spellIsReady":{"spellId":{"spellId":26297}}},{"spellIsReady":{"spellId":{"spellId":20594}}}]}}]}},"castSpell":{"spellId":{"otherId":"OtherActionPotion"}}}}, {"action":{"condition":{"auraIsActive":{"auraId":{"spellId":51271}}},"castSpell":{"spellId":{"spellId":33697}}}}, + {"action":{"condition":{"auraIsActive":{"auraId":{"spellId":51271}}},"castSpell":{"spellId":{"spellId":26297}}}}, + {"action":{"condition":{"auraIsActive":{"auraId":{"spellId":51271}}},"castSpell":{"spellId":{"spellId":20594}}}}, {"action":{"condition":{"auraIsActive":{"auraId":{"spellId":51271}}},"castSpell":{"spellId":{"spellId":54758}}}}, {"action":{"condition":{"and":{"vals":[{"currentRuneDeath":{"runeSlot":"SlotLeftBlood"}},{"currentRuneDeath":{"runeSlot":"SlotRightBlood"}},{"spellIsReady":{"spellId":{"spellId":45529}}},{"auraIsActive":{"auraId":{"spellId":51271}}},{"currentRuneActive":{"runeSlot":"SlotLeftBlood"}},{"currentRuneActive":{"runeSlot":"SlotRightBlood"}}]}},"strictSequence":{"actions":[{"castSpell":{"spellId":{"spellId":51425,"tag":1}}},{"castSpell":{"spellId":{"spellId":45529}}},{"castSpell":{"spellId":{"spellId":50842}}}]}}}, {"hide":true,"action":{"condition":{"and":{"vals":[{"auraIsActive":{"auraId":{"spellId":51271}}},{"cmp":{"op":"OpGe","lhs":{"auraRemainingTime":{"auraId":{"spellId":51271}}},"rhs":{"const":{"val":"10s"}}}},{"dotIsActive":{"spellId":{"spellId":55095}}},{"cmp":{"op":"OpLe","lhs":{"dotRemainingTime":{"spellId":{"spellId":55095}}},"rhs":{"const":{"val":"6s"}}}}]}},"strictSequence":{"actions":[{"castSpell":{"spellId":{"spellId":50842}}},{"castSpell":{"spellId":{"spellId":45529}}},{"waitUntil":{"condition":{"spellCanCast":{"spellId":{"spellId":51425,"tag":1}}}}},{"castSpell":{"spellId":{"spellId":51425,"tag":1}}}]}}}, diff --git a/ui/deathknight/apls/frost_uh_pesti.apl.json b/ui/deathknight/apls/frost_uh_pesti.apl.json index aa7671902c..ad6f32be18 100644 --- a/ui/deathknight/apls/frost_uh_pesti.apl.json +++ b/ui/deathknight/apls/frost_uh_pesti.apl.json @@ -1,12 +1,12 @@ { "type": "TypeAPL", "prepullActions": [ - {"action":{"castSpell":{"spellId":{"spellId":48263}}},"doAtValue":{"const":{"val":"-16s"}}}, - {"action":{"castSpell":{"spellId":{"spellId":50689}}},"doAtValue":{"const":{"val":"-14s"}}}, - {"action":{"castSpell":{"spellId":{"spellId":48265}}},"doAtValue":{"const":{"val":"-12s"}}}, + {"action":{"castSpell":{"spellId":{"spellId":48263}}},"doAtValue":{"const":{"val":"-13s"}}}, + {"action":{"castSpell":{"spellId":{"spellId":50689}}},"doAtValue":{"const":{"val":"-11.5s"}}}, + {"action":{"castSpell":{"spellId":{"spellId":48265}}},"doAtValue":{"const":{"val":"-10s"}}}, {"action":{"castSpell":{"spellId":{"spellId":42650}}},"doAtValue":{"const":{"val":"-8s"}}}, - {"action":{"castSpell":{"spellId":{"spellId":50689}}},"doAtValue":{"const":{"val":"-3s"}}}, - {"action":{"castSpell":{"spellId":{"spellId":57623}}},"doAtValue":{"const":{"val":"-1.5s"}}}, + {"action":{"castSpell":{"spellId":{"spellId":57623}}},"doAtValue":{"const":{"val":"-2.5s"}}}, + {"action":{"castSpell":{"spellId":{"spellId":50689}}},"doAtValue":{"const":{"val":"-1s"}}}, {"action":{"castSpell":{"spellId":{"otherId":"OtherActionPotion"}}},"doAtValue":{"const":{"val":"-1s"}}} ], "priorityList": [ @@ -18,11 +18,13 @@ {"action":{"condition":{"cmp":{"op":"OpLe","lhs":{"remainingTime":{}},"rhs":{"const":{"val":"3s"}}}},"castSpell":{"spellId":{"spellId":49930,"tag":1}}}}, {"action":{"condition":{"or":{"vals":[{"cmp":{"op":"OpEq","lhs":{"currentTime":{}},"rhs":{"const":{"val":"0"}}}},{"not":{"val":{"dotIsActive":{"spellId":{"spellId":55095}}}}}]}},"castSpell":{"spellId":{"spellId":59131}}}}, {"action":{"condition":{"not":{"val":{"dotIsActive":{"spellId":{"spellId":55078}}}}},"castSpell":{"spellId":{"spellId":49921,"tag":1}}}}, - {"action":{"condition":{"cmp":{"op":"OpLe","lhs":{"currentTime":{}},"rhs":{"const":{"val":"19s"}}}},"strictSequence":{"actions":[{"castSpell":{"spellId":{"spellId":50842}}},{"castSpell":{"spellId":{"spellId":45529}}},{"castSpell":{"spellId":{"spellId":51271}}},{"castSpell":{"spellId":{"spellId":54758}}},{"castSpell":{"spellId":{"spellId":33697}}},{"castSpell":{"spellId":{"spellId":51425,"tag":1}}},{"castSpell":{"spellId":{"spellId":55268,"tag":1}}},{"castSpell":{"spellId":{"spellId":47568}}},{"castSpell":{"spellId":{"spellId":51425,"tag":1}}},{"castSpell":{"spellId":{"spellId":55268,"tag":1}}},{"castSpell":{"spellId":{"spellId":51425,"tag":1}}},{"castSpell":{"spellId":{"spellId":55268,"tag":1}}},{"castSpell":{"spellId":{"spellId":51425,"tag":1}}},{"cancelAura":{"auraId":{"spellId":45529}}},{"castSpell":{"spellId":{"spellId":46584}}},{"castSpell":{"spellId":{"spellId":55268,"tag":1}}}]}}}, + {"action":{"condition":{"cmp":{"op":"OpLe","lhs":{"currentTime":{}},"rhs":{"const":{"val":"19s"}}}},"strictSequence":{"actions":[{"castSpell":{"spellId":{"spellId":50842}}},{"castSpell":{"spellId":{"spellId":45529}}},{"castSpell":{"spellId":{"spellId":51271}}},{"castSpell":{"spellId":{"spellId":54758}}},{"castSpell":{"spellId":{"spellId":33697}}},{"castSpell":{"spellId":{"spellId":26297}}},{"castSpell":{"spellId":{"spellId":20594}}},{"castSpell":{"spellId":{"spellId":51425,"tag":1}}},{"castSpell":{"spellId":{"spellId":55268,"tag":1}}},{"castSpell":{"spellId":{"spellId":47568}}},{"castSpell":{"spellId":{"spellId":51425,"tag":1}}},{"castSpell":{"spellId":{"spellId":55268,"tag":1}}},{"castSpell":{"spellId":{"spellId":51425,"tag":1}}},{"castSpell":{"spellId":{"spellId":55268,"tag":1}}},{"castSpell":{"spellId":{"spellId":51425,"tag":1}}},{"cancelAura":{"auraId":{"spellId":45529}}},{"castSpell":{"spellId":{"spellId":46584}}},{"castSpell":{"spellId":{"spellId":55268,"tag":1}}}]}}}, {"action":{"condition":{"and":{"vals":[{"spellIsReady":{"spellId":{"spellId":51271}}},{"currentRuneActive":{"runeSlot":"SlotLeftBlood"}},{"not":{"val":{"currentRuneActive":{"runeSlot":"SlotRightFrost"}}}},{"currentRuneDeath":{"runeSlot":"SlotRightBlood"}},{"not":{"val":{"currentRuneActive":{"runeSlot":"SlotRightFrost"}}}},{"currentRuneDeath":{"runeSlot":"SlotLeftBlood"}},{"cmp":{"op":"OpGt","lhs":{"dotRemainingTime":{"spellId":{"spellId":55095}}},"rhs":{"const":{"val":"9s"}}}}]}},"strictSequence":{"actions":[{"castSpell":{"spellId":{"spellId":51271}}},{"castSpell":{"spellId":{"spellId":45529}}},{"castSpell":{"spellId":{"spellId":51425,"tag":1}}},{"cancelAura":{"auraId":{"spellId":45529}}}]}}}, {"hide":true,"action":{"condition":{"and":{"vals":[{"spellIsReady":{"spellId":{"spellId":51271}}},{"currentRuneActive":{"runeSlot":"SlotLeftBlood"}},{"not":{"val":{"currentRuneActive":{"runeSlot":"SlotLeftFrost"}}}},{"not":{"val":{"currentRuneActive":{"runeSlot":"SlotRightFrost"}}}},{"not":{"val":{"currentRuneDeath":{"runeSlot":"SlotRightBlood"}}}}]}},"strictSequence":{"actions":[{"castSpell":{"spellId":{"spellId":45529}}},{"castSpell":{"spellId":{"spellId":50842}}},{"castSpell":{"spellId":{"spellId":51271}}}]}}}, - {"action":{"condition":{"and":{"vals":[{"auraIsActive":{"auraId":{"spellId":51271}}},{"spellIsReady":{"spellId":{"spellId":33697}}}]}},"castSpell":{"spellId":{"otherId":"OtherActionPotion"}}}}, + {"action":{"condition":{"and":{"vals":[{"auraIsActive":{"auraId":{"spellId":51271}}},{"or":{"vals":[{"spellIsReady":{"spellId":{"spellId":33697}}},{"spellIsReady":{"spellId":{"spellId":26297}}},{"spellIsReady":{"spellId":{"spellId":20594}}}]}}]}},"castSpell":{"spellId":{"otherId":"OtherActionPotion"}}}}, {"action":{"condition":{"auraIsActive":{"auraId":{"spellId":51271}}},"castSpell":{"spellId":{"spellId":33697}}}}, + {"action":{"condition":{"auraIsActive":{"auraId":{"spellId":51271}}},"castSpell":{"spellId":{"spellId":26297}}}}, + {"action":{"condition":{"auraIsActive":{"auraId":{"spellId":51271}}},"castSpell":{"spellId":{"spellId":20594}}}}, {"action":{"condition":{"auraIsActive":{"auraId":{"spellId":51271}}},"castSpell":{"spellId":{"spellId":54758}}}}, {"action":{"condition":{"and":{"vals":[{"auraIsActive":{"auraId":{"spellId":59052}}},{"dotIsActive":{"spellId":{"spellId":55095}}},{"cmp":{"op":"OpGt","lhs":{"dotRemainingTime":{"spellId":{"spellId":55095}}},"rhs":{"const":{"val":"3s"}}}},{"cmp":{"op":"OpEq","lhs":{"currentRuneCount":{"runeType":"RuneDeath"}},"rhs":{"const":{"val":"0"}}}}]}},"castSpell":{"spellId":{"spellId":51411}}}}, {"action":{"condition":{"and":{"vals":[{"auraIsActive":{"auraId":{"spellId":51130}}},{"cmp":{"op":"OpLe","lhs":{"runeGrace":{"runeType":"RuneFrost"}},"rhs":{"const":{"val":"1s"}}}},{"cmp":{"op":"OpLe","lhs":{"runeGrace":{"runeType":"RuneUnholy"}},"rhs":{"const":{"val":"1s"}}}},{"dotIsActive":{"spellId":{"spellId":55095}}},{"cmp":{"op":"OpGe","lhs":{"dotRemainingTime":{"spellId":{"spellId":55095}}},"rhs":{"const":{"val":"3s"}}}},{"cmp":{"op":"OpEq","lhs":{"currentRuneCount":{"runeType":"RuneDeath"}},"rhs":{"const":{"val":"0"}}}}]}},"castSpell":{"spellId":{"spellId":55268,"tag":1}}}},