Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/wowsims/sod
Browse files Browse the repository at this point in the history
  • Loading branch information
kayla-glick committed Jan 13, 2025
2 parents 55b9a9b + 39cf4a8 commit ff11c61
Show file tree
Hide file tree
Showing 16 changed files with 494 additions and 56 deletions.
5 changes: 5 additions & 0 deletions sim/core/cooldown.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ func (timer *Timer) Set(t time.Duration) {
*timer = Timer(t)
}

// Niche reset meant to be used for attack queued abilities that can be reset. Avoids a queued ability going off twice during thrashes like Wild Strikes.
func (timer *Timer) QueueReset(t time.Duration) {
*timer = Timer(t + (time.Millisecond * 50))
}

func (timer *Timer) Reset() {
*timer = Timer(startingCDTime)
}
Expand Down
12 changes: 6 additions & 6 deletions sim/hunter/item_sets_pve_phase_7.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,19 @@ func (hunter *Hunter) applyNaxxramasMelee4PBonus() {

// Not entirely sure how this will work so taking some liberties
// Assume that it resets all of them when one crits
var spellsToReset []*core.Spell
//var spellsToReset []*core.Spell

core.MakePermanent(hunter.RegisterAura(core.Aura{
Label: label,
OnInit: func(aura *core.Aura, sim *core.Simulation) {
spellsToReset = hunter.Strikes
spellsToReset = append(spellsToReset, hunter.MongooseBite)
//spellsToReset = hunter.Strikes
//spellsToReset = append(spellsToReset, hunter.MongooseBite)
},
OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if (spell.Flags.Matches(SpellFlagStrike) || spell.SpellCode == SpellCode_HunterMongooseBite) && result.DidCrit() {
for _, spell := range spellsToReset {
spell.CD.Reset()
}
spell.CD.Reset()
} else if spell.SpellCode == SpellCode_HunterRaptorStrikeHit && result.DidCrit() {
hunter.RaptorStrike.CD.QueueReset(sim.CurrentTime)
}
},
}))
Expand Down
6 changes: 5 additions & 1 deletion sim/hunter/items.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,11 @@ func init() {
MaxStacks: 2,
OnCastComplete: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) {
if spell.Flags.Matches(SpellFlagShot) || spell.ProcMask.Matches(core.ProcMaskMeleeSpecial) && spell.CD.Timer != nil {
spell.CD.Reset()
if spell.SpellCode == SpellCode_HunterRaptorStrike {
spell.CD.QueueReset(sim.CurrentTime)
} else {
spell.CD.Reset()
}
aura.RemoveStack(sim)
}
},
Expand Down
1 change: 1 addition & 0 deletions ui/core/preset_utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
Spec,
UnitReference,
} from './proto/common.js';
import { Hunter_Options } from './proto/hunter';
import { SavedRotation, SavedTalents } from './proto/ui.js';
import { Stats } from './proto_utils/stats.js';
import { SpecRotation, specTypeFunctions } from './proto_utils/utils.js';
Expand Down
23 changes: 23 additions & 0 deletions ui/hunter/apls/p6_melee_bm.apl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"type": "TypeAPL",
"prepullActions": [
{"action":{"move":{"rangeFromTarget":{"const":{"val":"5"}}}},"doAtValue":{"const":{"val":"-10s"}}},
{"action":{"castSpell":{"spellId":{"spellId":469145}}},"doAtValue":{"const":{"val":"-5s"}}},
{"action":{"castSpell":{"spellId":{"spellId":25295,"rank":9}}},"doAtValue":{"const":{"val":"-1.5s"}}},
{"action":{"castSpell":{"spellId":{"spellId":20572}}},"doAtValue":{"const":{"val":"-1.5s"}}},
{"action":{"castSpell":{"spellId":{"spellId":19574}}},"doAtValue":{"const":{"val":"-0.1s"}}}
],
"priorityList": [
{"action":{"autocastOtherCooldowns":{}}},
{"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpGe","lhs":{"auraNumStacks":{"auraId":{"spellId":415320}}},"rhs":{"const":{"val":"2"}}}}]}},"castSpell":{"spellId":{"spellId":3045}}}},
{"action":{"condition":{"and":{"vals":[{"not":{"val":{"auraIsActive":{"auraId":{"spellId":415358}}}}},{"cmp":{"op":"OpLt","lhs":{"auraNumStacks":{"auraId":{"spellId":415320}}},"rhs":{"const":{"val":"1"}}}}]}},"castSpell":{"spellId":{"spellId":415320}}}},
{"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpLt","lhs":{"auraRemainingTime":{"auraId":{"spellId":415320}}},"rhs":{"const":{"val":"2s"}}}},{"cmp":{"op":"OpGe","lhs":{"auraNumStacks":{"auraId":{"spellId":415320}}},"rhs":{"const":{"val":"1"}}}}]}},"castSpell":{"spellId":{"spellId":415320}}}},
{"action":{"castSpell":{"spellId":{"spellId":415343}}}},
{"action":{"castSpell":{"spellId":{"spellId":14271,"rank":4}}}},
{"action":{"castSpell":{"spellId":{"spellId":415320}}}},
{"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpLt","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"5%"}}}},{"cmp":{"op":"OpGe","lhs":{"remainingTime":{}},"rhs":{"const":{"val":"4s"}}}}]}},"castSpell":{"spellId":{"spellId":415423}}}},
{"action":{"condition":{"cmp":{"op":"OpGe","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"50%"}}}},"castSpell":{"spellId":{"spellId":469145}}}},
{"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpGe","lhs":{"spellTimeToReady":{"spellId":{"spellId":415343}}},"rhs":{"const":{"val":"1.5s"}}}},{"cmp":{"op":"OpGt","lhs":{"spellTimeToReady":{"spellId":{"spellId":14271,"rank":4}}},"rhs":{"const":{"val":"1.5s"}}}}]}},"castSpell":{"spellId":{"spellId":409530}}}},
{"hide":true,"action":{"castSpell":{"spellId":{"itemId":233985}}}}
]
}
26 changes: 26 additions & 0 deletions ui/hunter/apls/p6_melee_sv.apl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"type": "TypeAPL",
"prepullActions": [
{"action":{"move":{"rangeFromTarget":{"const":{"val":"5"}}}},"doAtValue":{"const":{"val":"-10s"}}},
{"action":{"castSpell":{"spellId":{"spellId":469145}}},"doAtValue":{"const":{"val":"-5s"}}},
{"action":{"castSpell":{"spellId":{"spellId":13555,"rank":8}}},"doAtValue":{"const":{"val":"-1.5s"}}},
{"action":{"castSpell":{"spellId":{"spellId":20572}}},"doAtValue":{"const":{"val":"-1.5s"}}},
{"action":{"castSpell":{"spellId":{"spellId":1213366}}},"doAtValue":{"const":{"val":"-0.1s"}}}
],
"priorityList": [
{"hide":true,"action":{"autocastOtherCooldowns":{}}},
{"hide":true,"action":{"condition":{"cmp":{"op":"OpGe","lhs":{"auraNumStacks":{"auraId":{"spellId":415320}}},"rhs":{"const":{"val":"2"}}}},"castSpell":{"spellId":{"spellId":3045}}}},
{"action":{"condition":{"or":{"vals":[{"cmp":{"op":"OpGe","lhs":{"auraNumStacks":{"auraId":{"spellId":415320}}},"rhs":{"const":{"val":"2"}}}},{"cmp":{"op":"OpGe","lhs":{"currentTime":{}},"rhs":{"const":{"val":"10"}}}}]}},"autocastOtherCooldowns":{}}},
{"action":{"condition":{"and":{"vals":[{"not":{"val":{"auraIsActive":{"auraId":{"spellId":415358}}}}},{"cmp":{"op":"OpLt","lhs":{"auraNumStacks":{"auraId":{"spellId":415320}}},"rhs":{"const":{"val":"3"}}}}]}},"castSpell":{"spellId":{"spellId":415320}}}},
{"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpLt","lhs":{"auraRemainingTime":{"auraId":{"spellId":415320}}},"rhs":{"const":{"val":"2s"}}}},{"cmp":{"op":"OpGe","lhs":{"auraNumStacks":{"auraId":{"spellId":415320}}},"rhs":{"const":{"val":"1"}}}}]}},"castSpell":{"spellId":{"spellId":415320}}}},
{"action":{"condition":{"auraIsActive":{"auraId":{"spellId":467331}}},"castSpell":{"spellId":{"spellId":458482}}}},
{"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpGe","lhs":{"auraNumStacks":{"auraId":{"spellId":415358}}},"rhs":{"const":{"val":"5"}}}},{"auraIsActiveWithReactionTime":{"auraId":{"spellId":467331}}}]}},"castSpell":{"spellId":{"spellId":14271,"rank":4}}}},
{"action":{"castSpell":{"spellId":{"spellId":415343}}}},
{"action":{"castSpell":{"spellId":{"spellId":458482}}}},
{"action":{"castSpell":{"spellId":{"spellId":14271,"rank":4}}}},
{"action":{"castSpell":{"spellId":{"spellId":415320}}}},
{"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpLt","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"5%"}}}},{"cmp":{"op":"OpGe","lhs":{"remainingTime":{}},"rhs":{"const":{"val":"4s"}}}}]}},"castSpell":{"spellId":{"spellId":415423}}}},
{"action":{"condition":{"cmp":{"op":"OpGe","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"50%"}}}},"castSpell":{"spellId":{"spellId":469145}}}},
{"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpGt","lhs":{"auraRemainingTime":{"auraId":{"spellId":415320}}},"rhs":{"const":{"val":"1.5"}}}},{"cmp":{"op":"OpGe","lhs":{"spellTimeToReady":{"spellId":{"spellId":415343}}},"rhs":{"const":{"val":"1.5"}}}},{"cmp":{"op":"OpGe","lhs":{"spellTimeToReady":{"spellId":{"spellId":458482}}},"rhs":{"const":{"val":"1.5"}}}},{"cmp":{"op":"OpGe","lhs":{"spellTimeToReady":{"spellId":{"spellId":14271,"rank":4}}},"rhs":{"const":{"val":"1.5"}}}}]}},"castSpell":{"spellId":{"spellId":409530}}}}
]
}
42 changes: 42 additions & 0 deletions ui/hunter/apls/p6_ranged_draconic.apl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"type": "TypeAPL",
"prepullActions": [
{"action":{"castSpell":{"spellId":{"spellId":3045}}},"doAtValue":{"const":{"val":"-22s"}},"hide":true},
{"action":{"castSpell":{"spellId":{"spellId":25296,"rank":7}}},"doAtValue":{"const":{"val":"-10s"}}},
{"action":{"castSpell":{"spellId":{"spellId":20904,"rank":6}}},"doAtValue":{"const":{"val":"-3.5s"}}},
{"action":{"castSpell":{"spellId":{"spellId":1213366}}},"doAtValue":{"const":{"val":"-0.44s"}},"hide":true},
{"action":{"castSpell":{"spellId":{"itemId":234462}}},"doAtValue":{"const":{"val":"-0.44s"}},"hide":true},
{"action":{"castSpell":{"spellId":{"itemId":215162}}},"doAtValue":{"const":{"val":"-0.44s"}}},
{"action":{"castSpell":{"spellId":{"spellId":26297}}},"doAtValue":{"const":{"val":"-0.44s"}},"hide":true},
{"action":{"castSpell":{"spellId":{"spellId":25295,"rank":9}}},"doAtValue":{"const":{"val":"-0.44s"}}}
],
"priorityList": [
{"action":{"condition":{"not":{"val":{"dotIsActive":{"spellId":{"spellId":25295,"rank":9}}}}},"castSpell":{"spellId":{"spellId":25295,"rank":9}}}},
{"action":{"condition":{"cmp":{"op":"OpLe","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"55%"}}}},"castSpell":{"spellId":{"itemId":13444}}}},
{"action":{"condition":{"cmp":{"op":"OpLe","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"65%"}}}},"castSpell":{"spellId":{"itemId":12662}}}},
{"action":{"condition":{"cmp":{"op":"OpGe","lhs":{"currentTime":{}},"rhs":{"const":{"val":"2.5s"}}}},"castSpell":{"spellId":{"spellId":1213366}}}},
{"action":{"condition":{"cmp":{"op":"OpGe","lhs":{"currentTime":{}},"rhs":{"const":{"val":"2.5s"}}}},"castSpell":{"spellId":{"itemId":234462}}}},
{"hide":true,"action":{"condition":{"cmp":{"op":"OpGe","lhs":{"currentTime":{}},"rhs":{"const":{"val":"2.5s"}}}},"castSpell":{"spellId":{"spellId":3045}}}},
{"hide":true,"action":{"condition":{"cmp":{"op":"OpGe","lhs":{"currentTime":{}},"rhs":{"const":{"val":"2.5s"}}}},"castSpell":{"spellId":{"spellId":26297}}}},
{"action":{"condition":{"or":{"vals":[{"auraIsActive":{"auraId":{"spellId":1213366}}},{"auraIsActive":{"auraId":{"itemId":234462}}}]}},"autocastOtherCooldowns":{}}},
{"hide":true,"action":{"condition":{"cmp":{"op":"OpGe","lhs":{"auraNumStacks":{"auraId":{"spellId":1213366}}},"rhs":{"const":{"val":"1"}}}},"castSpell":{"spellId":{"spellId":26297}}}},
{"hide":true,"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpGt","lhs":{"spellTimeToReady":{"spellId":{"spellId":409535}}},"rhs":{"const":{"val":"3s"}}}},{"cmp":{"op":"OpGt","lhs":{"spellTimeToReady":{"spellId":{"spellId":409510}}},"rhs":{"const":{"val":"3s"}}}},{"not":{"val":{"auraIsActive":{"auraId":{"spellId":415413}}}}}]}},"castSpell":{"spellId":{"spellId":468388}}}},
{"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpGe","lhs":{"currentTime":{}},"rhs":{"const":{"val":"15s"}}}},{"not":{"val":{"auraIsActive":{"auraId":{"spellId":415413}}}}}]}},"castSpell":{"spellId":{"spellId":468388}}}},
{"hide":true,"action":{"autocastOtherCooldowns":{}}},
{"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpGe","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"50%"}}}},{"auraIsActive":{"auraId":{"spellId":415423}}}]}},"cancelAura":{"auraId":{"spellId":415423}}}},
{"action":{"condition":{"and":{"vals":[{"not":{"val":{"auraIsActive":{"auraId":{"spellId":415413}}}}},{"cmp":{"op":"OpLt","lhs":{"spellTimeToReady":{"spellId":{"spellId":409433}}},"rhs":{"const":{"val":"2s"}}}},{"cmp":{"op":"OpGe","lhs":{"auraRemainingTime":{"auraId":{"spellId":409535}}},"rhs":{"const":{"val":"10s"}}}}]}},"castSpell":{"spellId":{"spellId":409530}}}},
{"action":{"condition":{"and":{"vals":[{"not":{"val":{"auraIsActive":{"auraId":{"spellId":415413}}}}},{"cmp":{"op":"OpLt","lhs":{"spellTimeToReady":{"spellId":{"spellId":409433}}},"rhs":{"const":{"val":"2s"}}}}]}},"castSpell":{"spellId":{"spellId":409535}}}},
{"action":{"condition":{"and":{"vals":[{"not":{"val":{"auraIsActive":{"auraId":{"spellId":415413}}}}},{"not":{"val":{"auraIsActive":{"auraId":{"spellId":468388}}}}}]}},"castSpell":{"spellId":{"spellId":409510}}}},
{"action":{"castSpell":{"spellId":{"spellId":409433}}}},
{"action":{"castSpell":{"spellId":{"spellId":20904,"rank":6}}}},
{"action":{"castSpell":{"spellId":{"spellId":25294,"rank":5}}}},
{"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpGt","lhs":{"autoTimeToNext":{"autoType":"Ranged"}},"rhs":{"const":{"val":"1.5s"}}}},{"cmp":{"op":"OpGt","lhs":{"gcdTimeToReady":{}},"rhs":{"const":{"val":"1s"}}}}]}},"castSpell":{"spellId":{"itemId":233986}}}},
{"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpLe","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"5%"}}}}]}},"castSpell":{"spellId":{"spellId":415423}}}},
{"action":{"condition":{"and":{"vals":[{"not":{"val":{"auraIsActive":{"auraId":{"spellId":415423}}}}},{"not":{"val":{"auraIsActive":{"auraId":{"spellId":14322,"rank":6}}}}},{"cmp":{"op":"OpGt","lhs":{"spellTimeToReady":{"spellId":{"spellId":409433}}},"rhs":{"const":{"val":"1.45s"}}}}]}},"castSpell":{"spellId":{"spellId":25296,"rank":7}}}},
{"action":{"condition":{"cmp":{"op":"OpEq","lhs":{"const":{"val":"1"}},"rhs":{"const":{"val":"0"}}}},"castSpell":{"spellId":{"spellId":26297,"tag":2}}}},
{"action":{"condition":{"cmp":{"op":"OpEq","lhs":{"const":{"val":"1"}},"rhs":{"const":{"val":"0"}}}},"castSpell":{"spellId":{"spellId":26297,"tag":3}}}},
{"action":{"condition":{"cmp":{"op":"OpEq","lhs":{"const":{"val":"1"}},"rhs":{"const":{"val":"0"}}}},"castSpell":{"spellId":{"spellId":26297,"tag":4}}}},
{"action":{"condition":{"cmp":{"op":"OpEq","lhs":{"const":{"val":"1"}},"rhs":{"const":{"val":"0"}}}},"castSpell":{"spellId":{"spellId":26297,"tag":5}}}},
{"action":{"condition":{"cmp":{"op":"OpEq","lhs":{"const":{"val":"1"}},"rhs":{"const":{"val":"0"}}}},"castSpell":{"spellId":{"spellId":26297,"tag":6}}}}
]
}
27 changes: 27 additions & 0 deletions ui/hunter/apls/p6_ranged_killshot.apl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"type": "TypeAPL",
"prepullActions": [
{"action":{"castSpell":{"spellId":{"spellId":25296,"rank":7}}},"doAtValue":{"const":{"val":"-10s"}}},
{"action":{"castSpell":{"spellId":{"spellId":20904,"rank":6}}},"doAtValue":{"const":{"val":"-3.5s"}}},
{"action":{"castSpell":{"spellId":{"itemId":215162}}},"doAtValue":{"const":{"val":"-0.45s"}}},
{"action":{"castSpell":{"spellId":{"spellId":25295,"rank":9}}},"doAtValue":{"const":{"val":"-0.45s"}}},
{"action":{"activateAura":{"auraId":{"spellId":415413}}},"doAtValue":{"const":{"val":"-0.45s"}},"hide":true}
],
"priorityList": [
{"action":{"condition":{"not":{"val":{"dotIsActive":{"spellId":{"spellId":25295,"rank":9}}}}},"castSpell":{"spellId":{"spellId":25295,"rank":9}}}},
{"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpGt","lhs":{"autoTimeToNext":{"autoType":"Ranged"}},"rhs":{"const":{"val":"1.5s"}}}},{"cmp":{"op":"OpGt","lhs":{"gcdTimeToReady":{}},"rhs":{"const":{"val":"1s"}}}},{"cmp":{"op":"OpLt","lhs":{"remainingTime":{}},"rhs":{"const":{"val":"30s"}}}}]}},"castSpell":{"spellId":{"itemId":233986}}}},
{"action":{"condition":{"spellIsReady":{"spellId":{"spellId":3045}}},"sequence":{"name":"Opener","actions":[{"castSpell":{"spellId":{"spellId":409433}}},{"castSpell":{"spellId":{"spellId":409593}}},{"castSpell":{"spellId":{"spellId":409530}}},{"castSpell":{"spellId":{"spellId":1213366}}},{"castSpell":{"spellId":{"itemId":234462}}},{"castSpell":{"spellId":{"spellId":25294,"rank":5}}},{"castSpell":{"spellId":{"spellId":409433}}}]}}},
{"action":{"condition":{"cmp":{"op":"OpGe","lhs":{"auraNumStacks":{"auraId":{"spellId":1213366}}},"rhs":{"const":{"val":"5"}}}},"castSpell":{"spellId":{"spellId":26297}}}},
{"action":{"condition":{"cmp":{"op":"OpLt","lhs":{"dotRemainingTime":{"spellId":{"spellId":25295,"rank":9}}},"rhs":{"const":{"val":"6s"}}}},"castSpell":{"spellId":{"spellId":409433}}}},
{"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpLt","lhs":{"spellTimeToReady":{"spellId":{"spellId":409433}}},"rhs":{"const":{"val":"6s"}}}},{"cmp":{"op":"OpGt","lhs":{"spellTimeToReady":{"spellId":{"spellId":409433}}},"rhs":{"const":{"val":"4s"}}}},{"spellIsReady":{"spellId":{"spellId":409593}}}]}},"castSpell":{"spellId":{"spellId":3045}}}},
{"action":{"condition":{"auraIsActive":{"auraId":{"spellId":3045}}},"castSpell":{"spellId":{"spellId":409593}}}},
{"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpGt","lhs":{"spellTimeToReady":{"spellId":{"spellId":409530}}},"rhs":{"const":{"val":"5s"}}}},{"cmp":{"op":"OpGt","lhs":{"spellTimeToReady":{"spellId":{"spellId":25294,"rank":5}}},"rhs":{"const":{"val":"8s"}}}},{"spellIsReady":{"spellId":{"spellId":409433}}}]}},"castSpell":{"spellId":{"spellId":468388}}}},
{"action":{"condition":{"auraIsActive":{"auraId":{"spellId":468388}}},"castSpell":{"spellId":{"spellId":409433}}}},
{"action":{"castSpell":{"spellId":{"spellId":409433}}}},
{"action":{"castSpell":{"spellId":{"spellId":409593}}}},
{"action":{"castSpell":{"spellId":{"spellId":409530}}}},
{"action":{"castSpell":{"spellId":{"spellId":25294,"rank":5}}}},
{"action":{"castSpell":{"spellId":{"spellId":14287,"rank":8}}}},
{"action":{"condition":{"isExecutePhase":{"threshold":"E20"}},"castSpell":{"spellId":{"itemId":12662}}}}
]
}
Loading

0 comments on commit ff11c61

Please sign in to comment.