rogue="T22_Rogue_Subtlety"
spec=subtlety
level=120
race=night_elf
timeofday=day
role=attack
position=back
talents=2330031

# Default consumables
potion=battle_potion_of_agility
flask=currents
food=bountiful_captains_feast
augmentation=battle_scarred

# 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=flask
actions.precombat+=/augmentation
actions.precombat+=/food
# Snapshot raid buffed stats before combat begins and pre-potting is done.
actions.precombat+=/snapshot_stats
# Used to define when to use stealth CDs or builders
actions.precombat+=/variable,name=stealth_threshold,value=60+talent.vigor.enabled*35+talent.master_of_shadows.enabled*10
actions.precombat+=/stealth
actions.precombat+=/marked_for_death,precombat_seconds=15
actions.precombat+=/shadow_blades,precombat_seconds=1
actions.precombat+=/potion

# Executed every time the actor is available.
# Check CDs at first
actions=call_action_list,name=cds
# Run fully switches to the Stealthed Rotation (by doing so, it forces pooling if nothing is available).
actions+=/run_action_list,name=stealthed,if=stealthed.all
# Apply Nightblade at 2+ CP during the first 10 seconds, after that 4+ CP if it expires within the next GCD or is not up
actions+=/nightblade,if=target.time_to_die>6&remains<gcd.max&combo_points>=4-(time<10)*2
# Consider using a Stealth CD when reaching the energy threshold and having space for at least 4 CP
actions+=/call_action_list,name=stealth_cds,if=energy.deficit<=variable.stealth_threshold&combo_points.deficit>=4
# Finish at 4+ without DS, 5+ with DS (outside stealth)
actions+=/call_action_list,name=finish,if=combo_points>=4+talent.deeper_stratagem.enabled|target.time_to_die<=1&combo_points>=3
# Use a builder when reaching the energy threshold (minus 40 if none of Alacrity, Shadow Focus, and Master of Shadows is selected)
actions+=/call_action_list,name=build,if=energy.deficit<=variable.stealth_threshold-40*!(talent.alacrity.enabled|talent.shadow_focus.enabled|talent.master_of_shadows.enabled)
# Lowest priority in all of the APL because it causes a GCD
actions+=/arcane_torrent,if=energy.deficit>=15+energy.regen
actions+=/arcane_pulse
actions+=/lights_judgment

# Builders
# Shuriken Toss at 29+ Sharpened Blades stacks. 1T at Rank 1, up to 4 at Rank 2, up to 5 at Rank 3
actions.build=shuriken_toss,if=buff.sharpened_blades.stack>=29&spell_targets.shuriken_storm<=1+3*azerite.sharpened_blades.rank=2+4*azerite.sharpened_blades.rank=3
actions.build+=/shuriken_storm,if=spell_targets.shuriken_storm>=2|buff.the_dreadlords_deceit.stack>=29
actions.build+=/gloomblade
actions.build+=/backstab

# Cooldowns
actions.cds=potion,if=buff.bloodlust.react|target.time_to_die<=60|(buff.vanish.up&(buff.shadow_blades.up|cooldown.shadow_blades.remains<=30))
actions.cds+=/blood_fury,if=stealthed.rogue
actions.cds+=/berserking,if=stealthed.rogue
actions.cds+=/fireblood,if=stealthed.rogue
actions.cds+=/ancestral_call,if=stealthed.rogue
actions.cds+=/symbols_of_death,if=dot.nightblade.ticking
actions.cds+=/marked_for_death,target_if=min:target.time_to_die,if=target.time_to_die<combo_points.deficit
actions.cds+=/marked_for_death,if=raid_event.adds.in>30&!stealthed.all&combo_points.deficit>=cp_max_spend
actions.cds+=/shadow_blades,if=combo_points.deficit>=2+stealthed.all
actions.cds+=/shuriken_tornado,if=spell_targets>=3&dot.nightblade.ticking&buff.symbols_of_death.up&buff.shadow_dance.up
actions.cds+=/shadow_dance,if=!buff.shadow_dance.up&target.time_to_die<=5+talent.subterfuge.enabled

