deathknight="T25_Death_Knight_Unholy"
source=default
spec=unholy
level=50
race=troll
role=attack
position=back
talents=2203032
azerite_essences=22:4:1/27:4:0/35:4:0/5:4:0

# Default consumables
potion=disabled
flask=disabled
food=disabled
augmentation=disabled
temporary_enchant=disabled

# 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+=/food
actions.precombat+=/augmentation
# Snapshot raid buffed stats before combat begins and pre-potting is done.
actions.precombat+=/snapshot_stats
actions.precombat+=/raise_dead

# Executed every time the actor is available.
actions=auto_attack
# Variables
actions+=/variable,name=pooling_for_gargoyle,value=cooldown.summon_gargoyle.remains<5&talent.summon_gargoyle
actions+=/variable,name=st_planning,value=active_enemies=1&(!raid_event.adds.exists|raid_event.adds.in>15)
# Racials
actions+=/arcane_torrent,if=runic_power.deficit>65&(pet.gargoyle.active|!talent.summon_gargoyle.enabled)&rune.deficit>=5
actions+=/blood_fury,if=pet.gargoyle.active|buff.unholy_assault.up|talent.army_of_the_damned&pet.apoc_ghoul.active&(pet.army_ghoul.active|cooldown.army_of_the_dead.remains>cooldown.blood_fury.duration%3)|target.time_to_die<=buff.blood_fury.duration
actions+=/berserking,if=pet.gargoyle.active|buff.unholy_assault.up|talent.army_of_the_damned&pet.apoc_ghoul.active&(pet.army_ghoul.active|cooldown.army_of_the_dead.remains>cooldown.berserking.duration%3)|target.time_to_die<=buff.berserking.duration
actions+=/lights_judgment,if=buff.unholy_strength.up
# Ancestral Call can trigger 4 potential buffs, each lasting 15 seconds. Utilized hard coded time as a trigger to keep it readable.
actions+=/ancestral_call,if=pet.gargoyle.active|buff.unholy_assault.up|talent.army_of_the_damned&pet.apoc_ghoul.active&(pet.army_ghoul.active|cooldown.army_of_the_dead.remains>cooldown.ancestral_call.duration%3)|target.time_to_die<=15
actions+=/arcane_pulse,if=active_enemies>=2|(rune.deficit>=5&runic_power.deficit>=60)
actions+=/fireblood,if=pet.gargoyle.active|buff.unholy_assault.up|talent.army_of_the_damned&pet.apoc_ghoul.active&(pet.army_ghoul.active|cooldown.army_of_the_dead.remains>cooldown.fireblood.duration%3)|target.time_to_die<=buff.fireblood.duration
actions+=/bag_of_tricks,if=buff.unholy_strength.up&active_enemies=1
# Maintaining Virulent Plague is a priority
actions+=/outbreak,if=dot.virulent_plague.refreshable&!talent.unholy_blight&!raid_event.adds.exists
actions+=/outbreak,if=dot.virulent_plague.refreshable&(!talent.unholy_blight|talent.unholy_blight&cooldown.unholy_blight.remains)&active_enemies>=2
actions+=/outbreak,if=runeforge.superstrain&(dot.frost_fever.refreshable|dot.blood_plague.refreshable)
# Action Lists
actions+=/call_action_list,name=covenants
actions+=/call_action_list,name=cooldowns
actions+=/run_action_list,name=aoe_setup,if=active_enemies>=2&(cooldown.death_and_decay.remains<10&!talent.defile|cooldown.defile.remains<10&talent.defile)&!death_and_decay.ticking
actions+=/run_action_list,name=aoe_burst,if=active_enemies>=2&death_and_decay.ticking
actions+=/run_action_list,name=generic_aoe,if=active_enemies>=2&(!death_and_decay.ticking&(cooldown.death_and_decay.remains>10&!talent.defile|cooldown.defile.remains>10&talent.defile))
actions+=/call_action_list,name=generic,if=active_enemies=1

