rogue="PR_Rogue_Assassination"
source=default
spec=assassination
level=60
race=mechagnome
role=attack
position=back
talents=3210021
covenant=kyrian
soulbind=pelagos,combat_meditation/lethal_poisons:4

# Default consumables
potion=phantom_fire
flask=spectral_flask_of_power
food=feast_of_gluttonous_hedonism
augmentation=veiled
temporary_enchant=main_hand:shaded_sharpening_stone/off_hand:shaded_sharpening_stone

# This default action priority list is automatically created based on your character.
# It is a attempt to provide you with a action list that is both simple and practicable,
# while resulting in a meaningful and good simulation. It may not result in the absolutely highest possible dps.
# Feel free to edit, adapt and improve it to your own needs.
# SimulationCraft is always looking for updates and improvements to the default action lists.

# Executed before combat begins. Accepts non-harmful actions only.
actions.precombat=apply_poison
actions.precombat+=/flask
actions.precombat+=/augmentation
actions.precombat+=/food
# Snapshot raid buffed stats before combat begins and pre-potting is done.
actions.precombat+=/snapshot_stats
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)
# 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|(trinket.1.is.shadowgrasp_totem&covenant.venthyr)
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|(trinket.2.is.shadowgrasp_totem&covenant.venthyr)
actions.precombat+=/stealth
actions.precombat+=/slice_and_dice,precombat_seconds=1

