Initialize a new PhaseInterceptor.
The scene to be managed
ReadonlylogPrivate ReadonlyscenePrivatestateThe interceptor's current state.
PrivatetargetThe current target that is being ran to.
If this is at the target phase, unlock the interceptor and return control back to the caller once the calling phase has finished.
This should not be called by anything other than PromptHandler.
Clear all prior phase logs.
PrivatedoWrapper function to add coral coloration to phase logs.
Arguments to original logging function
PrivatelogMethod to log the start of a phase. Called in place of PhaseManager.startCurrentPhase to allow for manual intervention.
The name of the phase to log
PrivaterunSkip the next upcoming phase.
This function should be used for skipping phases not yet started.
To end ones already in the process of running, use GameManager.endPhase.
Method to transition to a target phase.
The name of the Phase to transition to
Whether or not to run the target phase before resolving; default true
A Promise that resolves once target has been reached.
The PhaseInterceptor is a wrapper around the
BattleScene's PhaseManager. It allows tests to exert finer control over the phase system, providing logging, manual advancing, and other helpful utilities.