demonhunter="Demon_Hunter_Havoc_Demonic_T19H_NH"
level=110
race=blood_elf
role=attack
position=back
talents=3310333
talent_override=fel_barrage,if=(active_enemies>1|raid_event.adds.exists)&!talent.demonic.enabled
talent_override=momentum,if=active_enemies>1|raid_event.adds.exists
artifact=3:0:0:0:0:1000:3:1001:3:1002:3:1003:3:1004:3:1005:3:1006:3:1007:3:1008:3:1010:1:1011:1:1012:1:1013:1:1014:1:1015:1:1016:1:1330:1:1362:1:1493:4:1494:1:1495:1:1630:1
spec=havoc

# 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,type=flask_of_the_seventh_demon
actions.precombat+=/food,type=lavish_suramar_feast,if=!equipped.majordomos_dinner_bell
actions.precombat+=/food,type=nightborne_delicacy_platter,if=equipped.majordomos_dinner_bell
actions.precombat+=/augmentation,type=defiled
# Snapshot raid buffed stats before combat begins and pre-potting is done.
actions.precombat+=/snapshot_stats
actions.precombat+=/potion,name=old_war
actions.precombat+=/metamorphosis,if=!(talent.demon_reborn.enabled&talent.demonic.enabled)

# Executed every time the actor is available.
actions=auto_attack
actions+=/variable,name=waiting_for_nemesis,value=!(!talent.nemesis.enabled|cooldown.nemesis.ready|cooldown.nemesis.remains>target.time_to_die|cooldown.nemesis.remains>60)
actions+=/variable,name=waiting_for_chaos_blades,value=!(!talent.chaos_blades.enabled|cooldown.chaos_blades.ready|cooldown.chaos_blades.remains>target.time_to_die|cooldown.chaos_blades.remains>60)
# "Getting ready to use meta" conditions, this is used in a few places.
actions+=/variable,name=pooling_for_meta,value=!talent.demonic.enabled&cooldown.metamorphosis.remains<6&fury.deficit>30&(!variable.waiting_for_nemesis|cooldown.nemesis.remains<10)&(!variable.waiting_for_chaos_blades|cooldown.chaos_blades.remains<6)
# Blade Dance conditions. Always if First Blood is talented or the T20 2pc set bonus, otherwise at 5+ targets with Chaos Cleave or 3+ targets without.
actions+=/variable,name=blade_dance,value=talent.first_blood.enabled|set_bonus.tier20_2pc|spell_targets.blade_dance1>=3+(talent.chaos_cleave.enabled*2)
# Blade Dance pooling condition, so we don't spend too much fury when we need it soon. No need to pool on
# single target since First Blood already makes it cheap enough and delaying it a tiny bit isn't a big deal.
actions+=/variable,name=pooling_for_blade_dance,value=variable.blade_dance&fury-40<35-talent.first_blood.enabled*20&(spell_targets.blade_dance1>=3+(talent.chaos_cleave.enabled*2))
# Chaos Strike pooling condition, so we don't spend too much fury when we need it for Chaos Cleave AoE
actions+=/variable,name=pooling_for_chaos_strike,value=talent.chaos_cleave.enabled&fury.deficit>40&!raid_event.adds.up&raid_event.adds.in<2*gcd
actions+=/consume_magic
actions+=/call_action_list,name=cooldown,if=gcd.remains=0
actions+=/run_action_list,name=demonic,if=talent.demonic.enabled&talent.demonic_appetite.enabled&talent.blind_fury.enabled
actions+=/run_action_list,name=normal

# Use Metamorphosis when we are done pooling Fury and when we are not waiting for other cooldowns to sync.
actions.cooldown=metamorphosis,if=!(talent.demonic.enabled|variable.pooling_for_meta|variable.waiting_for_nemesis|variable.waiting_for_chaos_blades)|target.time_to_die<25
actions.cooldown+=/metamorphosis,if=talent.demonic.enabled&buff.metamorphosis.up&fury<40
# If adds are present, use Nemesis on the lowest HP add in order to get the Nemesis buff for AoE
actions.cooldown+=/nemesis,target_if=min:target.time_to_die,if=raid_event.adds.exists&debuff.nemesis.down&(active_enemies>desired_targets|raid_event.adds.in>60)
actions.cooldown+=/nemesis,if=!raid_event.adds.exists&(buff.chaos_blades.up|buff.metamorphosis.up|cooldown.metamorphosis.adjusted_remains<20|target.time_to_die<=60)
actions.cooldown+=/chaos_blades,if=buff.metamorphosis.up|cooldown.metamorphosis.adjusted_remains>60|target.time_to_die<=12
actions.cooldown+=/potion,name=old_war,if=buff.metamorphosis.remains>25|target.time_to_die<30

