<!DOCTYPE html><htmlclass="default"lang="en"><head><metacharset="utf-8"/><metahttp-equiv="x-ua-compatible"content="IE=edge"/><title>default | pokemon-rogue-battle</title><metaname="description"content="Documentation for pokemon-rogue-battle"/><metaname="viewport"content="width=device-width, initial-scale=1"/><linkrel="stylesheet"href="../assets/style.css"/><linkrel="stylesheet"href="../assets/highlight.css"/><scriptdefersrc="../assets/main.js"></script><scriptasyncsrc="../assets/icons.js"id="tsd-icons-script"></script><scriptasyncsrc="../assets/search.js"id="tsd-search-script"></script><scriptasyncsrc="../assets/navigation.js"id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme=localStorage.getItem("tsd-theme")||"os";document.body.style.display="none";setTimeout(()=>app?app.showPage():document.body.style.removeProperty("display"),500)</script><headerclass="tsd-page-toolbar"><divclass="tsd-toolbar-contents container"><divclass="table-cell"id="tsd-search"data-base=".."><divclass="field"><labelfor="tsd-search-field"class="tsd-widget tsd-toolbar-icon search no-caption"><svgwidth="16"height="16"viewBox="0 0 16 16"fill="none"><usehref="../assets/icons.svg#icon-search"></use></svg></label><inputtype="text"id="tsd-search-field"aria-label="Search"/></div><divclass="field"><divid="tsd-toolbar-links"></div></div><ulclass="results"><liclass="state loading">Preparing search index...</li><liclass="state failure">The search index is not available</li></ul><ahref="../index.html"class="title">pokemon-rogue-battle</a></div><divclass="table-cell"id="tsd-widgets"><ahref="#"class="tsd-widget tsd-toolbar-icon menu no-caption"data-toggle="menu"aria-label="Menu"><svgwidth="16"height="16"viewBox="0 0 16 16"fill="none"><usehref="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><divclass="container container-main"><divclass="col-content"><divclass="tsd-page-title"><ulclass="tsd-breadcrumb"><li><ahref="../index.html">pokemon-rogue-battle</a></li><li><ahref="../modules/test_utils_gameManager.html">test/utils/gameManager</a></li><li><ahref="test_utils_gameManager.default.html">default</a></li></ul><h1>Class default</h1></div><sectionclass="tsd-panel tsd-comment"><divclass="tsd-comment tsd-typography"><p>Class to manage the game state and transitions between phases.</p>
</div><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><spanclass="tsd-kind-parameter">movePosition</span>: <spanclass="tsd-signature-type">number</span></span><divclass="tsd-comment tsd-typography"><p>the index of the move in the pokemon's moveset array</p>
</div><divclass="tsd-comment tsd-typography"></div></li></ul></div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">void</span></h4><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/2b853bae2588daa6d1bf52b11fb665d38b521663/src/test/utils/gameManager.ts#L184">src/test/utils/gameManager.ts:184</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="doKillOpponents"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>do<wbr/>Kill<wbr/>Opponents</span><ahref="#doKillOpponents"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures"><liclass="tsd-signature tsd-anchor-link"><aid="doKillOpponents.doKillOpponents-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">do<wbr/>Kill<wbr/>Opponents</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">Promise</span><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-type">void</span><spanclass="tsd-signature-symbol">></span><ahref="#doKillOpponents.doKillOpponents-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Faint all opponents currently on the field</p>
</div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">Promise</span><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-type">void</span><spanclass="tsd-signature-symbol">></span></h4><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/2b853bae2588daa6d1bf52b11fb665d38b521663/src/test/utils/gameManager.ts#L216">src/test/utils/gameManager.ts:216</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="doRevivePokemon"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>do<wbr/>Revive<wbr/>Pokemon</span><ahref="#doRevivePokemon"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures"><liclass="tsd-signature tsd-anchor-link"><aid="doRevivePokemon.doRevivePokemon-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">do<wbr/>Revive<wbr/>Pokemon</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-kind-parameter">pokemonIndex</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">void</span><ahref="#doRevivePokemon.doRevivePokemon-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Revive pokemon, currently players only.</p>
</div><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><spanclass="tsd-kind-parameter">pokemonIndex</span>: <spanclass="tsd-signature-type">number</span></span><divclass="tsd-comment tsd-typography"><p>the index of the pokemon in your party to revive</p>
</div><divclass="tsd-comment tsd-typography"></div></li></ul></div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">void</span></h4><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/2b853bae2588daa6d1bf52b11fb665d38b521663/src/test/utils/gameManager.ts#L350">src/test/utils/gameManager.ts:350</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="doSelectModifier"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>do<wbr/>Select<wbr/>Modifier</span><ahref="#doSelectModifier"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures"><liclass="tsd-signature tsd-anchor-link"><aid="doSelectModifier.doSelectModifier-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">do<wbr/>Select<wbr/>Modifier</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">void</span><ahref="#doSelectModifier.doSelectModifier-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Emulate selecting a modifier (item)</p>
</div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">void</span></h4><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/2b853bae2588daa6d1bf52b11fb665d38b521663/src/test/utils/gameManager.ts#L224">src/test/utils/gameManager.ts:224</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="doSelectPartyPokemon"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>do<wbr/>Select<wbr/>Party<wbr/>Pokemon</span><ahref="#doSelectPartyPokemon"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures"><liclass="tsd-signature tsd-anchor-link"><aid="doSelectPartyPokemon.doSelectPartyPokemon-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">do<wbr/>Select<wbr/>Party<wbr/>Pokemon</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-kind-parameter">slot</span>, <spanclass="tsd-kind-parameter">inPhase</span><spanclass="tsd-signature-symbol">?</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">void</span><ahref="#doSelectPartyPokemon.doSelectPartyPokemon-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Select a pokemon from the party menu. Only really handles the basic cases
of the party UI, where you just need to navigate to a party slot and press
Action twice - navigating any menus that come up after you select a party member
is not supported.</p>
</div><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><spanclass="tsd-kind-parameter">slot</span>: <spanclass="tsd-signature-type">number</span></span><divclass="tsd-comment tsd-typography"><p>the index of the pokemon in your party to switch to</p>
</div><divclass="tsd-comment tsd-typography"></div></li><li><span><spanclass="tsd-kind-parameter">inPhase</span>: <spanclass="tsd-signature-type">string</span><spanclass="tsd-signature-symbol"> = "SwitchPhase"</span></span><divclass="tsd-comment tsd-typography"><p>Which phase to expect the selection to occur in. Typically
non-command switch actions happen in SwitchPhase.</p>
</div><divclass="tsd-comment tsd-typography"></div></li></ul></div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">void</span></h4><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/2b853bae2588daa6d1bf52b11fb665d38b521663/src/test/utils/gameManager.ts#L366">src/test/utils/gameManager.ts:366</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="doSelectTarget"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>do<wbr/>Select<wbr/>Target</span><ahref="#doSelectTarget"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures"><liclass="tsd-signature tsd-anchor-link"><aid="doSelectTarget.doSelectTarget-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">do<wbr/>Select<wbr/>Target</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-kind-parameter">targetIndex</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">void</span><ahref="#doSelectTarget.doSelectTarget-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Emulate a player's target selection after an attack is chosen,
usually called after <ahref="test_utils_gameManager.default.html#doAttack"class="tsd-kind-method"><code>doAttack</code></a> in a double battle.</p>
</div><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><spanclass="tsd-kind-parameter">targetIndex</span>: <ahref="../enums/battle.BattlerIndex.html"class="tsd-signature-type tsd-kind-enum">BattlerIndex</a></span><divclass="tsd-comment tsd-typography"><p>the index of the attack target</p>
</div><divclass="tsd-comment tsd-typography"></div></li></ul></div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">void</span></h4><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/2b853bae2588daa6d1bf52b11fb665d38b521663/src/test/utils/gameManager.ts#L207">src/test/utils/gameManager.ts:207</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="doSwitchPokemon"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>do<wbr/>Switch<wbr/>Pokemon</span><ahref="#doSwitchPokemon"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures"><liclass="tsd-signature tsd-anchor-link"><aid="doSwitchPokemon.doSwitchPokemon-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">do<wbr/>Switch<wbr/>Pokemon</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-kind-parameter">pokemonIndex</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">void</span><ahref="#doSwitchPokemon.doSwitchPokemon-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Command an in-battle switch to another Pokemon via the main battle menu.</p>
</div><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><spanclass="tsd-kind-parameter">pokemonIndex</span>: <spanclass="tsd-signature-type">number</span></span><divclass="tsd-comment tsd-typography"><p>the index of the pokemon in your party to switch to</p>
</div><divclass="tsd-comment tsd-typography"></div></li></ul></div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">void</span></h4><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/2b853bae2588daa6d1bf52b11fb665d38b521663/src/test/utils/gameManager.ts#L337">src/test/utils/gameManager.ts:337</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="endPhase"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>end<wbr/>Phase</span><ahref="#endPhase"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures"><liclass="tsd-signature tsd-anchor-link"><aid="endPhase.endPhase-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">end<wbr/>Phase</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">void</span><ahref="#endPhase.endPhase-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Ends the current phase.</p>
</div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">void</span></h4><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/2b853bae2588daa6d1bf52b11fb665d38b521663/src/test/utils/gameManager.ts#L91">src/test/utils/gameManager.ts:91</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="exportSaveToTest"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>export<wbr/>Save<wbr/>To<wbr/>Test</span><ahref="#exportSaveToTest"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures"><liclass="tsd-signature tsd-anchor-link"><aid="exportSaveToTest.exportSaveToTest-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">export<wbr/>Save<wbr/>To<wbr/>Test</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">Promise</span><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-type">string</span><spanclass="tsd-signature-symbol">></span><ahref="#exportSaveToTest.exportSaveToTest-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Exports the save data to import it in a test game.</p>
</div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">Promise</span><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-type">string</span><spanclass="tsd-signature-symbol">></span></h4><p>A promise that resolves with the exported save data.</p>
</div><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><spanclass="tsd-kind-parameter">path</span>: <spanclass="tsd-signature-type">any</span></span><divclass="tsd-comment tsd-typography"><p>The path to the data file.</p>
</div><divclass="tsd-comment tsd-typography"></div></li></ul></div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">Promise</span><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-symbol">[</span><spanclass="tsd-signature-type">boolean</span><spanclass="tsd-signature-symbol">, </span><spanclass="tsd-signature-type">number</span><spanclass="tsd-signature-symbol">]</span><spanclass="tsd-signature-symbol">></span></h4><p>A promise that resolves with a tuple containing a boolean indicating success and an integer status code.</p>
<divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/2b853bae2588daa6d1bf52b11fb665d38b521663/src/test/utils/gameManager.ts#L308">src/test/utils/gameManager.ts:308</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="isCurrentMode"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>is<wbr/>Current<wbr/>Mode</span><ahref="#isCurrentMode"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures"><liclass="tsd-signature tsd-anchor-link"><aid="isCurrentMode.isCurrentMode-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">is<wbr/>Current<wbr/>Mode</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-kind-parameter">mode</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">boolean</span><ahref="#isCurrentMode.isCurrentMode-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Checks if the current mode matches the target mode.</p>
</div><divclass="tsd-comment tsd-typography"></div></li></ul></div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">boolean</span></h4><p>True if the current mode matches the target mode, otherwise false.</p>
<divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/2b853bae2588daa6d1bf52b11fb665d38b521663/src/test/utils/gameManager.ts#L284">src/test/utils/gameManager.ts:284</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="isCurrentPhase"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>is<wbr/>Current<wbr/>Phase</span><ahref="#isCurrentPhase"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures"><liclass="tsd-signature tsd-anchor-link"><aid="isCurrentPhase.isCurrentPhase-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">is<wbr/>Current<wbr/>Phase</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-kind-parameter">phaseTarget</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">boolean</span><ahref="#isCurrentPhase.isCurrentPhase-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Checks if the current phase matches the target phase.</p>
</div><divclass="tsd-comment tsd-typography"></div></li></ul></div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">boolean</span></h4><p>True if the current phase matches the target phase, otherwise false.</p>
<divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/2b853bae2588daa6d1bf52b11fb665d38b521663/src/test/utils/gameManager.ts#L274">src/test/utils/gameManager.ts:274</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="isVictory"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>is<wbr/>Victory</span><ahref="#isVictory"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures"><liclass="tsd-signature tsd-anchor-link"><aid="isVictory.isVictory-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">is<wbr/>Victory</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">boolean</span><ahref="#isVictory.isVictory-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Checks if the player has won the battle.</p>
</div><divclass="tsd-comment tsd-typography"></div><ulclass="tsd-parameters"><liclass="tsd-parameter-signature"><ulclass="tsd-signatures"><liclass="tsd-signature"><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">void</span></li><liclass="tsd-description"><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">void</span></h4></li></ul></li></ul></li><li><span><codeclass="tsd-tag">Optional</code><spanclass="tsd-kind-parameter">expireFn</span>: <spanclass="tsd-signature-symbol">(</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol"> =></span><spanclass="tsd-signature-type">void</span><spanclass="tsd-signature-symbol">)</span></span><divclass="tsd-comment tsd-typography"><p>Optional function to determine if the prompt has expired.</p>
</div><divclass="tsd-comment tsd-typography"></div><ulclass="tsd-parameters"><liclass="tsd-parameter-signature"><ulclass="tsd-signatures"><liclass="tsd-signature"><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">void</span></li><liclass="tsd-description"><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">void</span></h4></li></ul></li></ul></li><li><span><spanclass="tsd-kind-parameter">awaitingActionInput</span>: <spanclass="tsd-signature-type">boolean</span><spanclass="tsd-signature-symbol"> = false</span></span></li></ul></div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">void</span></h4><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/2b853bae2588daa6d1bf52b11fb665d38b521663/src/test/utils/gameManager.ts#L102">src/test/utils/gameManager.ts:102</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="removeEnemyHeldItems"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>remove<wbr/>Enemy<wbr/>Held<wbr/>Items</span><ahref="#removeEnemyHeldItems"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures"><liclass="tsd-signature tsd-anchor-link"><aid="removeEnemyHeldItems.removeEnemyHeldItems-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">remove<wbr/>Enemy<wbr/>Held<wbr/>Items</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">void</span><ahref="#removeEnemyHeldItems.removeEnemyHeldItems-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Removes all held items from enemy pokemon</p>
</div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">void</span></h4><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/2b853bae2588daa6d1bf52b11fb665d38b521663/src/test/utils/gameManager.ts#L394">src/test/utils/gameManager.ts:394</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="runToFinalBossEncounter"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>run<wbr/>To<wbr/>Final<wbr/>Boss<wbr/>Encounter</span><ahref="#runToFinalBossEncounter"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures"><liclass="tsd-signature tsd-anchor-link"><aid="runToFinalBossEncounter.runToFinalBossEncounter-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">run<wbr/>To<wbr/>Final<wbr/>Boss<wbr/>Encounter</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-kind-parameter">game</span>, <spanclass="tsd-kind-parameter">species</span>, <spanclass="tsd-kind-parameter">mode</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">Promise</span><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-type">void</span><spanclass="tsd-signature-symbol">></span><ahref="#runToFinalBossEncounter.runToFinalBossEncounter-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Helper function to run to the final boss encounter as it's a bit tricky due to extra dialogue
</div><divclass="tsd-comment tsd-typography"></div></li><li><span><spanclass="tsd-kind-parameter">species</span>: <ahref="../enums/enums_species.Species.html"class="tsd-signature-type tsd-kind-enum">Species</a><spanclass="tsd-signature-symbol">[]</span></span><divclass="tsd-comment tsd-typography"></div></li><li><span><spanclass="tsd-kind-parameter">mode</span>: <ahref="../enums/game_mode.GameModes.html"class="tsd-signature-type tsd-kind-enum">GameModes</a></span><divclass="tsd-comment tsd-typography"></div></li></ul></div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">Promise</span><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-type">void</span><spanclass="tsd-signature-symbol">></span></h4><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/2b853bae2588daa6d1bf52b11fb665d38b521663/src/test/utils/gameManager.ts#L133">src/test/utils/gameManager.ts:133</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="runToTitle"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>run<wbr/>To<wbr/>Title</span><ahref="#runToTitle"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures"><liclass="tsd-signature tsd-anchor-link"><aid="runToTitle.runToTitle-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">run<wbr/>To<wbr/>Title</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">Promise</span><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-type">void</span><spanclass="tsd-signature-symbol">></span><ahref="#runToTitle.runToTitle-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Runs the game to the title phase.</p>
</div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">Promise</span><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-type">void</span><spanclass="tsd-signature-symbol">></span></h4><p>A promise that resolves when the title phase is reached.</p>
</div><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><spanclass="tsd-kind-parameter">order</span>: <ahref="../enums/battle.BattlerIndex.html"class="tsd-signature-type tsd-kind-enum">BattlerIndex</a><spanclass="tsd-signature-symbol">[]</span></span><divclass="tsd-comment tsd-typography"><p>The turn order to set</p>
</div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/2b853bae2588daa6d1bf52b11fb665d38b521663/src/test/utils/gameManager.ts#L385">src/test/utils/gameManager.ts:385</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="startBattle"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>start<wbr/>Battle</span><ahref="#startBattle"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures"><liclass="tsd-signature tsd-anchor-link"><aid="startBattle.startBattle-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">start<wbr/>Battle</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-kind-parameter">species</span><spanclass="tsd-signature-symbol">?</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">Promise</span><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-type">void</span><spanclass="tsd-signature-symbol">></span><ahref="#startBattle.startBattle-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Transitions to the start of a battle.</p>
</div><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><codeclass="tsd-tag">Optional</code><spanclass="tsd-kind-parameter">species</span>: <ahref="../enums/enums_species.Species.html"class="tsd-signature-type tsd-kind-enum">Species</a><spanclass="tsd-signature-symbol">[]</span></span><divclass="tsd-comment tsd-typography"><p>Optional array of species to start the battle with.</p>
</div><divclass="tsd-comment tsd-typography"></div></li></ul></div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">Promise</span><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-type">void</span><spanclass="tsd-signature-symbol">></span></h4><p>A promise that resolves when the battle is started.</p>
<divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/2b853bae2588daa6d1bf52b11fb665d38b521663/src/test/utils/gameManager.ts#L163">src/test/utils/gameManager.ts:163</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="toNextTurn"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>to<wbr/>Next<wbr/>Turn</span><ahref="#toNextTurn"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures"><liclass="tsd-signature tsd-anchor-link"><aid="toNextTurn.toNextTurn-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">to<wbr/>Next<wbr/>Turn</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">Promise</span><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-type">void</span><spanclass="tsd-signature-symbol">></span><ahref="#toNextTurn.toNextTurn-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Transition to the next upcoming <ahref="phases.CommandPhase.html"class="tsd-kind-class"><code>CommandPhase</code></a></p>
</div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">Promise</span><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-type">void</span><spanclass="tsd-signature-symbol">></span></h4><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/2b853bae2588daa6d1bf52b11fb665d38b521663/src/test/utils/gameManager.ts#L245">src/test/utils/gameManager.ts:245</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="toNextWave"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>to<wbr/>Next<wbr/>Wave</span><ahref="#toNextWave"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures"><liclass="tsd-signature tsd-anchor-link"><aid="toNextWave.toNextWave-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">to<wbr/>Next<wbr/>Wave</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">Promise</span><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-type">void</span><spanclass="tsd-signature-symbol">></span><ahref="#toNextWave.toNextWave-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Emulate selecting a modifier (item) and transition to the next upcoming <ahref="phases.CommandPhase.html"class="tsd-kind-class"><code>CommandPhase</code></a></p>
</div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">Promise</span><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-type">void</span><spanclass="tsd-signature-symbol">></span></h4><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/2b853bae2588daa6d1bf52b11fb665d38b521663/src/test/utils/gameManager.ts#L250">src/test/utils/gameManager.ts:250</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="waitMode"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>wait<wbr/>Mode</span><ahref="#waitMode"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures"><liclass="tsd-signature tsd-anchor-link"><aid="waitMode.waitMode-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">wait<wbr/>Mode</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-kind-parameter">mode</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">Promise</span><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-type">void</span><spanclass="tsd-signature-symbol">></span><ahref="#waitMode.waitMode-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Waits until the specified mode is set.</p>
</div><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><spanclass="tsd-kind-parameter">mode</span>: <ahref="../enums/ui_ui.Mode.html"class="tsd-signature-type tsd-kind-enum">Mode</a></span><divclass="tsd-comment tsd-typography"><p>The mode to wait for.</p>
</div><divclass="tsd-comment tsd-typography"></div></li></ul></div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">Promise</span><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-type">void</span><spanclass="tsd-signature-symbol">></span></h4><p>A promise that resolves when the mode is set.</p>