# Finishers
# Keep up Nightblade if it is about to run out. Do not use NB during Dance, if talented into Dark Shadow.
actions.finish=nightblade,if=(!talent.dark_shadow.enabled|!buff.shadow_dance.up)&target.time_to_die-remains>6&remains<tick_time*2&(spell_targets.shuriken_storm<4|!buff.symbols_of_death.up)
# Multidotting outside Dance on targets that will live for the duration of Nightblade with refresh during pandemic if you have less than 6 targets or play with Secret Technique.
actions.finish+=/nightblade,cycle_targets=1,if=spell_targets.shuriken_storm>=2&(spell_targets.shuriken_storm<=5|talent.secret_technique.enabled)&!buff.shadow_dance.up&target.time_to_die>=(5+(2*combo_points))&refreshable
# Refresh Nightblade early if it will expire during Symbols. Do that refresh if SoD gets ready in the next 5s.
actions.finish+=/nightblade,if=remains<cooldown.symbols_of_death.remains+10&cooldown.symbols_of_death.remains<=5&target.time_to_die-remains>cooldown.symbols_of_death.remains+5
# Secret Technique during Symbols. With Dark Shadow and multiple targets also only during Shadow Dance (until threshold in next line).
actions.finish+=/secret_technique,if=buff.symbols_of_death.up&(!talent.dark_shadow.enabled|spell_targets.shuriken_storm<2|buff.shadow_dance.up)
# With enough targets always use SecTec on CD.
actions.finish+=/secret_technique,if=spell_targets.shuriken_storm>=2+talent.dark_shadow.enabled+talent.nightstalker.enabled
actions.finish+=/eviscerate

# Stealth Cooldowns
# Helper Variable
actions.stealth_cds=variable,name=shd_threshold,value=cooldown.shadow_dance.charges_fractional>=1.75
# Vanish unless we are about to cap on Dance charges. Only when Find Weakness is about to run out.
actions.stealth_cds+=/vanish,if=!variable.shd_threshold&debuff.find_weakness.remains<1
# Pool for Shadowmeld + Shadowstrike unless we are about to cap on Dance charges. Only when Find Weakness is about to run out.
actions.stealth_cds+=/pool_resource,for_next=1,extra_amount=40
actions.stealth_cds+=/shadowmeld,if=energy>=40&energy.deficit>=10&!variable.shd_threshold&debuff.find_weakness.remains<1
# With Dark Shadow only Dance when Nightblade will stay up. Use during Symbols or above threshold.
actions.stealth_cds+=/shadow_dance,if=(!talent.dark_shadow.enabled|dot.nightblade.remains>=5+talent.subterfuge.enabled)&(variable.shd_threshold|buff.symbols_of_death.remains>=1.2|spell_targets>=4&cooldown.symbols_of_death.remains>10)
actions.stealth_cds+=/shadow_dance,if=target.time_to_die<cooldown.symbols_of_death.remains

# Stealthed Rotation
# If stealth is up, we really want to use Shadowstrike to benefits from the passive bonus, even if we are at max cp (from the precombat MfD).
actions.stealthed=shadowstrike,if=buff.stealth.up
# Finish at 4+ CP without DS, 5+ with DS, and 6 with DS after Vanish
actions.stealthed+=/call_action_list,name=finish,if=combo_points.deficit<=1-(talent.deeper_stratagem.enabled&buff.vanish.up)
# At 2 targets with Secret Technique keep up Find Weakness by cycling Shadowstrike.
actions.stealthed+=/shadowstrike,cycle_targets=1,if=talent.secret_technique.enabled&talent.find_weakness.enabled&debuff.find_weakness.remains<1&spell_targets.shuriken_storm=2&target.time_to_die-remains>6
actions.stealthed+=/shuriken_storm,if=spell_targets.shuriken_storm>=3
actions.stealthed+=/shadowstrike

head=cowl_of_dark_portents,id=163596,bonus_id=4824/1507/4775,azerite_powers=4/240/21/85/13
neck=heart_of_azeroth,id=158075,bonus_id=4929/4930/4936/1536,azerite_level=
shoulders=mantle_of_fastidious_machinations,id=158304,bonus_id=1557/4819/4775/4786,azerite_powers=4/240/22/83/13
back=cloak_of_rippling_whispers,id=160642,bonus_id=4800/1507
chest=cephalohide_jacket,id=159314,bonus_id=1557/4819/4775/4786,azerite_powers=4/240/459/85/13
wrists=wristwraps_of_coursing_miasma,id=160621,bonus_id=4800/1507
hands=gloves_of_descending_madness,id=160618,bonus_id=4800/1507
waist=replicated_chitin_cord,id=160717,bonus_id=4800/1507
legs=pathogenic_legwraps,id=160625,bonus_id=4800/1507
feet=quarantine_protocol_treads,id=160624,bonus_id=4800/1507
finger1=ring_of_the_infinite_void,id=160647,bonus_id=4800/1507,enchant=pact_of_versatility
finger2=rotscour_ring,id=160645,bonus_id=4800/1507,enchant=pact_of_versatility
trinket1=harlans_loaded_dice,id=155881,bonus_id=1542/4779
trinket2=frenetic_corpuscle,id=160648,bonus_id=4800/1507
main_hand=latticework_scalpel,id=160683,bonus_id=4800/1507,enchant=versatile_navigation
off_hand=latticework_scalpel,id=160683,bonus_id=4800/1507,enchant=deadly_navigation

# Gear Summary
# gear_ilvl=385.25
# gear_agility=4345
# gear_stamina=7205
# gear_crit_rating=1180
# gear_haste_rating=917
# gear_mastery_rating=582
# gear_versatility_rating=323
# gear_armor=1897
