Skip to content

Commit

Permalink
feat: track Eclipse state directly in Ovale (#952)
Browse files Browse the repository at this point in the history
* feat: implement eclipse module to track druid's eclipse state

Add an `eclipse` module that tracks the player's Eclipse state as
spells are cast by the player. The following script conditions
are provided:

* `EclipseAnyNext()`, `EclipseLunarNext()`, `EclipseSolarNext()`
  return true or false depending on which eclipse can be
  triggered next.

* `EclipseLunarIn()` returns the number of Wrath casts needed to
  enter a lunar eclipse.

* `EclipseSolarIn()` returns the number of Starfire casts needed to
  enter a solar eclipse.

* fix: teach emitter to use the new druid eclipse conditions

* fix: remove unnecessary counter properties from starfire and wrath

Eclipse state is tracked by the `eclipse` module and obsoletes the
previous counter code in the druid scripts.

* fix: hand-modify generated scripts to use the new eclipse conditions
  • Loading branch information
johnnylam88 authored Aug 8, 2021
1 parent e57af00 commit d6ec66e
Show file tree
Hide file tree
Showing 6 changed files with 756 additions and 68 deletions.
12 changes: 12 additions & 0 deletions src/ioc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down
Loading

0 comments on commit d6ec66e

Please sign in to comment.