druid="T25_Druid_Feral"
source=default
spec=feral
level=50
race=night_elf
timeofday=day
role=attack
position=back
talents=2331122
azerite_essences=32:3/4:3/27:3/35:3/300573/300575/300576/300577

# Default consumables
potion=superior_battle_potion_of_agility
flask=greater_flask_of_the_currents
food=famine_evaluator_and_snack_table
augmentation=battle_scarred
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.

# Feral APL can also be found at https://gist.github.com/Xanzara/6896c8996f5afce5ce115daa3a08daff

# 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+=/flask
actions.precombat+=/food
actions.precombat+=/augmentation
actions.precombat+=/variable,name=4cp_bite,value=0
# Shred = 0, Non-snapshot Rake = 1, Snapshot Rake = 2, LI = 3, Swipe = 4
actions.precombat+=/variable,name=filler,value=0
actions.precombat+=/variable,name=rip_ticks,value=7
actions.precombat+=/variable,name=thrash_ticks,value=1
actions.precombat+=/snapshot_stats
actions.precombat+=/cat_form
actions.precombat+=/prowl

# Executed every time the actor is available.
# Balance weaving investigation
actions=tigers_fury,if=buff.cat_form.down
actions+=/cat_form,if=buff.cat_form.down
# Prowl whenever possible
actions+=/prowl
actions+=/auto_attack,if=!buff.prowl.up&!buff.shadowmeld.up
actions+=/variable,name=shortest_ttd,value=target.time_to_die,if=variable.shortest_ttd=0
actions+=/cycling_variable,name=shortest_ttd,op=min,value=target.time_to_die
# One shot stealth
actions+=/run_action_list,name=stealth,if=buff.shadowmeld.up|buff.prowl.up
actions+=/call_action_list,name=cooldown
actions+=/run_action_list,name=finisher,if=combo_points>=(5-variable.4cp_bite)
# Multi-gcd stealth
actions+=/run_action_list,name=stealth,if=buff.bs_inc.up|buff.sudden_ambush.up
# The most expensive BT cycle (Thresh Shred Swipe cost 115 energy, make sure we can make that in 4 globals)
actions+=/pool_resource,if=talent.bloodtalons.enabled&buff.bloodtalons.down&(energy+3.5*energy.regen+(40*buff.clearcasting.up))<(115-23*buff.incarnation_king_of_the_jungle.up)&active_bt_triggers=0
actions+=/run_action_list,name=bloodtalons,if=talent.bloodtalons.enabled&(buff.bloodtalons.down|active_bt_triggers=2)
actions+=/ferocious_bite,target_if=max:target.time_to_die,if=buff.apex_predators_craving.up&(!talent.bloodtalons.enabled|buff.bloodtalons.up)
actions+=/feral_frenzy,if=combo_points=0
actions+=/pool_resource,for_next=1
actions+=/rake,target_if=(refreshable|persistent_multiplier>dot.rake.pmultiplier)&druid.rake.ticks_gained_on_refresh>spell_targets.swipe_cat*2-2
actions+=/moonfire_cat,target_if=refreshable&druid.moonfire.ticks_gained_on_refresh>spell_targets.swipe_cat*2-2
actions+=/pool_resource,for_next=1
actions+=/thrash_cat,if=refreshable&druid.thrash_cat.ticks_gained_on_refresh>variable.thrash_ticks
actions+=/brutal_slash,if=(buff.tigers_fury.up&(raid_event.adds.in>(1+max_charges-charges_fractional)*recharge_time))&(spell_targets.brutal_slash*action.brutal_slash.damage%action.brutal_slash.cost)>(action.shred.damage%action.shred.cost)
actions+=/swipe_cat,if=spell_targets.swipe_cat>1
actions+=/shred,if=buff.clearcasting.up
actions+=/call_action_list,name=filler

actions.bloodtalons=rake,target_if=(!ticking|(refreshable&persistent_multiplier>dot.rake.pmultiplier))&buff.bt_rake.down&druid.rake.ticks_gained_on_refresh>=2
actions.bloodtalons+=/lunar_inspiration,target_if=refreshable&buff.bt_moonfire.down
actions.bloodtalons+=/thrash_cat,target_if=refreshable&buff.bt_thrash.down&druid.thrash_cat.ticks_gained_on_refresh>8
actions.bloodtalons+=/brutal_slash,if=buff.bt_brutal_slash.down
actions.bloodtalons+=/swipe_cat,if=buff.bt_swipe.down&spell_targets.swipe_cat>1
actions.bloodtalons+=/shred,if=buff.bt_shred.down
actions.bloodtalons+=/swipe_cat,if=buff.bt_swipe.down
actions.bloodtalons+=/thrash_cat,if=buff.bt_thrash.down