# AoE Burst
actions.aoe_burst=epidemic,if=runic_power.deficit<(10+death_knight.fwounded_targets*3)&death_knight.fwounded_targets<6&!variable.pooling_for_gargoyle|buff.swarming_mist.up
actions.aoe_burst+=/epidemic,if=runic_power.deficit<25&death_knight.fwounded_targets>5&!variable.pooling_for_gargoyle
actions.aoe_burst+=/epidemic,if=!death_knight.fwounded_targets&!variable.pooling_for_gargoyle|fight_remains<5|raid_event.adds.exists&raid_event.adds.remains<5
actions.aoe_burst+=/wound_spender
actions.aoe_burst+=/epidemic,if=!variable.pooling_for_gargoyle

# AoE Setup
actions.aoe_setup=any_dnd,if=death_knight.fwounded_targets=active_enemies|raid_event.adds.exists&raid_event.adds.remains<=11
actions.aoe_setup+=/any_dnd,if=death_knight.fwounded_targets>=5
actions.aoe_setup+=/epidemic,if=!variable.pooling_for_gargoyle
actions.aoe_setup+=/festering_strike,target_if=max:debuff.festering_wound.stack,if=debuff.festering_wound.stack<=3&cooldown.apocalypse.remains<3
actions.aoe_setup+=/festering_strike,target_if=debuff.festering_wound.stack<1
actions.aoe_setup+=/festering_strike,target_if=min:debuff.festering_wound.stack,if=rune.time_to_4<(cooldown.death_and_decay.remains&!talent.defile|cooldown.defile.remains&talent.defile)

# Potions and other on use
actions.cooldowns=potion,if=pet.gargoyle.active|buff.unholy_assault.up|talent.army_of_the_damned&(pet.army_ghoul.active|pet.apoc_ghoul.active|cooldown.army_of_the_dead.remains>target.time_to_die)
actions.cooldowns+=/use_item,name=inscrutable_quantum_device,if=(cooldown.unholy_blight.remains|cooldown.dark_transformation.remains)&(pet.army_ghoul.active|pet.apoc_ghoul.active&!talent.army_of_the_damned|target.time_to_pct_20<5)
actions.cooldowns+=/use_item,name=macabre_sheet_music,if=cooldown.apocalypse.remains<5&(!equipped.inscrutable_quantum_device|cooldown.inscrutable_quantum_device.remains)
actions.cooldowns+=/use_item,name=dreadfire_vessel,if=cooldown.apocalypse.remains&rune.time_to_4<gcd&(!equipped.inscrutable_quantum_device|cooldown.inscrutable_quantum_device.remains)
actions.cooldowns+=/use_item,name=darkmoon_deck_voracity,if=cooldown.apocalypse.remains&(!equipped.inscrutable_quantum_device|cooldown.inscrutable_quantum_device.remains)
actions.cooldowns+=/use_items,if=cooldown.apocalypse.remains&(!equipped.inscrutable_quantum_device|cooldown.inscrutable_quantum_device.remains)
# Cooldowns
actions.cooldowns+=/army_of_the_dead,if=debuff.festering_wound.up&cooldown.unholy_blight.remains<3&cooldown.dark_transformation.remains<3&talent.unholy_blight|!talent.unholy_blight
# Sync Blight with Dark Transformation if utilizing other Dark Transformation buffs, those being Deadliest Coil, Frenzied Monstrosity or Eternal Hunger. Also checks if conditions are met to instead hold for Apocalypse.
actions.cooldowns+=/unholy_blight,if=variable.st_planning&(cooldown.army_of_the_dead.remains>5|death_knight.disable_aotd)&(cooldown.dark_transformation.remains<gcd|buff.dark_transformation.up)&(!runeforge.deadliest_coil|!talent.army_of_the_damned|conduit.convocation_of_the_dead.rank<5)
# Sync Blight with Apocalypse if the cooldown of Apocalypse is low enough. Requires Deadliest Coil, Convocation of the Dead and Army of the Damned together.
actions.cooldowns+=/unholy_blight,if=active_enemies=1&debuff.festering_wound.stack>=4&talent.unholy_blight&(talent.unholy_assault&conduit.convocation_of_the_dead.rank<5|talent.gargoyle)
actions.cooldowns+=/unholy_blight,if=active_enemies>=2
actions.cooldowns+=/dark_transformation,if=variable.st_planning&(debuff.unholy_blight_debuff.up|!talent.unholy_blight)
actions.cooldowns+=/dark_transformation,if=active_enemies>=2
actions.cooldowns+=/apocalypse,if=active_enemies=1&debuff.festering_wound.stack>=4&talent.unholy_blight&talent.army_of_the_damned&runeforge.deadliest_coil&conduit.convocation_of_the_dead.rank>=5
actions.cooldowns+=/apocalypse,if=debuff.festering_wound.stack>=4&active_enemies=1&talent.unholy_blight&conduit.convocation_of_the_dead.rank>=5&talent.army_of_the_damned&runeforge.deadliest_coil&debuff.unholy_blight_debuff.up
actions.cooldowns+=/apocalypse,if=active_enemies=1&debuff.festering_wound.stack>=4&!talent.unholy_blight|talent.army_of_the_damned&(!runeforge.deadliest_coil|conduit.convocation_of_the_dead.rank<5)|talent.unholy_assault&conduit.convocation_of_the_dead.rank>=5
actions.cooldowns+=/apocalypse,target_if=max:debuff.festering_wound.stack,if=active_enemies>=2&debuff.festering_wound.stack>=4&!death_and_decay.ticking
actions.cooldowns+=/summon_gargoyle,if=runic_power.deficit<14
actions.cooldowns+=/unholy_assault,if=variable.st_planning&debuff.festering_wound.stack<2&(pet.apoc_ghoul.active|conduit.convocation_of_the_dead&buff.dark_transformation.up&!pet.army_ghoul.active)
actions.cooldowns+=/unholy_assault,target_if=min:debuff.festering_wound.stack,if=active_enemies>=2&debuff.festering_wound.stack<2
actions.cooldowns+=/soul_reaper,target_if=target.time_to_pct_35<5&target.time_to_die>5
actions.cooldowns+=/raise_dead,if=!pet.ghoul.active