# Specific APL for the Blind Fury+Demonic Appetite+Demonic build
actions.demonic=pick_up_fragment,if=fury.deficit>=35&cooldown.eye_beam.remains>5
# Vengeful Retreat backwards through the target to minimize downtime.
actions.demonic+=/vengeful_retreat,if=(talent.prepared.enabled|talent.momentum.enabled)&buff.prepared.down&buff.momentum.down
# Fel Rush for Momentum.
actions.demonic+=/fel_rush,if=(talent.momentum.enabled|talent.fel_mastery.enabled)&(!talent.momentum.enabled|(charges=2|cooldown.vengeful_retreat.remains>4)&buff.momentum.down)&(charges=2|(raid_event.movement.in>10&raid_event.adds.in>10))
actions.demonic+=/throw_glaive,if=talent.bloodlet.enabled&(!talent.momentum.enabled|buff.momentum.up)&charges=2
actions.demonic+=/death_sweep,if=variable.blade_dance
actions.demonic+=/fel_eruption
actions.demonic+=/fury_of_the_illidari,if=(active_enemies>desired_targets|raid_event.adds.in>55)&(!talent.momentum.enabled|buff.momentum.up)
actions.demonic+=/blade_dance,if=variable.blade_dance&cooldown.eye_beam.remains>5&!cooldown.metamorphosis.ready
actions.demonic+=/throw_glaive,if=talent.bloodlet.enabled&spell_targets>=2&(!talent.master_of_the_glaive.enabled|!talent.momentum.enabled|buff.momentum.up)&(spell_targets>=3|raid_event.adds.in>recharge_time+cooldown)
actions.demonic+=/eye_beam,if=spell_targets.eye_beam_tick>desired_targets|!buff.metamorphosis.extended_by_demonic
actions.demonic+=/annihilation,if=(!talent.momentum.enabled|buff.momentum.up|fury.deficit<30+buff.prepared.up*8|buff.metamorphosis.remains<5)&!variable.pooling_for_blade_dance
actions.demonic+=/throw_glaive,if=talent.bloodlet.enabled&(!talent.master_of_the_glaive.enabled|!talent.momentum.enabled|buff.momentum.up)&raid_event.adds.in>recharge_time+cooldown
actions.demonic+=/chaos_strike,if=(!talent.momentum.enabled|buff.momentum.up|fury.deficit<30+buff.prepared.up*8)&!variable.pooling_for_chaos_strike&!variable.pooling_for_meta&!variable.pooling_for_blade_dance
actions.demonic+=/fel_rush,if=!talent.momentum.enabled&buff.metamorphosis.down&(charges=2|(raid_event.movement.in>10&raid_event.adds.in>10))
actions.demonic+=/demons_bite
actions.demonic+=/throw_glaive,if=buff.out_of_range.up
actions.demonic+=/fel_rush,if=movement.distance>15|(buff.out_of_range.up&!talent.momentum.enabled)
actions.demonic+=/vengeful_retreat,if=movement.distance>15

