<!DOCTYPE html><htmlclass="default"lang="en"><head><metacharset="utf-8"/><metahttp-equiv="x-ua-compatible"content="IE=edge"/><title>PostDamageForceSwitchAbAttr | 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/data_ability.html">data/ability</a></li><li><ahref="data_ability.PostDamageForceSwitchAbAttr.html">PostDamageForceSwitchAbAttr</a></li></ul><h1>Class PostDamageForceSwitchAbAttr</h1></div><sectionclass="tsd-panel tsd-comment"><divclass="tsd-comment tsd-typography"><p>Ability attribute for forcing a Pokémon to switch out after its health drops below half.
This attribute checks various conditions related to the damage received, the moves used by the Pokémon
and its opponents, and determines whether a forced switch-out should occur.</p>
Checks various conditions based on the moves used by the Pokémon, the opponents' moves, and
the Pokémon's health after damage to determine whether the switch-out should occur.</p>
</div><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><spanclass="tsd-kind-parameter">pokemon</span>: <ahref="field_pokemon.default.html"class="tsd-signature-type tsd-kind-class">default</a></span><divclass="tsd-comment tsd-typography"><p>The Pokémon that took damage.</p>
</div><divclass="tsd-comment tsd-typography"></div></li><li><span><spanclass="tsd-kind-parameter">damage</span>: <spanclass="tsd-signature-type">number</span></span><divclass="tsd-comment tsd-typography"><p>The amount of damage taken by the Pokémon.</p>
</div><divclass="tsd-comment tsd-typography"></div></li><li><span><spanclass="tsd-kind-parameter">simulated</span>: <spanclass="tsd-signature-type">boolean</span></span><divclass="tsd-comment tsd-typography"><p>Whether the ability is being simulated.</p>
</div><divclass="tsd-comment tsd-typography"></div></li><li><span><codeclass="tsd-tag">Optional</code><spanclass="tsd-kind-parameter">source</span>: <ahref="field_pokemon.default.html"class="tsd-signature-type tsd-kind-class">default</a></span><divclass="tsd-comment tsd-typography"><p>The Pokemon that dealt damage</p>
</div><divclass="tsd-comment tsd-typography"></div></li></ul></div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">boolean</span><spanclass="tsd-signature-symbol"> | </span><spanclass="tsd-signature-type">Promise</span><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-type">boolean</span><spanclass="tsd-signature-symbol">></span></h4><p><code>true</code> if the switch-out logic was successfully applied</p>