Skip to content

Commit

Permalink
fix auto rotation, update presets, 4p fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lime-green committed Oct 31, 2023
1 parent 2382b6f commit 9222430
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 19 deletions.
4 changes: 2 additions & 2 deletions sim/deathknight/dps/TestBlood.results
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
4 changes: 2 additions & 2 deletions sim/deathknight/dps/TestFrost.results
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
4 changes: 2 additions & 2 deletions sim/deathknight/dps/TestUnholy.results
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
2 changes: 1 addition & 1 deletion sim/deathknight/horn_of_winter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 5 additions & 0 deletions sim/deathknight/items.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions sim/deathknight/tank/TestBloodTank.results
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
5 changes: 4 additions & 1 deletion ui/core/proto_utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<number> {
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 {
Expand Down
6 changes: 4 additions & 2 deletions ui/deathknight/apls/frost_bl_pesti.apl.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}}}]}}},
Expand Down
16 changes: 9 additions & 7 deletions ui/deathknight/apls/frost_uh_pesti.apl.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand All @@ -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}}}},
Expand Down

0 comments on commit 9222430

Please sign in to comment.