diff --git a/src/ioc.ts b/src/ioc.ts index 35f668c18..90d55bd4d 100644 --- a/src/ioc.ts +++ b/src/ioc.ts @@ -20,6 +20,7 @@ import { DebugTools } from "./engine/debug"; import { OvaleDemonHunterDemonicClass } from "./states/DemonHunterDemonic"; import { OvaleDemonHunterSoulFragmentsClass } from "./states/DemonHunterSoulFragments"; import { OvaleSigilClass } from "./states/DemonHunterSigils"; +import { Eclipse } from "./states/eclipse"; import { OvaleEnemiesClass } from "./states/Enemies"; import { OvaleEquipmentClass } from "./states/Equipment"; import { OvaleFrameModuleClass } from "./ui/Frame"; @@ -80,6 +81,7 @@ export class IoC { public demonHunterDemonic: OvaleDemonHunterDemonicClass; public demonHunterSigils: OvaleSigilClass; public demonHunterSoulFragments: OvaleDemonHunterSoulFragmentsClass; + public eclipse: Eclipse; public enemies: OvaleEnemiesClass; public equipment: OvaleEquipmentClass; public frame: OvaleFrameModuleClass; @@ -194,6 +196,14 @@ export class IoC { this.spellBook, this.power ); + this.eclipse = new Eclipse( + this.ovale, + this.debug, + this.aura, + combat, + this.paperDoll, + this.spellBook + ); this.stance = new OvaleStanceClass( this.debug, this.ovale, @@ -467,6 +477,7 @@ export class IoC { this.state.registerState(this.paperDoll); this.state.registerState(this.baseState); this.state.registerState(this.demonHunterSigils); + this.state.registerState(this.eclipse); this.state.registerState(this.enemies); this.state.registerState(this.future); this.state.registerState(this.health); @@ -487,6 +498,7 @@ export class IoC { soulbind.registerConditions(this.condition); this.warlock.registerConditions(this.condition); this.aura.registerConditions(this.condition); + this.eclipse.registerConditions(this.condition); this.future.registerConditions(this.condition); this.paperDoll.registerConditions(this.condition); this.equipment.registerConditions(this.condition); diff --git a/src/scripts/ovale_druid.ts b/src/scripts/ovale_druid.ts index 8a7c56337..306cb5cb8 100644 --- a/src/scripts/ovale_druid.ts +++ b/src/scripts/ovale_druid.ts @@ -54,7 +54,7 @@ AddFunction ignore_starsurge AddFunction dream_will_fall_off { - { buffremaining(timeworn_dreambinder_buff) < gcd() + 0.1 or buffremaining(timeworn_dreambinder_buff) < executetime(starfire) + 0.1 and { buffpresent(eclipse_lunar_buff) or counter(solar) == 1 or counter(lunar) + counter(solar) == 1 } } and buffpresent(timeworn_dreambinder_buff) and equippedruneforge(timeworn_dreambinder_runeforge) + { buffremaining(timeworn_dreambinder_buff) < gcd() + 0.1 or buffremaining(timeworn_dreambinder_buff) < executetime(starfire) + 0.1 and { buffpresent(eclipse_lunar_buff) or eclipsesolarnext() or eclipseanynext() } } and buffpresent(timeworn_dreambinder_buff) and equippedruneforge(timeworn_dreambinder_runeforge) } AddFunction aspPerSec @@ -69,7 +69,7 @@ AddFunction critnotup AddFunction safe_to_use_spell { - buffremaining(timeworn_dreambinder_buff) > gcd() + 0.1 and { buffpresent(eclipse_solar_buff) and buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) or counter(lunar) == 1 } or buffremaining(timeworn_dreambinder_buff) > executetime(starfire) + 0.1 and { buffpresent(eclipse_lunar_buff) or counter(solar) == 1 or counter(lunar) + counter(solar) == 1 } or not buffpresent(timeworn_dreambinder_buff) + buffremaining(timeworn_dreambinder_buff) > gcd() + 0.1 and { buffpresent(eclipse_solar_buff) and buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) or eclipselunarnext() } or buffremaining(timeworn_dreambinder_buff) > executetime(starfire) + 0.1 and { buffpresent(eclipse_lunar_buff) or eclipsesolarnext() or eclipseanynext() } or not buffpresent(timeworn_dreambinder_buff) } AddFunction save_for_ca_inc @@ -131,7 +131,7 @@ AddFunction balancestmainactions #starfall,if=talent.stellar_drift.enabled&!talent.starlord.enabled&buff.starfall.refreshable&(buff.eclipse_lunar.remains>6&eclipse.in_lunar&buff.primordial_arcanic_pulsar.value<250|buff.primordial_arcanic_pulsar.value>=250&astral_power>90|dot.adaptive_swarm_damage.remains>8|action.adaptive_swarm_damage.in_flight)&!cooldown.ca_inc.ready if hastalent(stellar_drift_talent) and not hastalent(starlord_talent) and buffrefreshable(starfall) and { buffremaining(eclipse_lunar_buff) > 6 and buffpresent(eclipse_lunar_buff) and buffamount(primordial_arcanic_pulsar_buff) < 250 or buffamount(primordial_arcanic_pulsar_buff) >= 250 and astralpower() > 90 or target.debuffremaining(adaptive_swarm_damage) > 8 or inflighttotarget(adaptive_swarm_damage) } and not spellcooldown(celestial_alignment) <= 0 spell(starfall) #starsurge,if=buff.oneths_clear_vision.up|buff.kindred_empowerment_energize.up|buff.ca_inc.up&(buff.ravenous_frenzy.remains90&eclipse.in_any - if buffpresent(oneths_clear_vision_buff) or buffpresent(kindred_empowerment_energize) or buffpresent(celestial_alignment) and { buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) or not buffpresent(ravenous_frenzy) and not spellcooldown(ravenous_frenzy) <= 0 or not iscovenant("venthyr") } or astralpower() > 90 and buffpresent(eclipse_any) spell(starsurge) + if buffpresent(oneths_clear_vision_buff) or buffpresent(kindred_empowerment_energize) or buffpresent(celestial_alignment) and { buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) or not buffpresent(ravenous_frenzy) and not spellcooldown(ravenous_frenzy) <= 0 or not iscovenant("venthyr") } or astralpower() > 90 and { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } spell(starsurge) #starsurge,if=talent.starlord.enabled&(buff.starlord.up|astral_power>90)&buff.starlord.stack<3&(buff.eclipse_solar.up|buff.eclipse_lunar.up)&buff.primordial_arcanic_pulsar.value<270&(cooldown.ca_inc.remains>10|!variable.convoke_desync&covenant.night_fae) if hastalent(starlord_talent) and { buffpresent(starlord_buff) or astralpower() > 90 } and buffstacks(starlord_buff) < 3 and { buffpresent(eclipse_solar_buff) or buffpresent(eclipse_lunar_buff) } and buffamount(primordial_arcanic_pulsar_buff) < 270 and { spellcooldown(celestial_alignment) > 10 or not convoke_desync() and iscovenant("night_fae") } spell(starsurge) #starsurge,if=(buff.primordial_arcanic_pulsar.value<270|buff.primordial_arcanic_pulsar.value<250&talent.stellar_drift.enabled)&buff.eclipse_solar.remains>7&eclipse.in_solar&!buff.oneths_perception.up&!talent.starlord.enabled&cooldown.ca_inc.remains>7&(cooldown.kindred_spirits.remains>7|!covenant.kyrian) @@ -143,7 +143,7 @@ AddFunction balancestmainactions #full_moon,if=(buff.eclipse_lunar.up&!covenant.kyrian|(buff.kindred_empowerment_energize.up&covenant.kyrian)|(charges=2&recharge_time<5)|charges=3|buff.ca_inc.up)&ap_check&variable.save_for_ca_inc if { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(full_moon) and save_for_ca_inc() and spellknown(full_moon) spell(full_moon) #starfire,if=eclipse.in_lunar|eclipse.solar_next|eclipse.any_next|buff.warrior_of_elune.up&buff.eclipse_lunar.up|(buff.ca_inc.remains= astralpowercost(fury_of_elune) and buffamount(primordial_arcanic_pulsar_buff) < 240 and { target.debuffpresent(adaptive_swarm_damage) or not iscovenant("necrolord") } and save_for_ca_inc() spell(fury_of_elune) + if { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and astralpower() >= astralpowercost(fury_of_elune) and buffamount(primordial_arcanic_pulsar_buff) < 240 and { target.debuffpresent(adaptive_swarm_damage) or not iscovenant("necrolord") } and save_for_ca_inc() spell(fury_of_elune) - unless buffpresent(oneths_perception_buff) and buffrefreshable(starfall) and spell(starfall) or buffremaining(starlord_buff) < 5 and { buffremaining(eclipse_solar_buff) > 5 or buffremaining(eclipse_lunar_buff) > 5 } and astralpower() > 90 and buffpresent(starlord_buff) and texture(starlord_buff text=cancel) or iscovenant("night_fae") and convoke_desync() and spellcooldown(convoke_the_spirits) < 5 and not checkboxon("no_cds") and spell(starsurge) or hastalent(stellar_drift_talent) and not hastalent(starlord_talent) and buffrefreshable(starfall) and { buffremaining(eclipse_lunar_buff) > 6 and buffpresent(eclipse_lunar_buff) and buffamount(primordial_arcanic_pulsar_buff) < 250 or buffamount(primordial_arcanic_pulsar_buff) >= 250 and astralpower() > 90 or target.debuffremaining(adaptive_swarm_damage) > 8 or inflighttotarget(adaptive_swarm_damage) } and not spellcooldown(celestial_alignment) <= 0 and spell(starfall) or { buffpresent(oneths_clear_vision_buff) or buffpresent(kindred_empowerment_energize) or buffpresent(celestial_alignment) and { buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) or not buffpresent(ravenous_frenzy) and not spellcooldown(ravenous_frenzy) <= 0 or not iscovenant("venthyr") } or astralpower() > 90 and buffpresent(eclipse_any) } and spell(starsurge) or hastalent(starlord_talent) and { buffpresent(starlord_buff) or astralpower() > 90 } and buffstacks(starlord_buff) < 3 and { buffpresent(eclipse_solar_buff) or buffpresent(eclipse_lunar_buff) } and buffamount(primordial_arcanic_pulsar_buff) < 270 and { spellcooldown(celestial_alignment) > 10 or not convoke_desync() and iscovenant("night_fae") } and spell(starsurge) or { buffamount(primordial_arcanic_pulsar_buff) < 270 or buffamount(primordial_arcanic_pulsar_buff) < 250 and hastalent(stellar_drift_talent) } and buffremaining(eclipse_solar_buff) > 7 and buffpresent(eclipse_solar_buff) and not buffpresent(oneths_perception_buff) and not hastalent(starlord_talent) and spellcooldown(celestial_alignment) > 7 and { spellcooldown(kindred_spirits) > 7 or not iscovenant("kyrian") } and spell(starsurge) or { buffpresent(eclipse_lunar_buff) or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and save_for_ca_inc() and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(half_moon) and save_for_ca_inc() and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(full_moon) and save_for_ca_inc() and spellknown(full_moon) and spell(full_moon) + unless buffpresent(oneths_perception_buff) and buffrefreshable(starfall) and spell(starfall) or buffremaining(starlord_buff) < 5 and { buffremaining(eclipse_solar_buff) > 5 or buffremaining(eclipse_lunar_buff) > 5 } and astralpower() > 90 and buffpresent(starlord_buff) and texture(starlord_buff text=cancel) or iscovenant("night_fae") and convoke_desync() and spellcooldown(convoke_the_spirits) < 5 and not checkboxon("no_cds") and spell(starsurge) or hastalent(stellar_drift_talent) and not hastalent(starlord_talent) and buffrefreshable(starfall) and { buffremaining(eclipse_lunar_buff) > 6 and buffpresent(eclipse_lunar_buff) and buffamount(primordial_arcanic_pulsar_buff) < 250 or buffamount(primordial_arcanic_pulsar_buff) >= 250 and astralpower() > 90 or target.debuffremaining(adaptive_swarm_damage) > 8 or inflighttotarget(adaptive_swarm_damage) } and not spellcooldown(celestial_alignment) <= 0 and spell(starfall) or { buffpresent(oneths_clear_vision_buff) or buffpresent(kindred_empowerment_energize) or buffpresent(celestial_alignment) and { buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) or not buffpresent(ravenous_frenzy) and not spellcooldown(ravenous_frenzy) <= 0 or not iscovenant("venthyr") } or astralpower() > 90 and { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } } and spell(starsurge) or hastalent(starlord_talent) and { buffpresent(starlord_buff) or astralpower() > 90 } and buffstacks(starlord_buff) < 3 and { buffpresent(eclipse_solar_buff) or buffpresent(eclipse_lunar_buff) } and buffamount(primordial_arcanic_pulsar_buff) < 270 and { spellcooldown(celestial_alignment) > 10 or not convoke_desync() and iscovenant("night_fae") } and spell(starsurge) or { buffamount(primordial_arcanic_pulsar_buff) < 270 or buffamount(primordial_arcanic_pulsar_buff) < 250 and hastalent(stellar_drift_talent) } and buffremaining(eclipse_solar_buff) > 7 and buffpresent(eclipse_solar_buff) and not buffpresent(oneths_perception_buff) and not hastalent(starlord_talent) and spellcooldown(celestial_alignment) > 7 and { spellcooldown(kindred_spirits) > 7 or not iscovenant("kyrian") } and spell(starsurge) or { buffpresent(eclipse_lunar_buff) or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and save_for_ca_inc() and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(half_moon) and save_for_ca_inc() and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(full_moon) and save_for_ca_inc() and spellknown(full_moon) and spell(full_moon) { #warrior_of_elune spell(warrior_of_elune) - unless { buffpresent(eclipse_lunar_buff) or counter(solar) == 1 or counter(lunar) + counter(solar) == 1 or buffpresent(warrior_of_elune) and buffpresent(eclipse_lunar_buff) or buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) } and spell(starfire) or spell(wrath_balance) + unless { buffpresent(eclipse_lunar_buff) or eclipsesolarnext() or eclipseanynext() or buffpresent(warrior_of_elune) and buffpresent(eclipse_lunar_buff) or buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) } and spell(starfire) or spell(wrath_balance) { #run_action_list,name=fallthru balancefallthrushortcdactions() @@ -185,7 +185,7 @@ AddFunction balancestshortcdactions AddFunction balancestshortcdpostconditions { - { not target.debuffpresent(adaptive_swarm_damage) and not inflighttotarget(adaptive_swarm_damage) and { not target.debuffpresent(adaptive_swarm) or target.debuffremaining(adaptive_swarm) > 5 } or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 3 and target.debuffpresent(adaptive_swarm_damage) } and spell(adaptive_swarm) or target.refreshable(moonfire_debuff) and target.timetodie() > 12 and { astralpower() >= astralpowercost(moonfire) and dot_requirements() } and spell(moonfire) or target.refreshable(sunfire_debuff) and target.timetodie() > 12 and { astralpower() >= astralpowercost(sunfire) and dot_requirements() } and spell(sunfire) or target.refreshable(stellar_flare) and target.timetodie() > 16 and { astralpower() >= astralpowercost(stellar_flare) and dot_requirements() } and spell(stellar_flare) or { { buffremaining(eclipse_solar_buff) > 10 or buffremaining(eclipse_lunar_buff) > 10 } and spellcooldown(celestial_alignment) > 30 and { buffamount(primordial_arcanic_pulsar_buff) < 240 or not equippedruneforge(primordial_arcanic_pulsar_runeforge) } or buffamount(primordial_arcanic_pulsar_buff) >= 270 or spellcooldown(celestial_alignment) <= 0 and { astralpower() > 90 or is_aoe() } } and spell(kindred_spirits) or not checkboxon("no_cds") and cd_condition() and { astralpower() > 90 and { buffpresent(kindred_empowerment_energize) or not iscovenant("kyrian") } or iscovenant("night_fae") or is_aoe() or buffpresent(bloodlust) and buffremaining(bloodlust) < 30 + 9 * equippedruneforge(primordial_arcanic_pulsar_runeforge) + conduitvalue(precise_alignment_conduit) } and not buffpresent(celestial_alignment) and { not iscovenant("night_fae") or not spellcooldown(convoke_the_spirits) > 0 or fightremains() < spellcooldown(convoke_the_spirits) + 6 or fightremains() % 180 < 30 + conduitvalue(precise_alignment_conduit) } and spell(incarnation) or buffpresent(oneths_perception_buff) and buffrefreshable(starfall) and spell(starfall) or buffremaining(starlord_buff) < 5 and { buffremaining(eclipse_solar_buff) > 5 or buffremaining(eclipse_lunar_buff) > 5 } and astralpower() > 90 and buffpresent(starlord_buff) and texture(starlord_buff text=cancel) or iscovenant("night_fae") and convoke_desync() and spellcooldown(convoke_the_spirits) < 5 and not checkboxon("no_cds") and spell(starsurge) or hastalent(stellar_drift_talent) and not hastalent(starlord_talent) and buffrefreshable(starfall) and { buffremaining(eclipse_lunar_buff) > 6 and buffpresent(eclipse_lunar_buff) and buffamount(primordial_arcanic_pulsar_buff) < 250 or buffamount(primordial_arcanic_pulsar_buff) >= 250 and astralpower() > 90 or target.debuffremaining(adaptive_swarm_damage) > 8 or inflighttotarget(adaptive_swarm_damage) } and not spellcooldown(celestial_alignment) <= 0 and spell(starfall) or { buffpresent(oneths_clear_vision_buff) or buffpresent(kindred_empowerment_energize) or buffpresent(celestial_alignment) and { buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) or not buffpresent(ravenous_frenzy) and not spellcooldown(ravenous_frenzy) <= 0 or not iscovenant("venthyr") } or astralpower() > 90 and buffpresent(eclipse_any) } and spell(starsurge) or hastalent(starlord_talent) and { buffpresent(starlord_buff) or astralpower() > 90 } and buffstacks(starlord_buff) < 3 and { buffpresent(eclipse_solar_buff) or buffpresent(eclipse_lunar_buff) } and buffamount(primordial_arcanic_pulsar_buff) < 270 and { spellcooldown(celestial_alignment) > 10 or not convoke_desync() and iscovenant("night_fae") } and spell(starsurge) or { buffamount(primordial_arcanic_pulsar_buff) < 270 or buffamount(primordial_arcanic_pulsar_buff) < 250 and hastalent(stellar_drift_talent) } and buffremaining(eclipse_solar_buff) > 7 and buffpresent(eclipse_solar_buff) and not buffpresent(oneths_perception_buff) and not hastalent(starlord_talent) and spellcooldown(celestial_alignment) > 7 and { spellcooldown(kindred_spirits) > 7 or not iscovenant("kyrian") } and spell(starsurge) or { buffpresent(eclipse_lunar_buff) or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and save_for_ca_inc() and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(half_moon) and save_for_ca_inc() and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(full_moon) and save_for_ca_inc() and spellknown(full_moon) and spell(full_moon) or { buffpresent(eclipse_lunar_buff) or counter(solar) == 1 or counter(lunar) + counter(solar) == 1 or buffpresent(warrior_of_elune) and buffpresent(eclipse_lunar_buff) or buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) } and spell(starfire) or spell(wrath_balance) or balancefallthrushortcdpostconditions() + { not target.debuffpresent(adaptive_swarm_damage) and not inflighttotarget(adaptive_swarm_damage) and { not target.debuffpresent(adaptive_swarm) or target.debuffremaining(adaptive_swarm) > 5 } or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 3 and target.debuffpresent(adaptive_swarm_damage) } and spell(adaptive_swarm) or target.refreshable(moonfire_debuff) and target.timetodie() > 12 and { astralpower() >= astralpowercost(moonfire) and dot_requirements() } and spell(moonfire) or target.refreshable(sunfire_debuff) and target.timetodie() > 12 and { astralpower() >= astralpowercost(sunfire) and dot_requirements() } and spell(sunfire) or target.refreshable(stellar_flare) and target.timetodie() > 16 and { astralpower() >= astralpowercost(stellar_flare) and dot_requirements() } and spell(stellar_flare) or { { buffremaining(eclipse_solar_buff) > 10 or buffremaining(eclipse_lunar_buff) > 10 } and spellcooldown(celestial_alignment) > 30 and { buffamount(primordial_arcanic_pulsar_buff) < 240 or not equippedruneforge(primordial_arcanic_pulsar_runeforge) } or buffamount(primordial_arcanic_pulsar_buff) >= 270 or spellcooldown(celestial_alignment) <= 0 and { astralpower() > 90 or is_aoe() } } and spell(kindred_spirits) or not checkboxon("no_cds") and cd_condition() and { astralpower() > 90 and { buffpresent(kindred_empowerment_energize) or not iscovenant("kyrian") } or iscovenant("night_fae") or is_aoe() or buffpresent(bloodlust) and buffremaining(bloodlust) < 30 + 9 * equippedruneforge(primordial_arcanic_pulsar_runeforge) + conduitvalue(precise_alignment_conduit) } and not buffpresent(celestial_alignment) and { not iscovenant("night_fae") or not spellcooldown(convoke_the_spirits) > 0 or fightremains() < spellcooldown(convoke_the_spirits) + 6 or fightremains() % 180 < 30 + conduitvalue(precise_alignment_conduit) } and spell(incarnation) or buffpresent(oneths_perception_buff) and buffrefreshable(starfall) and spell(starfall) or buffremaining(starlord_buff) < 5 and { buffremaining(eclipse_solar_buff) > 5 or buffremaining(eclipse_lunar_buff) > 5 } and astralpower() > 90 and buffpresent(starlord_buff) and texture(starlord_buff text=cancel) or iscovenant("night_fae") and convoke_desync() and spellcooldown(convoke_the_spirits) < 5 and not checkboxon("no_cds") and spell(starsurge) or hastalent(stellar_drift_talent) and not hastalent(starlord_talent) and buffrefreshable(starfall) and { buffremaining(eclipse_lunar_buff) > 6 and buffpresent(eclipse_lunar_buff) and buffamount(primordial_arcanic_pulsar_buff) < 250 or buffamount(primordial_arcanic_pulsar_buff) >= 250 and astralpower() > 90 or target.debuffremaining(adaptive_swarm_damage) > 8 or inflighttotarget(adaptive_swarm_damage) } and not spellcooldown(celestial_alignment) <= 0 and spell(starfall) or { buffpresent(oneths_clear_vision_buff) or buffpresent(kindred_empowerment_energize) or buffpresent(celestial_alignment) and { buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) or not buffpresent(ravenous_frenzy) and not spellcooldown(ravenous_frenzy) <= 0 or not iscovenant("venthyr") } or astralpower() > 90 and { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } } and spell(starsurge) or hastalent(starlord_talent) and { buffpresent(starlord_buff) or astralpower() > 90 } and buffstacks(starlord_buff) < 3 and { buffpresent(eclipse_solar_buff) or buffpresent(eclipse_lunar_buff) } and buffamount(primordial_arcanic_pulsar_buff) < 270 and { spellcooldown(celestial_alignment) > 10 or not convoke_desync() and iscovenant("night_fae") } and spell(starsurge) or { buffamount(primordial_arcanic_pulsar_buff) < 270 or buffamount(primordial_arcanic_pulsar_buff) < 250 and hastalent(stellar_drift_talent) } and buffremaining(eclipse_solar_buff) > 7 and buffpresent(eclipse_solar_buff) and not buffpresent(oneths_perception_buff) and not hastalent(starlord_talent) and spellcooldown(celestial_alignment) > 7 and { spellcooldown(kindred_spirits) > 7 or not iscovenant("kyrian") } and spell(starsurge) or { buffpresent(eclipse_lunar_buff) or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and save_for_ca_inc() and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(half_moon) and save_for_ca_inc() and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(full_moon) and save_for_ca_inc() and spellknown(full_moon) and spell(full_moon) or { buffpresent(eclipse_lunar_buff) or eclipsesolarnext() or eclipseanynext() or buffpresent(warrior_of_elune) and buffpresent(eclipse_lunar_buff) or buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) } and spell(starfire) or spell(wrath_balance) or balancefallthrushortcdpostconditions() } AddFunction balancestcdactions @@ -205,7 +205,7 @@ AddFunction balancestcdactions #celestial_alignment,if=!druid.no_cds&variable.cd_condition&(astral_power>90&(buff.kindred_empowerment_energize.up|!covenant.kyrian)|covenant.night_fae|variable.is_aoe|buff.bloodlust.up&buff.bloodlust.remains<20+((9*runeforge.primordial_arcanic_pulsar.equipped)+(conduit.precise_alignment.time_value)))&!buff.ca_inc.up&(!covenant.night_fae|cooldown.convoke_the_spirits.up|interpolated_fight_remains 90 and { buffpresent(kindred_empowerment_energize) or not iscovenant("kyrian") } or iscovenant("night_fae") or is_aoe() or buffpresent(bloodlust) and buffremaining(bloodlust) < 20 + 9 * equippedruneforge(primordial_arcanic_pulsar_runeforge) + conduitvalue(precise_alignment_conduit) } and not buffpresent(celestial_alignment) and { not iscovenant("night_fae") or not spellcooldown(convoke_the_spirits) > 0 or fightremains() < spellcooldown(convoke_the_spirits) + 6 or fightremains() % 180 < 20 + conduitvalue(precise_alignment_conduit) } spell(celestial_alignment) - unless not checkboxon("no_cds") and cd_condition() and { astralpower() > 90 and { buffpresent(kindred_empowerment_energize) or not iscovenant("kyrian") } or iscovenant("night_fae") or is_aoe() or buffpresent(bloodlust) and buffremaining(bloodlust) < 30 + 9 * equippedruneforge(primordial_arcanic_pulsar_runeforge) + conduitvalue(precise_alignment_conduit) } and not buffpresent(celestial_alignment) and { not iscovenant("night_fae") or not spellcooldown(convoke_the_spirits) > 0 or fightremains() < spellcooldown(convoke_the_spirits) + 6 or fightremains() % 180 < 30 + conduitvalue(precise_alignment_conduit) } and spell(incarnation) or buffpresent(eclipse_any) and astralpower() >= astralpowercost(fury_of_elune) and buffamount(primordial_arcanic_pulsar_buff) < 240 and { target.debuffpresent(adaptive_swarm_damage) or not iscovenant("necrolord") } and save_for_ca_inc() and spell(fury_of_elune) or buffpresent(oneths_perception_buff) and buffrefreshable(starfall) and spell(starfall) or buffremaining(starlord_buff) < 5 and { buffremaining(eclipse_solar_buff) > 5 or buffremaining(eclipse_lunar_buff) > 5 } and astralpower() > 90 and buffpresent(starlord_buff) and texture(starlord_buff text=cancel) or iscovenant("night_fae") and convoke_desync() and spellcooldown(convoke_the_spirits) < 5 and not checkboxon("no_cds") and spell(starsurge) or hastalent(stellar_drift_talent) and not hastalent(starlord_talent) and buffrefreshable(starfall) and { buffremaining(eclipse_lunar_buff) > 6 and buffpresent(eclipse_lunar_buff) and buffamount(primordial_arcanic_pulsar_buff) < 250 or buffamount(primordial_arcanic_pulsar_buff) >= 250 and astralpower() > 90 or target.debuffremaining(adaptive_swarm_damage) > 8 or inflighttotarget(adaptive_swarm_damage) } and not spellcooldown(celestial_alignment) <= 0 and spell(starfall) or { buffpresent(oneths_clear_vision_buff) or buffpresent(kindred_empowerment_energize) or buffpresent(celestial_alignment) and { buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) or not buffpresent(ravenous_frenzy) and not spellcooldown(ravenous_frenzy) <= 0 or not iscovenant("venthyr") } or astralpower() > 90 and buffpresent(eclipse_any) } and spell(starsurge) or hastalent(starlord_talent) and { buffpresent(starlord_buff) or astralpower() > 90 } and buffstacks(starlord_buff) < 3 and { buffpresent(eclipse_solar_buff) or buffpresent(eclipse_lunar_buff) } and buffamount(primordial_arcanic_pulsar_buff) < 270 and { spellcooldown(celestial_alignment) > 10 or not convoke_desync() and iscovenant("night_fae") } and spell(starsurge) or { buffamount(primordial_arcanic_pulsar_buff) < 270 or buffamount(primordial_arcanic_pulsar_buff) < 250 and hastalent(stellar_drift_talent) } and buffremaining(eclipse_solar_buff) > 7 and buffpresent(eclipse_solar_buff) and not buffpresent(oneths_perception_buff) and not hastalent(starlord_talent) and spellcooldown(celestial_alignment) > 7 and { spellcooldown(kindred_spirits) > 7 or not iscovenant("kyrian") } and spell(starsurge) or { buffpresent(eclipse_lunar_buff) or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and save_for_ca_inc() and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(half_moon) and save_for_ca_inc() and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(full_moon) and save_for_ca_inc() and spellknown(full_moon) and spell(full_moon) or spell(warrior_of_elune) or { buffpresent(eclipse_lunar_buff) or counter(solar) == 1 or counter(lunar) + counter(solar) == 1 or buffpresent(warrior_of_elune) and buffpresent(eclipse_lunar_buff) or buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) } and spell(starfire) or spell(wrath_balance) + unless not checkboxon("no_cds") and cd_condition() and { astralpower() > 90 and { buffpresent(kindred_empowerment_energize) or not iscovenant("kyrian") } or iscovenant("night_fae") or is_aoe() or buffpresent(bloodlust) and buffremaining(bloodlust) < 30 + 9 * equippedruneforge(primordial_arcanic_pulsar_runeforge) + conduitvalue(precise_alignment_conduit) } and not buffpresent(celestial_alignment) and { not iscovenant("night_fae") or not spellcooldown(convoke_the_spirits) > 0 or fightremains() < spellcooldown(convoke_the_spirits) + 6 or fightremains() % 180 < 30 + conduitvalue(precise_alignment_conduit) } and spell(incarnation) or { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and astralpower() >= astralpowercost(fury_of_elune) and buffamount(primordial_arcanic_pulsar_buff) < 240 and { target.debuffpresent(adaptive_swarm_damage) or not iscovenant("necrolord") } and save_for_ca_inc() and spell(fury_of_elune) or buffpresent(oneths_perception_buff) and buffrefreshable(starfall) and spell(starfall) or buffremaining(starlord_buff) < 5 and { buffremaining(eclipse_solar_buff) > 5 or buffremaining(eclipse_lunar_buff) > 5 } and astralpower() > 90 and buffpresent(starlord_buff) and texture(starlord_buff text=cancel) or iscovenant("night_fae") and convoke_desync() and spellcooldown(convoke_the_spirits) < 5 and not checkboxon("no_cds") and spell(starsurge) or hastalent(stellar_drift_talent) and not hastalent(starlord_talent) and buffrefreshable(starfall) and { buffremaining(eclipse_lunar_buff) > 6 and buffpresent(eclipse_lunar_buff) and buffamount(primordial_arcanic_pulsar_buff) < 250 or buffamount(primordial_arcanic_pulsar_buff) >= 250 and astralpower() > 90 or target.debuffremaining(adaptive_swarm_damage) > 8 or inflighttotarget(adaptive_swarm_damage) } and not spellcooldown(celestial_alignment) <= 0 and spell(starfall) or { buffpresent(oneths_clear_vision_buff) or buffpresent(kindred_empowerment_energize) or buffpresent(celestial_alignment) and { buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) or not buffpresent(ravenous_frenzy) and not spellcooldown(ravenous_frenzy) <= 0 or not iscovenant("venthyr") } or astralpower() > 90 and { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } } and spell(starsurge) or hastalent(starlord_talent) and { buffpresent(starlord_buff) or astralpower() > 90 } and buffstacks(starlord_buff) < 3 and { buffpresent(eclipse_solar_buff) or buffpresent(eclipse_lunar_buff) } and buffamount(primordial_arcanic_pulsar_buff) < 270 and { spellcooldown(celestial_alignment) > 10 or not convoke_desync() and iscovenant("night_fae") } and spell(starsurge) or { buffamount(primordial_arcanic_pulsar_buff) < 270 or buffamount(primordial_arcanic_pulsar_buff) < 250 and hastalent(stellar_drift_talent) } and buffremaining(eclipse_solar_buff) > 7 and buffpresent(eclipse_solar_buff) and not buffpresent(oneths_perception_buff) and not hastalent(starlord_talent) and spellcooldown(celestial_alignment) > 7 and { spellcooldown(kindred_spirits) > 7 or not iscovenant("kyrian") } and spell(starsurge) or { buffpresent(eclipse_lunar_buff) or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and save_for_ca_inc() and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(half_moon) and save_for_ca_inc() and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(full_moon) and save_for_ca_inc() and spellknown(full_moon) and spell(full_moon) or spell(warrior_of_elune) or { buffpresent(eclipse_lunar_buff) or eclipsesolarnext() or eclipseanynext() or buffpresent(warrior_of_elune) and buffpresent(eclipse_lunar_buff) or buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) } and spell(starfire) or spell(wrath_balance) { #run_action_list,name=fallthru balancefallthrucdactions() @@ -217,7 +217,7 @@ AddFunction balancestcdactions AddFunction balancestcdpostconditions { - { not target.debuffpresent(adaptive_swarm_damage) and not inflighttotarget(adaptive_swarm_damage) and { not target.debuffpresent(adaptive_swarm) or target.debuffremaining(adaptive_swarm) > 5 } or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 3 and target.debuffpresent(adaptive_swarm_damage) } and spell(adaptive_swarm) or target.refreshable(moonfire_debuff) and target.timetodie() > 12 and { astralpower() >= astralpowercost(moonfire) and dot_requirements() } and spell(moonfire) or target.refreshable(sunfire_debuff) and target.timetodie() > 12 and { astralpower() >= astralpowercost(sunfire) and dot_requirements() } and spell(sunfire) or target.refreshable(stellar_flare) and target.timetodie() > 16 and { astralpower() >= astralpowercost(stellar_flare) and dot_requirements() } and spell(stellar_flare) or astralpower() >= astralpowercost(force_of_nature) and spell(force_of_nature) or { { buffremaining(eclipse_solar_buff) > 10 or buffremaining(eclipse_lunar_buff) > 10 } and spellcooldown(celestial_alignment) > 30 and { buffamount(primordial_arcanic_pulsar_buff) < 240 or not equippedruneforge(primordial_arcanic_pulsar_runeforge) } or buffamount(primordial_arcanic_pulsar_buff) >= 270 or spellcooldown(celestial_alignment) <= 0 and { astralpower() > 90 or is_aoe() } } and spell(kindred_spirits) or not checkboxon("no_cds") and cd_condition() and { astralpower() > 90 and { buffpresent(kindred_empowerment_energize) or not iscovenant("kyrian") } or iscovenant("night_fae") or is_aoe() or buffpresent(bloodlust) and buffremaining(bloodlust) < 30 + 9 * equippedruneforge(primordial_arcanic_pulsar_runeforge) + conduitvalue(precise_alignment_conduit) } and not buffpresent(celestial_alignment) and { not iscovenant("night_fae") or not spellcooldown(convoke_the_spirits) > 0 or fightremains() < spellcooldown(convoke_the_spirits) + 6 or fightremains() % 180 < 30 + conduitvalue(precise_alignment_conduit) } and spell(incarnation) or buffpresent(eclipse_any) and astralpower() >= astralpowercost(fury_of_elune) and buffamount(primordial_arcanic_pulsar_buff) < 240 and { target.debuffpresent(adaptive_swarm_damage) or not iscovenant("necrolord") } and save_for_ca_inc() and spell(fury_of_elune) or buffpresent(oneths_perception_buff) and buffrefreshable(starfall) and spell(starfall) or buffremaining(starlord_buff) < 5 and { buffremaining(eclipse_solar_buff) > 5 or buffremaining(eclipse_lunar_buff) > 5 } and astralpower() > 90 and buffpresent(starlord_buff) and texture(starlord_buff text=cancel) or iscovenant("night_fae") and convoke_desync() and spellcooldown(convoke_the_spirits) < 5 and not checkboxon("no_cds") and spell(starsurge) or hastalent(stellar_drift_talent) and not hastalent(starlord_talent) and buffrefreshable(starfall) and { buffremaining(eclipse_lunar_buff) > 6 and buffpresent(eclipse_lunar_buff) and buffamount(primordial_arcanic_pulsar_buff) < 250 or buffamount(primordial_arcanic_pulsar_buff) >= 250 and astralpower() > 90 or target.debuffremaining(adaptive_swarm_damage) > 8 or inflighttotarget(adaptive_swarm_damage) } and not spellcooldown(celestial_alignment) <= 0 and spell(starfall) or { buffpresent(oneths_clear_vision_buff) or buffpresent(kindred_empowerment_energize) or buffpresent(celestial_alignment) and { buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) or not buffpresent(ravenous_frenzy) and not spellcooldown(ravenous_frenzy) <= 0 or not iscovenant("venthyr") } or astralpower() > 90 and buffpresent(eclipse_any) } and spell(starsurge) or hastalent(starlord_talent) and { buffpresent(starlord_buff) or astralpower() > 90 } and buffstacks(starlord_buff) < 3 and { buffpresent(eclipse_solar_buff) or buffpresent(eclipse_lunar_buff) } and buffamount(primordial_arcanic_pulsar_buff) < 270 and { spellcooldown(celestial_alignment) > 10 or not convoke_desync() and iscovenant("night_fae") } and spell(starsurge) or { buffamount(primordial_arcanic_pulsar_buff) < 270 or buffamount(primordial_arcanic_pulsar_buff) < 250 and hastalent(stellar_drift_talent) } and buffremaining(eclipse_solar_buff) > 7 and buffpresent(eclipse_solar_buff) and not buffpresent(oneths_perception_buff) and not hastalent(starlord_talent) and spellcooldown(celestial_alignment) > 7 and { spellcooldown(kindred_spirits) > 7 or not iscovenant("kyrian") } and spell(starsurge) or { buffpresent(eclipse_lunar_buff) or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and save_for_ca_inc() and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(half_moon) and save_for_ca_inc() and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(full_moon) and save_for_ca_inc() and spellknown(full_moon) and spell(full_moon) or spell(warrior_of_elune) or { buffpresent(eclipse_lunar_buff) or counter(solar) == 1 or counter(lunar) + counter(solar) == 1 or buffpresent(warrior_of_elune) and buffpresent(eclipse_lunar_buff) or buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) } and spell(starfire) or spell(wrath_balance) or balancefallthrucdpostconditions() + { not target.debuffpresent(adaptive_swarm_damage) and not inflighttotarget(adaptive_swarm_damage) and { not target.debuffpresent(adaptive_swarm) or target.debuffremaining(adaptive_swarm) > 5 } or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 3 and target.debuffpresent(adaptive_swarm_damage) } and spell(adaptive_swarm) or target.refreshable(moonfire_debuff) and target.timetodie() > 12 and { astralpower() >= astralpowercost(moonfire) and dot_requirements() } and spell(moonfire) or target.refreshable(sunfire_debuff) and target.timetodie() > 12 and { astralpower() >= astralpowercost(sunfire) and dot_requirements() } and spell(sunfire) or target.refreshable(stellar_flare) and target.timetodie() > 16 and { astralpower() >= astralpowercost(stellar_flare) and dot_requirements() } and spell(stellar_flare) or astralpower() >= astralpowercost(force_of_nature) and spell(force_of_nature) or { { buffremaining(eclipse_solar_buff) > 10 or buffremaining(eclipse_lunar_buff) > 10 } and spellcooldown(celestial_alignment) > 30 and { buffamount(primordial_arcanic_pulsar_buff) < 240 or not equippedruneforge(primordial_arcanic_pulsar_runeforge) } or buffamount(primordial_arcanic_pulsar_buff) >= 270 or spellcooldown(celestial_alignment) <= 0 and { astralpower() > 90 or is_aoe() } } and spell(kindred_spirits) or not checkboxon("no_cds") and cd_condition() and { astralpower() > 90 and { buffpresent(kindred_empowerment_energize) or not iscovenant("kyrian") } or iscovenant("night_fae") or is_aoe() or buffpresent(bloodlust) and buffremaining(bloodlust) < 30 + 9 * equippedruneforge(primordial_arcanic_pulsar_runeforge) + conduitvalue(precise_alignment_conduit) } and not buffpresent(celestial_alignment) and { not iscovenant("night_fae") or not spellcooldown(convoke_the_spirits) > 0 or fightremains() < spellcooldown(convoke_the_spirits) + 6 or fightremains() % 180 < 30 + conduitvalue(precise_alignment_conduit) } and spell(incarnation) or { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and astralpower() >= astralpowercost(fury_of_elune) and buffamount(primordial_arcanic_pulsar_buff) < 240 and { target.debuffpresent(adaptive_swarm_damage) or not iscovenant("necrolord") } and save_for_ca_inc() and spell(fury_of_elune) or buffpresent(oneths_perception_buff) and buffrefreshable(starfall) and spell(starfall) or buffremaining(starlord_buff) < 5 and { buffremaining(eclipse_solar_buff) > 5 or buffremaining(eclipse_lunar_buff) > 5 } and astralpower() > 90 and buffpresent(starlord_buff) and texture(starlord_buff text=cancel) or iscovenant("night_fae") and convoke_desync() and spellcooldown(convoke_the_spirits) < 5 and not checkboxon("no_cds") and spell(starsurge) or hastalent(stellar_drift_talent) and not hastalent(starlord_talent) and buffrefreshable(starfall) and { buffremaining(eclipse_lunar_buff) > 6 and buffpresent(eclipse_lunar_buff) and buffamount(primordial_arcanic_pulsar_buff) < 250 or buffamount(primordial_arcanic_pulsar_buff) >= 250 and astralpower() > 90 or target.debuffremaining(adaptive_swarm_damage) > 8 or inflighttotarget(adaptive_swarm_damage) } and not spellcooldown(celestial_alignment) <= 0 and spell(starfall) or { buffpresent(oneths_clear_vision_buff) or buffpresent(kindred_empowerment_energize) or buffpresent(celestial_alignment) and { buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) or not buffpresent(ravenous_frenzy) and not spellcooldown(ravenous_frenzy) <= 0 or not iscovenant("venthyr") } or astralpower() > 90 and { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } } and spell(starsurge) or hastalent(starlord_talent) and { buffpresent(starlord_buff) or astralpower() > 90 } and buffstacks(starlord_buff) < 3 and { buffpresent(eclipse_solar_buff) or buffpresent(eclipse_lunar_buff) } and buffamount(primordial_arcanic_pulsar_buff) < 270 and { spellcooldown(celestial_alignment) > 10 or not convoke_desync() and iscovenant("night_fae") } and spell(starsurge) or { buffamount(primordial_arcanic_pulsar_buff) < 270 or buffamount(primordial_arcanic_pulsar_buff) < 250 and hastalent(stellar_drift_talent) } and buffremaining(eclipse_solar_buff) > 7 and buffpresent(eclipse_solar_buff) and not buffpresent(oneths_perception_buff) and not hastalent(starlord_talent) and spellcooldown(celestial_alignment) > 7 and { spellcooldown(kindred_spirits) > 7 or not iscovenant("kyrian") } and spell(starsurge) or { buffpresent(eclipse_lunar_buff) or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and save_for_ca_inc() and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(half_moon) and save_for_ca_inc() and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(full_moon) and save_for_ca_inc() and spellknown(full_moon) and spell(full_moon) or spell(warrior_of_elune) or { buffpresent(eclipse_lunar_buff) or eclipsesolarnext() or eclipseanynext() or buffpresent(warrior_of_elune) and buffpresent(eclipse_lunar_buff) or buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) } and spell(starfire) or spell(wrath_balance) or balancefallthrucdpostconditions() } ### actions.precombat @@ -324,7 +324,7 @@ AddFunction balancedreambindermainactions #full_moon,if=(buff.eclipse_lunar.up&!covenant.kyrian|(buff.kindred_empowerment_energize.up&covenant.kyrian)|(charges=2&recharge_time<5)|charges=3|buff.ca_inc.up)&ap_check&variable.save_for_ca_inc if { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(full_moon) and save_for_ca_inc() and spellknown(full_moon) spell(full_moon) #starfire,if=eclipse.in_lunar|eclipse.solar_next|eclipse.any_next|buff.warrior_of_elune.up&buff.eclipse_lunar.up|(buff.ca_inc.remains= astralpowercost(fury_of_elune) and { target.debuffpresent(adaptive_swarm_damage) or not iscovenant("necrolord") } and save_for_ca_inc() spell(fury_of_elune) + if { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and astralpower() >= astralpowercost(fury_of_elune) and { target.debuffpresent(adaptive_swarm_damage) or not iscovenant("necrolord") } and save_for_ca_inc() spell(fury_of_elune) unless iscovenant("night_fae") and convoke_desync() and astralpower() >= 40 and spellcooldown(convoke_the_spirits) < gcd() * { astralpower() / 30 } and not checkboxon("no_cds") and spell(starsurge) or { buffpresent(eclipse_lunar_buff) or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and save_for_ca_inc() and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(half_moon) and save_for_ca_inc() and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(full_moon) and save_for_ca_inc() and spellknown(full_moon) and spell(full_moon) { #warrior_of_elune spell(warrior_of_elune) - unless { buffpresent(eclipse_lunar_buff) or counter(solar) == 1 or counter(lunar) + counter(solar) == 1 or buffpresent(warrior_of_elune) and buffpresent(eclipse_lunar_buff) or buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) } and spell(starfire) or spell(wrath_balance) + unless { buffpresent(eclipse_lunar_buff) or eclipsesolarnext() or eclipseanynext() or buffpresent(warrior_of_elune) and buffpresent(eclipse_lunar_buff) or buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) } and spell(starfire) or spell(wrath_balance) { #run_action_list,name=fallthru balancefallthrushortcdactions() @@ -366,7 +366,7 @@ AddFunction balancedreambindershortcdactions AddFunction balancedreambindershortcdpostconditions { - { not safe_to_use_spell() or buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) or astralpower() > 90 } and spell(starsurge) or { not target.debuffpresent(adaptive_swarm_damage) and not inflighttotarget(adaptive_swarm_damage) and { not target.debuffpresent(adaptive_swarm) or target.debuffremaining(adaptive_swarm) > 5 } or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 3 and target.debuffpresent(adaptive_swarm_damage) } and spell(adaptive_swarm) or target.refreshable(moonfire_debuff) and target.timetodie() > 12 and { { buffremaining(celestial_alignment) > 5 and { buffremaining(ravenous_frenzy) > 5 or not buffpresent(ravenous_frenzy) } or not buffpresent(celestial_alignment) or astralpower() < 30 } and { not buffpresent(kindred_empowerment_energize) or astralpower() < 30 } and astralpower() >= astralpowercost(moonfire) } and spell(moonfire) or target.refreshable(sunfire_debuff) and target.timetodie() > 12 and { { buffremaining(celestial_alignment) > 5 and { buffremaining(ravenous_frenzy) > 5 or not buffpresent(ravenous_frenzy) } or not buffpresent(celestial_alignment) or astralpower() < 30 } and { not buffpresent(kindred_empowerment_energize) or astralpower() < 30 } and astralpower() >= astralpowercost(sunfire) } and spell(sunfire) or target.refreshable(stellar_flare) and target.timetodie() > 16 and { { buffremaining(celestial_alignment) > 5 and { buffremaining(ravenous_frenzy) > 5 or not buffpresent(ravenous_frenzy) } or not buffpresent(celestial_alignment) or astralpower() < 30 } and { not buffpresent(kindred_empowerment_energize) or astralpower() < 30 } and astralpower() >= astralpowercost(stellar_flare) } and spell(stellar_flare) or { { buffremaining(eclipse_solar_buff) > 10 or buffremaining(eclipse_lunar_buff) > 10 } and spellcooldown(celestial_alignment) > 30 or spellcooldown(celestial_alignment) <= 0 } and spell(kindred_spirits) or not checkboxon("no_cds") and cd_condition() and { buffpresent(kindred_empowerment_energize) or not iscovenant("kyrian") or iscovenant("night_fae") or is_aoe() or buffpresent(bloodlust) and buffremaining(bloodlust) < 30 + conduitvalue(precise_alignment_conduit) } and not buffpresent(celestial_alignment) and { not iscovenant("night_fae") or not spellcooldown(convoke_the_spirits) > 0 or fightremains() < spellcooldown(convoke_the_spirits) + 6 or fightremains() % 180 < 30 + conduitvalue(precise_alignment_conduit) } and spell(incarnation) or iscovenant("night_fae") and convoke_desync() and astralpower() >= 40 and spellcooldown(convoke_the_spirits) < gcd() * { astralpower() / 30 } and not checkboxon("no_cds") and spell(starsurge) or { buffpresent(eclipse_lunar_buff) or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and save_for_ca_inc() and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(half_moon) and save_for_ca_inc() and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(full_moon) and save_for_ca_inc() and spellknown(full_moon) and spell(full_moon) or { buffpresent(eclipse_lunar_buff) or counter(solar) == 1 or counter(lunar) + counter(solar) == 1 or buffpresent(warrior_of_elune) and buffpresent(eclipse_lunar_buff) or buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) } and spell(starfire) or spell(wrath_balance) or balancefallthrushortcdpostconditions() + { not safe_to_use_spell() or buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) or astralpower() > 90 } and spell(starsurge) or { not target.debuffpresent(adaptive_swarm_damage) and not inflighttotarget(adaptive_swarm_damage) and { not target.debuffpresent(adaptive_swarm) or target.debuffremaining(adaptive_swarm) > 5 } or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 3 and target.debuffpresent(adaptive_swarm_damage) } and spell(adaptive_swarm) or target.refreshable(moonfire_debuff) and target.timetodie() > 12 and { { buffremaining(celestial_alignment) > 5 and { buffremaining(ravenous_frenzy) > 5 or not buffpresent(ravenous_frenzy) } or not buffpresent(celestial_alignment) or astralpower() < 30 } and { not buffpresent(kindred_empowerment_energize) or astralpower() < 30 } and astralpower() >= astralpowercost(moonfire) } and spell(moonfire) or target.refreshable(sunfire_debuff) and target.timetodie() > 12 and { { buffremaining(celestial_alignment) > 5 and { buffremaining(ravenous_frenzy) > 5 or not buffpresent(ravenous_frenzy) } or not buffpresent(celestial_alignment) or astralpower() < 30 } and { not buffpresent(kindred_empowerment_energize) or astralpower() < 30 } and astralpower() >= astralpowercost(sunfire) } and spell(sunfire) or target.refreshable(stellar_flare) and target.timetodie() > 16 and { { buffremaining(celestial_alignment) > 5 and { buffremaining(ravenous_frenzy) > 5 or not buffpresent(ravenous_frenzy) } or not buffpresent(celestial_alignment) or astralpower() < 30 } and { not buffpresent(kindred_empowerment_energize) or astralpower() < 30 } and astralpower() >= astralpowercost(stellar_flare) } and spell(stellar_flare) or { { buffremaining(eclipse_solar_buff) > 10 or buffremaining(eclipse_lunar_buff) > 10 } and spellcooldown(celestial_alignment) > 30 or spellcooldown(celestial_alignment) <= 0 } and spell(kindred_spirits) or not checkboxon("no_cds") and cd_condition() and { buffpresent(kindred_empowerment_energize) or not iscovenant("kyrian") or iscovenant("night_fae") or is_aoe() or buffpresent(bloodlust) and buffremaining(bloodlust) < 30 + conduitvalue(precise_alignment_conduit) } and not buffpresent(celestial_alignment) and { not iscovenant("night_fae") or not spellcooldown(convoke_the_spirits) > 0 or fightremains() < spellcooldown(convoke_the_spirits) + 6 or fightremains() % 180 < 30 + conduitvalue(precise_alignment_conduit) } and spell(incarnation) or iscovenant("night_fae") and convoke_desync() and astralpower() >= 40 and spellcooldown(convoke_the_spirits) < gcd() * { astralpower() / 30 } and not checkboxon("no_cds") and spell(starsurge) or { buffpresent(eclipse_lunar_buff) or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and save_for_ca_inc() and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(half_moon) and save_for_ca_inc() and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(full_moon) and save_for_ca_inc() and spellknown(full_moon) and spell(full_moon) or { buffpresent(eclipse_lunar_buff) or eclipsesolarnext() or eclipseanynext() or buffpresent(warrior_of_elune) and buffpresent(eclipse_lunar_buff) or buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) } and spell(starfire) or spell(wrath_balance) or balancefallthrushortcdpostconditions() } AddFunction balancedreambindercdactions @@ -386,7 +386,7 @@ AddFunction balancedreambindercdactions #celestial_alignment,if=!druid.no_cds&variable.cd_condition&((buff.kindred_empowerment_energize.up|!covenant.kyrian)|covenant.night_fae|variable.is_aoe|buff.bloodlust.up&buff.bloodlust.remains<20+(conduit.precise_alignment.time_value))&!buff.ca_inc.up&(!covenant.night_fae|cooldown.convoke_the_spirits.up|interpolated_fight_remains 0 or fightremains() < spellcooldown(convoke_the_spirits) + 6 or fightremains() % 180 < 20 + conduitvalue(precise_alignment_conduit) } spell(celestial_alignment) - unless not checkboxon("no_cds") and cd_condition() and { buffpresent(kindred_empowerment_energize) or not iscovenant("kyrian") or iscovenant("night_fae") or is_aoe() or buffpresent(bloodlust) and buffremaining(bloodlust) < 30 + conduitvalue(precise_alignment_conduit) } and not buffpresent(celestial_alignment) and { not iscovenant("night_fae") or not spellcooldown(convoke_the_spirits) > 0 or fightremains() < spellcooldown(convoke_the_spirits) + 6 or fightremains() % 180 < 30 + conduitvalue(precise_alignment_conduit) } and spell(incarnation) or buffpresent(eclipse_any) and astralpower() >= astralpowercost(fury_of_elune) and { target.debuffpresent(adaptive_swarm_damage) or not iscovenant("necrolord") } and save_for_ca_inc() and spell(fury_of_elune) or iscovenant("night_fae") and convoke_desync() and astralpower() >= 40 and spellcooldown(convoke_the_spirits) < gcd() * { astralpower() / 30 } and not checkboxon("no_cds") and spell(starsurge) or { buffpresent(eclipse_lunar_buff) or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and save_for_ca_inc() and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(half_moon) and save_for_ca_inc() and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(full_moon) and save_for_ca_inc() and spellknown(full_moon) and spell(full_moon) or spell(warrior_of_elune) or { buffpresent(eclipse_lunar_buff) or counter(solar) == 1 or counter(lunar) + counter(solar) == 1 or buffpresent(warrior_of_elune) and buffpresent(eclipse_lunar_buff) or buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) } and spell(starfire) or spell(wrath_balance) + unless not checkboxon("no_cds") and cd_condition() and { buffpresent(kindred_empowerment_energize) or not iscovenant("kyrian") or iscovenant("night_fae") or is_aoe() or buffpresent(bloodlust) and buffremaining(bloodlust) < 30 + conduitvalue(precise_alignment_conduit) } and not buffpresent(celestial_alignment) and { not iscovenant("night_fae") or not spellcooldown(convoke_the_spirits) > 0 or fightremains() < spellcooldown(convoke_the_spirits) + 6 or fightremains() % 180 < 30 + conduitvalue(precise_alignment_conduit) } and spell(incarnation) or { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and astralpower() >= astralpowercost(fury_of_elune) and { target.debuffpresent(adaptive_swarm_damage) or not iscovenant("necrolord") } and save_for_ca_inc() and spell(fury_of_elune) or iscovenant("night_fae") and convoke_desync() and astralpower() >= 40 and spellcooldown(convoke_the_spirits) < gcd() * { astralpower() / 30 } and not checkboxon("no_cds") and spell(starsurge) or { buffpresent(eclipse_lunar_buff) or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and save_for_ca_inc() and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(half_moon) and save_for_ca_inc() and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(full_moon) and save_for_ca_inc() and spellknown(full_moon) and spell(full_moon) or spell(warrior_of_elune) or { buffpresent(eclipse_lunar_buff) or eclipsesolarnext() or eclipseanynext() or buffpresent(warrior_of_elune) and buffpresent(eclipse_lunar_buff) or buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) } and spell(starfire) or spell(wrath_balance) { #run_action_list,name=fallthru balancefallthrucdactions() @@ -398,7 +398,7 @@ AddFunction balancedreambindercdactions AddFunction balancedreambindercdpostconditions { - { not safe_to_use_spell() or buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) or astralpower() > 90 } and spell(starsurge) or { not target.debuffpresent(adaptive_swarm_damage) and not inflighttotarget(adaptive_swarm_damage) and { not target.debuffpresent(adaptive_swarm) or target.debuffremaining(adaptive_swarm) > 5 } or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 3 and target.debuffpresent(adaptive_swarm_damage) } and spell(adaptive_swarm) or target.refreshable(moonfire_debuff) and target.timetodie() > 12 and { { buffremaining(celestial_alignment) > 5 and { buffremaining(ravenous_frenzy) > 5 or not buffpresent(ravenous_frenzy) } or not buffpresent(celestial_alignment) or astralpower() < 30 } and { not buffpresent(kindred_empowerment_energize) or astralpower() < 30 } and astralpower() >= astralpowercost(moonfire) } and spell(moonfire) or target.refreshable(sunfire_debuff) and target.timetodie() > 12 and { { buffremaining(celestial_alignment) > 5 and { buffremaining(ravenous_frenzy) > 5 or not buffpresent(ravenous_frenzy) } or not buffpresent(celestial_alignment) or astralpower() < 30 } and { not buffpresent(kindred_empowerment_energize) or astralpower() < 30 } and astralpower() >= astralpowercost(sunfire) } and spell(sunfire) or target.refreshable(stellar_flare) and target.timetodie() > 16 and { { buffremaining(celestial_alignment) > 5 and { buffremaining(ravenous_frenzy) > 5 or not buffpresent(ravenous_frenzy) } or not buffpresent(celestial_alignment) or astralpower() < 30 } and { not buffpresent(kindred_empowerment_energize) or astralpower() < 30 } and astralpower() >= astralpowercost(stellar_flare) } and spell(stellar_flare) or astralpower() >= astralpowercost(force_of_nature) and spell(force_of_nature) or { { buffremaining(eclipse_solar_buff) > 10 or buffremaining(eclipse_lunar_buff) > 10 } and spellcooldown(celestial_alignment) > 30 or spellcooldown(celestial_alignment) <= 0 } and spell(kindred_spirits) or not checkboxon("no_cds") and cd_condition() and { buffpresent(kindred_empowerment_energize) or not iscovenant("kyrian") or iscovenant("night_fae") or is_aoe() or buffpresent(bloodlust) and buffremaining(bloodlust) < 30 + conduitvalue(precise_alignment_conduit) } and not buffpresent(celestial_alignment) and { not iscovenant("night_fae") or not spellcooldown(convoke_the_spirits) > 0 or fightremains() < spellcooldown(convoke_the_spirits) + 6 or fightremains() % 180 < 30 + conduitvalue(precise_alignment_conduit) } and spell(incarnation) or buffpresent(eclipse_any) and astralpower() >= astralpowercost(fury_of_elune) and { target.debuffpresent(adaptive_swarm_damage) or not iscovenant("necrolord") } and save_for_ca_inc() and spell(fury_of_elune) or iscovenant("night_fae") and convoke_desync() and astralpower() >= 40 and spellcooldown(convoke_the_spirits) < gcd() * { astralpower() / 30 } and not checkboxon("no_cds") and spell(starsurge) or { buffpresent(eclipse_lunar_buff) or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and save_for_ca_inc() and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(half_moon) and save_for_ca_inc() and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(full_moon) and save_for_ca_inc() and spellknown(full_moon) and spell(full_moon) or spell(warrior_of_elune) or { buffpresent(eclipse_lunar_buff) or counter(solar) == 1 or counter(lunar) + counter(solar) == 1 or buffpresent(warrior_of_elune) and buffpresent(eclipse_lunar_buff) or buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) } and spell(starfire) or spell(wrath_balance) or balancefallthrucdpostconditions() + { not safe_to_use_spell() or buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) or astralpower() > 90 } and spell(starsurge) or { not target.debuffpresent(adaptive_swarm_damage) and not inflighttotarget(adaptive_swarm_damage) and { not target.debuffpresent(adaptive_swarm) or target.debuffremaining(adaptive_swarm) > 5 } or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 3 and target.debuffpresent(adaptive_swarm_damage) } and spell(adaptive_swarm) or target.refreshable(moonfire_debuff) and target.timetodie() > 12 and { { buffremaining(celestial_alignment) > 5 and { buffremaining(ravenous_frenzy) > 5 or not buffpresent(ravenous_frenzy) } or not buffpresent(celestial_alignment) or astralpower() < 30 } and { not buffpresent(kindred_empowerment_energize) or astralpower() < 30 } and astralpower() >= astralpowercost(moonfire) } and spell(moonfire) or target.refreshable(sunfire_debuff) and target.timetodie() > 12 and { { buffremaining(celestial_alignment) > 5 and { buffremaining(ravenous_frenzy) > 5 or not buffpresent(ravenous_frenzy) } or not buffpresent(celestial_alignment) or astralpower() < 30 } and { not buffpresent(kindred_empowerment_energize) or astralpower() < 30 } and astralpower() >= astralpowercost(sunfire) } and spell(sunfire) or target.refreshable(stellar_flare) and target.timetodie() > 16 and { { buffremaining(celestial_alignment) > 5 and { buffremaining(ravenous_frenzy) > 5 or not buffpresent(ravenous_frenzy) } or not buffpresent(celestial_alignment) or astralpower() < 30 } and { not buffpresent(kindred_empowerment_energize) or astralpower() < 30 } and astralpower() >= astralpowercost(stellar_flare) } and spell(stellar_flare) or astralpower() >= astralpowercost(force_of_nature) and spell(force_of_nature) or { { buffremaining(eclipse_solar_buff) > 10 or buffremaining(eclipse_lunar_buff) > 10 } and spellcooldown(celestial_alignment) > 30 or spellcooldown(celestial_alignment) <= 0 } and spell(kindred_spirits) or not checkboxon("no_cds") and cd_condition() and { buffpresent(kindred_empowerment_energize) or not iscovenant("kyrian") or iscovenant("night_fae") or is_aoe() or buffpresent(bloodlust) and buffremaining(bloodlust) < 30 + conduitvalue(precise_alignment_conduit) } and not buffpresent(celestial_alignment) and { not iscovenant("night_fae") or not spellcooldown(convoke_the_spirits) > 0 or fightremains() < spellcooldown(convoke_the_spirits) + 6 or fightremains() % 180 < 30 + conduitvalue(precise_alignment_conduit) } and spell(incarnation) or { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and astralpower() >= astralpowercost(fury_of_elune) and { target.debuffpresent(adaptive_swarm_damage) or not iscovenant("necrolord") } and save_for_ca_inc() and spell(fury_of_elune) or iscovenant("night_fae") and convoke_desync() and astralpower() >= 40 and spellcooldown(convoke_the_spirits) < gcd() * { astralpower() / 30 } and not checkboxon("no_cds") and spell(starsurge) or { buffpresent(eclipse_lunar_buff) or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and save_for_ca_inc() and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(half_moon) and save_for_ca_inc() and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_lunar_buff) and not iscovenant("kyrian") or buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 or buffpresent(celestial_alignment) } and astralpower() >= astralpowercost(full_moon) and save_for_ca_inc() and spellknown(full_moon) and spell(full_moon) or spell(warrior_of_elune) or { buffpresent(eclipse_lunar_buff) or eclipsesolarnext() or eclipseanynext() or buffpresent(warrior_of_elune) and buffpresent(eclipse_lunar_buff) or buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) } and spell(starfire) or spell(wrath_balance) or balancefallthrucdpostconditions() } ### actions.boat @@ -422,12 +422,12 @@ AddFunction balanceboatmainactions #stellar_flare,target_if=refreshable&target.time_to_die>16+remains,if=ap_check&variable.dot_requirements if target.refreshable(stellar_flare) and target.timetodie() > 16 + target.debuffremaining(stellar_flare) and { astralpower() >= astralpowercost(stellar_flare) and dot_requirements() } spell(stellar_flare) #kindred_spirits,if=(eclipse.lunar_next|eclipse.solar_next|eclipse.any_next|buff.balance_of_all_things_nature.remains>4.5|buff.balance_of_all_things_arcane.remains>4.5|astral_power>90&cooldown.ca_inc.ready&!druid.no_cds)&(cooldown.ca_inc.remains>30|cooldown.ca_inc.ready)|interpolated_fight_remains<10 - if { counter(lunar) == 1 or counter(solar) == 1 or counter(lunar) + counter(solar) == 1 or buffremaining(balance_of_all_things_nature_buff) > 4.5 or buffremaining(balance_of_all_things_arcane_buff) > 4.5 or astralpower() > 90 and spellcooldown(celestial_alignment) <= 0 and not checkboxon("no_cds") } and { spellcooldown(celestial_alignment) > 30 or spellcooldown(celestial_alignment) <= 0 } or fightremains() < 10 spell(kindred_spirits) + if { eclipselunarnext() or eclipsesolarnext() or eclipseanynext() or buffremaining(balance_of_all_things_nature_buff) > 4.5 or buffremaining(balance_of_all_things_arcane_buff) > 4.5 or astralpower() > 90 and spellcooldown(celestial_alignment) <= 0 and not checkboxon("no_cds") } and { spellcooldown(celestial_alignment) > 30 or spellcooldown(celestial_alignment) <= 0 } or fightremains() < 10 spell(kindred_spirits) #incarnation,if=!druid.no_cds&variable.cd_condition&((astral_power>90&(buff.kindred_empowerment_energize.up|!covenant.kyrian)|buff.bloodlust.up&buff.bloodlust.remains<30+(conduit.precise_alignment.time_value))|interpolated_fight_remains<30+(conduit.precise_alignment.time_value)|covenant.night_fae)&(!covenant.night_fae|variable.convoke_desync|cooldown.convoke_the_spirits.ready) if not checkboxon("no_cds") and cd_condition() and { astralpower() > 90 and { buffpresent(kindred_empowerment_energize) or not iscovenant("kyrian") } or buffpresent(bloodlust) and buffremaining(bloodlust) < 30 + conduitvalue(precise_alignment_conduit) or fightremains() < 30 + conduitvalue(precise_alignment_conduit) or iscovenant("night_fae") } and { not iscovenant("night_fae") or convoke_desync() or spellcooldown(convoke_the_spirits) <= 0 } spell(incarnation) #variable,name=aspPerSec,value=eclipse.in_lunar*8%action.starfire.execute_time+!eclipse.in_lunar*6%action.wrath.execute_time+0.2%spell_haste #starsurge,if=(interpolated_fight_remains<4|(buff.ravenous_frenzy.remains120|astral_power+variable.aspPerSec*buff.eclipse_lunar.remains+dot.fury_of_elune.ticks_remain*2.5>120)&eclipse.in_any&(!buff.ca_inc.up|!talent.starlord.enabled)&((!cooldown.ca_inc.up|covenant.kyrian&!cooldown.empower_bond.up)|covenant.night_fae)&(!covenant.venthyr|!buff.ca_inc.up|astral_power>90)|(talent.starlord.enabled&buff.ca_inc.up&(buff.starlord.stack<3|astral_power>90))|buff.ca_inc.remains>8&!buff.ravenous_frenzy.up&!talent.starlord.enabled - if fightremains() < 4 or buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) or { astralpower() + aspPerSec() * buffremaining(eclipse_solar_buff) + target.ticksremaining(fury_of_elune) * 2.5 > 120 or astralpower() + aspPerSec() * buffremaining(eclipse_lunar_buff) + target.ticksremaining(fury_of_elune) * 2.5 > 120 } and buffpresent(eclipse_any) and { not buffpresent(celestial_alignment) or not hastalent(starlord_talent) } and { not { not spellcooldown(celestial_alignment) > 0 } or iscovenant("kyrian") and not { not spellcooldown(empower_bond) > 0 } or iscovenant("night_fae") } and { not iscovenant("venthyr") or not buffpresent(celestial_alignment) or astralpower() > 90 } or hastalent(starlord_talent) and buffpresent(celestial_alignment) and { buffstacks(starlord_buff) < 3 or astralpower() > 90 } or buffremaining(celestial_alignment) > 8 and not buffpresent(ravenous_frenzy) and not hastalent(starlord_talent) spell(starsurge) + if fightremains() < 4 or buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) or { astralpower() + aspPerSec() * buffremaining(eclipse_solar_buff) + target.ticksremaining(fury_of_elune) * 2.5 > 120 or astralpower() + aspPerSec() * buffremaining(eclipse_lunar_buff) + target.ticksremaining(fury_of_elune) * 2.5 > 120 } and { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and { not buffpresent(celestial_alignment) or not hastalent(starlord_talent) } and { not { not spellcooldown(celestial_alignment) > 0 } or iscovenant("kyrian") and not { not spellcooldown(empower_bond) > 0 } or iscovenant("night_fae") } and { not iscovenant("venthyr") or not buffpresent(celestial_alignment) or astralpower() > 90 } or hastalent(starlord_talent) and buffpresent(celestial_alignment) and { buffstacks(starlord_buff) < 3 or astralpower() > 90 } or buffremaining(celestial_alignment) > 8 and not buffpresent(ravenous_frenzy) and not hastalent(starlord_talent) spell(starsurge) #new_moon,if=(buff.eclipse_lunar.up|(charges=2&recharge_time<5)|charges=3)&ap_check if { buffpresent(eclipse_lunar_buff) or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and { not spellknown(half_moon) and not spellknown(full_moon) } spell(new_moon) #half_moon,if=(buff.eclipse_lunar.up|(charges=2&recharge_time<5)|charges=3)&ap_check @@ -435,7 +435,7 @@ AddFunction balanceboatmainactions #full_moon,if=(buff.eclipse_lunar.up|(charges=2&recharge_time<5)|charges=3)&ap_check if { buffpresent(eclipse_lunar_buff) or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 } and astralpower() >= astralpowercost(full_moon) and spellknown(full_moon) spell(full_moon) #starfire,if=eclipse.in_lunar|eclipse.solar_next|eclipse.any_next|buff.warrior_of_elune.up&buff.eclipse_lunar.up|(buff.ca_inc.remains= astralpowercost(force_of_nature) spell(force_of_nature) #fury_of_elune,if=(eclipse.in_any|eclipse.solar_in_1|eclipse.lunar_in_1)&(!covenant.night_fae|druid.no_cds|(astral_power<95&(variable.critnotup|astral_power<30|variable.is_aoe)&(variable.convoke_desync&!cooldown.convoke_the_spirits.up|!variable.convoke_desync&!cooldown.ca_inc.up)))&(cooldown.ca_inc.remains>30|druid.no_cds|astral_power>90&cooldown.ca_inc.up&(cooldown.empower_bond.remains4|!covenant.necrolord) - if { buffpresent(eclipse_any) or counter(solar) == 1 or counter(lunar) == 1 } and { not iscovenant("night_fae") or checkboxon("no_cds") or astralpower() < 95 and { critnotup() or astralpower() < 30 or is_aoe() } and { convoke_desync() and not { not spellcooldown(convoke_the_spirits) > 0 } or not convoke_desync() and not { not spellcooldown(celestial_alignment) > 0 } } } and { spellcooldown(celestial_alignment) > 30 or checkboxon("no_cds") or astralpower() > 90 and not spellcooldown(celestial_alignment) > 0 and { spellcooldown(empower_bond) < executetime(starfire) or not iscovenant("kyrian") } or fightremains() < 10 } and { target.debuffremaining(adaptive_swarm_damage) > 4 or not iscovenant("necrolord") } spell(fury_of_elune) + if { { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } or eclipsesolarin() == 1 or eclipselunarin() == 1 } and { not iscovenant("night_fae") or checkboxon("no_cds") or astralpower() < 95 and { critnotup() or astralpower() < 30 or is_aoe() } and { convoke_desync() and not { not spellcooldown(convoke_the_spirits) > 0 } or not convoke_desync() and not { not spellcooldown(celestial_alignment) > 0 } } } and { spellcooldown(celestial_alignment) > 30 or checkboxon("no_cds") or astralpower() > 90 and not spellcooldown(celestial_alignment) > 0 and { spellcooldown(empower_bond) < executetime(starfire) or not iscovenant("kyrian") } or fightremains() < 10 } and { target.debuffremaining(adaptive_swarm_damage) > 4 or not iscovenant("necrolord") } spell(fury_of_elune) - unless { { counter(lunar) == 1 or counter(solar) == 1 or counter(lunar) + counter(solar) == 1 or buffremaining(balance_of_all_things_nature_buff) > 4.5 or buffremaining(balance_of_all_things_arcane_buff) > 4.5 or astralpower() > 90 and spellcooldown(celestial_alignment) <= 0 and not checkboxon("no_cds") } and { spellcooldown(celestial_alignment) > 30 or spellcooldown(celestial_alignment) <= 0 } or fightremains() < 10 } and spell(kindred_spirits) or not checkboxon("no_cds") and cd_condition() and { astralpower() > 90 and { buffpresent(kindred_empowerment_energize) or not iscovenant("kyrian") } or buffpresent(bloodlust) and buffremaining(bloodlust) < 30 + conduitvalue(precise_alignment_conduit) or fightremains() < 30 + conduitvalue(precise_alignment_conduit) or iscovenant("night_fae") } and { not iscovenant("night_fae") or convoke_desync() or spellcooldown(convoke_the_spirits) <= 0 } and spell(incarnation) or { fightremains() < 4 or buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) or { astralpower() + aspPerSec() * buffremaining(eclipse_solar_buff) + target.ticksremaining(fury_of_elune) * 2.5 > 120 or astralpower() + aspPerSec() * buffremaining(eclipse_lunar_buff) + target.ticksremaining(fury_of_elune) * 2.5 > 120 } and buffpresent(eclipse_any) and { not buffpresent(celestial_alignment) or not hastalent(starlord_talent) } and { not { not spellcooldown(celestial_alignment) > 0 } or iscovenant("kyrian") and not { not spellcooldown(empower_bond) > 0 } or iscovenant("night_fae") } and { not iscovenant("venthyr") or not buffpresent(celestial_alignment) or astralpower() > 90 } or hastalent(starlord_talent) and buffpresent(celestial_alignment) and { buffstacks(starlord_buff) < 3 or astralpower() > 90 } or buffremaining(celestial_alignment) > 8 and not buffpresent(ravenous_frenzy) and not hastalent(starlord_talent) } and spell(starsurge) or { buffpresent(eclipse_lunar_buff) or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_lunar_buff) or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 } and astralpower() >= astralpowercost(half_moon) and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_lunar_buff) or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 } and astralpower() >= astralpowercost(full_moon) and spellknown(full_moon) and spell(full_moon) + unless { { eclipselunarnext() or eclipsesolarnext() or eclipseanynext() or buffremaining(balance_of_all_things_nature_buff) > 4.5 or buffremaining(balance_of_all_things_arcane_buff) > 4.5 or astralpower() > 90 and spellcooldown(celestial_alignment) <= 0 and not checkboxon("no_cds") } and { spellcooldown(celestial_alignment) > 30 or spellcooldown(celestial_alignment) <= 0 } or fightremains() < 10 } and spell(kindred_spirits) or not checkboxon("no_cds") and cd_condition() and { astralpower() > 90 and { buffpresent(kindred_empowerment_energize) or not iscovenant("kyrian") } or buffpresent(bloodlust) and buffremaining(bloodlust) < 30 + conduitvalue(precise_alignment_conduit) or fightremains() < 30 + conduitvalue(precise_alignment_conduit) or iscovenant("night_fae") } and { not iscovenant("night_fae") or convoke_desync() or spellcooldown(convoke_the_spirits) <= 0 } and spell(incarnation) or { fightremains() < 4 or buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) or { astralpower() + aspPerSec() * buffremaining(eclipse_solar_buff) + target.ticksremaining(fury_of_elune) * 2.5 > 120 or astralpower() + aspPerSec() * buffremaining(eclipse_lunar_buff) + target.ticksremaining(fury_of_elune) * 2.5 > 120 } and { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and { not buffpresent(celestial_alignment) or not hastalent(starlord_talent) } and { not { not spellcooldown(celestial_alignment) > 0 } or iscovenant("kyrian") and not { not spellcooldown(empower_bond) > 0 } or iscovenant("night_fae") } and { not iscovenant("venthyr") or not buffpresent(celestial_alignment) or astralpower() > 90 } or hastalent(starlord_talent) and buffpresent(celestial_alignment) and { buffstacks(starlord_buff) < 3 or astralpower() > 90 } or buffremaining(celestial_alignment) > 8 and not buffpresent(ravenous_frenzy) and not hastalent(starlord_talent) } and spell(starsurge) or { buffpresent(eclipse_lunar_buff) or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_lunar_buff) or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 } and astralpower() >= astralpowercost(half_moon) and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_lunar_buff) or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 } and astralpower() >= astralpowercost(full_moon) and spellknown(full_moon) and spell(full_moon) { #warrior_of_elune spell(warrior_of_elune) - unless { buffpresent(eclipse_lunar_buff) or counter(solar) == 1 or counter(lunar) + counter(solar) == 1 or buffpresent(warrior_of_elune) and buffpresent(eclipse_lunar_buff) or buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) } and spell(starfire) or spell(wrath_balance) + unless { buffpresent(eclipse_lunar_buff) or eclipsesolarnext() or eclipseanynext() or buffpresent(warrior_of_elune) and buffpresent(eclipse_lunar_buff) or buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) } and spell(starfire) or spell(wrath_balance) { #run_action_list,name=fallthru balancefallthrushortcdactions() @@ -472,7 +472,7 @@ AddFunction balanceboatshortcdactions AddFunction balanceboatshortcdpostconditions { - buffstacks(balance_of_all_things_nature_buff) < 4 and buffstacks(balance_of_all_things_arcane_buff) < 4 and { not target.debuffpresent(adaptive_swarm_damage) and not inflighttotarget(adaptive_swarm_damage) and { not target.debuffpresent(adaptive_swarm) or target.debuffremaining(adaptive_swarm) > 3 } or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 5 and target.debuffpresent(adaptive_swarm_damage) } and spell(adaptive_swarm) or { buffremaining(balance_of_all_things_nature_buff) > 4.5 or buffremaining(balance_of_all_things_arcane_buff) > 4.5 } and { spellcooldown(celestial_alignment) > 7 or spellcooldown(empower_bond) > 7 and not buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") } and buffpresent(starlord_buff) and texture(starlord_buff text=cancel) or not critnotup() and { iscovenant("night_fae") or spellcooldown(celestial_alignment) > 7 or not cd_condition() and not iscovenant("kyrian") or spellcooldown(empower_bond) > 7 and not buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") } and spell(starsurge) or spellcooldown(convoke_the_spirits) < 5 and not checkboxon("no_cds") and { convoke_desync() or spellcooldown(celestial_alignment) < 5 } and cd_condition() and astralpower() > 40 and iscovenant("night_fae") and not checkboxon("no_cds") and spell(starsurge) or target.refreshable(sunfire_debuff) and target.timetodie() > 16 and { astralpower() >= astralpowercost(sunfire) and dot_requirements() } and spell(sunfire) or target.refreshable(moonfire_debuff) and target.timetodie() > 13.5 and { astralpower() >= astralpowercost(moonfire) and dot_requirements() } and spell(moonfire) or target.refreshable(stellar_flare) and target.timetodie() > 16 + target.debuffremaining(stellar_flare) and { astralpower() >= astralpowercost(stellar_flare) and dot_requirements() } and spell(stellar_flare) or { { counter(lunar) == 1 or counter(solar) == 1 or counter(lunar) + counter(solar) == 1 or buffremaining(balance_of_all_things_nature_buff) > 4.5 or buffremaining(balance_of_all_things_arcane_buff) > 4.5 or astralpower() > 90 and spellcooldown(celestial_alignment) <= 0 and not checkboxon("no_cds") } and { spellcooldown(celestial_alignment) > 30 or spellcooldown(celestial_alignment) <= 0 } or fightremains() < 10 } and spell(kindred_spirits) or not checkboxon("no_cds") and cd_condition() and { astralpower() > 90 and { buffpresent(kindred_empowerment_energize) or not iscovenant("kyrian") } or buffpresent(bloodlust) and buffremaining(bloodlust) < 30 + conduitvalue(precise_alignment_conduit) or fightremains() < 30 + conduitvalue(precise_alignment_conduit) or iscovenant("night_fae") } and { not iscovenant("night_fae") or convoke_desync() or spellcooldown(convoke_the_spirits) <= 0 } and spell(incarnation) or { fightremains() < 4 or buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) or { astralpower() + aspPerSec() * buffremaining(eclipse_solar_buff) + target.ticksremaining(fury_of_elune) * 2.5 > 120 or astralpower() + aspPerSec() * buffremaining(eclipse_lunar_buff) + target.ticksremaining(fury_of_elune) * 2.5 > 120 } and buffpresent(eclipse_any) and { not buffpresent(celestial_alignment) or not hastalent(starlord_talent) } and { not { not spellcooldown(celestial_alignment) > 0 } or iscovenant("kyrian") and not { not spellcooldown(empower_bond) > 0 } or iscovenant("night_fae") } and { not iscovenant("venthyr") or not buffpresent(celestial_alignment) or astralpower() > 90 } or hastalent(starlord_talent) and buffpresent(celestial_alignment) and { buffstacks(starlord_buff) < 3 or astralpower() > 90 } or buffremaining(celestial_alignment) > 8 and not buffpresent(ravenous_frenzy) and not hastalent(starlord_talent) } and spell(starsurge) or { buffpresent(eclipse_lunar_buff) or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_lunar_buff) or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 } and astralpower() >= astralpowercost(half_moon) and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_lunar_buff) or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 } and astralpower() >= astralpowercost(full_moon) and spellknown(full_moon) and spell(full_moon) or { buffpresent(eclipse_lunar_buff) or counter(solar) == 1 or counter(lunar) + counter(solar) == 1 or buffpresent(warrior_of_elune) and buffpresent(eclipse_lunar_buff) or buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) } and spell(starfire) or spell(wrath_balance) or balancefallthrushortcdpostconditions() + buffstacks(balance_of_all_things_nature_buff) < 4 and buffstacks(balance_of_all_things_arcane_buff) < 4 and { not target.debuffpresent(adaptive_swarm_damage) and not inflighttotarget(adaptive_swarm_damage) and { not target.debuffpresent(adaptive_swarm) or target.debuffremaining(adaptive_swarm) > 3 } or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 5 and target.debuffpresent(adaptive_swarm_damage) } and spell(adaptive_swarm) or { buffremaining(balance_of_all_things_nature_buff) > 4.5 or buffremaining(balance_of_all_things_arcane_buff) > 4.5 } and { spellcooldown(celestial_alignment) > 7 or spellcooldown(empower_bond) > 7 and not buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") } and buffpresent(starlord_buff) and texture(starlord_buff text=cancel) or not critnotup() and { iscovenant("night_fae") or spellcooldown(celestial_alignment) > 7 or not cd_condition() and not iscovenant("kyrian") or spellcooldown(empower_bond) > 7 and not buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") } and spell(starsurge) or spellcooldown(convoke_the_spirits) < 5 and not checkboxon("no_cds") and { convoke_desync() or spellcooldown(celestial_alignment) < 5 } and cd_condition() and astralpower() > 40 and iscovenant("night_fae") and not checkboxon("no_cds") and spell(starsurge) or target.refreshable(sunfire_debuff) and target.timetodie() > 16 and { astralpower() >= astralpowercost(sunfire) and dot_requirements() } and spell(sunfire) or target.refreshable(moonfire_debuff) and target.timetodie() > 13.5 and { astralpower() >= astralpowercost(moonfire) and dot_requirements() } and spell(moonfire) or target.refreshable(stellar_flare) and target.timetodie() > 16 + target.debuffremaining(stellar_flare) and { astralpower() >= astralpowercost(stellar_flare) and dot_requirements() } and spell(stellar_flare) or { { eclipselunarnext() or eclipsesolarnext() or eclipseanynext() or buffremaining(balance_of_all_things_nature_buff) > 4.5 or buffremaining(balance_of_all_things_arcane_buff) > 4.5 or astralpower() > 90 and spellcooldown(celestial_alignment) <= 0 and not checkboxon("no_cds") } and { spellcooldown(celestial_alignment) > 30 or spellcooldown(celestial_alignment) <= 0 } or fightremains() < 10 } and spell(kindred_spirits) or not checkboxon("no_cds") and cd_condition() and { astralpower() > 90 and { buffpresent(kindred_empowerment_energize) or not iscovenant("kyrian") } or buffpresent(bloodlust) and buffremaining(bloodlust) < 30 + conduitvalue(precise_alignment_conduit) or fightremains() < 30 + conduitvalue(precise_alignment_conduit) or iscovenant("night_fae") } and { not iscovenant("night_fae") or convoke_desync() or spellcooldown(convoke_the_spirits) <= 0 } and spell(incarnation) or { fightremains() < 4 or buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) or { astralpower() + aspPerSec() * buffremaining(eclipse_solar_buff) + target.ticksremaining(fury_of_elune) * 2.5 > 120 or astralpower() + aspPerSec() * buffremaining(eclipse_lunar_buff) + target.ticksremaining(fury_of_elune) * 2.5 > 120 } and { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and { not buffpresent(celestial_alignment) or not hastalent(starlord_talent) } and { not { not spellcooldown(celestial_alignment) > 0 } or iscovenant("kyrian") and not { not spellcooldown(empower_bond) > 0 } or iscovenant("night_fae") } and { not iscovenant("venthyr") or not buffpresent(celestial_alignment) or astralpower() > 90 } or hastalent(starlord_talent) and buffpresent(celestial_alignment) and { buffstacks(starlord_buff) < 3 or astralpower() > 90 } or buffremaining(celestial_alignment) > 8 and not buffpresent(ravenous_frenzy) and not hastalent(starlord_talent) } and spell(starsurge) or { buffpresent(eclipse_lunar_buff) or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_lunar_buff) or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 } and astralpower() >= astralpowercost(half_moon) and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_lunar_buff) or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 } and astralpower() >= astralpowercost(full_moon) and spellknown(full_moon) and spell(full_moon) or { buffpresent(eclipse_lunar_buff) or eclipsesolarnext() or eclipseanynext() or buffpresent(warrior_of_elune) and buffpresent(eclipse_lunar_buff) or buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) } and spell(starfire) or spell(wrath_balance) or balancefallthrushortcdpostconditions() } AddFunction balanceboatcdactions @@ -485,12 +485,12 @@ AddFunction balanceboatcdactions #convoke_the_spirits,if=!druid.no_cds&((variable.convoke_desync&!cooldown.ca_inc.ready|buff.ca_inc.up)&(buff.balance_of_all_things_nature.stack=5|buff.balance_of_all_things_arcane.stack=5)|fight_remains<10) if not checkboxon("no_cds") and { { convoke_desync() and not spellcooldown(celestial_alignment) <= 0 or buffpresent(celestial_alignment) } and { buffstacks(balance_of_all_things_nature_buff) == 5 or buffstacks(balance_of_all_things_arcane_buff) == 5 } or fightremains() < 10 } spell(convoke_the_spirits) - unless { buffremaining(balance_of_all_things_nature_buff) > 4.5 or buffremaining(balance_of_all_things_arcane_buff) > 4.5 } and { spellcooldown(celestial_alignment) > 7 or spellcooldown(empower_bond) > 7 and not buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") } and buffpresent(starlord_buff) and texture(starlord_buff text=cancel) or not critnotup() and { iscovenant("night_fae") or spellcooldown(celestial_alignment) > 7 or not cd_condition() and not iscovenant("kyrian") or spellcooldown(empower_bond) > 7 and not buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") } and spell(starsurge) or spellcooldown(convoke_the_spirits) < 5 and not checkboxon("no_cds") and { convoke_desync() or spellcooldown(celestial_alignment) < 5 } and cd_condition() and astralpower() > 40 and iscovenant("night_fae") and not checkboxon("no_cds") and spell(starsurge) or target.refreshable(sunfire_debuff) and target.timetodie() > 16 and { astralpower() >= astralpowercost(sunfire) and dot_requirements() } and spell(sunfire) or target.refreshable(moonfire_debuff) and target.timetodie() > 13.5 and { astralpower() >= astralpowercost(moonfire) and dot_requirements() } and spell(moonfire) or target.refreshable(stellar_flare) and target.timetodie() > 16 + target.debuffremaining(stellar_flare) and { astralpower() >= astralpowercost(stellar_flare) and dot_requirements() } and spell(stellar_flare) or astralpower() >= astralpowercost(force_of_nature) and spell(force_of_nature) or { buffpresent(eclipse_any) or counter(solar) == 1 or counter(lunar) == 1 } and { not iscovenant("night_fae") or checkboxon("no_cds") or astralpower() < 95 and { critnotup() or astralpower() < 30 or is_aoe() } and { convoke_desync() and not { not spellcooldown(convoke_the_spirits) > 0 } or not convoke_desync() and not { not spellcooldown(celestial_alignment) > 0 } } } and { spellcooldown(celestial_alignment) > 30 or checkboxon("no_cds") or astralpower() > 90 and not spellcooldown(celestial_alignment) > 0 and { spellcooldown(empower_bond) < executetime(starfire) or not iscovenant("kyrian") } or fightremains() < 10 } and { target.debuffremaining(adaptive_swarm_damage) > 4 or not iscovenant("necrolord") } and spell(fury_of_elune) or { { counter(lunar) == 1 or counter(solar) == 1 or counter(lunar) + counter(solar) == 1 or buffremaining(balance_of_all_things_nature_buff) > 4.5 or buffremaining(balance_of_all_things_arcane_buff) > 4.5 or astralpower() > 90 and spellcooldown(celestial_alignment) <= 0 and not checkboxon("no_cds") } and { spellcooldown(celestial_alignment) > 30 or spellcooldown(celestial_alignment) <= 0 } or fightremains() < 10 } and spell(kindred_spirits) + unless { buffremaining(balance_of_all_things_nature_buff) > 4.5 or buffremaining(balance_of_all_things_arcane_buff) > 4.5 } and { spellcooldown(celestial_alignment) > 7 or spellcooldown(empower_bond) > 7 and not buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") } and buffpresent(starlord_buff) and texture(starlord_buff text=cancel) or not critnotup() and { iscovenant("night_fae") or spellcooldown(celestial_alignment) > 7 or not cd_condition() and not iscovenant("kyrian") or spellcooldown(empower_bond) > 7 and not buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") } and spell(starsurge) or spellcooldown(convoke_the_spirits) < 5 and not checkboxon("no_cds") and { convoke_desync() or spellcooldown(celestial_alignment) < 5 } and cd_condition() and astralpower() > 40 and iscovenant("night_fae") and not checkboxon("no_cds") and spell(starsurge) or target.refreshable(sunfire_debuff) and target.timetodie() > 16 and { astralpower() >= astralpowercost(sunfire) and dot_requirements() } and spell(sunfire) or target.refreshable(moonfire_debuff) and target.timetodie() > 13.5 and { astralpower() >= astralpowercost(moonfire) and dot_requirements() } and spell(moonfire) or target.refreshable(stellar_flare) and target.timetodie() > 16 + target.debuffremaining(stellar_flare) and { astralpower() >= astralpowercost(stellar_flare) and dot_requirements() } and spell(stellar_flare) or astralpower() >= astralpowercost(force_of_nature) and spell(force_of_nature) or { { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } or eclipsesolarin() == 1 or eclipselunarin() == 1 } and { not iscovenant("night_fae") or checkboxon("no_cds") or astralpower() < 95 and { critnotup() or astralpower() < 30 or is_aoe() } and { convoke_desync() and not { not spellcooldown(convoke_the_spirits) > 0 } or not convoke_desync() and not { not spellcooldown(celestial_alignment) > 0 } } } and { spellcooldown(celestial_alignment) > 30 or checkboxon("no_cds") or astralpower() > 90 and not spellcooldown(celestial_alignment) > 0 and { spellcooldown(empower_bond) < executetime(starfire) or not iscovenant("kyrian") } or fightremains() < 10 } and { target.debuffremaining(adaptive_swarm_damage) > 4 or not iscovenant("necrolord") } and spell(fury_of_elune) or { { eclipselunarnext() or eclipsesolarnext() or eclipseanynext() or buffremaining(balance_of_all_things_nature_buff) > 4.5 or buffremaining(balance_of_all_things_arcane_buff) > 4.5 or astralpower() > 90 and spellcooldown(celestial_alignment) <= 0 and not checkboxon("no_cds") } and { spellcooldown(celestial_alignment) > 30 or spellcooldown(celestial_alignment) <= 0 } or fightremains() < 10 } and spell(kindred_spirits) { #celestial_alignment,if=!druid.no_cds&variable.cd_condition&((astral_power>90&(buff.kindred_empowerment_energize.up|!covenant.kyrian)|buff.bloodlust.up&buff.bloodlust.remains<20+(conduit.precise_alignment.time_value))|interpolated_fight_remains<20+(conduit.precise_alignment.time_value)|covenant.night_fae)&(!covenant.night_fae|variable.convoke_desync|cooldown.convoke_the_spirits.ready) if not checkboxon("no_cds") and cd_condition() and { astralpower() > 90 and { buffpresent(kindred_empowerment_energize) or not iscovenant("kyrian") } or buffpresent(bloodlust) and buffremaining(bloodlust) < 20 + conduitvalue(precise_alignment_conduit) or fightremains() < 20 + conduitvalue(precise_alignment_conduit) or iscovenant("night_fae") } and { not iscovenant("night_fae") or convoke_desync() or spellcooldown(convoke_the_spirits) <= 0 } spell(celestial_alignment) - unless not checkboxon("no_cds") and cd_condition() and { astralpower() > 90 and { buffpresent(kindred_empowerment_energize) or not iscovenant("kyrian") } or buffpresent(bloodlust) and buffremaining(bloodlust) < 30 + conduitvalue(precise_alignment_conduit) or fightremains() < 30 + conduitvalue(precise_alignment_conduit) or iscovenant("night_fae") } and { not iscovenant("night_fae") or convoke_desync() or spellcooldown(convoke_the_spirits) <= 0 } and spell(incarnation) or { fightremains() < 4 or buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) or { astralpower() + aspPerSec() * buffremaining(eclipse_solar_buff) + target.ticksremaining(fury_of_elune) * 2.5 > 120 or astralpower() + aspPerSec() * buffremaining(eclipse_lunar_buff) + target.ticksremaining(fury_of_elune) * 2.5 > 120 } and buffpresent(eclipse_any) and { not buffpresent(celestial_alignment) or not hastalent(starlord_talent) } and { not { not spellcooldown(celestial_alignment) > 0 } or iscovenant("kyrian") and not { not spellcooldown(empower_bond) > 0 } or iscovenant("night_fae") } and { not iscovenant("venthyr") or not buffpresent(celestial_alignment) or astralpower() > 90 } or hastalent(starlord_talent) and buffpresent(celestial_alignment) and { buffstacks(starlord_buff) < 3 or astralpower() > 90 } or buffremaining(celestial_alignment) > 8 and not buffpresent(ravenous_frenzy) and not hastalent(starlord_talent) } and spell(starsurge) or { buffpresent(eclipse_lunar_buff) or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_lunar_buff) or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 } and astralpower() >= astralpowercost(half_moon) and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_lunar_buff) or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 } and astralpower() >= astralpowercost(full_moon) and spellknown(full_moon) and spell(full_moon) or spell(warrior_of_elune) or { buffpresent(eclipse_lunar_buff) or counter(solar) == 1 or counter(lunar) + counter(solar) == 1 or buffpresent(warrior_of_elune) and buffpresent(eclipse_lunar_buff) or buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) } and spell(starfire) or spell(wrath_balance) + unless not checkboxon("no_cds") and cd_condition() and { astralpower() > 90 and { buffpresent(kindred_empowerment_energize) or not iscovenant("kyrian") } or buffpresent(bloodlust) and buffremaining(bloodlust) < 30 + conduitvalue(precise_alignment_conduit) or fightremains() < 30 + conduitvalue(precise_alignment_conduit) or iscovenant("night_fae") } and { not iscovenant("night_fae") or convoke_desync() or spellcooldown(convoke_the_spirits) <= 0 } and spell(incarnation) or { fightremains() < 4 or buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) or { astralpower() + aspPerSec() * buffremaining(eclipse_solar_buff) + target.ticksremaining(fury_of_elune) * 2.5 > 120 or astralpower() + aspPerSec() * buffremaining(eclipse_lunar_buff) + target.ticksremaining(fury_of_elune) * 2.5 > 120 } and { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and { not buffpresent(celestial_alignment) or not hastalent(starlord_talent) } and { not { not spellcooldown(celestial_alignment) > 0 } or iscovenant("kyrian") and not { not spellcooldown(empower_bond) > 0 } or iscovenant("night_fae") } and { not iscovenant("venthyr") or not buffpresent(celestial_alignment) or astralpower() > 90 } or hastalent(starlord_talent) and buffpresent(celestial_alignment) and { buffstacks(starlord_buff) < 3 or astralpower() > 90 } or buffremaining(celestial_alignment) > 8 and not buffpresent(ravenous_frenzy) and not hastalent(starlord_talent) } and spell(starsurge) or { buffpresent(eclipse_lunar_buff) or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_lunar_buff) or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 } and astralpower() >= astralpowercost(half_moon) and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_lunar_buff) or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 } and astralpower() >= astralpowercost(full_moon) and spellknown(full_moon) and spell(full_moon) or spell(warrior_of_elune) or { buffpresent(eclipse_lunar_buff) or eclipsesolarnext() or eclipseanynext() or buffpresent(warrior_of_elune) and buffpresent(eclipse_lunar_buff) or buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) } and spell(starfire) or spell(wrath_balance) { #run_action_list,name=fallthru balancefallthrucdactions() @@ -501,7 +501,7 @@ AddFunction balanceboatcdactions AddFunction balanceboatcdpostconditions { - buffstacks(balance_of_all_things_nature_buff) < 4 and buffstacks(balance_of_all_things_arcane_buff) < 4 and { not target.debuffpresent(adaptive_swarm_damage) and not inflighttotarget(adaptive_swarm_damage) and { not target.debuffpresent(adaptive_swarm) or target.debuffremaining(adaptive_swarm) > 3 } or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 5 and target.debuffpresent(adaptive_swarm_damage) } and spell(adaptive_swarm) or { buffremaining(balance_of_all_things_nature_buff) > 4.5 or buffremaining(balance_of_all_things_arcane_buff) > 4.5 } and { spellcooldown(celestial_alignment) > 7 or spellcooldown(empower_bond) > 7 and not buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") } and buffpresent(starlord_buff) and texture(starlord_buff text=cancel) or not critnotup() and { iscovenant("night_fae") or spellcooldown(celestial_alignment) > 7 or not cd_condition() and not iscovenant("kyrian") or spellcooldown(empower_bond) > 7 and not buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") } and spell(starsurge) or spellcooldown(convoke_the_spirits) < 5 and not checkboxon("no_cds") and { convoke_desync() or spellcooldown(celestial_alignment) < 5 } and cd_condition() and astralpower() > 40 and iscovenant("night_fae") and not checkboxon("no_cds") and spell(starsurge) or target.refreshable(sunfire_debuff) and target.timetodie() > 16 and { astralpower() >= astralpowercost(sunfire) and dot_requirements() } and spell(sunfire) or target.refreshable(moonfire_debuff) and target.timetodie() > 13.5 and { astralpower() >= astralpowercost(moonfire) and dot_requirements() } and spell(moonfire) or target.refreshable(stellar_flare) and target.timetodie() > 16 + target.debuffremaining(stellar_flare) and { astralpower() >= astralpowercost(stellar_flare) and dot_requirements() } and spell(stellar_flare) or astralpower() >= astralpowercost(force_of_nature) and spell(force_of_nature) or { buffpresent(eclipse_any) or counter(solar) == 1 or counter(lunar) == 1 } and { not iscovenant("night_fae") or checkboxon("no_cds") or astralpower() < 95 and { critnotup() or astralpower() < 30 or is_aoe() } and { convoke_desync() and not { not spellcooldown(convoke_the_spirits) > 0 } or not convoke_desync() and not { not spellcooldown(celestial_alignment) > 0 } } } and { spellcooldown(celestial_alignment) > 30 or checkboxon("no_cds") or astralpower() > 90 and not spellcooldown(celestial_alignment) > 0 and { spellcooldown(empower_bond) < executetime(starfire) or not iscovenant("kyrian") } or fightremains() < 10 } and { target.debuffremaining(adaptive_swarm_damage) > 4 or not iscovenant("necrolord") } and spell(fury_of_elune) or { { counter(lunar) == 1 or counter(solar) == 1 or counter(lunar) + counter(solar) == 1 or buffremaining(balance_of_all_things_nature_buff) > 4.5 or buffremaining(balance_of_all_things_arcane_buff) > 4.5 or astralpower() > 90 and spellcooldown(celestial_alignment) <= 0 and not checkboxon("no_cds") } and { spellcooldown(celestial_alignment) > 30 or spellcooldown(celestial_alignment) <= 0 } or fightremains() < 10 } and spell(kindred_spirits) or not checkboxon("no_cds") and cd_condition() and { astralpower() > 90 and { buffpresent(kindred_empowerment_energize) or not iscovenant("kyrian") } or buffpresent(bloodlust) and buffremaining(bloodlust) < 30 + conduitvalue(precise_alignment_conduit) or fightremains() < 30 + conduitvalue(precise_alignment_conduit) or iscovenant("night_fae") } and { not iscovenant("night_fae") or convoke_desync() or spellcooldown(convoke_the_spirits) <= 0 } and spell(incarnation) or { fightremains() < 4 or buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) or { astralpower() + aspPerSec() * buffremaining(eclipse_solar_buff) + target.ticksremaining(fury_of_elune) * 2.5 > 120 or astralpower() + aspPerSec() * buffremaining(eclipse_lunar_buff) + target.ticksremaining(fury_of_elune) * 2.5 > 120 } and buffpresent(eclipse_any) and { not buffpresent(celestial_alignment) or not hastalent(starlord_talent) } and { not { not spellcooldown(celestial_alignment) > 0 } or iscovenant("kyrian") and not { not spellcooldown(empower_bond) > 0 } or iscovenant("night_fae") } and { not iscovenant("venthyr") or not buffpresent(celestial_alignment) or astralpower() > 90 } or hastalent(starlord_talent) and buffpresent(celestial_alignment) and { buffstacks(starlord_buff) < 3 or astralpower() > 90 } or buffremaining(celestial_alignment) > 8 and not buffpresent(ravenous_frenzy) and not hastalent(starlord_talent) } and spell(starsurge) or { buffpresent(eclipse_lunar_buff) or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_lunar_buff) or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 } and astralpower() >= astralpowercost(half_moon) and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_lunar_buff) or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 } and astralpower() >= astralpowercost(full_moon) and spellknown(full_moon) and spell(full_moon) or spell(warrior_of_elune) or { buffpresent(eclipse_lunar_buff) or counter(solar) == 1 or counter(lunar) + counter(solar) == 1 or buffpresent(warrior_of_elune) and buffpresent(eclipse_lunar_buff) or buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) } and spell(starfire) or spell(wrath_balance) or balancefallthrucdpostconditions() + buffstacks(balance_of_all_things_nature_buff) < 4 and buffstacks(balance_of_all_things_arcane_buff) < 4 and { not target.debuffpresent(adaptive_swarm_damage) and not inflighttotarget(adaptive_swarm_damage) and { not target.debuffpresent(adaptive_swarm) or target.debuffremaining(adaptive_swarm) > 3 } or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 5 and target.debuffpresent(adaptive_swarm_damage) } and spell(adaptive_swarm) or { buffremaining(balance_of_all_things_nature_buff) > 4.5 or buffremaining(balance_of_all_things_arcane_buff) > 4.5 } and { spellcooldown(celestial_alignment) > 7 or spellcooldown(empower_bond) > 7 and not buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") } and buffpresent(starlord_buff) and texture(starlord_buff text=cancel) or not critnotup() and { iscovenant("night_fae") or spellcooldown(celestial_alignment) > 7 or not cd_condition() and not iscovenant("kyrian") or spellcooldown(empower_bond) > 7 and not buffpresent(kindred_empowerment_energize) and iscovenant("kyrian") } and spell(starsurge) or spellcooldown(convoke_the_spirits) < 5 and not checkboxon("no_cds") and { convoke_desync() or spellcooldown(celestial_alignment) < 5 } and cd_condition() and astralpower() > 40 and iscovenant("night_fae") and not checkboxon("no_cds") and spell(starsurge) or target.refreshable(sunfire_debuff) and target.timetodie() > 16 and { astralpower() >= astralpowercost(sunfire) and dot_requirements() } and spell(sunfire) or target.refreshable(moonfire_debuff) and target.timetodie() > 13.5 and { astralpower() >= astralpowercost(moonfire) and dot_requirements() } and spell(moonfire) or target.refreshable(stellar_flare) and target.timetodie() > 16 + target.debuffremaining(stellar_flare) and { astralpower() >= astralpowercost(stellar_flare) and dot_requirements() } and spell(stellar_flare) or astralpower() >= astralpowercost(force_of_nature) and spell(force_of_nature) or { { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } or eclipsesolarin() == 1 or eclipselunarin() == 1 } and { not iscovenant("night_fae") or checkboxon("no_cds") or astralpower() < 95 and { critnotup() or astralpower() < 30 or is_aoe() } and { convoke_desync() and not { not spellcooldown(convoke_the_spirits) > 0 } or not convoke_desync() and not { not spellcooldown(celestial_alignment) > 0 } } } and { spellcooldown(celestial_alignment) > 30 or checkboxon("no_cds") or astralpower() > 90 and not spellcooldown(celestial_alignment) > 0 and { spellcooldown(empower_bond) < executetime(starfire) or not iscovenant("kyrian") } or fightremains() < 10 } and { target.debuffremaining(adaptive_swarm_damage) > 4 or not iscovenant("necrolord") } and spell(fury_of_elune) or { { eclipselunarnext() or eclipsesolarnext() or eclipseanynext() or buffremaining(balance_of_all_things_nature_buff) > 4.5 or buffremaining(balance_of_all_things_arcane_buff) > 4.5 or astralpower() > 90 and spellcooldown(celestial_alignment) <= 0 and not checkboxon("no_cds") } and { spellcooldown(celestial_alignment) > 30 or spellcooldown(celestial_alignment) <= 0 } or fightremains() < 10 } and spell(kindred_spirits) or not checkboxon("no_cds") and cd_condition() and { astralpower() > 90 and { buffpresent(kindred_empowerment_energize) or not iscovenant("kyrian") } or buffpresent(bloodlust) and buffremaining(bloodlust) < 30 + conduitvalue(precise_alignment_conduit) or fightremains() < 30 + conduitvalue(precise_alignment_conduit) or iscovenant("night_fae") } and { not iscovenant("night_fae") or convoke_desync() or spellcooldown(convoke_the_spirits) <= 0 } and spell(incarnation) or { fightremains() < 4 or buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) or { astralpower() + aspPerSec() * buffremaining(eclipse_solar_buff) + target.ticksremaining(fury_of_elune) * 2.5 > 120 or astralpower() + aspPerSec() * buffremaining(eclipse_lunar_buff) + target.ticksremaining(fury_of_elune) * 2.5 > 120 } and { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and { not buffpresent(celestial_alignment) or not hastalent(starlord_talent) } and { not { not spellcooldown(celestial_alignment) > 0 } or iscovenant("kyrian") and not { not spellcooldown(empower_bond) > 0 } or iscovenant("night_fae") } and { not iscovenant("venthyr") or not buffpresent(celestial_alignment) or astralpower() > 90 } or hastalent(starlord_talent) and buffpresent(celestial_alignment) and { buffstacks(starlord_buff) < 3 or astralpower() > 90 } or buffremaining(celestial_alignment) > 8 and not buffpresent(ravenous_frenzy) and not hastalent(starlord_talent) } and spell(starsurge) or { buffpresent(eclipse_lunar_buff) or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_lunar_buff) or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 } and astralpower() >= astralpowercost(half_moon) and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_lunar_buff) or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 } and astralpower() >= astralpowercost(full_moon) and spellknown(full_moon) and spell(full_moon) or spell(warrior_of_elune) or { buffpresent(eclipse_lunar_buff) or eclipsesolarnext() or eclipseanynext() or buffpresent(warrior_of_elune) and buffpresent(eclipse_lunar_buff) or buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) } and spell(starfire) or spell(wrath_balance) or balancefallthrucdpostconditions() } ### actions.aoe @@ -509,7 +509,7 @@ AddFunction balanceboatcdpostconditions AddFunction balanceaoemainactions { #sunfire,target_if=refreshable&target.time_to_die>14-spell_targets+remains&(eclipse.in_any|remains 14 - enemies(tagged=1) + target.debuffremaining(sunfire_debuff) and { buffpresent(eclipse_any) or target.debuffremaining(sunfire_debuff) < gcd() } spell(sunfire) + if target.refreshable(sunfire_debuff) and target.timetodie() > 14 - enemies(tagged=1) + target.debuffremaining(sunfire_debuff) and { { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } or target.debuffremaining(sunfire_debuff) < gcd() } spell(sunfire) #starfall,if=(buff.starfall.refreshable&(spell_targets.starfall<3|!runeforge.timeworn_dreambinder.equipped)|talent.soul_of_the_forest.enabled&buff.eclipse_solar.remains<3&eclipse.in_solar&buff.starfall.remains<7&spell_targets.starfall>=4)&(!runeforge.lycaras_fleeting_glimpse.equipped|time%%45>buff.starfall.remains+2)&target.time_to_die>5 if { buffrefreshable(starfall) and { enemies(tagged=1) < 3 or not equippedruneforge(timeworn_dreambinder_runeforge) } or hastalent(soul_of_the_forest_talent) and buffremaining(eclipse_solar_buff) < 3 and buffpresent(eclipse_solar_buff) and buffremaining(starfall) < 7 and enemies(tagged=1) >= 4 } and { not equippedruneforge(lycaras_fleeting_glimpse_runeforge) or timeincombat() % 45 > buffremaining(starfall) + 2 } and target.timetodie() > 5 spell(starfall) #starfall,if=runeforge.timeworn_dreambinder.equipped&spell_targets.starfall>=3&(!buff.timeworn_dreambinder.up&buff.starfall.refreshable|(variable.dream_will_fall_off&(buff.starfall.remains<3|spell_targets.starfall>2&talent.stellar_drift.enabled&buff.starfall.remains<5))) @@ -532,18 +532,18 @@ AddFunction balanceaoemainactions #starfall,if=covenant.night_fae&(variable.convoke_desync|cooldown.ca_inc.up|buff.ca_inc.up)&cooldown.convoke_the_spirits.remains 0 or buffpresent(celestial_alignment) } and spellcooldown(convoke_the_spirits) < gcd() * { astralpower() / 50 } and buffremaining(starfall) < 4 and not checkboxon("no_cds") spell(starfall) #starsurge,if=covenant.night_fae&(variable.convoke_desync|cooldown.ca_inc.up|buff.ca_inc.up)&cooldown.convoke_the_spirits.remains<6&buff.starfall.up&eclipse.in_any&!variable.ignore_starsurge&!druid.no_cds - if iscovenant("night_fae") and { convoke_desync() or not spellcooldown(celestial_alignment) > 0 or buffpresent(celestial_alignment) } and spellcooldown(convoke_the_spirits) < 6 and buffpresent(starfall) and buffpresent(eclipse_any) and not ignore_starsurge() and not checkboxon("no_cds") spell(starsurge) + if iscovenant("night_fae") and { convoke_desync() or not spellcooldown(celestial_alignment) > 0 or buffpresent(celestial_alignment) } and spellcooldown(convoke_the_spirits) < 6 and buffpresent(starfall) and { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and not ignore_starsurge() and not checkboxon("no_cds") spell(starsurge) #starsurge,if=buff.oneths_clear_vision.up|(!starfire.ap_check|(buff.ca_inc.remains<5&buff.ca_inc.up|(buff.ravenous_frenzy.remains= astralpowercost(starfire) or { buffremaining(celestial_alignment) < 5 and buffpresent(celestial_alignment) or buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) } and starfall_wont_fall_off() and enemies(tagged=1) < 3 } and { not equippedruneforge(timeworn_dreambinder_runeforge) or enemies(tagged=1) < 3 } spell(starsurge) #new_moon,if=(eclipse.in_any&cooldown.ca_inc.remains>50|(charges=2&recharge_time<5)|charges=3)&ap_check - if { buffpresent(eclipse_any) and spellcooldown(celestial_alignment) > 50 or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and { not spellknown(half_moon) and not spellknown(full_moon) } spell(new_moon) + if { { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and spellcooldown(celestial_alignment) > 50 or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and { not spellknown(half_moon) and not spellknown(full_moon) } spell(new_moon) #half_moon,if=(eclipse.in_any&cooldown.ca_inc.remains>50|(charges=2&recharge_time<5)|charges=3)&ap_check - if { buffpresent(eclipse_any) and spellcooldown(celestial_alignment) > 50 or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 } and astralpower() >= astralpowercost(half_moon) and spellknown(half_moon) spell(half_moon) + if { { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and spellcooldown(celestial_alignment) > 50 or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 } and astralpower() >= astralpowercost(half_moon) and spellknown(half_moon) spell(half_moon) #full_moon,if=(eclipse.in_any&cooldown.ca_inc.remains>50|(charges=2&recharge_time<5)|charges=3)&ap_check - if { buffpresent(eclipse_any) and spellcooldown(celestial_alignment) > 50 or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 } and astralpower() >= astralpowercost(full_moon) and spellknown(full_moon) spell(full_moon) + if { { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and spellcooldown(celestial_alignment) > 50 or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 } and astralpower() >= astralpowercost(full_moon) and spellknown(full_moon) spell(full_moon) #variable,name=starfire_in_solar,value=spell_targets.starfire>4+floor(mastery_value*100%20)+floor(buff.starsurge_empowerment_solar.stack%4) #wrath,if=eclipse.lunar_next|eclipse.any_next&variable.is_cleave|buff.eclipse_solar.remains0.6&(spell_targets<=3|!talent.soul_of_the_forest.enabled)|!variable.is_cleave&buff.ca_inc.remains>execute_time - if counter(lunar) == 1 or counter(lunar) + counter(solar) == 1 and is_cleave() or buffremaining(eclipse_solar_buff) < executetime(starfire) and buffpresent(eclipse_solar_buff) or buffpresent(eclipse_solar_buff) and not starfire_in_solar() or buffremaining(celestial_alignment) < executetime(starfire) and not is_cleave() and buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) or buffpresent(ravenous_frenzy) and 100 / { 100 + spellcastspeedpercent() } > 0.6 and { enemies(tagged=1) <= 3 or not hastalent(soul_of_the_forest_talent) } or not is_cleave() and buffremaining(celestial_alignment) > executetime(wrath_balance) spell(wrath_balance) + if eclipselunarnext() or eclipseanynext() and is_cleave() or buffremaining(eclipse_solar_buff) < executetime(starfire) and buffpresent(eclipse_solar_buff) or buffpresent(eclipse_solar_buff) and not starfire_in_solar() or buffremaining(celestial_alignment) < executetime(starfire) and not is_cleave() and buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) or buffpresent(ravenous_frenzy) and 100 / { 100 + spellcastspeedpercent() } > 0.6 and { enemies(tagged=1) <= 3 or not hastalent(soul_of_the_forest_talent) } or not is_cleave() and buffremaining(celestial_alignment) > executetime(wrath_balance) spell(wrath_balance) #starfire spell(starfire) #run_action_list,name=fallthru @@ -557,7 +557,7 @@ AddFunction balanceaoemainpostconditions AddFunction balanceaoeshortcdactions { - unless target.refreshable(sunfire_debuff) and target.timetodie() > 14 - enemies(tagged=1) + target.debuffremaining(sunfire_debuff) and { buffpresent(eclipse_any) or target.debuffremaining(sunfire_debuff) < gcd() } and spell(sunfire) or { buffrefreshable(starfall) and { enemies(tagged=1) < 3 or not equippedruneforge(timeworn_dreambinder_runeforge) } or hastalent(soul_of_the_forest_talent) and buffremaining(eclipse_solar_buff) < 3 and buffpresent(eclipse_solar_buff) and buffremaining(starfall) < 7 and enemies(tagged=1) >= 4 } and { not equippedruneforge(lycaras_fleeting_glimpse_runeforge) or timeincombat() % 45 > buffremaining(starfall) + 2 } and target.timetodie() > 5 and spell(starfall) or equippedruneforge(timeworn_dreambinder_runeforge) and enemies(tagged=1) >= 3 and { not buffpresent(timeworn_dreambinder_buff) and buffrefreshable(starfall) or dream_will_fall_off() and { buffremaining(starfall) < 3 or enemies(tagged=1) > 2 and hastalent(stellar_drift_talent) and buffremaining(starfall) < 5 } } and spell(starfall) or { dream_will_fall_off() and starfall_wont_fall_off() and not ignore_starsurge() or { buffstacks(balance_of_all_things_nature_buff) > 3 or buffstacks(balance_of_all_things_arcane_buff) > 3 } and enemies(tagged=1) < 4 } and spell(starsurge) or { not buffpresent(adaptive_swarm) and not inflighttotarget(adaptive_swarm_damage) or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 3 } and spell(adaptive_swarm) or target.refreshable(moonfire_debuff) and target.timetodie() > { 14 + enemies(tagged=1) * 1.5 } / enemies(tagged=1) + target.debuffremaining(moonfire_debuff) and { { spellcooldown(celestial_alignment) <= 0 and not checkboxon("no_cds") and { convoke_desync() or spellcooldown(convoke_the_spirits) <= 0 or not iscovenant("night_fae") } or enemies(tagged=1) < 5 * { 1 + talentpoints(twin_moons_talent) } or { buffpresent(eclipse_solar_buff) or { buffpresent(eclipse_solar_buff) and buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_lunar_buff) } and not hastalent(soul_of_the_forest_talent) or buffamount(primordial_arcanic_pulsar_buff) >= 250 } and enemies(tagged=1) < 10 * { 1 + talentpoints(twin_moons_talent) } and astralpower() > 50 - buffremaining(starfall) * 6 } and { not buffpresent(kindred_empowerment_energize) or buffpresent(eclipse_solar_buff) or not iscovenant("kyrian") } and astralpower() >= astralpowercost(moonfire) } and spell(moonfire) + unless target.refreshable(sunfire_debuff) and target.timetodie() > 14 - enemies(tagged=1) + target.debuffremaining(sunfire_debuff) and { { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } or target.debuffremaining(sunfire_debuff) < gcd() } and spell(sunfire) or { buffrefreshable(starfall) and { enemies(tagged=1) < 3 or not equippedruneforge(timeworn_dreambinder_runeforge) } or hastalent(soul_of_the_forest_talent) and buffremaining(eclipse_solar_buff) < 3 and buffpresent(eclipse_solar_buff) and buffremaining(starfall) < 7 and enemies(tagged=1) >= 4 } and { not equippedruneforge(lycaras_fleeting_glimpse_runeforge) or timeincombat() % 45 > buffremaining(starfall) + 2 } and target.timetodie() > 5 and spell(starfall) or equippedruneforge(timeworn_dreambinder_runeforge) and enemies(tagged=1) >= 3 and { not buffpresent(timeworn_dreambinder_buff) and buffrefreshable(starfall) or dream_will_fall_off() and { buffremaining(starfall) < 3 or enemies(tagged=1) > 2 and hastalent(stellar_drift_talent) and buffremaining(starfall) < 5 } } and spell(starfall) or { dream_will_fall_off() and starfall_wont_fall_off() and not ignore_starsurge() or { buffstacks(balance_of_all_things_nature_buff) > 3 or buffstacks(balance_of_all_things_arcane_buff) > 3 } and enemies(tagged=1) < 4 } and spell(starsurge) or { not buffpresent(adaptive_swarm) and not inflighttotarget(adaptive_swarm_damage) or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 3 } and spell(adaptive_swarm) or target.refreshable(moonfire_debuff) and target.timetodie() > { 14 + enemies(tagged=1) * 1.5 } / enemies(tagged=1) + target.debuffremaining(moonfire_debuff) and { { spellcooldown(celestial_alignment) <= 0 and not checkboxon("no_cds") and { convoke_desync() or spellcooldown(convoke_the_spirits) <= 0 or not iscovenant("night_fae") } or enemies(tagged=1) < 5 * { 1 + talentpoints(twin_moons_talent) } or { buffpresent(eclipse_solar_buff) or { buffpresent(eclipse_solar_buff) and buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_lunar_buff) } and not hastalent(soul_of_the_forest_talent) or buffamount(primordial_arcanic_pulsar_buff) >= 250 } and enemies(tagged=1) < 10 * { 1 + talentpoints(twin_moons_talent) } and astralpower() > 50 - buffremaining(starfall) * 6 } and { not buffpresent(kindred_empowerment_energize) or buffpresent(eclipse_solar_buff) or not iscovenant("kyrian") } and astralpower() >= astralpowercost(moonfire) } and spell(moonfire) { #force_of_nature,if=ap_check if astralpower() >= astralpowercost(force_of_nature) spell(force_of_nature) @@ -565,14 +565,14 @@ AddFunction balanceaoeshortcdactions unless not checkboxon("no_cds") and cd_condition() and { buffpresent(starfall) or astralpower() > 50 } and not buffpresent(solstice_buff) and not buffpresent(celestial_alignment) and { not iscovenant("night_fae") or convoke_desync() or not spellcooldown(convoke_the_spirits) > 0 or fightremains() < spellcooldown(convoke_the_spirits) + 6 or fightremains() % 180 < 30 + conduitvalue(precise_alignment_conduit) } and spell(incarnation) or { fightremains() < 15 or { buffamount(primordial_arcanic_pulsar_buff) < 250 or buffamount(primordial_arcanic_pulsar_buff) >= 250 } and buffpresent(starfall) and { spellcooldown(celestial_alignment) > 50 or checkboxon("no_cds") } } and spell(kindred_spirits) or target.refreshable(stellar_flare) and target.timetodie() > 15 and { enemies(tagged=1) < 4 and astralpower() >= astralpowercost(stellar_flare) and { buffremaining(celestial_alignment) > 10 or not buffpresent(celestial_alignment) } } and spell(stellar_flare) { #fury_of_elune,if=eclipse.in_any&ap_check&buff.primordial_arcanic_pulsar.value<250&(dot.adaptive_swarm_damage.ticking|!covenant.necrolord|spell_targets>2) - if buffpresent(eclipse_any) and astralpower() >= astralpowercost(fury_of_elune) and buffamount(primordial_arcanic_pulsar_buff) < 250 and { target.debuffpresent(adaptive_swarm_damage) or not iscovenant("necrolord") or enemies(tagged=1) > 2 } spell(fury_of_elune) + if { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and astralpower() >= astralpowercost(fury_of_elune) and buffamount(primordial_arcanic_pulsar_buff) < 250 and { target.debuffpresent(adaptive_swarm_damage) or not iscovenant("necrolord") or enemies(tagged=1) > 2 } spell(fury_of_elune) - unless buffpresent(oneths_perception_buff) and { buffrefreshable(starfall) or astralpower() > 90 } and spell(starfall) or iscovenant("night_fae") and { convoke_desync() or not spellcooldown(celestial_alignment) > 0 or buffpresent(celestial_alignment) } and spellcooldown(convoke_the_spirits) < gcd() * { astralpower() / 50 } and buffremaining(starfall) < 4 and not checkboxon("no_cds") and spell(starfall) or iscovenant("night_fae") and { convoke_desync() or not spellcooldown(celestial_alignment) > 0 or buffpresent(celestial_alignment) } and spellcooldown(convoke_the_spirits) < 6 and buffpresent(starfall) and buffpresent(eclipse_any) and not ignore_starsurge() and not checkboxon("no_cds") and spell(starsurge) or { buffpresent(oneths_clear_vision_buff) or { not astralpower() >= astralpowercost(starfire) or { buffremaining(celestial_alignment) < 5 and buffpresent(celestial_alignment) or buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) } and starfall_wont_fall_off() and enemies(tagged=1) < 3 } and { not equippedruneforge(timeworn_dreambinder_runeforge) or enemies(tagged=1) < 3 } } and spell(starsurge) or { buffpresent(eclipse_any) and spellcooldown(celestial_alignment) > 50 or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_any) and spellcooldown(celestial_alignment) > 50 or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 } and astralpower() >= astralpowercost(half_moon) and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_any) and spellcooldown(celestial_alignment) > 50 or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 } and astralpower() >= astralpowercost(full_moon) and spellknown(full_moon) and spell(full_moon) + unless buffpresent(oneths_perception_buff) and { buffrefreshable(starfall) or astralpower() > 90 } and spell(starfall) or iscovenant("night_fae") and { convoke_desync() or not spellcooldown(celestial_alignment) > 0 or buffpresent(celestial_alignment) } and spellcooldown(convoke_the_spirits) < gcd() * { astralpower() / 50 } and buffremaining(starfall) < 4 and not checkboxon("no_cds") and spell(starfall) or iscovenant("night_fae") and { convoke_desync() or not spellcooldown(celestial_alignment) > 0 or buffpresent(celestial_alignment) } and spellcooldown(convoke_the_spirits) < 6 and buffpresent(starfall) and { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and not ignore_starsurge() and not checkboxon("no_cds") and spell(starsurge) or { buffpresent(oneths_clear_vision_buff) or { not astralpower() >= astralpowercost(starfire) or { buffremaining(celestial_alignment) < 5 and buffpresent(celestial_alignment) or buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) } and starfall_wont_fall_off() and enemies(tagged=1) < 3 } and { not equippedruneforge(timeworn_dreambinder_runeforge) or enemies(tagged=1) < 3 } } and spell(starsurge) or { { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and spellcooldown(celestial_alignment) > 50 or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and spellcooldown(celestial_alignment) > 50 or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 } and astralpower() >= astralpowercost(half_moon) and spellknown(half_moon) and spell(half_moon) or { { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and spellcooldown(celestial_alignment) > 50 or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 } and astralpower() >= astralpowercost(full_moon) and spellknown(full_moon) and spell(full_moon) { #warrior_of_elune spell(warrior_of_elune) - unless { counter(lunar) == 1 or counter(lunar) + counter(solar) == 1 and is_cleave() or buffremaining(eclipse_solar_buff) < executetime(starfire) and buffpresent(eclipse_solar_buff) or buffpresent(eclipse_solar_buff) and not starfire_in_solar() or buffremaining(celestial_alignment) < executetime(starfire) and not is_cleave() and buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) or buffpresent(ravenous_frenzy) and 100 / { 100 + spellcastspeedpercent() } > 0.6 and { enemies(tagged=1) <= 3 or not hastalent(soul_of_the_forest_talent) } or not is_cleave() and buffremaining(celestial_alignment) > executetime(wrath_balance) } and spell(wrath_balance) or spell(starfire) + unless { eclipselunarnext() or eclipseanynext() and is_cleave() or buffremaining(eclipse_solar_buff) < executetime(starfire) and buffpresent(eclipse_solar_buff) or buffpresent(eclipse_solar_buff) and not starfire_in_solar() or buffremaining(celestial_alignment) < executetime(starfire) and not is_cleave() and buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) or buffpresent(ravenous_frenzy) and 100 / { 100 + spellcastspeedpercent() } > 0.6 and { enemies(tagged=1) <= 3 or not hastalent(soul_of_the_forest_talent) } or not is_cleave() and buffremaining(celestial_alignment) > executetime(wrath_balance) } and spell(wrath_balance) or spell(starfire) { #run_action_list,name=fallthru balancefallthrushortcdactions() @@ -584,7 +584,7 @@ AddFunction balanceaoeshortcdactions AddFunction balanceaoeshortcdpostconditions { - target.refreshable(sunfire_debuff) and target.timetodie() > 14 - enemies(tagged=1) + target.debuffremaining(sunfire_debuff) and { buffpresent(eclipse_any) or target.debuffremaining(sunfire_debuff) < gcd() } and spell(sunfire) or { buffrefreshable(starfall) and { enemies(tagged=1) < 3 or not equippedruneforge(timeworn_dreambinder_runeforge) } or hastalent(soul_of_the_forest_talent) and buffremaining(eclipse_solar_buff) < 3 and buffpresent(eclipse_solar_buff) and buffremaining(starfall) < 7 and enemies(tagged=1) >= 4 } and { not equippedruneforge(lycaras_fleeting_glimpse_runeforge) or timeincombat() % 45 > buffremaining(starfall) + 2 } and target.timetodie() > 5 and spell(starfall) or equippedruneforge(timeworn_dreambinder_runeforge) and enemies(tagged=1) >= 3 and { not buffpresent(timeworn_dreambinder_buff) and buffrefreshable(starfall) or dream_will_fall_off() and { buffremaining(starfall) < 3 or enemies(tagged=1) > 2 and hastalent(stellar_drift_talent) and buffremaining(starfall) < 5 } } and spell(starfall) or { dream_will_fall_off() and starfall_wont_fall_off() and not ignore_starsurge() or { buffstacks(balance_of_all_things_nature_buff) > 3 or buffstacks(balance_of_all_things_arcane_buff) > 3 } and enemies(tagged=1) < 4 } and spell(starsurge) or { not buffpresent(adaptive_swarm) and not inflighttotarget(adaptive_swarm_damage) or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 3 } and spell(adaptive_swarm) or target.refreshable(moonfire_debuff) and target.timetodie() > { 14 + enemies(tagged=1) * 1.5 } / enemies(tagged=1) + target.debuffremaining(moonfire_debuff) and { { spellcooldown(celestial_alignment) <= 0 and not checkboxon("no_cds") and { convoke_desync() or spellcooldown(convoke_the_spirits) <= 0 or not iscovenant("night_fae") } or enemies(tagged=1) < 5 * { 1 + talentpoints(twin_moons_talent) } or { buffpresent(eclipse_solar_buff) or { buffpresent(eclipse_solar_buff) and buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_lunar_buff) } and not hastalent(soul_of_the_forest_talent) or buffamount(primordial_arcanic_pulsar_buff) >= 250 } and enemies(tagged=1) < 10 * { 1 + talentpoints(twin_moons_talent) } and astralpower() > 50 - buffremaining(starfall) * 6 } and { not buffpresent(kindred_empowerment_energize) or buffpresent(eclipse_solar_buff) or not iscovenant("kyrian") } and astralpower() >= astralpowercost(moonfire) } and spell(moonfire) or not checkboxon("no_cds") and cd_condition() and { buffpresent(starfall) or astralpower() > 50 } and not buffpresent(solstice_buff) and not buffpresent(celestial_alignment) and { not iscovenant("night_fae") or convoke_desync() or not spellcooldown(convoke_the_spirits) > 0 or fightremains() < spellcooldown(convoke_the_spirits) + 6 or fightremains() % 180 < 30 + conduitvalue(precise_alignment_conduit) } and spell(incarnation) or { fightremains() < 15 or { buffamount(primordial_arcanic_pulsar_buff) < 250 or buffamount(primordial_arcanic_pulsar_buff) >= 250 } and buffpresent(starfall) and { spellcooldown(celestial_alignment) > 50 or checkboxon("no_cds") } } and spell(kindred_spirits) or target.refreshable(stellar_flare) and target.timetodie() > 15 and { enemies(tagged=1) < 4 and astralpower() >= astralpowercost(stellar_flare) and { buffremaining(celestial_alignment) > 10 or not buffpresent(celestial_alignment) } } and spell(stellar_flare) or buffpresent(oneths_perception_buff) and { buffrefreshable(starfall) or astralpower() > 90 } and spell(starfall) or iscovenant("night_fae") and { convoke_desync() or not spellcooldown(celestial_alignment) > 0 or buffpresent(celestial_alignment) } and spellcooldown(convoke_the_spirits) < gcd() * { astralpower() / 50 } and buffremaining(starfall) < 4 and not checkboxon("no_cds") and spell(starfall) or iscovenant("night_fae") and { convoke_desync() or not spellcooldown(celestial_alignment) > 0 or buffpresent(celestial_alignment) } and spellcooldown(convoke_the_spirits) < 6 and buffpresent(starfall) and buffpresent(eclipse_any) and not ignore_starsurge() and not checkboxon("no_cds") and spell(starsurge) or { buffpresent(oneths_clear_vision_buff) or { not astralpower() >= astralpowercost(starfire) or { buffremaining(celestial_alignment) < 5 and buffpresent(celestial_alignment) or buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) } and starfall_wont_fall_off() and enemies(tagged=1) < 3 } and { not equippedruneforge(timeworn_dreambinder_runeforge) or enemies(tagged=1) < 3 } } and spell(starsurge) or { buffpresent(eclipse_any) and spellcooldown(celestial_alignment) > 50 or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_any) and spellcooldown(celestial_alignment) > 50 or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 } and astralpower() >= astralpowercost(half_moon) and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_any) and spellcooldown(celestial_alignment) > 50 or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 } and astralpower() >= astralpowercost(full_moon) and spellknown(full_moon) and spell(full_moon) or { counter(lunar) == 1 or counter(lunar) + counter(solar) == 1 and is_cleave() or buffremaining(eclipse_solar_buff) < executetime(starfire) and buffpresent(eclipse_solar_buff) or buffpresent(eclipse_solar_buff) and not starfire_in_solar() or buffremaining(celestial_alignment) < executetime(starfire) and not is_cleave() and buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) or buffpresent(ravenous_frenzy) and 100 / { 100 + spellcastspeedpercent() } > 0.6 and { enemies(tagged=1) <= 3 or not hastalent(soul_of_the_forest_talent) } or not is_cleave() and buffremaining(celestial_alignment) > executetime(wrath_balance) } and spell(wrath_balance) or spell(starfire) or balancefallthrushortcdpostconditions() + target.refreshable(sunfire_debuff) and target.timetodie() > 14 - enemies(tagged=1) + target.debuffremaining(sunfire_debuff) and { { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } or target.debuffremaining(sunfire_debuff) < gcd() } and spell(sunfire) or { buffrefreshable(starfall) and { enemies(tagged=1) < 3 or not equippedruneforge(timeworn_dreambinder_runeforge) } or hastalent(soul_of_the_forest_talent) and buffremaining(eclipse_solar_buff) < 3 and buffpresent(eclipse_solar_buff) and buffremaining(starfall) < 7 and enemies(tagged=1) >= 4 } and { not equippedruneforge(lycaras_fleeting_glimpse_runeforge) or timeincombat() % 45 > buffremaining(starfall) + 2 } and target.timetodie() > 5 and spell(starfall) or equippedruneforge(timeworn_dreambinder_runeforge) and enemies(tagged=1) >= 3 and { not buffpresent(timeworn_dreambinder_buff) and buffrefreshable(starfall) or dream_will_fall_off() and { buffremaining(starfall) < 3 or enemies(tagged=1) > 2 and hastalent(stellar_drift_talent) and buffremaining(starfall) < 5 } } and spell(starfall) or { dream_will_fall_off() and starfall_wont_fall_off() and not ignore_starsurge() or { buffstacks(balance_of_all_things_nature_buff) > 3 or buffstacks(balance_of_all_things_arcane_buff) > 3 } and enemies(tagged=1) < 4 } and spell(starsurge) or { not buffpresent(adaptive_swarm) and not inflighttotarget(adaptive_swarm_damage) or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 3 } and spell(adaptive_swarm) or target.refreshable(moonfire_debuff) and target.timetodie() > { 14 + enemies(tagged=1) * 1.5 } / enemies(tagged=1) + target.debuffremaining(moonfire_debuff) and { { spellcooldown(celestial_alignment) <= 0 and not checkboxon("no_cds") and { convoke_desync() or spellcooldown(convoke_the_spirits) <= 0 or not iscovenant("night_fae") } or enemies(tagged=1) < 5 * { 1 + talentpoints(twin_moons_talent) } or { buffpresent(eclipse_solar_buff) or { buffpresent(eclipse_solar_buff) and buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_lunar_buff) } and not hastalent(soul_of_the_forest_talent) or buffamount(primordial_arcanic_pulsar_buff) >= 250 } and enemies(tagged=1) < 10 * { 1 + talentpoints(twin_moons_talent) } and astralpower() > 50 - buffremaining(starfall) * 6 } and { not buffpresent(kindred_empowerment_energize) or buffpresent(eclipse_solar_buff) or not iscovenant("kyrian") } and astralpower() >= astralpowercost(moonfire) } and spell(moonfire) or not checkboxon("no_cds") and cd_condition() and { buffpresent(starfall) or astralpower() > 50 } and not buffpresent(solstice_buff) and not buffpresent(celestial_alignment) and { not iscovenant("night_fae") or convoke_desync() or not spellcooldown(convoke_the_spirits) > 0 or fightremains() < spellcooldown(convoke_the_spirits) + 6 or fightremains() % 180 < 30 + conduitvalue(precise_alignment_conduit) } and spell(incarnation) or { fightremains() < 15 or { buffamount(primordial_arcanic_pulsar_buff) < 250 or buffamount(primordial_arcanic_pulsar_buff) >= 250 } and buffpresent(starfall) and { spellcooldown(celestial_alignment) > 50 or checkboxon("no_cds") } } and spell(kindred_spirits) or target.refreshable(stellar_flare) and target.timetodie() > 15 and { enemies(tagged=1) < 4 and astralpower() >= astralpowercost(stellar_flare) and { buffremaining(celestial_alignment) > 10 or not buffpresent(celestial_alignment) } } and spell(stellar_flare) or buffpresent(oneths_perception_buff) and { buffrefreshable(starfall) or astralpower() > 90 } and spell(starfall) or iscovenant("night_fae") and { convoke_desync() or not spellcooldown(celestial_alignment) > 0 or buffpresent(celestial_alignment) } and spellcooldown(convoke_the_spirits) < gcd() * { astralpower() / 50 } and buffremaining(starfall) < 4 and not checkboxon("no_cds") and spell(starfall) or iscovenant("night_fae") and { convoke_desync() or not spellcooldown(celestial_alignment) > 0 or buffpresent(celestial_alignment) } and spellcooldown(convoke_the_spirits) < 6 and buffpresent(starfall) and { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and not ignore_starsurge() and not checkboxon("no_cds") and spell(starsurge) or { buffpresent(oneths_clear_vision_buff) or { not astralpower() >= astralpowercost(starfire) or { buffremaining(celestial_alignment) < 5 and buffpresent(celestial_alignment) or buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) } and starfall_wont_fall_off() and enemies(tagged=1) < 3 } and { not equippedruneforge(timeworn_dreambinder_runeforge) or enemies(tagged=1) < 3 } } and spell(starsurge) or { { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and spellcooldown(celestial_alignment) > 50 or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and spellcooldown(celestial_alignment) > 50 or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 } and astralpower() >= astralpowercost(half_moon) and spellknown(half_moon) and spell(half_moon) or { { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and spellcooldown(celestial_alignment) > 50 or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 } and astralpower() >= astralpowercost(full_moon) and spellknown(full_moon) and spell(full_moon) or { eclipselunarnext() or eclipseanynext() and is_cleave() or buffremaining(eclipse_solar_buff) < executetime(starfire) and buffpresent(eclipse_solar_buff) or buffpresent(eclipse_solar_buff) and not starfire_in_solar() or buffremaining(celestial_alignment) < executetime(starfire) and not is_cleave() and buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) or buffpresent(ravenous_frenzy) and 100 / { 100 + spellcastspeedpercent() } > 0.6 and { enemies(tagged=1) <= 3 or not hastalent(soul_of_the_forest_talent) } or not is_cleave() and buffremaining(celestial_alignment) > executetime(wrath_balance) } and spell(wrath_balance) or spell(starfire) or balancefallthrushortcdpostconditions() } AddFunction balanceaoecdactions @@ -594,14 +594,14 @@ AddFunction balanceaoecdactions #convoke_the_spirits,if=!druid.no_cds&((variable.convoke_desync&!cooldown.ca_inc.ready|buff.ca_inc.up)&(astral_power<50|variable.ignore_starsurge)&(buff.eclipse_lunar.remains>6|buff.eclipse_solar.remains>6)&(!runeforge.balance_of_all_things|buff.balance_of_all_things_nature.stack>3|buff.balance_of_all_things_arcane.stack>3)|fight_remains<10) if not checkboxon("no_cds") and { { convoke_desync() and not spellcooldown(celestial_alignment) <= 0 or buffpresent(celestial_alignment) } and { astralpower() < 50 or ignore_starsurge() } and { buffremaining(eclipse_lunar_buff) > 6 or buffremaining(eclipse_solar_buff) > 6 } and { not runeforge(balance_of_all_things_runeforge) or buffstacks(balance_of_all_things_nature_buff) > 3 or buffstacks(balance_of_all_things_arcane_buff) > 3 } or fightremains() < 10 } spell(convoke_the_spirits) - unless target.refreshable(sunfire_debuff) and target.timetodie() > 14 - enemies(tagged=1) + target.debuffremaining(sunfire_debuff) and { buffpresent(eclipse_any) or target.debuffremaining(sunfire_debuff) < gcd() } and spell(sunfire) or { buffrefreshable(starfall) and { enemies(tagged=1) < 3 or not equippedruneforge(timeworn_dreambinder_runeforge) } or hastalent(soul_of_the_forest_talent) and buffremaining(eclipse_solar_buff) < 3 and buffpresent(eclipse_solar_buff) and buffremaining(starfall) < 7 and enemies(tagged=1) >= 4 } and { not equippedruneforge(lycaras_fleeting_glimpse_runeforge) or timeincombat() % 45 > buffremaining(starfall) + 2 } and target.timetodie() > 5 and spell(starfall) or equippedruneforge(timeworn_dreambinder_runeforge) and enemies(tagged=1) >= 3 and { not buffpresent(timeworn_dreambinder_buff) and buffrefreshable(starfall) or dream_will_fall_off() and { buffremaining(starfall) < 3 or enemies(tagged=1) > 2 and hastalent(stellar_drift_talent) and buffremaining(starfall) < 5 } } and spell(starfall) or { dream_will_fall_off() and starfall_wont_fall_off() and not ignore_starsurge() or { buffstacks(balance_of_all_things_nature_buff) > 3 or buffstacks(balance_of_all_things_arcane_buff) > 3 } and enemies(tagged=1) < 4 } and spell(starsurge) or { not buffpresent(adaptive_swarm) and not inflighttotarget(adaptive_swarm_damage) or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 3 } and spell(adaptive_swarm) or target.refreshable(moonfire_debuff) and target.timetodie() > { 14 + enemies(tagged=1) * 1.5 } / enemies(tagged=1) + target.debuffremaining(moonfire_debuff) and { { spellcooldown(celestial_alignment) <= 0 and not checkboxon("no_cds") and { convoke_desync() or spellcooldown(convoke_the_spirits) <= 0 or not iscovenant("night_fae") } or enemies(tagged=1) < 5 * { 1 + talentpoints(twin_moons_talent) } or { buffpresent(eclipse_solar_buff) or { buffpresent(eclipse_solar_buff) and buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_lunar_buff) } and not hastalent(soul_of_the_forest_talent) or buffamount(primordial_arcanic_pulsar_buff) >= 250 } and enemies(tagged=1) < 10 * { 1 + talentpoints(twin_moons_talent) } and astralpower() > 50 - buffremaining(starfall) * 6 } and { not buffpresent(kindred_empowerment_energize) or buffpresent(eclipse_solar_buff) or not iscovenant("kyrian") } and astralpower() >= astralpowercost(moonfire) } and spell(moonfire) or astralpower() >= astralpowercost(force_of_nature) and spell(force_of_nature) + unless target.refreshable(sunfire_debuff) and target.timetodie() > 14 - enemies(tagged=1) + target.debuffremaining(sunfire_debuff) and { { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } or target.debuffremaining(sunfire_debuff) < gcd() } and spell(sunfire) or { buffrefreshable(starfall) and { enemies(tagged=1) < 3 or not equippedruneforge(timeworn_dreambinder_runeforge) } or hastalent(soul_of_the_forest_talent) and buffremaining(eclipse_solar_buff) < 3 and buffpresent(eclipse_solar_buff) and buffremaining(starfall) < 7 and enemies(tagged=1) >= 4 } and { not equippedruneforge(lycaras_fleeting_glimpse_runeforge) or timeincombat() % 45 > buffremaining(starfall) + 2 } and target.timetodie() > 5 and spell(starfall) or equippedruneforge(timeworn_dreambinder_runeforge) and enemies(tagged=1) >= 3 and { not buffpresent(timeworn_dreambinder_buff) and buffrefreshable(starfall) or dream_will_fall_off() and { buffremaining(starfall) < 3 or enemies(tagged=1) > 2 and hastalent(stellar_drift_talent) and buffremaining(starfall) < 5 } } and spell(starfall) or { dream_will_fall_off() and starfall_wont_fall_off() and not ignore_starsurge() or { buffstacks(balance_of_all_things_nature_buff) > 3 or buffstacks(balance_of_all_things_arcane_buff) > 3 } and enemies(tagged=1) < 4 } and spell(starsurge) or { not buffpresent(adaptive_swarm) and not inflighttotarget(adaptive_swarm_damage) or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 3 } and spell(adaptive_swarm) or target.refreshable(moonfire_debuff) and target.timetodie() > { 14 + enemies(tagged=1) * 1.5 } / enemies(tagged=1) + target.debuffremaining(moonfire_debuff) and { { spellcooldown(celestial_alignment) <= 0 and not checkboxon("no_cds") and { convoke_desync() or spellcooldown(convoke_the_spirits) <= 0 or not iscovenant("night_fae") } or enemies(tagged=1) < 5 * { 1 + talentpoints(twin_moons_talent) } or { buffpresent(eclipse_solar_buff) or { buffpresent(eclipse_solar_buff) and buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_lunar_buff) } and not hastalent(soul_of_the_forest_talent) or buffamount(primordial_arcanic_pulsar_buff) >= 250 } and enemies(tagged=1) < 10 * { 1 + talentpoints(twin_moons_talent) } and astralpower() > 50 - buffremaining(starfall) * 6 } and { not buffpresent(kindred_empowerment_energize) or buffpresent(eclipse_solar_buff) or not iscovenant("kyrian") } and astralpower() >= astralpowercost(moonfire) } and spell(moonfire) or astralpower() >= astralpowercost(force_of_nature) and spell(force_of_nature) { #ravenous_frenzy,if=buff.ca_inc.up if buffpresent(celestial_alignment) spell(ravenous_frenzy) #celestial_alignment,if=!druid.no_cds&variable.cd_condition&(buff.starfall.up|astral_power>50)&!buff.solstice.up&!buff.ca_inc.up&(!covenant.night_fae|variable.convoke_desync|cooldown.convoke_the_spirits.up|interpolated_fight_remains<20+(conduit.precise_alignment.time_value)) if not checkboxon("no_cds") and cd_condition() and { buffpresent(starfall) or astralpower() > 50 } and not buffpresent(solstice_buff) and not buffpresent(celestial_alignment) and { not iscovenant("night_fae") or convoke_desync() or not spellcooldown(convoke_the_spirits) > 0 or fightremains() < 20 + conduitvalue(precise_alignment_conduit) } spell(celestial_alignment) - unless not checkboxon("no_cds") and cd_condition() and { buffpresent(starfall) or astralpower() > 50 } and not buffpresent(solstice_buff) and not buffpresent(celestial_alignment) and { not iscovenant("night_fae") or convoke_desync() or not spellcooldown(convoke_the_spirits) > 0 or fightremains() < spellcooldown(convoke_the_spirits) + 6 or fightremains() % 180 < 30 + conduitvalue(precise_alignment_conduit) } and spell(incarnation) or { fightremains() < 15 or { buffamount(primordial_arcanic_pulsar_buff) < 250 or buffamount(primordial_arcanic_pulsar_buff) >= 250 } and buffpresent(starfall) and { spellcooldown(celestial_alignment) > 50 or checkboxon("no_cds") } } and spell(kindred_spirits) or target.refreshable(stellar_flare) and target.timetodie() > 15 and { enemies(tagged=1) < 4 and astralpower() >= astralpowercost(stellar_flare) and { buffremaining(celestial_alignment) > 10 or not buffpresent(celestial_alignment) } } and spell(stellar_flare) or buffpresent(eclipse_any) and astralpower() >= astralpowercost(fury_of_elune) and buffamount(primordial_arcanic_pulsar_buff) < 250 and { target.debuffpresent(adaptive_swarm_damage) or not iscovenant("necrolord") or enemies(tagged=1) > 2 } and spell(fury_of_elune) or buffpresent(oneths_perception_buff) and { buffrefreshable(starfall) or astralpower() > 90 } and spell(starfall) or iscovenant("night_fae") and { convoke_desync() or not spellcooldown(celestial_alignment) > 0 or buffpresent(celestial_alignment) } and spellcooldown(convoke_the_spirits) < gcd() * { astralpower() / 50 } and buffremaining(starfall) < 4 and not checkboxon("no_cds") and spell(starfall) or iscovenant("night_fae") and { convoke_desync() or not spellcooldown(celestial_alignment) > 0 or buffpresent(celestial_alignment) } and spellcooldown(convoke_the_spirits) < 6 and buffpresent(starfall) and buffpresent(eclipse_any) and not ignore_starsurge() and not checkboxon("no_cds") and spell(starsurge) or { buffpresent(oneths_clear_vision_buff) or { not astralpower() >= astralpowercost(starfire) or { buffremaining(celestial_alignment) < 5 and buffpresent(celestial_alignment) or buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) } and starfall_wont_fall_off() and enemies(tagged=1) < 3 } and { not equippedruneforge(timeworn_dreambinder_runeforge) or enemies(tagged=1) < 3 } } and spell(starsurge) or { buffpresent(eclipse_any) and spellcooldown(celestial_alignment) > 50 or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_any) and spellcooldown(celestial_alignment) > 50 or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 } and astralpower() >= astralpowercost(half_moon) and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_any) and spellcooldown(celestial_alignment) > 50 or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 } and astralpower() >= astralpowercost(full_moon) and spellknown(full_moon) and spell(full_moon) or spell(warrior_of_elune) or { counter(lunar) == 1 or counter(lunar) + counter(solar) == 1 and is_cleave() or buffremaining(eclipse_solar_buff) < executetime(starfire) and buffpresent(eclipse_solar_buff) or buffpresent(eclipse_solar_buff) and not starfire_in_solar() or buffremaining(celestial_alignment) < executetime(starfire) and not is_cleave() and buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) or buffpresent(ravenous_frenzy) and 100 / { 100 + spellcastspeedpercent() } > 0.6 and { enemies(tagged=1) <= 3 or not hastalent(soul_of_the_forest_talent) } or not is_cleave() and buffremaining(celestial_alignment) > executetime(wrath_balance) } and spell(wrath_balance) or spell(starfire) + unless not checkboxon("no_cds") and cd_condition() and { buffpresent(starfall) or astralpower() > 50 } and not buffpresent(solstice_buff) and not buffpresent(celestial_alignment) and { not iscovenant("night_fae") or convoke_desync() or not spellcooldown(convoke_the_spirits) > 0 or fightremains() < spellcooldown(convoke_the_spirits) + 6 or fightremains() % 180 < 30 + conduitvalue(precise_alignment_conduit) } and spell(incarnation) or { fightremains() < 15 or { buffamount(primordial_arcanic_pulsar_buff) < 250 or buffamount(primordial_arcanic_pulsar_buff) >= 250 } and buffpresent(starfall) and { spellcooldown(celestial_alignment) > 50 or checkboxon("no_cds") } } and spell(kindred_spirits) or target.refreshable(stellar_flare) and target.timetodie() > 15 and { enemies(tagged=1) < 4 and astralpower() >= astralpowercost(stellar_flare) and { buffremaining(celestial_alignment) > 10 or not buffpresent(celestial_alignment) } } and spell(stellar_flare) or { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and astralpower() >= astralpowercost(fury_of_elune) and buffamount(primordial_arcanic_pulsar_buff) < 250 and { target.debuffpresent(adaptive_swarm_damage) or not iscovenant("necrolord") or enemies(tagged=1) > 2 } and spell(fury_of_elune) or buffpresent(oneths_perception_buff) and { buffrefreshable(starfall) or astralpower() > 90 } and spell(starfall) or iscovenant("night_fae") and { convoke_desync() or not spellcooldown(celestial_alignment) > 0 or buffpresent(celestial_alignment) } and spellcooldown(convoke_the_spirits) < gcd() * { astralpower() / 50 } and buffremaining(starfall) < 4 and not checkboxon("no_cds") and spell(starfall) or iscovenant("night_fae") and { convoke_desync() or not spellcooldown(celestial_alignment) > 0 or buffpresent(celestial_alignment) } and spellcooldown(convoke_the_spirits) < 6 and buffpresent(starfall) and { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and not ignore_starsurge() and not checkboxon("no_cds") and spell(starsurge) or { buffpresent(oneths_clear_vision_buff) or { not astralpower() >= astralpowercost(starfire) or { buffremaining(celestial_alignment) < 5 and buffpresent(celestial_alignment) or buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) } and starfall_wont_fall_off() and enemies(tagged=1) < 3 } and { not equippedruneforge(timeworn_dreambinder_runeforge) or enemies(tagged=1) < 3 } } and spell(starsurge) or { { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and spellcooldown(celestial_alignment) > 50 or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and spellcooldown(celestial_alignment) > 50 or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 } and astralpower() >= astralpowercost(half_moon) and spellknown(half_moon) and spell(half_moon) or { { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and spellcooldown(celestial_alignment) > 50 or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 } and astralpower() >= astralpowercost(full_moon) and spellknown(full_moon) and spell(full_moon) or spell(warrior_of_elune) or { eclipselunarnext() or eclipseanynext() and is_cleave() or buffremaining(eclipse_solar_buff) < executetime(starfire) and buffpresent(eclipse_solar_buff) or buffpresent(eclipse_solar_buff) and not starfire_in_solar() or buffremaining(celestial_alignment) < executetime(starfire) and not is_cleave() and buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) or buffpresent(ravenous_frenzy) and 100 / { 100 + spellcastspeedpercent() } > 0.6 and { enemies(tagged=1) <= 3 or not hastalent(soul_of_the_forest_talent) } or not is_cleave() and buffremaining(celestial_alignment) > executetime(wrath_balance) } and spell(wrath_balance) or spell(starfire) { #run_action_list,name=fallthru balancefallthrucdactions() @@ -611,7 +611,7 @@ AddFunction balanceaoecdactions AddFunction balanceaoecdpostconditions { - target.refreshable(sunfire_debuff) and target.timetodie() > 14 - enemies(tagged=1) + target.debuffremaining(sunfire_debuff) and { buffpresent(eclipse_any) or target.debuffremaining(sunfire_debuff) < gcd() } and spell(sunfire) or { buffrefreshable(starfall) and { enemies(tagged=1) < 3 or not equippedruneforge(timeworn_dreambinder_runeforge) } or hastalent(soul_of_the_forest_talent) and buffremaining(eclipse_solar_buff) < 3 and buffpresent(eclipse_solar_buff) and buffremaining(starfall) < 7 and enemies(tagged=1) >= 4 } and { not equippedruneforge(lycaras_fleeting_glimpse_runeforge) or timeincombat() % 45 > buffremaining(starfall) + 2 } and target.timetodie() > 5 and spell(starfall) or equippedruneforge(timeworn_dreambinder_runeforge) and enemies(tagged=1) >= 3 and { not buffpresent(timeworn_dreambinder_buff) and buffrefreshable(starfall) or dream_will_fall_off() and { buffremaining(starfall) < 3 or enemies(tagged=1) > 2 and hastalent(stellar_drift_talent) and buffremaining(starfall) < 5 } } and spell(starfall) or { dream_will_fall_off() and starfall_wont_fall_off() and not ignore_starsurge() or { buffstacks(balance_of_all_things_nature_buff) > 3 or buffstacks(balance_of_all_things_arcane_buff) > 3 } and enemies(tagged=1) < 4 } and spell(starsurge) or { not buffpresent(adaptive_swarm) and not inflighttotarget(adaptive_swarm_damage) or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 3 } and spell(adaptive_swarm) or target.refreshable(moonfire_debuff) and target.timetodie() > { 14 + enemies(tagged=1) * 1.5 } / enemies(tagged=1) + target.debuffremaining(moonfire_debuff) and { { spellcooldown(celestial_alignment) <= 0 and not checkboxon("no_cds") and { convoke_desync() or spellcooldown(convoke_the_spirits) <= 0 or not iscovenant("night_fae") } or enemies(tagged=1) < 5 * { 1 + talentpoints(twin_moons_talent) } or { buffpresent(eclipse_solar_buff) or { buffpresent(eclipse_solar_buff) and buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_lunar_buff) } and not hastalent(soul_of_the_forest_talent) or buffamount(primordial_arcanic_pulsar_buff) >= 250 } and enemies(tagged=1) < 10 * { 1 + talentpoints(twin_moons_talent) } and astralpower() > 50 - buffremaining(starfall) * 6 } and { not buffpresent(kindred_empowerment_energize) or buffpresent(eclipse_solar_buff) or not iscovenant("kyrian") } and astralpower() >= astralpowercost(moonfire) } and spell(moonfire) or astralpower() >= astralpowercost(force_of_nature) and spell(force_of_nature) or not checkboxon("no_cds") and cd_condition() and { buffpresent(starfall) or astralpower() > 50 } and not buffpresent(solstice_buff) and not buffpresent(celestial_alignment) and { not iscovenant("night_fae") or convoke_desync() or not spellcooldown(convoke_the_spirits) > 0 or fightremains() < spellcooldown(convoke_the_spirits) + 6 or fightremains() % 180 < 30 + conduitvalue(precise_alignment_conduit) } and spell(incarnation) or { fightremains() < 15 or { buffamount(primordial_arcanic_pulsar_buff) < 250 or buffamount(primordial_arcanic_pulsar_buff) >= 250 } and buffpresent(starfall) and { spellcooldown(celestial_alignment) > 50 or checkboxon("no_cds") } } and spell(kindred_spirits) or target.refreshable(stellar_flare) and target.timetodie() > 15 and { enemies(tagged=1) < 4 and astralpower() >= astralpowercost(stellar_flare) and { buffremaining(celestial_alignment) > 10 or not buffpresent(celestial_alignment) } } and spell(stellar_flare) or buffpresent(eclipse_any) and astralpower() >= astralpowercost(fury_of_elune) and buffamount(primordial_arcanic_pulsar_buff) < 250 and { target.debuffpresent(adaptive_swarm_damage) or not iscovenant("necrolord") or enemies(tagged=1) > 2 } and spell(fury_of_elune) or buffpresent(oneths_perception_buff) and { buffrefreshable(starfall) or astralpower() > 90 } and spell(starfall) or iscovenant("night_fae") and { convoke_desync() or not spellcooldown(celestial_alignment) > 0 or buffpresent(celestial_alignment) } and spellcooldown(convoke_the_spirits) < gcd() * { astralpower() / 50 } and buffremaining(starfall) < 4 and not checkboxon("no_cds") and spell(starfall) or iscovenant("night_fae") and { convoke_desync() or not spellcooldown(celestial_alignment) > 0 or buffpresent(celestial_alignment) } and spellcooldown(convoke_the_spirits) < 6 and buffpresent(starfall) and buffpresent(eclipse_any) and not ignore_starsurge() and not checkboxon("no_cds") and spell(starsurge) or { buffpresent(oneths_clear_vision_buff) or { not astralpower() >= astralpowercost(starfire) or { buffremaining(celestial_alignment) < 5 and buffpresent(celestial_alignment) or buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) } and starfall_wont_fall_off() and enemies(tagged=1) < 3 } and { not equippedruneforge(timeworn_dreambinder_runeforge) or enemies(tagged=1) < 3 } } and spell(starsurge) or { buffpresent(eclipse_any) and spellcooldown(celestial_alignment) > 50 or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { buffpresent(eclipse_any) and spellcooldown(celestial_alignment) > 50 or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 } and astralpower() >= astralpowercost(half_moon) and spellknown(half_moon) and spell(half_moon) or { buffpresent(eclipse_any) and spellcooldown(celestial_alignment) > 50 or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 } and astralpower() >= astralpowercost(full_moon) and spellknown(full_moon) and spell(full_moon) or spell(warrior_of_elune) or { counter(lunar) == 1 or counter(lunar) + counter(solar) == 1 and is_cleave() or buffremaining(eclipse_solar_buff) < executetime(starfire) and buffpresent(eclipse_solar_buff) or buffpresent(eclipse_solar_buff) and not starfire_in_solar() or buffremaining(celestial_alignment) < executetime(starfire) and not is_cleave() and buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) or buffpresent(ravenous_frenzy) and 100 / { 100 + spellcastspeedpercent() } > 0.6 and { enemies(tagged=1) <= 3 or not hastalent(soul_of_the_forest_talent) } or not is_cleave() and buffremaining(celestial_alignment) > executetime(wrath_balance) } and spell(wrath_balance) or spell(starfire) or balancefallthrucdpostconditions() + target.refreshable(sunfire_debuff) and target.timetodie() > 14 - enemies(tagged=1) + target.debuffremaining(sunfire_debuff) and { { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } or target.debuffremaining(sunfire_debuff) < gcd() } and spell(sunfire) or { buffrefreshable(starfall) and { enemies(tagged=1) < 3 or not equippedruneforge(timeworn_dreambinder_runeforge) } or hastalent(soul_of_the_forest_talent) and buffremaining(eclipse_solar_buff) < 3 and buffpresent(eclipse_solar_buff) and buffremaining(starfall) < 7 and enemies(tagged=1) >= 4 } and { not equippedruneforge(lycaras_fleeting_glimpse_runeforge) or timeincombat() % 45 > buffremaining(starfall) + 2 } and target.timetodie() > 5 and spell(starfall) or equippedruneforge(timeworn_dreambinder_runeforge) and enemies(tagged=1) >= 3 and { not buffpresent(timeworn_dreambinder_buff) and buffrefreshable(starfall) or dream_will_fall_off() and { buffremaining(starfall) < 3 or enemies(tagged=1) > 2 and hastalent(stellar_drift_talent) and buffremaining(starfall) < 5 } } and spell(starfall) or { dream_will_fall_off() and starfall_wont_fall_off() and not ignore_starsurge() or { buffstacks(balance_of_all_things_nature_buff) > 3 or buffstacks(balance_of_all_things_arcane_buff) > 3 } and enemies(tagged=1) < 4 } and spell(starsurge) or { not buffpresent(adaptive_swarm) and not inflighttotarget(adaptive_swarm_damage) or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 3 } and spell(adaptive_swarm) or target.refreshable(moonfire_debuff) and target.timetodie() > { 14 + enemies(tagged=1) * 1.5 } / enemies(tagged=1) + target.debuffremaining(moonfire_debuff) and { { spellcooldown(celestial_alignment) <= 0 and not checkboxon("no_cds") and { convoke_desync() or spellcooldown(convoke_the_spirits) <= 0 or not iscovenant("night_fae") } or enemies(tagged=1) < 5 * { 1 + talentpoints(twin_moons_talent) } or { buffpresent(eclipse_solar_buff) or { buffpresent(eclipse_solar_buff) and buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_lunar_buff) } and not hastalent(soul_of_the_forest_talent) or buffamount(primordial_arcanic_pulsar_buff) >= 250 } and enemies(tagged=1) < 10 * { 1 + talentpoints(twin_moons_talent) } and astralpower() > 50 - buffremaining(starfall) * 6 } and { not buffpresent(kindred_empowerment_energize) or buffpresent(eclipse_solar_buff) or not iscovenant("kyrian") } and astralpower() >= astralpowercost(moonfire) } and spell(moonfire) or astralpower() >= astralpowercost(force_of_nature) and spell(force_of_nature) or not checkboxon("no_cds") and cd_condition() and { buffpresent(starfall) or astralpower() > 50 } and not buffpresent(solstice_buff) and not buffpresent(celestial_alignment) and { not iscovenant("night_fae") or convoke_desync() or not spellcooldown(convoke_the_spirits) > 0 or fightremains() < spellcooldown(convoke_the_spirits) + 6 or fightremains() % 180 < 30 + conduitvalue(precise_alignment_conduit) } and spell(incarnation) or { fightremains() < 15 or { buffamount(primordial_arcanic_pulsar_buff) < 250 or buffamount(primordial_arcanic_pulsar_buff) >= 250 } and buffpresent(starfall) and { spellcooldown(celestial_alignment) > 50 or checkboxon("no_cds") } } and spell(kindred_spirits) or target.refreshable(stellar_flare) and target.timetodie() > 15 and { enemies(tagged=1) < 4 and astralpower() >= astralpowercost(stellar_flare) and { buffremaining(celestial_alignment) > 10 or not buffpresent(celestial_alignment) } } and spell(stellar_flare) or { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and astralpower() >= astralpowercost(fury_of_elune) and buffamount(primordial_arcanic_pulsar_buff) < 250 and { target.debuffpresent(adaptive_swarm_damage) or not iscovenant("necrolord") or enemies(tagged=1) > 2 } and spell(fury_of_elune) or buffpresent(oneths_perception_buff) and { buffrefreshable(starfall) or astralpower() > 90 } and spell(starfall) or iscovenant("night_fae") and { convoke_desync() or not spellcooldown(celestial_alignment) > 0 or buffpresent(celestial_alignment) } and spellcooldown(convoke_the_spirits) < gcd() * { astralpower() / 50 } and buffremaining(starfall) < 4 and not checkboxon("no_cds") and spell(starfall) or iscovenant("night_fae") and { convoke_desync() or not spellcooldown(celestial_alignment) > 0 or buffpresent(celestial_alignment) } and spellcooldown(convoke_the_spirits) < 6 and buffpresent(starfall) and { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and not ignore_starsurge() and not checkboxon("no_cds") and spell(starsurge) or { buffpresent(oneths_clear_vision_buff) or { not astralpower() >= astralpowercost(starfire) or { buffremaining(celestial_alignment) < 5 and buffpresent(celestial_alignment) or buffremaining(ravenous_frenzy) < gcd() * { astralpower() / 30 } and buffpresent(ravenous_frenzy) } and starfall_wont_fall_off() and enemies(tagged=1) < 3 } and { not equippedruneforge(timeworn_dreambinder_runeforge) or enemies(tagged=1) < 3 } } and spell(starsurge) or { { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and spellcooldown(celestial_alignment) > 50 or charges(new_moon) == 2 and spellchargecooldown(new_moon) < 5 or charges(new_moon) == 3 } and astralpower() >= astralpowercost(new_moon) and { not spellknown(half_moon) and not spellknown(full_moon) } and spell(new_moon) or { { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and spellcooldown(celestial_alignment) > 50 or charges(half_moon) == 2 and spellchargecooldown(half_moon) < 5 or charges(half_moon) == 3 } and astralpower() >= astralpowercost(half_moon) and spellknown(half_moon) and spell(half_moon) or { { buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) } and spellcooldown(celestial_alignment) > 50 or charges(full_moon) == 2 and spellchargecooldown(full_moon) < 5 or charges(full_moon) == 3 } and astralpower() >= astralpowercost(full_moon) and spellknown(full_moon) and spell(full_moon) or spell(warrior_of_elune) or { eclipselunarnext() or eclipseanynext() and is_cleave() or buffremaining(eclipse_solar_buff) < executetime(starfire) and buffpresent(eclipse_solar_buff) or buffpresent(eclipse_solar_buff) and not starfire_in_solar() or buffremaining(celestial_alignment) < executetime(starfire) and not is_cleave() and buffremaining(celestial_alignment) < executetime(wrath_balance) and buffpresent(celestial_alignment) or buffpresent(ravenous_frenzy) and 100 / { 100 + spellcastspeedpercent() } > 0.6 and { enemies(tagged=1) <= 3 or not hastalent(soul_of_the_forest_talent) } or not is_cleave() and buffremaining(celestial_alignment) > executetime(wrath_balance) } and spell(wrath_balance) or spell(starfire) or balancefallthrucdpostconditions() } ### actions.default @@ -2432,11 +2432,11 @@ AddFunction guardianowlweavemainactions #moonfire,target_if=refreshable|buff.galactic_guardian.up if target.refreshable(moonfire_debuff) or buffpresent(galactic_guardian_buff) spell(moonfire) #starfire,if=covenant.night_fae&eclipse.any_next - if iscovenant("night_fae") and counter(lunar) + counter(solar) == 1 spell(starfire) + if iscovenant("night_fae") and eclipseanynext() spell(starfire) #wrath,if=!covenant.night_fae&eclipse.any_next - if not iscovenant("night_fae") and counter(lunar) + counter(solar) == 1 spell(wrath) + if not iscovenant("night_fae") and eclipseanynext() spell(wrath) #starfire,if=(eclipse.in_lunar|eclipse.solar_next)|(eclipse.in_lunar&buff.starsurge_empowerment_lunar.up) - if buffpresent(eclipse_lunar_buff) or counter(solar) == 1 or buffpresent(eclipse_lunar_buff) and buffpresent(starsurge_empowerment_lunar_buff) spell(starfire) + if buffpresent(eclipse_lunar_buff) or eclipsesolarnext() or buffpresent(eclipse_lunar_buff) and buffpresent(starsurge_empowerment_lunar_buff) spell(starfire) #wrath spell(wrath) } @@ -2456,7 +2456,7 @@ AddFunction guardianowlweaveshortcdactions AddFunction guardianowlweaveshortcdpostconditions { - not buffpresent(moonkin_form) and spell(moonkin_form) or spell(starsurge) or { not target.debuffpresent(adaptive_swarm_damage) and not inflighttotarget(adaptive_swarm_damage) and { not target.debuffpresent(adaptive_swarm) or target.debuffremaining(adaptive_swarm) > 3 } or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 5 and target.debuffpresent(adaptive_swarm_damage) } and spell(adaptive_swarm) or target.refreshable(sunfire_debuff) and spell(sunfire) or { target.refreshable(moonfire_debuff) or buffpresent(galactic_guardian_buff) } and spell(moonfire) or iscovenant("night_fae") and counter(lunar) + counter(solar) == 1 and spell(starfire) or not iscovenant("night_fae") and counter(lunar) + counter(solar) == 1 and spell(wrath) or { buffpresent(eclipse_lunar_buff) or counter(solar) == 1 or buffpresent(eclipse_lunar_buff) and buffpresent(starsurge_empowerment_lunar_buff) } and spell(starfire) or spell(wrath) + not buffpresent(moonkin_form) and spell(moonkin_form) or spell(starsurge) or { not target.debuffpresent(adaptive_swarm_damage) and not inflighttotarget(adaptive_swarm_damage) and { not target.debuffpresent(adaptive_swarm) or target.debuffremaining(adaptive_swarm) > 3 } or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 5 and target.debuffpresent(adaptive_swarm_damage) } and spell(adaptive_swarm) or target.refreshable(sunfire_debuff) and spell(sunfire) or { target.refreshable(moonfire_debuff) or buffpresent(galactic_guardian_buff) } and spell(moonfire) or iscovenant("night_fae") and eclipseanynext() and spell(starfire) or not iscovenant("night_fae") and eclipseanynext() and spell(wrath) or { buffpresent(eclipse_lunar_buff) or eclipsesolarnext() or buffpresent(eclipse_lunar_buff) and buffpresent(starsurge_empowerment_lunar_buff) } and spell(starfire) or spell(wrath) } AddFunction guardianowlweavecdactions @@ -2471,7 +2471,7 @@ AddFunction guardianowlweavecdactions #convoke_the_spirits,if=soulbind.first_strike.enabled if enabledsoulbind(first_strike_soulbind) spell(convoke_the_spirits) - unless checkboxon("owlweave_bear") and spell(empower_bond) or { not target.debuffpresent(adaptive_swarm_damage) and not inflighttotarget(adaptive_swarm_damage) and { not target.debuffpresent(adaptive_swarm) or target.debuffremaining(adaptive_swarm) > 3 } or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 5 and target.debuffpresent(adaptive_swarm_damage) } and spell(adaptive_swarm) or target.refreshable(sunfire_debuff) and spell(sunfire) or { target.refreshable(moonfire_debuff) or buffpresent(galactic_guardian_buff) } and spell(moonfire) or iscovenant("night_fae") and counter(lunar) + counter(solar) == 1 and spell(starfire) or not iscovenant("night_fae") and counter(lunar) + counter(solar) == 1 and spell(wrath) + unless checkboxon("owlweave_bear") and spell(empower_bond) or { not target.debuffpresent(adaptive_swarm_damage) and not inflighttotarget(adaptive_swarm_damage) and { not target.debuffpresent(adaptive_swarm) or target.debuffremaining(adaptive_swarm) > 3 } or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 5 and target.debuffpresent(adaptive_swarm_damage) } and spell(adaptive_swarm) or target.refreshable(sunfire_debuff) and spell(sunfire) or { target.refreshable(moonfire_debuff) or buffpresent(galactic_guardian_buff) } and spell(moonfire) or iscovenant("night_fae") and eclipseanynext() and spell(starfire) or not iscovenant("night_fae") and eclipseanynext() and spell(wrath) { #convoke_the_spirits,if=(buff.eclipse_lunar.up|buff.eclipse_solar.up) if buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff) spell(convoke_the_spirits) @@ -2482,7 +2482,7 @@ AddFunction guardianowlweavecdactions AddFunction guardianowlweavecdpostconditions { - not buffpresent(moonkin_form) and spell(moonkin_form) or spell(starsurge) or checkboxon("owlweave_bear") and spell(empower_bond) or { not target.debuffpresent(adaptive_swarm_damage) and not inflighttotarget(adaptive_swarm_damage) and { not target.debuffpresent(adaptive_swarm) or target.debuffremaining(adaptive_swarm) > 3 } or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 5 and target.debuffpresent(adaptive_swarm_damage) } and spell(adaptive_swarm) or target.refreshable(sunfire_debuff) and spell(sunfire) or { target.refreshable(moonfire_debuff) or buffpresent(galactic_guardian_buff) } and spell(moonfire) or iscovenant("night_fae") and counter(lunar) + counter(solar) == 1 and spell(starfire) or not iscovenant("night_fae") and counter(lunar) + counter(solar) == 1 and spell(wrath) or { buffpresent(eclipse_lunar_buff) or counter(solar) == 1 or buffpresent(eclipse_lunar_buff) and buffpresent(starsurge_empowerment_lunar_buff) } and spell(starfire) or spell(wrath) + not buffpresent(moonkin_form) and spell(moonkin_form) or spell(starsurge) or checkboxon("owlweave_bear") and spell(empower_bond) or { not target.debuffpresent(adaptive_swarm_damage) and not inflighttotarget(adaptive_swarm_damage) and { not target.debuffpresent(adaptive_swarm) or target.debuffremaining(adaptive_swarm) > 3 } or target.debuffstacks(adaptive_swarm_damage) < 3 and target.debuffremaining(adaptive_swarm_damage) < 5 and target.debuffpresent(adaptive_swarm_damage) } and spell(adaptive_swarm) or target.refreshable(sunfire_debuff) and spell(sunfire) or { target.refreshable(moonfire_debuff) or buffpresent(galactic_guardian_buff) } and spell(moonfire) or iscovenant("night_fae") and eclipseanynext() and spell(starfire) or not iscovenant("night_fae") and eclipseanynext() and spell(wrath) or { buffpresent(eclipse_lunar_buff) or eclipsesolarnext() or buffpresent(eclipse_lunar_buff) and buffpresent(starsurge_empowerment_lunar_buff) } and spell(starfire) or spell(wrath) } ### actions.oconvoke diff --git a/src/scripts/ovale_druid_spells.ts b/src/scripts/ovale_druid_spells.ts index 53fbc90ed..2e72b3b95 100644 --- a/src/scripts/ovale_druid_spells.ts +++ b/src/scripts/ovale_druid_spells.ts @@ -436,7 +436,6 @@ Define(wrath_balance 190984) # Hurl a ball of energy at the target, dealing (60 of Spell Power) Nature damage.?a197911[rnrn|cFFFFFFFFGenerates m2/10 Astral Power.|r][] SpellInfo(wrath_balance lunarpower=0) SpellList(adaptive_swarm adaptive_swarm_damage adaptive_swarm_heal) -SpellList(eclipse_any eclipse_lunar_buff eclipse_solar_buff) SpellList(incarnation incarnation_tree_of_life incarnation_king_of_the_jungle incarnation_guardian_of_ursoc incarnation_chosen_of_elune) SpellList(berserk berserk_cat berserk_bear) SpellList(bs_inc_buff incarnation_king_of_the_jungle incarnation_guardian_of_ursoc berserk_bear berserk_cat) @@ -581,11 +580,6 @@ Define(guardian_affinity_talent_restoration 22160) SpellRequire(frenzied_regeneration unusable set=1 enabled=(not ((specialization(guardian) or hastalent(guardian_affinity_talent_balance) or hastalent(guardian_affinity_talent_feral) or hastalent(guardian_affinity_restoration)) and stance(druid_bear_form)))) SpellRequire(incapacitating_roar unusable set=1 enabled=(not ((specialization(guardian) or hastalent(guardian_affinity_talent_balance) or hastalent(guardian_affinity_talent_feral) or hastalent(guardian_affinity_restoration)) and stance(druid_bear_form)))) -SpellInfo(starfire inccounter="solar" resetcounter="lunar") -SpellInfo(wrath inccounter="lunar" resetcounter="solar") - SpellAddBuff(starfire eclipse_solar_buff set=1 enabled=(counter("solar") == 1)) - SpellAddBuff(wrath eclipse_lunar_buff set=1 enabled=(counter("lunar") == 1)) - Define(starsurge_empowerment_solar_buff -78674) SpellInfo(starsurge_empowerment_solar_buff) SpellRequire(starsurge_empowerment_solar_buff duration set=(buffexpires(eclipse_solar_buff))) diff --git a/src/simulationcraft/definitions.ts b/src/simulationcraft/definitions.ts index 3bb479a36..8d5caaa55 100644 --- a/src/simulationcraft/definitions.ts +++ b/src/simulationcraft/definitions.ts @@ -706,38 +706,56 @@ export const miscOperands: LuaObj = { name: "buffpresent", extraSymbol: "eclipse_solar_buff", }, + solar_in: { + type: MiscOperandModifierType.Replace, + name: "eclipsesolarin", + }, solar_in_1: { type: MiscOperandModifierType.Code, - code: "counter(solar) == 1", + code: "eclipsesolarin() == 1", }, - solar_next: { + solar_in_2: { type: MiscOperandModifierType.Code, - code: "counter(solar) == 1", + code: "eclipsesolarin() == 2", }, - lunar_in_1: { + solar_next: { type: MiscOperandModifierType.Replace, - code: "counter(lunar) == 1", + name: "eclipsesolarnext", + }, + lunar_in: { + type: MiscOperandModifierType.Replace, + name: "eclipselunarin", + }, + lunar_in_1: { + type: MiscOperandModifierType.Code, + code: "eclipselunarin() == 1", + }, + lunar_in_2: { + type: MiscOperandModifierType.Code, + code: "eclipselunarin() == 2", }, lunar_next: { type: MiscOperandModifierType.Replace, - code: "counter(lunar) == 1", + name: "eclipselunarnext", }, any_next: { - type: MiscOperandModifierType.Code, - code: "counter(lunar) + counter(solar) == 1", + type: MiscOperandModifierType.Replace, + name: "eclipseanynext", }, in_any: { - type: MiscOperandModifierType.Replace, - name: "buffpresent", - extraSymbol: "eclipse_any", + type: MiscOperandModifierType.Code, + code: "buffpresent(eclipse_lunar_buff) or buffpresent(eclipse_solar_buff)", + symbolsInCode: { + 1: "eclipse_lunar_buff", + 2: "eclipse_solar_buff", + }, }, in_both: { type: MiscOperandModifierType.Code, - code: - "buffpresent(eclipse_solar_buff) and buffpresent(eclipse_lunar_buff)", + code: "buffpresent(eclipse_lunar_buff) and buffpresent(eclipse_solar_buff)", symbolsInCode: { - 1: "eclipse_solar_buff", - 2: "eclipse_lunar_buff", + 1: "eclipse_lunar_buff", + 2: "eclipse_solar_buff", }, }, }, diff --git a/src/states/eclipse.ts b/src/states/eclipse.ts new file mode 100644 index 000000000..d6bab3e78 --- /dev/null +++ b/src/states/eclipse.ts @@ -0,0 +1,665 @@ +import aceEvent, { AceEvent } from "@wowts/ace_event-3.0"; +import { LuaArray } from "@wowts/lua"; +import { huge as infinity } from "@wowts/math"; +import { concat, insert } from "@wowts/table"; +import { AceModule } from "@wowts/tsaddon"; +import { GetSpellCount, GetTime, UnitCastingInfo } from "@wowts/wow-mock"; +import { + ConditionFunction, + ConditionResult, + OvaleConditionClass, + returnBoolean, + returnConstant, +} from "../engine/condition"; +import { DebugTools, Tracer } from "../engine/debug"; +import { SpellCastEventHandler, States, StateModule } from "../engine/state"; +import { OptionUiGroup } from "../ui/acegui-helpers"; +import { OvaleClass } from "../Ovale"; +import { Aura, OvaleAuraClass } from "./Aura"; +import { SpellCast } from "./LastSpell"; +import { OvalePaperDollClass } from "./PaperDoll"; +import { OvaleSpellBookClass } from "./SpellBook"; +import { OvaleCombatClass } from "./combat"; + +type EclipseType = "lunar" | "solar"; + +type EclipseState = + | "any_next" + | "in_both" + | "in_lunar" + | "in_solar" + | "lunar_next" + | "solar_next"; + +class EclipseData { + starfire = 0; + starfireMax = 0; + wrath = 0; + wrathMax = 0; +} + +const balanceSpellId = { + starfire: 194153, + wrath: 190984, +}; + +const balanceAffinitySpellId = { + talent: 22163, + starfire: 197628, + wrath: 5176, +}; + +const celestialAlignmentId = 194223; +const eclipseLunarId = 48518; +const eclipseSolarId = 48517; +const leafOnTheWaterId = 334604; + +export class Eclipse extends States implements StateModule { + private module: AceModule & AceEvent; + private tracer: Tracer; + private hasEclipseHandlers = false; + private isCasting = false; + private adjustCount = false; + private starfireId = 0; + private wrathId = 0; + + private debugEclipse: OptionUiGroup = { + type: "group", + name: "Eclipse", + args: { + eclipse: { + type: "input", + name: "Eclipse", + multiline: 25, + width: "full", + get: () => { + const output: LuaArray = {}; + insert(output, `Starfire spell ID: ${this.starfireId}`); + insert(output, `Wrath spell ID: ${this.wrathId}`); + insert(output, ""); + insert( + output, + `Total Starfire(s) to Solar Eclipse: ${this.current.starfireMax}` + ); + insert( + output, + `Total Wrath(s) to Lunar Eclipse: ${this.current.starfireMax}` + ); + insert(output, ""); + insert( + output, + `Starfire(s) to Solar Eclipse: ${this.current.starfire}` + ); + insert( + output, + `Wrath(s) to Lunar Eclipse: ${this.current.wrath}` + ); + return concat(output, "\n"); + }, + }, + }, + }; + + constructor( + private ovale: OvaleClass, + debug: DebugTools, + private aura: OvaleAuraClass, + private combat: OvaleCombatClass, + private paperDoll: OvalePaperDollClass, + private spellBook: OvaleSpellBookClass + ) { + super(EclipseData); + this.module = ovale.createModule( + "Eclipse", + this.onEnable, + this.onDisable, + aceEvent + ); + this.tracer = debug.create(this.module.GetName()); + debug.defaultOptions.args["eclipse"] = this.debugEclipse; + } + + private onEnable = () => { + if (this.ovale.playerClass == "DRUID") { + this.module.RegisterEvent( + "PLAYER_ENTERING_WORLD", + this.onUpdateEclipseHandlers + ); + this.module.RegisterMessage( + "Ovale_SpecializationChanged", + this.onUpdateEclipseHandlers + ); + this.module.RegisterMessage( + "Ovale_TalentsChanged", + this.onUpdateEclipseHandlers + ); + } + }; + + private onDisable = () => { + if (this.ovale.playerClass == "DRUID") { + this.module.UnregisterEvent("PLAYER_ENTERING_WORLD"); + this.module.UnregisterMessage("Ovale_SpecializationChanged"); + this.module.UnregisterMessage("Ovale_TalentsChanged"); + this.unregisterEclipseHandlers(); + } + }; + + private onUpdateEclipseHandlers = (event: string) => { + const isBalanceDruid = this.paperDoll.isSpecialization("balance"); + const hasBalanceAffinity = + this.spellBook.getTalentPoints(balanceAffinitySpellId.talent) > 0; + if (isBalanceDruid || hasBalanceAffinity) { + if (isBalanceDruid) { + this.starfireId = balanceSpellId.starfire; + this.wrathId = balanceSpellId.wrath; + } else if (hasBalanceAffinity) { + this.starfireId = balanceAffinitySpellId.starfire; + this.wrathId = balanceAffinitySpellId.wrath; + } else { + this.starfireId = 0; + this.wrathId = 0; + } + this.registerEclipseHandlers(); + this.updateSpellMaxCounts(event); + this.updateSpellCounts(event); + } else { + this.unregisterEclipseHandlers(); + } + }; + + private registerEclipseHandlers = () => { + if (!this.hasEclipseHandlers) { + this.tracer.debug("Installing eclipse event handlers."); + this.module.RegisterEvent( + "UNIT_SPELLCAST_FAILED", + this.onUnitSpellCastStop + ); + this.module.RegisterEvent( + "UNIT_SPELLCAST_FAILED_QUIET", + this.onUnitSpellCastStop + ); + this.module.RegisterEvent( + "UNIT_SPELLCAST_INTERRUPTED", + this.onUnitSpellCastStop + ); + this.module.RegisterEvent( + "UNIT_SPELLCAST_START", + this.onUnitSpellCastStart + ); + this.module.RegisterEvent( + "UNIT_SPELLCAST_STOP", + this.onUnitSpellCastStop + ); + this.module.RegisterEvent( + "UNIT_SPELLCAST_SUCCEEDED", + this.onUnitSpellCastSucceeded + ); + this.module.RegisterEvent( + "UPDATE_SHAPESHIFT_COOLDOWN", + this.onUpdateShapeshiftCooldown + ); + this.module.RegisterMessage( + "Ovale_AuraAdded", + this.onOvaleAuraAddedOrRemoved + ); + this.module.RegisterMessage( + "Ovale_AuraRemoved", + this.onOvaleAuraAddedOrRemoved + ); + this.hasEclipseHandlers = true; + } + }; + + private unregisterEclipseHandlers = () => { + if (this.hasEclipseHandlers) { + this.tracer.debug("Removing eclipse event handlers."); + this.module.UnregisterEvent("UNIT_SPELLCAST_FAILED"); + this.module.UnregisterEvent("UNIT_SPELLCAST_FAILED_QUIET"); + this.module.UnregisterEvent("UNIT_SPELLCAST_INTERRUPTED"); + this.module.UnregisterEvent("UNIT_SPELLCAST_START"); + this.module.UnregisterEvent("UNIT_SPELLCAST_STOP"); + this.module.UnregisterEvent("UNIT_SPELLCAST_SUCCEEDED"); + this.module.UnregisterEvent("UPDATE_SHAPESHIFT_COOLDOWN"); + this.module.UnregisterMessage("Ovale_AuraAdded"); + this.module.UnregisterMessage("Ovale_AuraRemoved"); + this.hasEclipseHandlers = false; + } + }; + + private onUnitSpellCastStart = ( + event: string, + unit: string, + castGUID: string, + spellId: number + ) => { + if ( + unit == "player" && + (spellId == this.starfireId || spellId == this.wrathId) + ) { + // Sanity-check that the current spellcast is what was expected. + const [name, , , , , , , , castSpellId] = UnitCastingInfo(unit); + if (name && spellId == castSpellId) { + this.isCasting = true; + } + } + }; + + private onUnitSpellCastStop = ( + event: string, + unit: string, + castGUID: string, + spellId: number + ) => { + if ( + unit == "player" && + (spellId == this.starfireId || spellId == this.wrathId) + ) { + this.isCasting = false; + this.adjustCount = false; + } + }; + + private onUnitSpellCastSucceeded = ( + event: string, + unit: string, + castGUID: string, + spellId: number + ) => { + const current = this.current; + if ( + unit == "player" && + (spellId == celestialAlignmentId || + spellId == this.starfireId || + spellId == this.wrathId) + ) { + this.tracer.debug(`${event}: ${spellId}`); + this.isCasting = false; + this.updateSpellCounts(event); + if (this.adjustCount) { + if (spellId == this.starfireId && current.starfire > 0) { + current.starfire = current.starfire - 1; + this.tracer.debug( + "%s: adjust starfire: %d", + event, + current.starfire + ); + } else if (spellId == this.wrathId && current.wrath > 0) { + current.wrath = current.wrath - 1; + this.tracer.debug( + "%s: adjust wrath: %d", + event, + current.wrath + ); + } + this.adjustCount = false; + } + } + }; + + private onUpdateShapeshiftCooldown = (event: string) => { + /* When out of combat, this event seems to fire regularly + * every few seconds when the spell counts reset. + */ + if (!this.combat.isInCombat(undefined)) { + this.updateSpellCounts(event); + } + }; + + private onOvaleAuraAddedOrRemoved = ( + event: string, + atTime: number, + guid: string, + auraId: number, + caster: string + ) => { + if (guid == this.ovale.playerGUID) { + if (auraId == leafOnTheWaterId) { + this.updateSpellMaxCounts(event, atTime); + } else if (auraId == eclipseLunarId || auraId == eclipseSolarId) { + if (event == "Ovale_AuraRemoved" && this.isCasting) { + /* + * GetSpellCounts() does not yet return the correct + * information at UNIT_SPELLCAST_SUCCEEDED time if the + * count changes mid-cast. If the player is mid-cast + * when the Eclipse ends, then we need to adjust the + * count. + */ + this.adjustCount = true; + } + this.updateSpellCounts(event); + } + } + }; + + private updateSpellMaxCounts = (event: string, atTime?: number) => { + atTime = atTime || GetTime(); + const aura = this.aura.getAura( + "player", + leafOnTheWaterId, + atTime, + "HELPFUL" + ); + let starfireMax = 2; + let wrathMax = 2; + if (aura) { + starfireMax = 1; + wrathMax = 1; + } + const current = this.current; + if ( + current.starfireMax != starfireMax || + current.wrathMax != wrathMax + ) { + current.starfireMax = starfireMax; + current.wrathMax = wrathMax; + this.tracer.debug( + "%s: starfireMax: %d, wrathMax: %d", + event, + starfireMax, + wrathMax + ); + this.ovale.needRefresh(); + } + }; + + private updateSpellCounts = (event: string) => { + const current = this.current; + const starfire = GetSpellCount(this.starfireId); + const wrath = GetSpellCount(this.wrathId); + if (current.starfire != starfire || current.wrath != wrath) { + current.starfire = starfire; + current.wrath = wrath; + this.tracer.debug( + "%s: starfire: %d, wrath: %d", + event, + starfire, + wrath + ); + this.ovale.needRefresh(); + } + }; + + // State module + + initializeState() {} + + resetState() { + const current = this.current; + const state = this.next; + state.starfire = current.starfire || 0; + state.starfireMax = current.starfireMax; + state.wrath = current.wrath || 0; + state.wrathMax = current.wrathMax; + } + + cleanState() {} + + applySpellAfterCast: SpellCastEventHandler = ( + spellId: number, + targetGUID: string, + startCast: number, + endCast: number, + channel: boolean, + spellcast: SpellCast + ) => { + const state = this.next; + const prevStarfire = state.starfire; + const prevWrath = state.wrath; + let starfire = prevStarfire; + let wrath = prevWrath; + + // Decrement the counters based on the casted spell. + if (spellId == celestialAlignmentId) { + // Celestial Alignment triggers both Eclipse states. + starfire = 0; + wrath = 0; + this.tracer.log( + "Spell ID '%d' Celestial Alignment resets counts to 0.", + spellId + ); + // Celestial Alignment has a default base duration of 20 seconds. + const duration = + this.aura.getBaseDuration( + celestialAlignmentId, + undefined, + endCast + ) || 20; + this.triggerEclipse(endCast, "lunar", duration); + this.triggerEclipse(endCast, "solar", duration); + } else { + if (spellId == this.starfireId && prevStarfire > 0) { + starfire = prevStarfire - 1; + this.tracer.log( + "Spell ID '%d' Starfire decrements count to %d.", + spellId, + starfire + ); + } else if (spellId == this.wrathId && prevWrath > 0) { + wrath = prevWrath - 1; + this.tracer.log( + "Spell ID '%d' Wrath decrements count to %d.", + spellId, + wrath + ); + } + if (prevStarfire > 0 && starfire == 0) { + // Eclipse (Solar) has a default base duration of 15 seconds. + const duration = + this.aura.getBaseDuration( + eclipseSolarId, + undefined, + endCast + ) || 15; + this.triggerEclipse(endCast, "solar", duration); + wrath = 0; + } + if (prevWrath > 0 && wrath == 0) { + // Eclipse (Lunar) has a default base duration of 15 seconds. + const duration = + this.aura.getBaseDuration( + eclipseLunarId, + undefined, + endCast + ) || 15; + this.triggerEclipse(endCast, "lunar", duration); + starfire = 0; + } + } + // Update the counter state. + state.starfire = starfire; + state.wrath = wrath; + }; + + private triggerEclipse = ( + atTime: number, + eclipseType: EclipseType, + duration: number + ) => { + if (eclipseType == "lunar" || eclipseType == "solar") { + this.tracer.log("Triggering %s eclipse.", eclipseType); + const auraId = + (eclipseType == "lunar" && eclipseLunarId) || eclipseSolarId; + this.aura.addAuraToGUID( + this.ovale.playerGUID, + auraId, + this.ovale.playerGUID, + "HELPFUL", + undefined, + atTime, + atTime + duration, + atTime + ); + } + }; + + private getEclipseAuras = (atTime: number): (Aura | undefined)[] => { + const lunar = this.aura.getAura( + "player", + eclipseLunarId, + atTime, + "HELPFUL" + ); + const solar = this.aura.getAura( + "player", + eclipseSolarId, + atTime, + "HELPFUL" + ); + return [lunar, solar]; + }; + + /* this.getSpellCounts() has the same return values as API function + * GetSpellCount(): 0, 1, or 2 for the number of spells needed to + * enter the next eclipse. + */ + private getSpellCounts = (atTime: number): number[] => { + const state = this.next; + let starfire = state.starfire; + let wrath = state.wrath; + if (starfire == 0 && wrath == 0) { + const [lunar, solar] = this.getEclipseAuras(atTime); + const inLunar = + (lunar && this.aura.isActiveAura(lunar, atTime)) || false; + const inSolar = + (solar && this.aura.isActiveAura(solar, atTime)) || false; + if (!inLunar && !inSolar) { + const lunarEnding = (lunar && lunar.ending) || 0; + const solarEnding = (solar && solar.ending) || 0; + if (this.aura.isWithinAuraLag(lunarEnding, solarEnding)) { + // exit both eclipses + starfire = state.starfireMax; + wrath = state.wrathMax; + } else if (lunarEnding < solarEnding) { + // exit solar eclipse + wrath = state.wrathMax; + } else if (lunarEnding > solarEnding) { + // exit lunar eclipse + starfire = state.starfireMax; + } + } + } + this.tracer.log( + "Spell counts at time = %f: starfire = %d, wrath = %d", + atTime, + starfire, + wrath + ); + return [starfire, wrath]; + }; + + private getEclipse = (atTime: number): EclipseState => { + let eclipse: EclipseState = "any_next"; + const [starfire, wrath] = this.getSpellCounts(atTime); + if (starfire > 0 && wrath > 0) { + eclipse = "any_next"; + } else if (starfire > 0 && wrath == 0) { + eclipse = "solar_next"; + } else if (starfire == 0 && wrath > 0) { + eclipse = "lunar_next"; + } else { + // (starfire == 0 && wrath == 0) + const [lunar, solar] = this.getEclipseAuras(atTime); + const inLunar = + (lunar && this.aura.isActiveAura(lunar, atTime)) || false; + const inSolar = + (solar && this.aura.isActiveAura(solar, atTime)) || false; + if (inLunar && inSolar) { + eclipse = "in_both"; + } else if (inLunar) { + eclipse = "in_lunar"; + } else if (inSolar) { + eclipse = "in_solar"; + } + } + return eclipse; + }; + + registerConditions(condition: OvaleConditionClass) { + condition.registerCondition( + "eclipseanynext", + false, + this.isNextEclipseAny + ); + condition.registerCondition( + "eclipselunarin", + false, + this.enterEclipseLunarIn + ); + condition.registerCondition( + "eclipselunarnext", + false, + this.isNextEclipseLunar + ); + condition.registerCondition( + "eclipsesolarin", + false, + this.enterEclipseSolarIn + ); + condition.registerCondition( + "eclipsesolarnext", + false, + this.isNextEclipseSolar + ); + } + + private isNextEclipseAny: ConditionFunction = ( + positionalParameters, + namedParameters, + atTime + ): ConditionResult => { + const eclipse = this.getEclipse(atTime); + const value = eclipse == "any_next"; + return returnBoolean(value); + }; + + private isNextEclipseLunar: ConditionFunction = ( + positionalParameters, + namedParameters, + atTime + ): ConditionResult => { + const eclipse = this.getEclipse(atTime); + const value = eclipse == "lunar_next"; + return returnBoolean(value); + }; + + private isNextEclipseSolar: ConditionFunction = ( + positionalParameters, + namedParameters, + atTime + ): ConditionResult => { + const eclipse = this.getEclipse(atTime); + const value = eclipse == "solar_next"; + return returnBoolean(value); + }; + + /* this.enterEclipseLunarIn() returns the number of Wrath casts to + * enter lunar eclipse. + */ + private enterEclipseLunarIn: ConditionFunction = ( + positionalParameters, + namedParameters, + atTime + ): ConditionResult => { + const [, wrath] = this.getSpellCounts(atTime); + if (wrath > 0) { + return returnConstant(wrath); + } + return returnConstant(infinity); + }; + + /* this.enterEclipseSolarIn() returns the number of Starfire casts to + * enter solar eclipse. + */ + private enterEclipseSolarIn: ConditionFunction = ( + positionalParameters, + namedParameters, + atTime + ): ConditionResult => { + const [starfire] = this.getSpellCounts(atTime); + if (starfire > 0) { + return returnConstant(starfire); + } + return returnConstant(infinity); + }; +} diff --git a/src/utils/importsimc/fixes.ts b/src/utils/importsimc/fixes.ts index 4371d7dcd..f0dd5ca98 100644 --- a/src/utils/importsimc/fixes.ts +++ b/src/utils/importsimc/fixes.ts @@ -70,7 +70,6 @@ export function getFixes(spellData: ReturnType) { "blessing_of_autumn", "blessing_of_winter" ); - addSpellList("eclipse_any", "eclipse_lunar_buff", "eclipse_solar_buff"); addSpellList( "bt_buffs", "bt_swipe_buff",