# Ensure weapon enchant is applied if you've selected Improved Flametongue Weapon.
actions.precombat+=/flametongue_weapon,if=talent.improved_flametongue_weapon.enabled
actions.precombat+=/potion
actions.precombat+=/stormkeeper
actions.precombat+=/lightning_shield
actions.precombat+=/thunderstrike_ward
# Enable more movement.
actions+=/spiritwalkers_grace,moving=1,if=movement.distance>6
# Interrupt of casts.
actions+=/wind_shear
actions+=/blood_fury,if=!talent.ascendance.enabled|buff.ascendance.up|cooldown.ascendance.remains>50
actions+=/berserking,if=!talent.ascendance.enabled|buff.ascendance.up
actions+=/fireblood,if=!talent.ascendance.enabled|buff.ascendance.up|cooldown.ascendance.remains>50
actions+=/ancestral_call,if=!talent.ascendance.enabled|buff.ascendance.up|cooldown.ascendance.remains>50
actions+=/bag_of_tricks,if=!talent.ascendance.enabled|!buff.ascendance.up
actions+=/use_items
actions+=/lightning_shield,if=buff.lightning_shield.down
actions+=/natures_swiftness
actions+=/ancestral_swiftness
## If you've selected Ascendance sync Power Infusion with it. Otherwise use Power Infusion on Cooldown.
## actions+=/invoke_external_buff,name=power_infusion,if=talent.ascendance.enabled&buff.ascendance.up|!talent.ascendance.enabled
actions+=/potion
actions+=/run_action_list,name=aoe,if=active_enemies>2&(spell_targets.chain_lightning>2|spell_targets.lava_beam>2)
actions+=/run_action_list,name=single_target
# Keep your cooldowns rolling.
actions.aoe+=/fire_elemental,if=!buff.fire_elemental.up&(!talent.primal_elementalist.enabled|!buff.lesser_fire_elemental.up)
# Keep your cooldowns rolling.
actions.aoe+=/storm_elemental,if=!buff.storm_elemental.up&(!talent.primal_elementalist.enabled|!buff.lesser_storm_elemental.up)
# Keep your cooldowns rolling.
actions.aoe+=/stormkeeper,if=!buff.stormkeeper.up
# Reset LMT CD as early as possible.
actions.aoe+=/totemic_recall,if=cooldown.liquid_magma_totem.remains>45
# Keep your cooldowns rolling.
actions.aoe+=/liquid_magma_totem
# Spread Flame Shock using Surge of Power.
actions.aoe+=/primordial_wave,cycle_targets=1,if=buff.surge_of_power.up
# Spread Flame Shock using Surge of Power.
actions.aoe+=/primordial_wave,cycle_targets=1,if=talent.deeply_rooted_elements.enabled&!talent.surge_of_power.enabled
# Spread Flame Shock using Surge of Power.
actions.aoe+=/primordial_wave,cycle_targets=1,if=talent.master_of_the_elements.enabled&!talent.lightning_rod.enabled
# Spread Flame Shock using Surge of Power on up to 4 for Lightning builds.
actions.aoe+=/flame_shock,cycle_targets=1,if=refreshable&buff.surge_of_power.up&talent.lightning_rod.enabled&dot.flame_shock.remains0
# Refresh Flame Shock against low target counts if Master of the Elements was selected up to 6.
actions.aoe+=/flame_shock,cycle_targets=1,if=refreshable&talent.master_of_the_elements.enabled&!talent.lightning_rod.enabled&!talent.surge_of_power.enabled&dot.flame_shock.remains0
# Refresh Flame Shock to gamble on Deeply Rooted Element procs up to 6.
actions.aoe+=/flame_shock,cycle_targets=1,if=refreshable&talent.deeply_rooted_elements.enabled&!talent.surge_of_power.enabled&dot.flame_shock.remains0
# JUST DO IT! https://i.kym-cdn.com/entries/icons/mobile/000/018/147/Shia_LaBeouf__Just_Do_It__Motivational_Speech_(Original_Video_by_LaBeouf__R%C3%B6nkk%C3%B6___Turner)_0-4_screenshot.jpg
actions.aoe+=/ascendance
# {T31 fire} Lava burst is top prio on 3 targets.
actions.aoe+=/lava_burst,cycle_targets=1,if=dot.flame_shock.remains&active_enemies=3&(!talent.lightning_rod.enabled&set_bonus.tier31_4pc)
# {T31 fire} Earthquake is still good with Mote and either 10 Magma Chamber stacks on 6+ targets or 9+ targets.
actions.aoe+=/earthquake,if=buff.master_of_the_elements.up&(buff.magma_chamber.stack=10&active_enemies>=6|talent.splintered_elements.enabled&active_enemies>=9|talent.mountains_will_fall.enabled&active_enemies>=9)&(!talent.lightning_rod.enabled&set_bonus.tier31_4pc)
# {T31 fire} Stormkeeper is strong and should be used.
actions.aoe+=/lava_beam,if=buff.stormkeeper.up&(buff.surge_of_power.up&active_enemies>=6|buff.master_of_the_elements.up&(active_enemies<6|!talent.surge_of_power.enabled))&(!talent.lightning_rod.enabled&set_bonus.tier31_4pc)
# {T31 fire} Stormkeeper is strong and should be used.
actions.aoe+=/chain_lightning,if=buff.stormkeeper.up&(buff.surge_of_power.up&active_enemies>=6|buff.master_of_the_elements.up&(active_enemies<6|!talent.surge_of_power.enabled))&(!talent.lightning_rod.enabled&set_bonus.tier31_4pc)
# {T31 fire} Lava Surge is strong.
actions.aoe+=/lava_burst,cycle_targets=1,if=dot.flame_shock.remains&cooldown_react&buff.lava_surge.up&(!talent.lightning_rod.enabled&set_bonus.tier31_4pc)
# Cast Lava Burst to buff your immediately follow-up Earthquake with Master of the Elements.
actions.aoe+=/lava_burst,cycle_targets=1,if=dot.flame_shock.remains&cooldown_react&buff.lava_surge.up&talent.master_of_the_elements.enabled&!buff.master_of_the_elements.up&(maelstrom>=52-5*talent.eye_of_the_storm.enabled-2*talent.flow_of_power.enabled)&(!talent.echoes_of_great_sundering.enabled&!talent.lightning_rod.enabled|buff.echoes_of_great_sundering_es.up|buff.echoes_of_great_sundering_eb.up)&(!buff.ascendance.up&active_enemies>3|active_enemies=3)
# Use the talents you selected.
actions.aoe+=/earthquake,if=!talent.echoes_of_great_sundering.enabled&active_enemies>3&(spell_targets.chain_lightning>3|spell_targets.lava_beam>3)
# Use the talents you selected.
actions.aoe+=/earthquake,if=!talent.echoes_of_great_sundering.enabled&!talent.elemental_blast.enabled&active_enemies=3&(spell_targets.chain_lightning=3|spell_targets.lava_beam=3)
# Use the talents you selected.
actions.aoe+=/earthquake,if=buff.echoes_of_great_sundering_es.up|buff.echoes_of_great_sundering_eb.up
# Use the talents you selected. Spread Lightning Rod to as many targets as possible.
actions.aoe+=/elemental_blast,cycle_targets=1,if=talent.echoes_of_great_sundering.enabled
# Use the talents you selected.
actions.aoe+=/elemental_blast,if=talent.echoes_of_great_sundering.enabled
# Elemental Blast is stronger than Earthquake against 3 targets.
actions.aoe+=/elemental_blast,if=active_enemies=3&!talent.echoes_of_great_sundering.enabled
# Use the talents you selected. Spread Lightning Rod to as many targets as possible.
actions.aoe+=/earth_shock,cycle_targets=1,if=talent.echoes_of_great_sundering.enabled
# Use the talents you selected.
actions.aoe+=/earth_shock,if=talent.echoes_of_great_sundering.enabled
# Buff Stormkeeper with Master of the elements on 3-4 targets.
actions.aoe+=/lava_burst,cycle_targets=1,if=dot.flame_shock.remains&talent.master_of_the_elements.enabled&!buff.master_of_the_elements.up&(buff.stormkeeper.up|t30_2pc_timer.next_tick<3&set_bonus.tier30_2pc)&(maelstrom<60-5*talent.eye_of_the_storm.enabled-2*talent.flow_of_power.enabled-10)&active_enemies<5
# Stormkeeper is strong and should be used.
actions.aoe+=/lava_beam,if=buff.stormkeeper.up
# Stormkeeper is strong and should be used.
actions.aoe+=/chain_lightning,if=buff.stormkeeper.up
# Power of the Maelstrom is strong and should be used.
actions.aoe+=/lava_beam,if=buff.power_of_the_maelstrom.up&buff.ascendance.remains>cast_time
# Power of the Maelstrom is strong and should be used.
actions.aoe+=/chain_lightning,if=buff.power_of_the_maelstrom.up
# Against 6 targets or more Surge of Power should be used with Lava Beam rather than Lava Burst.
actions.aoe+=/lava_beam,if=active_enemies>=6&buff.surge_of_power.up&buff.ascendance.remains>cast_time
# Against 6 targets or more Surge of Power should be used with Chain Lightning rather than Lava Burst.
actions.aoe+=/chain_lightning,if=active_enemies>=6&buff.surge_of_power.up
# Consume Master of the Elements with Lava Beam.
actions.aoe+=/lava_beam,if=buff.master_of_the_elements.up&buff.ascendance.remains>cast_time
# Proc Master of the Elements against 3 targets.
actions.aoe+=/lava_burst,cycle_targets=1,if=dot.flame_shock.remains&active_enemies=3&talent.master_of_the_elements.enabled
# Gamble away for Deeply Rooted Elements procs whenever Lava Surge makes Lava Burst more efficient.
actions.aoe+=/lava_burst,cycle_targets=1,if=dot.flame_shock.remains&buff.lava_surge.up&talent.deeply_rooted_elements.enabled
# {PH} Icefury line to proc EoGS with Fusion of Elements.
actions.aoe+=/icefury,if=talent.fusion_of_elements.enabled&talent.echoes_of_great_sundering.enabled
#
actions.aoe+=/lava_beam,if=buff.ascendance.remains>cast_time
actions.aoe+=/chain_lightning
actions.aoe+=/flame_shock,moving=1,cycle_targets=1,if=refreshable
actions.aoe+=/frost_shock,moving=1
# Keep your cooldowns rolling.
actions.single_target+=/fire_elemental,if=!buff.fire_elemental.up&(!talent.primal_elementalist.enabled|!buff.lesser_fire_elemental.up)
# Keep your cooldowns rolling.
actions.single_target+=/storm_elemental,if=!buff.storm_elemental.up&(!talent.primal_elementalist.enabled|!buff.lesser_storm_elemental.up)
# Reset LMT CD as early as possible.
actions.single_target+=/totemic_recall,if=cooldown.liquid_magma_totem.remains>45&(active_enemies>1&(spell_targets.chain_lightning>1|spell_targets.lava_beam>1))
# Keep your cooldowns rolling.
actions.single_target+=/liquid_magma_totem,if=active_dot.flame_shock=0|dot.flame_shock.remains<6|active_enemies>1&(spell_targets.chain_lightning>1|spell_targets.lava_beam>1)
# Use Primordial Wave as much as possible without wasting buffs.
actions.single_target+=/primordial_wave,cycle_targets=1
actions.single_target+=/flame_shock,cycle_targets=1,if=active_enemies=1&refreshable&(dot.flame_shock.remains1&(spell_targets.chain_lightning>1|spell_targets.lava_beam>1)&(talent.deeply_rooted_elements.enabled|talent.ascendance.enabled|talent.primordial_wave.enabled|talent.searing_flames.enabled|talent.magma_chamber.enabled)&(!buff.master_of_the_elements.up&(buff.stormkeeper.up|cooldown.stormkeeper.remains=0)|!talent.surge_of_power.enabled)
# Spread Flame Shock to multiple targets only if talents were selected that benefit from it.
actions.single_target+=/flame_shock,cycle_targets=1,if=active_enemies>1&(spell_targets.chain_lightning>1|spell_targets.lava_beam>1)&refreshable&(talent.deeply_rooted_elements.enabled|talent.ascendance.enabled|talent.primordial_wave.enabled|talent.searing_flames.enabled|talent.magma_chamber.enabled)&(buff.surge_of_power.up&!buff.stormkeeper.up&!cooldown.stormkeeper.remains=0|!talent.surge_of_power.enabled),cycle_targets=1
# {SoP builds} Use Stormkeeper if you already got Surge of Power buff rolling.
actions.single_target+=/stormkeeper,if=!buff.ascendance.up&!buff.stormkeeper.up&buff.surge_of_power.up
actions.single_target+=/stormkeeper,if=!buff.ascendance.up&!buff.stormkeeper.up&(!talent.surge_of_power.enabled|!talent.elemental_blast.enabled)
actions.single_target+=/ascendance,if=!buff.stormkeeper.up
# Stormkeeper is strong and should be used.
actions.single_target+=/lightning_bolt,if=buff.stormkeeper.up&buff.surge_of_power.up
# Stormkeeper is strong and should be used.
actions.single_target+=/lava_beam,if=active_enemies>1&(spell_targets.chain_lightning>1|spell_targets.lava_beam>1)&buff.stormkeeper.up&!talent.surge_of_power.enabled
# Stormkeeper is strong and should be used.
actions.single_target+=/chain_lightning,if=active_enemies>1&(spell_targets.chain_lightning>1|spell_targets.lava_beam>1)&buff.stormkeeper.up&!talent.surge_of_power.enabled
# Buff stormkeeper with MotE when not using Surge.
actions.single_target+=/lava_burst,if=buff.stormkeeper.up&!buff.master_of_the_elements.up&!talent.surge_of_power.enabled&talent.master_of_the_elements.enabled
# Stormkeeper is strong and should be used.
actions.single_target+=/lightning_bolt,if=buff.stormkeeper.up&!talent.surge_of_power.enabled&buff.master_of_the_elements.up
# Stormkeeper is strong and should be used.
actions.single_target+=/lightning_bolt,if=buff.stormkeeper.up&!talent.surge_of_power.enabled&!talent.master_of_the_elements.enabled
# {Lightning builds} Surge of Power is strong and should be used.
actions.single_target+=/lightning_bolt,if=buff.surge_of_power.up&talent.lightning_rod.enabled
actions.single_target+=/lava_beam,if=active_enemies>1&(spell_targets.chain_lightning>1|spell_targets.lava_beam>1)&buff.power_of_the_maelstrom.up&buff.ascendance.remains>cast_time&!set_bonus.tier31_4pc
# Lava Surge is neat. Utilize it...Unless it's Lightning build and you save it to buff Elemental Blast.
actions.single_target+=/lava_burst,if=cooldown_react&buff.lava_surge.up&(talent.deeply_rooted_elements.enabled|!talent.master_of_the_elements.enabled|!talent.elemental_blast.enabled)
# Spam Lava burst in Ascendance if not running Elemental Blast.
actions.single_target+=/lava_burst,cycle_targets=1,if=dot.flame_shock.remains>2&buff.ascendance.up&!talent.elemental_blast.enabled
# {Fire builds} Buff your next with MotE.
actions.single_target+=/lava_burst,cycle_targets=1,if=dot.flame_shock.remains>2&talent.master_of_the_elements.enabled&!buff.master_of_the_elements.up&!talent.lightning_rod.enabled
# {Lightning builds} Buff your next Maelstrom Spender with MotE if it won't cap your maelstrom.
actions.single_target+=/lava_burst,if=talent.master_of_the_elements.enabled&!buff.master_of_the_elements.up&(maelstrom>=80|maelstrom>=55&!talent.elemental_blast.enabled)&talent.swelling_maelstrom.enabled&maelstrom<=130
# Use the talents you selected. Additionally Elemental Blast is stronger than EoGS. In this case don't use Earthquake on single target.
actions.single_target+=/earthquake,if=(buff.echoes_of_great_sundering_es.up|buff.echoes_of_great_sundering_eb.up)&(!talent.elemental_blast.enabled&active_enemies<2|active_enemies>1)
# Use Earthquake against two enemies unless you have to alternate because of Echoes of Great Sundering.
actions.single_target+=/earthquake,if=active_enemies>1&(spell_targets.chain_lightning>1|spell_targets.lava_beam>1)&!talent.echoes_of_great_sundering.enabled&!talent.elemental_blast.enabled
# Default EB line for lightning builds. Requires MotE buff for fire.
actions.single_target+=/elemental_blast,if=buff.master_of_the_elements.up|talent.lightning_rod.enabled
actions.single_target+=/earth_shock
# Fish for DRE procs.
actions.single_target+=/lava_burst,cycle_targets=1,if=dot.flame_shock.remains>2&talent.deeply_rooted_elements.enabled
# Spread out your Icefury usage if you can get more use out of accompanied buffs.
actions.single_target+=/frost_shock,if=buff.icefury_dmg.up&talent.flux_melting.enabled&!buff.flux_melting.up
# Use Lava Burst normally with fire builds. Save it as much as possible in lightning builds unless you cant use Lightning Bolt without wasting Stormkeeper charges.
actions.single_target+=/lava_burst,cycle_targets=1,if=dot.flame_shock.remains>2&talent.echo_of_the_elements.enabled|!talent.elemental_blast.enabled|!talent.master_of_the_elements.enabled|buff.stormkeeper.up
actions.single_target+=/elemental_blast
actions.single_target+=/icefury
# Utilize the Power of the Maelstrom buff if your Chain Lightning is empowered by Unrelenting Calamity.
actions.single_target+=/chain_lightning,if=buff.power_of_the_maelstrom.up&active_enemies>1&(spell_targets.chain_lightning>1|spell_targets.lava_beam>1)
# Utilize the Power of the Maelstrom buff if your Lightning Bolt is empowered by Unrelenting Calamity.
actions.single_target+=/lightning_bolt,if=buff.power_of_the_maelstrom.up
actions.single_target+=/frost_shock,if=buff.icefury_dmg.up
# Casting Chain Lightning at two targets is more efficient than Lightning Bolt.
actions.single_target+=/chain_lightning,if=active_enemies>1&(spell_targets.chain_lightning>1|spell_targets.lava_beam>1)
# Filler spell. Always available. Always the bottom line.
actions.single_target+=/lightning_bolt
actions.single_target+=/flame_shock,moving=1,cycle_targets=1,if=refreshable
actions.single_target+=/flame_shock,moving=1,if=movement.distance>6
# Frost Shock is our movement filler.
actions.single_target+=/frost_shock,moving=1