# Covenant Abilities
actions.covenants=swarming_mist,if=variable.st_planning&runic_power.deficit>6
# Set to use after apoc is on CD as to prevent overcapping RP while setting up CD's
actions.covenants+=/swarming_mist,if=cooldown.apocalypse.remains&(active_enemies>=2&active_enemies<=5&runic_power.deficit>(active_enemies*6)|active_enemies>5&runic_power.deficit>30)
actions.covenants+=/abomination_limb,if=variable.st_planning&!soulbind.lead_by_example&cooldown.apocalypse.remains&rune.time_to_4>(3+buff.runic_corruption.remains)
actions.covenants+=/abomination_limb,if=variable.st_planning&soulbind.lead_by_example&(cooldown.unholy_blight.remains|!talent.unholy_blight&cooldown.dark_transformation.remains)
actions.covenants+=/abomination_limb,if=active_enemies>=2&rune.time_to_4>(3+buff.runic_corruption.remains)
actions.covenants+=/shackle_the_unworthy,if=variable.st_planning&cooldown.apocalypse.remains
actions.covenants+=/shackle_the_unworthy,if=active_enemies>=2&(death_and_decay.ticking|raid_event.adds.remains<=14)

# Single Target
actions.generic=death_coil,if=buff.sudden_doom.react&!variable.pooling_for_gargoyle|pet.gargoyle.active
actions.generic+=/death_coil,if=runic_power.deficit<13&!variable.pooling_for_gargoyle
actions.generic+=/any_dnd,if=cooldown.apocalypse.remains&(talent.defile.enabled|covenant.night_fae|runeforge.phearomones)
actions.generic+=/wound_spender,if=debuff.festering_wound.stack>4
actions.generic+=/wound_spender,if=debuff.festering_wound.up&cooldown.apocalypse.remains>5&(!talent.unholy_blight|talent.army_of_the_damned|conduit.convocation_of_the_dead|raid_event.adds.exists)
actions.generic+=/wound_spender,if=debuff.festering_wound.up&talent.unholy_blight&!talent.army_of_the_damned&!raid_event.adds.exists&(cooldown.unholy_blight.remains>5&cooldown.apocalypse.ready&!dot.unholy_blight.remains|!cooldown.apocalypse.ready)
actions.generic+=/death_coil,if=runic_power.deficit<20&!variable.pooling_for_gargoyle
actions.generic+=/festering_strike,if=debuff.festering_wound.stack<1
actions.generic+=/festering_strike,if=debuff.festering_wound.stack<4&cooldown.apocalypse.remains<3&(!talent.unholy_blight|talent.army_of_the_damned|conduit.convocation_of_the_dead|raid_event.adds.exists)
actions.generic+=/festering_strike,if=debuff.festering_wound.stack<4&talent.unholy_blight&!talent.army_of_the_damned&!raid_event.adds.exists&cooldown.apocalypse.ready&(cooldown.unholy_blight.remains<3|debuff.unholy_blight_debuff.up)
actions.generic+=/death_coil,if=!variable.pooling_for_gargoyle

