From 30cb5be9c78d0d95bbd3a2de61ba9a052375d7ba Mon Sep 17 00:00:00 2001 From: James Tanner Date: Mon, 10 Jul 2023 17:38:31 -0700 Subject: [PATCH 1/2] Small tweaks to hunter rotation presets --- ui/hunter/presets.ts | 75 ++++++++++++++++++++++++++++++++++++++++++-- ui/hunter/sim.ts | 1 + 2 files changed, 73 insertions(+), 3 deletions(-) diff --git a/ui/hunter/presets.ts b/ui/hunter/presets.ts index d2adcbde7b..83f80f970c 100644 --- a/ui/hunter/presets.ts +++ b/ui/hunter/presets.ts @@ -169,6 +169,12 @@ export const ROTATION_PRESET_BM = { "castSpell": {"spellId":{"spellId":49048}} } }, + { + "hide": true, + "action": { + "castSpell": {"spellId":{"spellId":49045}} + } + }, { "action": { "castSpell": {"spellId":{"spellId":49052}} @@ -177,7 +183,7 @@ export const ROTATION_PRESET_BM = { ] }`), }), -} +}; export const ROTATION_PRESET_MM = { name: 'MM', @@ -247,6 +253,12 @@ export const ROTATION_PRESET_MM = { "castSpell": {"spellId":{"spellId":49048}} } }, + { + "hide": true, + "action": { + "castSpell": {"spellId":{"spellId":49045}} + } + }, { "action": { "castSpell": {"spellId":{"spellId":49052}} @@ -255,7 +267,7 @@ export const ROTATION_PRESET_MM = { ] }`), }), -} +}; export const ROTATION_PRESET_SV = { name: 'SV', @@ -345,7 +357,64 @@ export const ROTATION_PRESET_SV = { ] }`), }), -} +}; + +export const ROTATION_PRESET_AOE = { + name: 'AOE', + rotation: SavedRotation.create({ + specRotationOptionsJson: HunterRotation.toJsonString(HunterRotation.create({ + timeToTrapWeaveMs: 2000, + })), + rotation: APLRotation.fromJsonString(`{ + "enabled": true, + "prepullActions": [ + { + "action": { + "castSpell": {"spellId":{"otherId":"OtherActionPotion"}} + }, + "doAt": "-1s" + } + ], + "priorityList": [ + { + "action": { + "condition": {"cmp":{"op":"OpGt","lhs":{"currentTime":{}},"rhs":{"const":{"val":"10s"}}}}, + "autocastOtherCooldowns": {} + } + }, + { + "action": { + "condition": {"and":{"vals":[{"not":{"val":{"auraIsActive":{"auraId":{"spellId":34074}}}}},{"cmp":{"op":"OpLt","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"10%"}}}}]}}, + "castSpell": {"spellId":{"spellId":34074}} + } + }, + { + "action": { + "condition": {"and":{"vals":[{"not":{"val":{"auraIsActive":{"auraId":{"spellId":61847}}}}},{"cmp":{"op":"OpGt","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"30%"}}}}]}}, + "castSpell": {"spellId":{"spellId":61847}} + } + }, + { + "hide": true, + "action": { + "multidot": {"spellId":{"spellId":49001},"maxDots":3,"maxOverlap":{"const":{"val":"0ms"}}} + } + }, + { + "action": { + "condition": {"not":{"val":{"dotIsActive":{"spellId":{"spellId":49067}}}}}, + "castSpell": {"spellId":{"tag":1,"spellId":49067}} + } + }, + { + "action": { + "castSpell": {"spellId":{"spellId":58434}} + } + } + ] + }`), + }), +}; export const DefaultOptions = HunterOptions.create({ ammo: Ammo.SaroniteRazorheads, diff --git a/ui/hunter/sim.ts b/ui/hunter/sim.ts index 94952d4245..ee39797840 100644 --- a/ui/hunter/sim.ts +++ b/ui/hunter/sim.ts @@ -249,6 +249,7 @@ export class HunterSimUI extends IndividualSimUI { Presets.ROTATION_PRESET_BM, Presets.ROTATION_PRESET_MM, Presets.ROTATION_PRESET_SV, + Presets.ROTATION_PRESET_AOE, ], // Preset gear configurations that the user can quickly select. gear: [ From ea606f5871191ad2ca5430c50e74bae36c05a4ed Mon Sep 17 00:00:00 2001 From: James Tanner Date: Mon, 10 Jul 2023 17:42:01 -0700 Subject: [PATCH 2/2] Fix pretrap bug --- sim/hunter/explosive_trap.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sim/hunter/explosive_trap.go b/sim/hunter/explosive_trap.go index 36c4d347c3..00538fb3b6 100644 --- a/sim/hunter/explosive_trap.go +++ b/sim/hunter/explosive_trap.go @@ -61,7 +61,7 @@ func (hunter *Hunter) registerExplosiveTrapSpell(timer *core.Timer) { ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) { if sim.CurrentTime < 0 { // Traps only last 30s. - if sim.CurrentTime < time.Second*30 { + if sim.CurrentTime < -time.Second*30 { return }