You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

170 lines
19 KiB

## Assassination Rogue
## May 14, 2022
## Changes:
## - Apply 'strict' flag to some APL forks to save processing time.
## - Don't Vanish unless Slice and Dice will last longer than Master Assassin.
## - Relax Flagellation / Vendetta sync (if Vendetta is toggled off or on a long CD).
## - Make Fleshcraft interrupt in combat if we just did it for volatile_solvent.
## - Use SBS more to summon Kevin's Oozeling if you have the soulbind.
## - Convert rune_word.frost to buff.rune_word_frost.up.
## - Added Windscar Whetstone.
## - Tweaked Exsanguinate to get used if you've Vendetta-sanguinated.
## Executed before combat begins. Accepts non-harmful actions only.
actions.precombat=apply_poison
actions.precombat+=/bottled_flayedwing_toxin
actions.precombat+=/marked_for_death,precombat_seconds=10,if=!covenant.venthyr&raid_event.adds.in>15
actions.precombat+=/fleshcraft,if=soulbind.pustule_eruption|soulbind.volatile_solvent
actions.precombat+=/variable,name=vendetta_cdr,value=1-(runeforge.duskwalkers_patch*(0.45+(set_bonus.tier28_4pc*0.1)))
# The average CDR is 0.22 but due to the RNG nature of CP gen, 2x this value is optimal for syncing logic
actions.precombat+=/variable,name=flagellation_cdr,value=1-(runeforge.obedience*0.44)
# Determine which (if any) stat buff trinket we want to attempt to sync with Vendetta.
actions.precombat+=/variable,name=trinket_sync_slot,value=1,if=trinket.1.has_stat.any_dps&(!trinket.2.has_stat.any_dps|trinket.1.cooldown.duration>=trinket.2.cooldown.duration)|trinket.1.is.inscrutable_quantum_device|(covenant.venthyr&!trinket.2.has_stat.any_dps&trinket.1.is.shadowgrasp_totem)
actions.precombat+=/variable,name=trinket_sync_slot,value=2,if=trinket.2.has_stat.any_dps&(!trinket.1.has_stat.any_dps|trinket.2.cooldown.duration>trinket.1.cooldown.duration)|trinket.2.is.inscrutable_quantum_device|(covenant.venthyr&!trinket.1.has_stat.any_dps&trinket.2.is.shadowgrasp_totem)
actions.precombat+=/variable,name=use_trinket_1_pre_vendetta,value=set_bonus.tier28_4pc&(trinket.1.has_stat.haste_rating|trinket.1.is.inscrutable_quantum_device)
actions.precombat+=/variable,name=use_trinket_2_pre_vendetta,value=set_bonus.tier28_4pc&(trinket.2.has_stat.haste_rating|trinket.2.is.inscrutable_quantum_device)
actions.precombat+=/stealth
actions.precombat+=/slice_and_dice,precombat_seconds=1,if=!talent.nightstalker.enabled&refreshable
## Executed every time the actor is available.
actions=kick
# Restealth if possible (no vulnerable enemies in combat)
actions+=/stealth
actions+=/variable,name=single_target,value=spell_targets.fan_of_knives<2
# Combined Energy Regen needed to saturate
actions+=/variable,name=regen_saturated,value=energy.regen_combined>35
actions+=/variable,name=vendetta_cooldown_remains,value=cooldown.vendetta.remains*variable.vendetta_cdr
actions+=/call_action_list,name=stealthed,strict=1,if=stealthed.rogue
actions+=/call_action_list,name=cds
# Put SnD up initially for Cut to the Chase, refresh with Envenom if at low duration
actions+=/slice_and_dice,if=!buff.slice_and_dice.up&combo_points>=1
actions+=/envenom,if=buff.slice_and_dice.up&buff.slice_and_dice.remains<5&combo_points>=4
actions+=/call_action_list,name=dot
actions+=/call_action_list,name=direct
actions+=/arcane_torrent,if=energy.deficit>=15+energy.regen_combined
actions+=/arcane_pulse
actions+=/lights_judgment
actions+=/bag_of_tricks
## Cooldowns
# If adds are up, snipe the one with lowest TTD. Use when dying faster than CP deficit or without any CP.
actions.cds=marked_for_death,line_cd=1.5,cycle_targets=1,if=raid_event.adds.up&(!variable.single_target|target.time_to_die<30)&(target.time_to_die<combo_points.deficit*1.5|combo_points.deficit>=cp_max_spend)
# If no adds will die within the next 30s, use MfD for max CP. Attempt to sync with Flagellation if possible.
actions.cds+=/marked_for_death,if=raid_event.adds.in>30-raid_event.adds.duration&combo_points.deficit>=cp_max_spend&(!covenant.venthyr|(debuff.flagellation.up|cooldown.flagellation.remains>15)&(talent.crimson_tempest.enabled|!cooldown.shiv.ready))
# Sync Vendetta window with Nightstalker+Exsanguinate if applicable
actions.cds+=/variable,name=vendetta_nightstalker_condition,value=!talent.nightstalker.enabled|!talent.exsanguinate.enabled|cooldown.exsanguinate.remains<5-2*talent.deeper_stratagem.enabled
# Wait on Vendetta for Garrote with MA, unless we are at max CP for Flagellation
actions.cds+=/variable,name=vendetta_ma_condition,value=!talent.master_assassin.enabled|dot.garrote.ticking|covenant.venthyr&combo_points.deficit=0
# Sync Vendetta with Flagellation and Sepsis as long as we won't lose a cast over the fight duration
actions.cds+=/variable,name=vendetta_covenant_condition,if=covenant.kyrian|covenant.necrolord|covenant.none,value=1
actions.cds+=/variable,name=vendetta_covenant_condition,if=covenant.venthyr,value=floor((fight_remains-20)%(120*variable.vendetta_cdr))>floor((fight_remains-20-cooldown.flagellation.remains)%(120*variable.vendetta_cdr))&cooldown.flagellation.remains>10|buff.flagellation_buff.up|debuff.flagellation.up|boss&fight_remains<20
actions.cds+=/variable,name=vendetta_covenant_condition,if=covenant.night_fae,value=floor((fight_remains-20)%(120*variable.vendetta_cdr))>floor((fight_remains-20-cooldown.sepsis.remains)%(120*variable.vendetta_cdr))|dot.sepsis.ticking|boss&fight_remains<20
# Fleshcraft for Pustule Eruption if not stealthed or in a cooldown cycle
actions.cds+=/fleshcraft,if=(soulbind.pustule_eruption|soulbind.volatile_solvent)&!stealthed.all&!debuff.vendetta.up&master_assassin_remains=0&(energy.time_to_max_combined>2|!debuff.shiv.up),interrupt_immediate=1,interrupt_global=1,interrupt_if=soulbind.volatile_solvent
# Sync Flagellation with Vendetta as long as we won't lose a cast over the fight duration (or if Vendetta will come back again/is toggled off).
actions.cds+=/flagellation,if=!stealthed.rogue&(variable.vendetta_cooldown_remains<3&variable.vendetta_ma_condition&effective_combo_points>=4&target.time_to_die>10|debuff.vendetta.up|boss&fight_remains<24)
actions.cds+=/flagellation,if=!stealthed.rogue&effective_combo_points>=4&(floor((fight_remains-24)%(cooldown*variable.flagellation_cdr))>floor((fight_remains-24-variable.vendetta_cooldown_remains)%(cooldown*variable.flagellation_cdr)))
# Sync Sepsis with Vendetta as long as we won't lose a cast over the fight duration, but prefer targets that will live at least 10s
actions.cds+=/sepsis,if=!stealthed.rogue&dot.garrote.ticking&(cooldown.vendetta.remains<1&target.time_to_die>10|debuff.vendetta.up|boss&fight_remains<10)
actions.cds+=/sepsis,if=!stealthed.rogue&(floor((fight_remains-10)%cooldown)>floor((fight_remains-10-variable.vendetta_cooldown_remains)%cooldown))+ actions.cds+=/sepsis,if=!stealthed.rogue&(floor((fight_remains-10)%cooldown)>floor((fight_remains-10-variable.vendetta_cooldown_remains)%cooldown))
# Vendetta to be used if not stealthed, Rupture is up, and all other talent/covenant conditions are satisfied
actions.cds+=/variable,name=vendetta_condition,value=!stealthed.rogue&dot.rupture.ticking&!debuff.vendetta.up&variable.vendetta_nightstalker_condition&variable.vendetta_ma_condition&variable.vendetta_covenant_condition
# Sync the priority stat buff trinket with Vendetta, otherwise use on cooldown
actions.cds+=/use_items,slots=trinket1,if=(!variable.use_trinket_1_pre_vendetta|variable.vendetta_condition&(cooldown.vendetta.remains<2|variable.vendetta_cooldown_remains>trinket.1.cooldown.duration%2)|fight_remains<=20)&(variable.trinket_sync_slot=1&(debuff.vendetta.up|variable.use_trinket_1_pre_vendetta|fight_remains<=20)|(variable.trinket_sync_slot=2&(!trinket.2.cooldown.ready|variable.vendetta_cooldown_remains>20))|!variable.trinket_sync_slot)
actions.cds+=/use_items,slots=trinket2,if=(!variable.use_trinket_2_pre_vendetta|variable.vendetta_condition&(cooldown.vendetta.remains<2|variable.vendetta_cooldown_remains>trinket.2.cooldown.duration%2)|fight_remains<=20)&(variable.trinket_sync_slot=2&(debuff.vendetta.up|variable.use_trinket_2_pre_vendetta|fight_remains<=20)|(variable.trinket_sync_slot=1&(!trinket.1.cooldown.ready|variable.vendetta_cooldown_remains>20))|!variable.trinket_sync_slot)
# If using T28 4pc, delay until the next DoT tick if we can gain more than a 3% haste snapshot compared to the current tick value
actions.cds+=/vendetta,if=variable.vendetta_condition&(!set_bonus.tier28_4pc|(dot.garrote.haste_pct>=(dot.garrote.haste_pct_next_tick-3))&(dot.rupture.haste_pct>=(dot.rupture.haste_pct_next_tick-3)))
# Exsanguinate when not stealthed and both Rupture and Garrote are up for long enough.
actions.cds+=/exsanguinate,if=!stealthed.rogue&(!dot.garrote.refreshable&dot.rupture.remains*(1+set_bonus.tier28_4pc*debuff.vendetta.up)>4+4*cp_max_spend|dot.rupture.remains*0.5>target.time_to_die)&target.time_to_die>4
# Shiv if DoTs are up; if Night Fae attempt to sync with Sepsis or Vendetta if we won't waste more than half Shiv's cooldown
actions.cds+=/shiv,if=!covenant.night_fae&!debuff.shiv.up&dot.garrote.ticking&dot.rupture.ticking&(!talent.crimson_tempest.enabled|!set_bonus.tier28_2pc&variable.single_target|dot.crimson_tempest.ticking)
actions.cds+=/shiv,if=covenant.night_fae&!debuff.shiv.up&dot.garrote.ticking&dot.rupture.ticking&((cooldown.sepsis.ready|cooldown.sepsis.remains>12)+(cooldown.vendetta.ready|variable.vendetta_cooldown_remains>12)=2)
actions.cds+=/potion,if=buff.bloodlust.react|boss&fight_remains<30|debuff.vendetta.up
actions.cds+=/blood_fury,if=debuff.vendetta.up
actions.cds+=/berserking,if=debuff.vendetta.up
actions.cds+=/fireblood,if=debuff.vendetta.up
actions.cds+=/ancestral_call,if=debuff.vendetta.up
actions.cds+=/call_action_list,name=vanish,if=!stealthed.all&master_assassin_remains=0
actions.cds+=/use_item,name=windscar_whetstone,if=spell_targets.fan_of_knives>desired_targets|raid_event.adds.in>60|boss&fight_remains<7
actions.cds+=/use_item,name=cache_of_acquired_treasures,if=buff.acquired_axe.up&(spell_targets.fan_of_knives=1&raid_event.adds.in>60|spell_targets.fan_of_knives>1)|boss&fight_remains<25
actions.cds+=/use_item,name=scars_of_fraternal_strife,if=!buff.scars_of_fraternal_strife_4.up|boss&fight_remains<30
## Direct damage abilities
# Envenom at 4+ (5+ with DS) CP. Immediately on 2+ targets, with Vendetta, or with TB; otherwise wait for some energy. Also wait if Exsg combo is coming up.
actions.direct=envenom,if=effective_combo_points>=4+talent.deeper_stratagem.enabled&(debuff.vendetta.up|debuff.shiv.up|debuff.flagellation.up|energy.deficit<=25+energy.regen_combined|!variable.single_target|effective_combo_points>cp_max_spend)&(!talent.exsanguinate.enabled|cooldown.exsanguinate.remains>2)
actions.direct+=/variable,name=use_filler,value=combo_points.deficit>1|energy.deficit<=25+energy.regen_combined|!variable.single_target
# Apply SBS to all targets without a debuff as priority, preferring targets dying sooner after the primary target
actions.direct+=/serrated_bone_spike,if=variable.use_filler&!dot.serrated_bone_spike_dot.ticking
actions.direct+=/serrated_bone_spike,cycle_targets=1,if=variable.use_filler&!dot.serrated_bone_spike_dot.ticking
# Keep from capping charges or burn at the end of fights
actions.direct+=/serrated_bone_spike,if=variable.use_filler&master_assassin_remains<0.8&(boss&fight_remains<=5|cooldown.serrated_bone_spike.max_charges-charges_fractional<=0.25)
# When MA is not at high duration, sync with damage buffs without overwriting Lead by Example
actions.direct+=/serrated_bone_spike,if=!set_bonus.tier28_2pc&variable.use_filler&master_assassin_remains<0.8&(soulbind.lead_by_example.enabled&!buff.lead_by_example.up&debuff.vendetta.up|buff.marrowed_gemstone_enhancement.up|!variable.single_target&debuff.shiv.up)
actions.direct+=/serrated_bone_spike,if=set_bonus.tier28_2pc&variable.use_filler&master_assassin_remains<0.8&debuff.grudge_match.up&!buff.lead_by_example.up&raid_event.adds.in>5
# Use SBS to summon Kevin's Oozeling if you have the soulbind.
actions.direct+=/serrated_bone_spike,line_cd=15,if=soulbind.kevins_oozeling&buff.kevins_oozeling.down
# Fan of Knives at 19+ stacks of Hidden Blades or against 4+ targets.
actions.direct+=/fan_of_knives,if=variable.use_filler&(buff.hidden_blades.stack>=19|(!priority_rotation&spell_targets.fan_of_knives>=3+stealthed.rogue))
# Fan of Knives to apply poisons if inactive on any target (or any bleeding targets with priority rotation) at 3T
actions.direct+=/fan_of_knives,if=active_dot.deadly_poison_dot<active_enemies&(!priority_rotation|dot.garrote.ticking|dot.rupture.ticking)&variable.use_filler&spell_targets.fan_of_knives>=3
actions.direct+=/echoing_reprimand,if=variable.use_filler&variable.vendetta_cooldown_remains>10
actions.direct+=/ambush,if=variable.use_filler&(master_assassin_remains=0&!runeforge.doomblade|buff.blindside.up)
# Tab-Mutilate to apply Deadly Poison at 2 targets
actions.direct+=/mutilate,cycle_targets=1,if=variable.use_filler&spell_targets.fan_of_knives=2
actions.direct+=/mutilate,if=variable.use_filler
## Damage over time abilities
# Limit secondary Garrotes for priority rotation if we have 35 energy regen or Garrote will expire on the primary target
actions.dot=variable,name=skip_cycle_garrote,value=priority_rotation&(dot.garrote.remains<cooldown.garrote.duration|variable.regen_saturated)
# Limit secondary Ruptures for priority rotation if we have 35 energy regen or Shiv is up on 2T+
actions.dot+=/variable,name=skip_cycle_rupture,value=priority_rotation&(debuff.shiv.up&spell_targets.fan_of_knives>2|variable.regen_saturated)
# Limit Ruptures if Vendetta+Shiv/Master Assassin is up and we have 2+ seconds left on the Rupture DoT
actions.dot+=/variable,name=skip_rupture,value=debuff.vendetta.up&(debuff.shiv.up|master_assassin_remains>0)&dot.rupture.remains>2
# Special Garrote and Rupture setup prior to Exsanguinate cast
actions.dot+=/garrote,if=talent.exsanguinate.enabled&!will_lose_exsanguinate&dot.garrote.pmultiplier<=1&cooldown.exsanguinate.remains<2&spell_targets.fan_of_knives=1&raid_event.adds.in>6&dot.garrote.remains*0.5<target.time_to_die
actions.dot+=/rupture,if=talent.exsanguinate.enabled&!will_lose_exsanguinate&dot.rupture.pmultiplier<=1&(effective_combo_points>=cp_max_spend&cooldown.exsanguinate.remains<1&dot.rupture.remains*0.5<target.time_to_die)
# Garrote upkeep, also tries to use it as a special generator for the last CP before a finisher
actions.dot+=/pool_resource,for_next=1
actions.dot+=/garrote,if=refreshable&combo_points.deficit>=1&(pmultiplier<=1|remains<=tick_time&spell_targets.fan_of_knives>=3)&(!will_lose_exsanguinate|remains<=tick_time*2&spell_targets.fan_of_knives>=3)&(target.time_to_die-remains)>4&master_assassin_remains=0
actions.dot+=/pool_resource,for_next=1
# Early refresh Garrote if it is at low duration (but not yet pandemic) at the end of Vendetta with 4pc
actions.dot+=/garrote,if=set_bonus.tier28_4pc&debuff.vendetta.up&debuff.vendetta.remains<3&remains<7&combo_points.deficit>=1&(pmultiplier<=1|remains<=tick_time&spell_targets.fan_of_knives>=3)&(target.time_to_die-remains)>2
actions.dot+=/pool_resource,for_next=1
actions.dot+=/garrote,cycle_targets=1,if=!variable.skip_cycle_garrote&refreshable&combo_points.deficit>=1&(pmultiplier<=1|remains<=tick_time&spell_targets.fan_of_knives>=3)&(!will_lose_exsanguinate|remains<=tick_time*2&spell_targets.fan_of_knives>=3)&(target.time_to_die-remains)>12&master_assassin_remains=0
# Crimson Tempest on multiple targets at 4+ CP when running out in 2-5s as long as we have enough regen and aren't setting up for Vendetta
actions.dot+=/crimson_tempest,cycle_targets=1,if=spell_targets>=2&effective_combo_points>=4&energy.regen_combined>20&(!cooldown.vendetta.ready|dot.rupture.ticking)&remains<(2+3*(spell_targets>=4))*(1-(set_bonus.tier28_4pc*debuff.vendetta.up*0.5))
# Keep up Rupture at 4+ on all targets (when living long enough and not snapshot)
actions.dot+=/rupture,if=!variable.skip_rupture&effective_combo_points>=4&refreshable&(pmultiplier<=1|remains<=tick_time&spell_targets.fan_of_knives>=3)&(!will_lose_exsanguinate|remains<=tick_time*2&spell_targets.fan_of_knives>=3)&target.time_to_die-remains>(4+(runeforge.dashing_scoundrel*5)+(runeforge.doomblade*5)+(variable.regen_saturated*6))
# Early refresh Rupture if it is at low duration (but not yet pandemic) at the end of Vendetta with 4pc
actions.dot+=/rupture,if=set_bonus.tier28_4pc&effective_combo_points>=4&debuff.vendetta.up&debuff.vendetta.remains<3&remains<8&target.time_to_die-remains>(4+(runeforge.dashing_scoundrel*5)+(runeforge.doomblade*5)+(variable.regen_saturated*6))%2
actions.dot+=/rupture,cycle_targets=1,if=!variable.skip_cycle_rupture&!variable.skip_rupture&effective_combo_points>=4&refreshable&(pmultiplier<=1|remains<=tick_time&spell_targets.fan_of_knives>=3)&(!will_lose_exsanguinate|remains<=tick_time*2&spell_targets.fan_of_knives>=3)&target.time_to_die-remains>(4+(runeforge.dashing_scoundrel*5)+(runeforge.doomblade*5)+(variable.regen_saturated*6))
# Fallback AoE Crimson Tempest with the same logic as above, but ignoring the energy conditions if we aren't using Rupture
actions.dot+=/crimson_tempest,if=spell_targets>=2&effective_combo_points>=4&remains<2+3*(spell_targets>=4)
# Crimson Tempest on ST if in pandemic and nearly max energy and if Envenom won't do more damage due to TB/MA
actions.dot+=/crimson_tempest,if=spell_targets=1&(!runeforge.dashing_scoundrel|rune_word.frost.enabled)&effective_combo_points>=(cp_max_spend-1)&refreshable&!will_lose_exsanguinate&(!debuff.shiv.up|debuff.grudge_match.remains>2)&target.time_to_die-remains>4
## Stealthed Actions
# Nighstalker on 3T: Crimson Tempest
actions.stealthed=crimson_tempest,if=talent.nightstalker.enabled&spell_targets>=3&combo_points>=4&target.time_to_die-remains>6
# Nighstalker on 1T: Snapshot Rupture
actions.stealthed+=/rupture,if=talent.nightstalker.enabled&combo_points>=4&target.time_to_die-remains>6
# Subterfuge: Apply or Refresh with buffed Garrotes
actions.stealthed+=/pool_resource,for_next=1
actions.stealthed+=/garrote,cycle_targets=1,if=talent.subterfuge.enabled&!will_lose_exsanguinate&(remains<12%exsanguinated_rate|pmultiplier<=1)&target.time_to_die-remains>2
# Subterfuge + Exsg on 1T: Refresh Garrote at the end of stealth to get max duration before Exsanguinate
actions.stealthed+=/pool_resource,for_next=1
actions.stealthed+=/garrote,if=talent.subterfuge.enabled&talent.exsanguinate.enabled&active_enemies=1&buff.subterfuge.remains<1.3
## Vanish
# Finish with max CP for Nightstalker, unless using Deathly Shadows
actions.vanish=variable,name=nightstalker_cp_condition,value=(!runeforge.deathly_shadows&effective_combo_points>=cp_max_spend)|(runeforge.deathly_shadows&combo_points<2)
# Vanish with Exsg + Nightstalker: Maximum CP and Exsg ready for next GCD
actions.vanish+=/vanish,if=talent.exsanguinate.enabled&talent.nightstalker.enabled&variable.nightstalker_cp_condition&cooldown.exsanguinate.remains<1
# Vanish with Nightstalker + No Exsg: Maximum CP and Vendetta up
actions.vanish+=/vanish,if=talent.nightstalker.enabled&!talent.exsanguinate.enabled&variable.nightstalker_cp_condition&debuff.vendetta.up
actions.vanish+=/pool_resource,for_next=1,extra_amount=45
actions.vanish+=/vanish,if=talent.subterfuge.enabled&cooldown.garrote.up&debuff.vendetta.up&(dot.garrote.refreshable|dot.garrote.pmultiplier<=1)&combo_points.deficit>=(spell_targets.fan_of_knives>?4)&raid_event.adds.in>12
# Vanish with Master Assasin: Rupture+Garrote not in refresh range, during Vendetta+Shiv. Sync with Sepsis final hit if possible.
actions.vanish+=/vanish,if=(talent.master_assassin.enabled|runeforge.mark_of_the_master_assassin)&!dot.rupture.refreshable&dot.garrote.remains>3&debuff.vendetta.up&(debuff.shiv.up|debuff.vendetta.remains<4|dot.sepsis.ticking)&dot.sepsis.remains<3