# General APL for Non-Demonic Builds
actions.normal=pick_up_fragment,if=talent.demonic_appetite.enabled&fury.deficit>=35
# Vengeful Retreat backwards through the target to minimize downtime.
actions.normal+=/vengeful_retreat,if=(talent.prepared.enabled|talent.momentum.enabled)&buff.prepared.down&buff.momentum.down
# Fel Rush for Momentum and for fury from Fel Mastery.
actions.normal+=/fel_rush,if=(talent.momentum.enabled|talent.fel_mastery.enabled)&(!talent.momentum.enabled|(charges=2|cooldown.vengeful_retreat.remains>4)&buff.momentum.down)&(!talent.fel_mastery.enabled|fury.deficit>=25)&(charges=2|(raid_event.movement.in>10&raid_event.adds.in>10))
# Use Fel Barrage at max charges, saving it for Momentum and adds if possible.
actions.normal+=/fel_barrage,if=(charges=max_charges)&(buff.momentum.up|!talent.momentum.enabled)&(active_enemies>desired_targets|raid_event.adds.in>30)
actions.normal+=/throw_glaive,if=talent.bloodlet.enabled&(!talent.momentum.enabled|buff.momentum.up)&charges=2
actions.normal+=/felblade,if=fury<15&(cooldown.death_sweep.remains<2*gcd|cooldown.blade_dance.remains<2*gcd)
actions.normal+=/death_sweep,if=variable.blade_dance
actions.normal+=/fel_rush,if=charges=2&!talent.momentum.enabled&!talent.fel_mastery.enabled
actions.normal+=/fel_eruption
actions.normal+=/fury_of_the_illidari,if=(active_enemies>desired_targets|raid_event.adds.in>55)&(!talent.momentum.enabled|buff.momentum.up)&(!talent.chaos_blades.enabled|buff.chaos_blades.up|cooldown.chaos_blades.remains>30|target.time_to_die<cooldown.chaos_blades.remains)
actions.normal+=/blade_dance,if=variable.blade_dance&(!cooldown.metamorphosis.ready)
actions.normal+=/throw_glaive,if=talent.bloodlet.enabled&spell_targets>=2&(!talent.master_of_the_glaive.enabled|!talent.momentum.enabled|buff.momentum.up)&(spell_targets>=3|raid_event.adds.in>recharge_time+cooldown)
actions.normal+=/felblade,if=fury.deficit>=30+buff.prepared.up*8
actions.normal+=/eye_beam,if=talent.blind_fury.enabled&(spell_targets.eye_beam_tick>desired_targets|fury.deficit>=35)
actions.normal+=/annihilation,if=(talent.demon_blades.enabled|!talent.momentum.enabled|buff.momentum.up|fury.deficit<30+buff.prepared.up*8|buff.metamorphosis.remains<5)&!variable.pooling_for_blade_dance
actions.normal+=/throw_glaive,if=talent.bloodlet.enabled&(!talent.master_of_the_glaive.enabled|!talent.momentum.enabled|buff.momentum.up)&raid_event.adds.in>recharge_time+cooldown
actions.normal+=/eye_beam,if=!talent.blind_fury.enabled&(spell_targets.eye_beam_tick>desired_targets|(!set_bonus.tier19_4pc&raid_event.adds.in>45&!variable.pooling_for_meta&buff.metamorphosis.down&(artifact.anguish_of_the_deceiver.enabled|active_enemies>1)&!talent.chaos_cleave.enabled))
actions.normal+=/throw_glaive,if=buff.metamorphosis.down&spell_targets>=2
actions.normal+=/chaos_strike,if=(talent.demon_blades.enabled|!talent.momentum.enabled|buff.momentum.up|fury.deficit<30+buff.prepared.up*8)&!variable.pooling_for_chaos_strike&!variable.pooling_for_meta&!variable.pooling_for_blade_dance
# Use Fel Barrage if its nearing max charges, saving it for Momentum and adds if possible.
actions.normal+=/fel_barrage,if=(charges=max_charges-1)&buff.metamorphosis.down&(buff.momentum.up|!talent.momentum.enabled)&(active_enemies>desired_targets|raid_event.adds.in>30)
actions.normal+=/fel_rush,if=!talent.momentum.enabled&raid_event.movement.in>charges*10&(talent.demon_blades.enabled|buff.metamorphosis.down)
actions.normal+=/demons_bite
actions.normal+=/throw_glaive,if=buff.out_of_range.up
actions.normal+=/felblade,if=movement.distance|buff.out_of_range.up
actions.normal+=/fel_rush,if=movement.distance>15|(buff.out_of_range.up&!talent.momentum.enabled)
actions.normal+=/vengeful_retreat,if=movement.distance>15
actions.normal+=/throw_glaive,if=!talent.bloodlet.enabled

head=mask_of_second_sight,id=138378,bonus_id=3517
neck=belerons_choker_of_misery,id=140899,bonus_id=3517,enchant=mark_of_the_claw
shoulders=mantle_of_the_torn_sky,id=140864,bonus_id=3517
back=cape_of_second_sight,id=138375,bonus_id=3517,enchant=binding_of_agility
chest=tunic_of_second_sight,id=138376,bonus_id=3517
wrists=bracers_of_impossible_choices,id=140889,bonus_id=3517
hands=gloves_of_synchronus_elements,id=140905,bonus_id=3517
waist=high_shadow_councilors_wrap,id=140919,bonus_id=3517
legs=legwraps_of_second_sight,id=138379,bonus_id=3517
feet=grovetenders_moccasins,id=140861,bonus_id=3517
finger1=ring_of_exclusive_servitude,id=140906,bonus_id=3517,enchant=binding_of_critical_strike
finger2=spellblades_gemmed_signet,id=140895,bonus_id=3517,enchant=binding_of_critical_strike
trinket1=entwined_elemental_foci,id=140796,bonus_id=3517
trinket2=nightblooming_frond,id=140802,bonus_id=3517
main_hand=twinblades_of_the_deceiver,id=127829,bonus_id=719,gem_id=140824/139251/140824,relic_id=3517/1806/3517
off_hand=twinblades_of_the_deceiver,id=127830,gem_id=0/0/0/0,relic_id=0/0

# Gear Summary
# gear_ilvl=897.38
# gear_agility=21009
# gear_stamina=30554
# gear_crit_rating=10669
# gear_haste_rating=1054
# gear_mastery_rating=7175
# gear_versatility_rating=3074
# gear_armor=2351
# set_bonus=tier19_2pc=1
# set_bonus=tier19_4pc=1