# Generic AoE Priority
actions.generic_aoe=epidemic,if=buff.sudden_doom.react
actions.generic_aoe+=/epidemic,if=!variable.pooling_for_gargoyle
actions.generic_aoe+=/wound_spender,target_if=max:debuff.festering_wound.stack,if=(cooldown.apocalypse.remains>5&debuff.festering_wound.up|debuff.festering_wound.stack>4)&(fight_remains<cooldown.death_and_decay.remains+10|fight_remains>cooldown.apocalypse.remains)
actions.generic_aoe+=/festering_strike,target_if=max:debuff.festering_wound.stack,if=debuff.festering_wound.stack<=3&cooldown.apocalypse.remains<3|debuff.festering_wound.stack<1
actions.generic_aoe+=/festering_strike,target_if=min:debuff.festering_wound.stack,if=cooldown.apocalypse.remains>5&debuff.festering_wound.stack<1

head=greathelm_of_phantasmic_reality,id=174167,bonus_id=4824/1517/4775,azerite_powers=199/109/21/13
neck=heart_of_azeroth,id=158075,bonus_id=4929/5814/4936/1630,azerite_level=80
shoulders=pauldrons_of_infinite_darkness,id=174166,bonus_id=1517/4824/4775,azerite_powers=199/109/31/13
back=ashjrakamas_shroud_of_resolve,id=169223,bonus_id=6286
chest=desert_guardians_breastplate,id=159424,bonus_id=1647/4775,azerite_powers=109/199/18/13
wrists=dragonbone_vambraces,id=174170,bonus_id=4824/1517/6573
hands=mirageweavers_gauntlets,id=174178,bonus_id=4824/1517/6573
waist=welloiled_plate_girdle,id=169057,bonus_id=4824/1522/6573
legs=living_obsidian_legguards,id=174172,bonus_id=4824/1517/6573
feet=boots_of_hallucinatory_reality,id=174173,bonus_id=4824/1517/6573
finger1=overclocking_bit_band,id=169159,bonus_id=4824/1522/6476/6465,enchant=accord_of_haste
finger2=logic_loop_of_division,id=169157,bonus_id=4824/1522,enchant=accord_of_haste
trinket1=voidtwisted_titanshard,id=174528,bonus_id=4824/1517
trinket2=vitacharged_titanshard,id=174500,bonus_id=4824/1517
main_hand=devastations_hour,id=172187,bonus_id=4824/1517,enchant=rune_of_the_fallen_crusader

# Gear Summary
# gear_ilvl=147.60
# gear_strength=490
# gear_stamina=910
# gear_crit_rating=267
# gear_haste_rating=388
# gear_mastery_rating=138
# gear_versatility_rating=53
# gear_corruption=95
# gear_corruption_resistance=50
# gear_armor=735
# set_bonus=titanic_empowerment_2pc=1
