Code:
# Executed before combat begins. Accepts non-harmful actions only.
actions.precombat=flask,type=flask_of_the_whispered_pact
actions.precombat+=/food,type=azshari_salad
actions.precombat+=/moonkin_form
actions.precombat+=/blessing_of_elune
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=deadly_grace
actions.precombat+=/solar_wrath
actions.precombat+=/incarnation
# Executed every time the actor is available.
actions=potion,name=deadly_grace,if=buff.celestial_alignment.up|buff.incarnation.up
#actions+=/use_item,slot=trinket1
#actions+=/use_item,slot=trinket2
#actions+=/use_item,slot=finger2,if=(buff.celestial_alignment.up|buff.incarnation.up)
actions+=/blessing_of_elune,if=active_enemies<=2&talent.blessing_of_the_ancients.enabled&buff.blessing_of_elune.down
actions+=/blessing_of_anshe,if=active_enemies>=3&talent.blessing_of_the_ancients.enabled&buff.blessing_of_anshe.down
actions+=/call_action_list,name=ed,if=equipped.the_emerald_dreamcatcher
#actions+=/moonfire,if=(talent.natures_balance.enabled&remains<3)|(remains<6.6&!talent.natures_balance.enabled)
actions+=/moonfire,cycle_targets=1,max_cycle_targets=3,if=remains<6.6&target.time_to_die>10&buff.fury_of_elune_up.down
actions+=/sunfire,if=(talent.natures_balance.enabled&remains<3)|(remains<5.4&!talent.natures_balance.enabled)
actions+=/call_action_list,name=fury_of_elune,if=talent.fury_of_elune.enabled&cooldown.fury_of_elune.remains<target.time_to_die
actions+=/new_moon,if=(charges=2&recharge_time<5)|charges=3
actions+=/half_moon,if=(charges=2&recharge_time<5)|charges=3|(target.time_to_die<15&charges=2)|buff.incarnation.up
actions+=/berserking,if=(buff.celestial_alignment.up|buff.incarnation.up)
actions+=/full_moon,if=buff.berserking.up|buff.incarnation.up
actions+=/full_moon,if=(charges=2&recharge_time<5)|charges=3|target.time_to_die<15
actions+=/stellar_flare,cycle_targets=1,max_cycle_targets=4,if=active_enemies<4&remains<7.2&astral_power>=15
actions+=/starfall,if=buff.oneths_overconfidence.up
actions+=/astral_communion,if=astral_power.deficit>=75
actions+=/incarnation,if=astral_power>=40
actions+=/celestial_alignment,if=astral_power>=40
actions+=/solar_wrath,if=buff.solar_empowerment.stack=3
actions+=/lunar_strike,if=buff.lunar_empowerment.stack=3
actions+=/call_action_list,name=celestial_alignment_phase,if=buff.celestial_alignment.up|buff.incarnation.up
actions+=/call_action_list,name=single_target
actions.fury_of_elune=incarnation,if=astral_power>=95&cooldown.fury_of_elune.remains<=gcd
actions.fury_of_elune+=/fury_of_elune,if=astral_power>=95
actions.fury_of_elune+=/new_moon,if=((charges=2&recharge_time<5)|charges=3)&&(buff.fury_of_elune_up.up|(cooldown.fury_of_elune.remains>gcd*3&astral_power<=90))
actions.fury_of_elune+=/half_moon,if=((charges=2&recharge_time<5)|charges=3)&&(buff.fury_of_elune_up.up|(cooldown.fury_of_elune.remains>gcd*3&astral_power<=80))
actions.fury_of_elune+=/full_moon,if=((charges=2&recharge_time<5)|charges=3)&&(buff.fury_of_elune_up.up|(cooldown.fury_of_elune.remains>gcd*3&astral_power<=60))
actions.fury_of_elune+=/astral_communion,if=buff.fury_of_elune_up.up&astral_power<=25
actions.fury_of_elune+=/warrior_of_elune,if=buff.fury_of_elune_up.up|(cooldown.fury_of_elune.remains>=35&buff.lunar_empowerment.up)
actions.fury_of_elune+=/lunar_strike,if=buff.warrior_of_elune.up&(astral_power<=90|(astral_power<=85&buff.incarnation.up))
actions.fury_of_elune+=/new_moon,if=astral_power<=90&buff.fury_of_elune_up.up
actions.fury_of_elune+=/half_moon,if=astral_power<=80&buff.fury_of_elune_up.up&astral_power>cast_time*12
actions.fury_of_elune+=/full_moon,if=astral_power<=60&buff.fury_of_elune_up.up&astral_power>cast_time*12
actions.fury_of_elune+=/moonfire,if=buff.fury_of_elune_up.down&remains<=6.6
actions.fury_of_elune+=/sunfire,if=buff.fury_of_elune_up.down&remains<=5.4
actions.fury_of_elune+=/stellar_flare,if=remains<7.2&active_enemies=1
actions.fury_of_elune+=/starfall,if=(active_enemies>=2&talent.stellar_flare.enabled|active_enemies>=3)&buff.fury_of_elune_up.down&cooldown.fury_of_elune.remains>10
actions.fury_of_elune+=/starsurge,if=active_enemies<=2&buff.fury_of_elune_up.down&cooldown.fury_of_elune.remains>7
actions.fury_of_elune+=/solar_wrath,if=buff.solar_empowerment.up
actions.fury_of_elune+=/lunar_strike,if=buff.lunar_empowerment.stack=3|(buff.lunar_empowerment.remains<5&buff.lunar_empowerment.up)|active_enemies>=2
actions.fury_of_elune+=/solar_wrath
actions.celestial_alignment_phase=starfall,if=(active_enemies>=2&talent.stellar_flare.enabled|active_enemies>=3)&((talent.fury_of_elune.enabled&cooldown.fury_of_elune.remains>12&buff.fury_of_elune_up.down)|!talent.fury_of_elune.enabled)
actions.celestial_alignment_phase+=/starsurge,if=active_enemies<=2
actions.celestial_alignment_phase+=/warrior_of_elune
actions.celestial_alignment_phase+=/lunar_strike,if=buff.warrior_of_elune.up
actions.celestial_alignment_phase+=/solar_wrath,if=buff.solar_empowerment.up
actions.celestial_alignment_phase+=/lunar_strike,if=buff.lunar_empowerment.up
actions.celestial_alignment_phase+=/solar_wrath,if=talent.natures_balance.enabled&dot.sunfire_dmg.remains<5&cast_time<dot.sunfire_dmg.remains
actions.celestial_alignment_phase+=/lunar_strike,if=talent.natures_balance.enabled&dot.moonfire_dmg.remains<5&cast_time<dot.moonfire_dmg.remains|active_enemies>=2
actions.celestial_alignment_phase+=/solar_wrath
actions.single_target=new_moon,if=astral_power<=90
actions.single_target+=/half_moon,if=astral_power<=80
actions.single_target+=/full_moon,if=astral_power<=60
actions.single_target+=/starfall,if=(active_enemies>=2&talent.stellar_flare.enabled|active_enemies>=3)&((talent.fury_of_elune.enabled&cooldown.fury_of_elune.remains>12&buff.fury_of_elune_up.down)|!talent.fury_of_elune.enabled)
actions.single_target+=/starsurge,if=active_enemies<=2
actions.single_target+=/warrior_of_elune
actions.single_target+=/lunar_strike,if=buff.warrior_of_elune.up
actions.single_target+=/solar_wrath,if=buff.solar_empowerment.up
actions.single_target+=/lunar_strike,if=buff.lunar_empowerment.up
actions.single_target+=/solar_wrath,if=talent.natures_balance.enabled&dot.sunfire_dmg.remains<5&cast_time<dot.sunfire_dmg.remains
actions.single_target+=/lunar_strike,if=talent.natures_balance.enabled&dot.moonfire_dmg.remains<5&cast_time<dot.moonfire_dmg.remains|active_enemies>=2
actions.single_target+=/solar_wrath
#assumes bota
actions.ed=astral_communion,if=astral_power.deficit>=75&buff.the_emerald_dreamcatcher.up
actions.ed+=/incarnation,if=astral_power>=85&!buff.the_emerald_dreamcatcher.up
actions.ed+=/celestial_alignment,if=astral_power>=85&!buff.the_emerald_dreamcatcher.up
actions.ed+=/lunar_strike,if=buff.lunar_empowerment.up&buff.the_emerald_dreamcatcher.remains>execute_time&buff.the_emerald_dreamcatcher.remains<gcd.max&astral_power<=77.5
actions.ed+=/solar_wrath,if=buff.solar_empowerment.up&buff.the_emerald_dreamcatcher.remains>execute_time&buff.the_emerald_dreamcatcher.remains<gcd.max&astral_power<=85
actions.ed+=/starsurge,if=(buff.the_emerald_dreamcatcher.up&buff.the_emerald_dreamcatcher.remains<gcd.max)|astral_power>90|((buff.celestial_alignment.up|buff.incarnation.up)&astral_power>=85)|(buff.the_emerald_dreamcatcher.up&astral_power>=77.5&(buff.celestial_alignment.up|buff.incarnation.up))
actions.ed+=/stellar_flare,cycle_targets=1,max_cycle_targets=4,if=active_enemies<4&remains<7.2&astral_power>=15
actions.ed+=/moonfire,if=(talent.natures_balance.enabled&remains<3)|(remains<6.6&!talent.natures_balance.enabled)
actions.ed+=/sunfire,if=(talent.natures_balance.enabled&remains<3)|(remains<5.4&!talent.natures_balance.enabled)
actions.ed+=/starfall,if=buff.oneths_overconfidence.up&buff.the_emerald_dreamcatcher.remains>execute_time&remains<2
actions.ed+=/solar_wrath,if=buff.solar_empowerment.stack>1&buff.the_emerald_dreamcatcher.remains>2*execute_time&dot.moonfire.remains>5
actions.ed+=/solar_wrath,if=buff.solar_empowerment.up&buff.the_emerald_dreamcatcher.remains>execute_time&astral_power>=10&dot.sunfire.remains<5.4&dot.moonfire.remains>6.6
actions.ed+=/lunar_strike,if=buff.lunar_empowerment.up&buff.the_emerald_dreamcatcher.remains>execute_time&astral_power>=5&(!(buff.celestial_alignment.up|buff.incarnation.up)|(buff.celestial_alignment.up|buff.incarnation.up)&astral_power<=77)
actions.ed+=/solar_wrath,if=buff.solar_empowerment.up&buff.the_emerald_dreamcatcher.remains>execute_time&astral_power>=10
actions.ed+=/starfall,if=buff.oneths_overconfidence.up&remains<2
actions.ed+=/new_moon,if=astral_power<=90
actions.ed+=/half_moon,if=astral_power<=80
actions.ed+=/full_moon,if=astral_power<=60
actions.ed+=/solar_wrath,if=buff.solar_empowerment.up
actions.ed+=/lunar_strike,if=buff.lunar_empowerment.up
actions.ed+=/solar_wrath