<!DOCTYPE html><htmlclass="default"lang="en"><head><metacharset="utf-8"/><metahttp-equiv="x-ua-compatible"content="IE=edge"/><title>MysteryEncounterPhase | 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/phases_mystery_encounter_phases.html">phases/mystery-encounter-phases</a></li><li><ahref="phases_mystery_encounter_phases.MysteryEncounterPhase.html">MysteryEncounterPhase</a></li></ul><h1>Class MysteryEncounterPhase</h1></div><sectionclass="tsd-panel tsd-comment"><divclass="tsd-comment tsd-typography"><p>Will handle (in order):</p>
<ul>
<li>Clearing of phase queues to enter the Mystery Encounter game state</li>
<li>Management of session data related to MEs</li>
<li>Initialization of ME option select menu and UI</li>
<li>Execute MysteryEncounter.onPreOptionPhase logic if it exists for the selected option</li>
<li>Display any <code>OptionTextDisplay.selected</code> type dialogue that is set in the MysteryEncounterDialogue dialogue tree for selected option</li>
<li>Queuing of the <ahref="phases_mystery_encounter_phases.MysteryEncounterOptionSelectedPhase.html"class="tsd-kind-class"><code>MysteryEncounterOptionSelectedPhase</code></a></li>
</div></section></div></details></section></section><detailsclass="tsd-panel-group tsd-member-group tsd-accordion"open><summaryclass="tsd-accordion-summary"data-key="section-Constructors"><h2><svgwidth="20"height="20"viewBox="0 0 24 24"fill="none"><usehref="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><sectionclass="tsd-panel tsd-member"><aid="constructor"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>constructor</span><ahref="#constructor"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="constructor.new_MysteryEncounterPhase"class="tsd-anchor"></a><spanclass="tsd-kind-constructor-signature">new <wbr/>Mystery<wbr/>Encounter<wbr/>Phase</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-kind-parameter">scene</span>, <spanclass="tsd-kind-parameter">optionSelectSettings</span><spanclass="tsd-signature-symbol">?</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><ahref="phases_mystery_encounter_phases.MysteryEncounterPhase.html"class="tsd-signature-type tsd-kind-class">MysteryEncounterPhase</a><ahref="#constructor.new_MysteryEncounterPhase"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>Mostly useful for having repeated queries during a single encounter, where the queries and options may differ each time</p>
</div><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><spanclass="tsd-kind-parameter">scene</span>: <ahref="battle_scene.default.html"class="tsd-signature-type tsd-kind-class">default</a></span><divclass="tsd-comment tsd-typography"></div></li><li><span><codeclass="tsd-tag">Optional</code><spanclass="tsd-kind-parameter">optionSelectSettings</span>: <ahref="data_mystery_encounters_utils_encounter_phase_utils.OptionSelectSettings.html"class="tsd-signature-type tsd-kind-class">OptionSelectSettings</a></span><divclass="tsd-comment tsd-typography"><p>allows overriding the typical options of an encounter with new ones</p>
</div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">void</span></h4><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><p>Overrides <ahref="phase.Phase.html">Phase</a>.<ahref="phase.Phase.html#end">end</a></p><ul><li>Defined in <ahref="https://github.com/pagefaultgames/pokerogue/blob/41380b39b950f9eeb49b31a48c0e7f5a25232de3/src/phases/mystery-encounter-phases.ts#L158">src/phases/mystery-encounter-phases.ts:158</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="handleOptionSelect"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>handle<wbr/>Option<wbr/>Select</span><ahref="#handleOptionSelect"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="handleOptionSelect.handleOptionSelect-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">handle<wbr/>Option<wbr/>Select</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-kind-parameter">option</span>, <spanclass="tsd-kind-parameter">index</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">boolean</span><ahref="#handleOptionSelect.handleOptionSelect-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>Triggers after a player selects an option for the encounter</p>