# TODO: Need to sync with with ravenous frenzy when we run frenzyband, or atleast check if its worth it
actions.cooldown=berserk
actions.cooldown+=/incarnation
# Try and not waste TF energy, but also just use it for zerk and incarns
actions.cooldown+=/tigers_fury,if=energy.deficit>55|(buff.bs_inc.up&buff.bs_inc.remains<13)|(talent.predator.enabled&variable.shortest_ttd<3)
# Might be wrong to use Smeld on Rake in very very niche situations, but very rarely
actions.cooldown+=/shadowmeld,if=buff.tigers_fury.up&buff.bs_inc.down&combo_points<4&dot.rake.pmultiplier<1.6&energy>40
actions.cooldown+=/berserking,if=buff.tigers_fury.up|buff.bs_inc.up
actions.cooldown+=/potion,if=buff.bs_inc.up
actions.cooldown+=/ravenous_frenzy,if=buff.bs_inc.up|fight_remains<21
# TODO: Check moonkin hotw and stuff like this, and maybe better combat remain resync
actions.cooldown+=/convoke_the_spirits,if=(dot.rip.remains>4&(buff.tigers_fury.down|buff.tigers_fury.remains<4)&combo_points=0&dot.thrash_cat.ticking&dot.rake.ticking)|fight_remains<5
# Maybe there should be more conditions on the conduit
actions.cooldown+=/kindred_spirits,if=buff.tigers_fury.up|(conduit.deep_allegiance.enabled)
actions.cooldown+=/adaptive_swarm,target_if=max:time_to_die*(combo_points=5&!dot.adaptive_swarm_damage.ticking)
actions.cooldown+=/use_items

actions.filler=rake,target_if=variable.filler=1&dot.rake.pmultiplier<=persistent_multiplier
actions.filler+=/rake,if=variable.filler=2
actions.filler+=/lunar_inspiration,if=variable.filler=3
actions.filler+=/swipe,if=variable.filler=4
actions.filler+=/shred

actions.finisher=savage_roar,if=buff.savage_roar.down|buff.savage_roar.remains<(combo_points*6+1)*0.3
# Make sure to zero the variable so some old value don't end up lingering
actions.finisher+=/variable,name=best_rip,value=0,if=talent.primal_wrath.enabled
actions.finisher+=/cycling_variable,name=best_rip,op=max,value=druid.rip.ticks_gained_on_refresh,if=talent.primal_wrath.enabled
actions.finisher+=/primal_wrath,if=druid.primal_wrath.ticks_gained_on_refresh>(variable.rip_ticks>?variable.best_rip)|spell_targets.primal_wrath>(3+1*talent.sabertooth.enabled)
actions.finisher+=/rip,target_if=(!ticking|(remains+combo_points*talent.sabertooth.enabled)<duration*0.3|dot.rip.pmultiplier<persistent_multiplier)&druid.rip.ticks_gained_on_refresh>variable.rip_ticks
actions.finisher+=/ferocious_bite,max_energy=1,target_if=max:time_to_die

# Rake needs roughly 50% of its length at a minimum to surpass shreds dpe
actions.stealth=run_action_list,name=bloodtalons,if=talent.bloodtalons.enabled&buff.bloodtalons.down
actions.stealth+=/rake,target_if=dot.rake.pmultiplier<1.5&druid.rake.ticks_gained_on_refresh>2
actions.stealth+=/shred

head=stygian_guise,id=174132,bonus_id=4824/1517/4775,azerite_powers=209/582/20/467/13
neck=heart_of_azeroth,id=158075,bonus_id=4929/5814/4936/1630,azerite_level=80
shoulders=spaulders_of_aberrant_allure,id=174135,bonus_id=4824/1517/4775,azerite_powers=209/582/31/14/13
back=ashjrakamas_shroud_of_resolve,id=169223,bonus_id=6286
chest=darkheart_robe,id=174131,bonus_id=4824/1517/4775,azerite_powers=209/582/30/15/13
wrists=bracers_of_dark_prophecy,id=174138,bonus_id=4824/1517/6573
hands=selfsanitizing_handwraps,id=168985,bonus_id=1532/4779/6573
waist=mekgineers_championship_belt,id=168957,bonus_id=1532/4779/6573
legs=unseen_predators_breeches,id=169070,bonus_id=1532/4779/6573
feet=corpuscular_leather_greaves,id=174144,bonus_id=4824/1517/6573
finger1=logic_loop_of_recursion,id=169158,bonus_id=1532/4779/6573,enchant=accord_of_versatility
finger2=overclocking_bit_band,id=169159,bonus_id=1532/4779,enchant=accord_of_versatility
trinket1=deadeye_spyglass,id=159623,bonus_id=1647/4779
trinket2=ashvanes_razor_coral,id=169311,bonus_id=4800/1517
main_hand=anzig_vra,id=172191,bonus_id=4824/1517,enchant=versatile_navigation

# Gear Summary
# gear_ilvl=147.80
# gear_agility=486
# gear_stamina=749
# gear_crit_rating=292
# gear_haste_rating=242
# gear_mastery_rating=199
# gear_versatility_rating=53
# gear_corruption=90
# gear_corruption_resistance=50
# gear_armor=284