# Executed every time the actor is available.
# Restealth if possible (no vulnerable enemies in combat)
actions=stealth
# Interrupt on cooldown to allow simming interactions with that
actions+=/kick
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+=/call_action_list,name=stealthed,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,target_if=min:target.time_to_die,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&!cooldown.shiv.ready&(!covenant.venthyr|debuff.flagellation.up|cooldown.flagellation.remains>15)
# 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))|buff.flagellation_buff.up|debuff.flagellation.up|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|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)
# Sync Flagellation with Vendetta as long as we won't lose a cast over the fight duration
actions.cds+=/flagellation,if=!stealthed.rogue&(cooldown.vendetta.remains<3&variable.vendetta_ma_condition&effective_combo_points>=4&target.time_to_die>10|debuff.vendetta.up|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-cooldown.vendetta.remains*variable.vendetta_cdr)%(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&(cooldown.vendetta.remains<1&target.time_to_die>10|debuff.vendetta.up|fight_remains<10)
actions.cds+=/sepsis,if=!stealthed.rogue&(floor((fight_remains-10)%cooldown)>floor((fight_remains-10-cooldown.vendetta.remains*variable.vendetta_cdr)%cooldown))
actions.cds+=/vendetta,if=!stealthed.rogue&dot.rupture.ticking&!debuff.vendetta.up&variable.vendetta_nightstalker_condition&variable.vendetta_ma_condition&variable.vendetta_covenant_condition
# 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>4+4*cp_max_spend|dot.rupture.remains*0.5>target.time_to_die)&target.time_to_die>4
# Shiv if we are about to Envenom, and attempt to sync with Sepsis final hit if we won't waste more than half the cooldown.
actions.cds+=/shiv,if=dot.garrote.ticking&dot.rupture.ticking&(!cooldown.sepsis.ready|cooldown.vendetta.remains>12)|dot.sepsis.ticking
actions.cds+=/potion,if=buff.bloodlust.react|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
# Sync the priority stat buff trinket with Vendetta, otherwise use on cooldown
actions.cds+=/use_items,slots=trinket1,if=variable.trinket_sync_slot=1&(debuff.vendetta.up|fight_remains<=20)|(variable.trinket_sync_slot=2&!trinket.2.cooldown.ready)|!variable.trinket_sync_slot
actions.cds+=/use_items,slots=trinket2,if=variable.trinket_sync_slot=2&(debuff.vendetta.up|fight_remains<=20)|(variable.trinket_sync_slot=1&!trinket.1.cooldown.ready)|!variable.trinket_sync_slot

# 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,target_if=min:target.time_to_die+(dot.serrated_bone_spike_dot.ticking*600),if=variable.use_filler&!dot.serrated_bone_spike_dot.ticking
# When MA is not at high duration, use SBS to apply Lead by Example during Vendetta, otherwise keep from capping charges
actions.direct+=/serrated_bone_spike,if=variable.use_filler&master_assassin_remains<0.8&(fight_remains<=5|cooldown.serrated_bone_spike.max_charges-charges_fractional<=0.25|soulbind.lead_by_example.enabled&!buff.lead_by_example.up&debuff.vendetta.up|buff.marrowed_gemstone_enhancement.up)
# 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>=4+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,target_if=!dot.deadly_poison_dot.ticking&(!priority_rotation|dot.garrote.ticking|dot.rupture.ticking),if=variable.use_filler&spell_targets.fan_of_knives>=3
actions.direct+=/echoing_reprimand,if=variable.use_filler&cooldown.vendetta.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,target_if=!dot.deadly_poison_dot.ticking,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&!exsanguinated.garrote&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&(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)&(!exsanguinated|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
actions.dot+=/garrote,cycle_targets=1,if=!variable.skip_cycle_garrote&target!=self.target&refreshable&combo_points.deficit>=1&(pmultiplier<=1|remains<=tick_time&spell_targets.fan_of_knives>=3)&(!exsanguinated|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,target_if=min:remains,if=spell_targets>=2&effective_combo_points>=4&energy.regen_combined>20&(!cooldown.vendetta.ready|dot.rupture.ticking)&remains<2+3*(spell_targets>=4)
# 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)&(!exsanguinated|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))
actions.dot+=/rupture,cycle_targets=1,if=!variable.skip_cycle_rupture&!variable.skip_rupture&target!=self.target&effective_combo_points>=4&refreshable&(pmultiplier<=1|remains<=tick_time&spell_targets.fan_of_knives>=3)&(!exsanguinated|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)&master_assassin_remains=0&effective_combo_points>=(cp_max_spend-1)&refreshable&!exsanguinated&!debuff.shiv.up&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,target_if=min:remains,if=talent.subterfuge.enabled&(remains<12|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
actions.stealthed+=/mutilate,if=talent.subterfuge.enabled&combo_points<=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&(dot.garrote.refreshable|debuff.vendetta.up&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

head=vicious_surge_faceguard,id=180106,bonus_id=6807/1498/6646
neck=azurevenom_choker,id=180115,bonus_id=6807/1498/6646
shoulders=far_travelers_shoulderpads,id=179344,bonus_id=6807/1498/6646
back=drape_of_twisted_loyalties,id=180123,bonus_id=6807/1498/6646
chest=animasplattered_hide,id=178835,bonus_id=6807/1498/6646,enchant=eternal_stats
wrists=bands_of_the_undergrowth,id=178702,bonus_id=6807/1498/6646
hands=gloves_of_obscure_rituals,id=178757,bonus_id=6807/1498/6646
waist=girdle_of_shattered_dreams,id=178805,bonus_id=6807/1498/6646
legs=umbrahide_leggings,id=172318,bonus_id=6647/6649/6716/7117/1487
feet=sinsoaked_waders,id=178837,bonus_id=6807/1498/6646,enchant=eternal_agility
finger1=arachnid_cipher_ring,id=178933,bonus_id=6807/1498/6646,enchant=tenet_of_haste
finger2=entwined_gorger_tendril,id=178848,bonus_id=6807/1498/6646,enchant=tenet_of_haste
trinket1=phial_of_putrefaction,id=178771,bonus_id=6807/1498/6646
trinket2=overcharged_anima_battery,id=180116,bonus_id=6807/1498/6646
main_hand=tanglewood_thorn,id=178710,bonus_id=6807/1498/6646,enchant=celestial_guidance
off_hand=tanglewood_thorn,id=178710,bonus_id=6807/1498/6646,enchant=sinful_revelation

# Gear Summary
# gear_ilvl=184.38
# gear_agility=597
# gear_stamina=861
# gear_attack_power=40
# gear_crit_rating=628
# gear_haste_rating=368
# gear_versatility_rating=388
# gear_armor=479
