pokerogue/main/classes/data_ability.Ability.html

30 lines
43 KiB
HTML
Raw Normal View History

2024-11-18 18:42:56 +00:00
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Ability | pokemon-rogue-battle</title><meta name="description" content="Documentation for pokemon-rogue-battle"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../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><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">pokemon-rogue-battle</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">pokemon-rogue-battle</a></li><li><a href="../modules/data_ability.html">data/ability</a></li><li><a href="data_ability.Ability.html">Ability</a></li></ul><h1>Class Ability</h1></div><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/interfaces_locales.Localizable.html" class="tsd-signature-type tsd-kind-interface">Localizable</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/pagefaultgames/pokerogue/blob/0c920ba195c8fa8470694f5a1f4b3157438aa256/src/data/ability.ts#L42">src/data/ability.ts:42</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="data_ability.Ability.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
2024-05-31 14:57:14 +01:00
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="data_ability.Ability.html#attrs" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>attrs</span></a>
<a href="data_ability.Ability.html#conditions" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>conditions</span></a>
<a href="data_ability.Ability.html#description" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>description</span></a>
<a href="data_ability.Ability.html#generation" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>generation</span></a>
<a href="data_ability.Ability.html#id" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>id</span></a>
<a href="data_ability.Ability.html#isBypassFaint" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>is<wbr/>Bypass<wbr/>Faint</span></a>
<a href="data_ability.Ability.html#isIgnorable" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>is<wbr/>Ignorable</span></a>
<a href="data_ability.Ability.html#name" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>name</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="data_ability.Ability.html#attr" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>attr</span></a>
<a href="data_ability.Ability.html#bypassFaint" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>bypass<wbr/>Faint</span></a>
<a href="data_ability.Ability.html#condition" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>condition</span></a>
<a href="data_ability.Ability.html#conditionalAttr" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>conditional<wbr/>Attr</span></a>
2024-10-26 22:31:27 +01:00
<a href="data_ability.Ability.html#edgeCase" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>edge<wbr/>Case</span></a>
2024-05-31 14:57:14 +01:00
<a href="data_ability.Ability.html#getAttrs" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Attrs</span></a>
<a href="data_ability.Ability.html#hasAttr" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>has<wbr/>Attr</span></a>
<a href="data_ability.Ability.html#ignorable" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>ignorable</span></a>
<a href="data_ability.Ability.html#localize" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>localize</span></a>
<a href="data_ability.Ability.html#partial" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>partial</span></a>
<a href="data_ability.Ability.html#unimplemented" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>unimplemented</span></a>
2024-11-18 18:42:56 +00:00
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_Ability" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Ability</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">generation</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="data_ability.Ability.html" class="tsd-signature-type tsd-kind-class">Ability</a><a href="#constructor.new_Ability" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">id</span>: <a href="../enums/enums_abilities.Abilities.html" class="tsd-signature-type tsd-kind-enum">Abilities</a></span></li><li><span><span class="tsd-kind-parameter">generation</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="data_ability.Ability.html" class="tsd-signature-type tsd-kind-class">Ability</a></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/pagefaultgames/pokerogue/blob/0c920ba195c8fa8470694f5a1f4b3157438aa256/src/data/ability.ts#L54">src/data/ability.ts:54</a></li></ul></aside></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="attrs" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>attrs</span><a href="#attrs" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">attrs</span><span class="tsd-signature-symbol">:</span> <a href="data_ability.AbAttr.html" class="tsd-signature-type tsd-kind-class">AbAttr</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/pagefaultgames/pokerogue/blob/0c920ba195c8fa8470694f5a1f4b3157438aa256/src/data/ability.ts#L51">src/data/ability.ts:51</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="conditions" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>conditions</span><a href="#conditions" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">conditions</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">AbAttrCondition</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/pagefaultgames/pokerogue/blob/0c920ba195c8fa8470694f5a1f4b3157438aa256/src/data/ability.ts#L52">src/data/ability.ts:52</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="description" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>description</span><a href="#description" aria
2024-10-26 22:31:27 +01:00
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>the ability</p>
2024-11-18 18:42:56 +00:00
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/pagefaultgames/pokerogue/blob/0c920ba195c8fa8470694f5a1f4b3157438aa256/src/data/ability.ts#L135">src/data/ability.ts:135</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="getAttrs" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>Attrs</span><a href="#getAttrs" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="getAttrs.getAttrs-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Attrs</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="data_ability.Ability.html#getAttrs.getAttrs-1.T-2">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">attrType</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="data_ability.Ability.html#getAttrs.getAttrs-1.T-2">T</a><span class="tsd-signature-symbol">[]</span><a href="#getAttrs.getAttrs-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Get all ability attributes that match <code>attrType</code></p>
2024-06-19 17:01:41 +01:00
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="getAttrs.getAttrs-1.T-2" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><a href="data_ability.AbAttr.html" class="tsd-signature-type tsd-kind-class">AbAttr</a></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">attrType</span>: <a href="../types/utils.Constructor.html" class="tsd-signature-type tsd-kind-type-alias">Constructor</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="data_ability.Ability.html#getAttrs.getAttrs-1.T-2">T</a><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>any attribute that extends <a href="data_ability.AbAttr.html" class="tsd-kind-class"><code>AbAttr</code></a></p>
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a class="tsd-signature-type tsd-kind-type-parameter" href="data_ability.Ability.html#getAttrs.getAttrs-1.T-2">T</a><span class="tsd-signature-symbol">[]</span></h4><p>Array of attributes that match <code>attrType</code>, Empty Array if none match.</p>
2024-11-18 18:42:56 +00:00
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/pagefaultgames/pokerogue/blob/0c920ba195c8fa8470694f5a1f4b3157438aa256/src/data/ability.ts#L77">src/data/ability.ts:77</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="hasAttr" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>has<wbr/>Attr</span><a href="#hasAttr" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="hasAttr.hasAttr-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">has<wbr/>Attr</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="data_ability.Ability.html#hasAttr.hasAttr-1.T-3">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">attrType</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#hasAttr.hasAttr-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Check if an ability has an attribute that matches <code>attrType</code></p>
2024-06-19 17:01:41 +01:00
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="hasAttr.hasAttr-1.T-3" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><a href="data_ability.AbAttr.html" class="tsd-signature-type tsd-kind-class">AbAttr</a></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">attrType</span>: <a href="../types/utils.Constructor.html" class="tsd-signature-type tsd-kind-type-alias">Constructor</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="data_ability.Ability.html#hasAttr.hasAttr-1.T-3">T</a><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>any attribute that extends <a href="data_ability.AbAttr.html" class="tsd-kind-class"><code>AbAttr</code></a></p>
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>true if the ability has attribute <code>attrType</code></p>
2024-11-18 18:42:56 +00:00
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/pagefaultgames/pokerogue/blob/0c920ba195c8fa8470694f5a1f4b3157438aa256/src/data/ability.ts#L86">src/data/ability.ts:86</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="ignorable" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>ignorable</span><a href="#ignorable" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="ignorable.ignorable-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">ignorable</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="data_ability.Ability.html" class="tsd-signature-type tsd-kind-class">Ability</a><a href="#ignorable.ignorable-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="data_ability.Ability.html" class="tsd-signature-type tsd-kind-class">Ability</a></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/pagefaultgames/pokerogue/blob/0c920ba195c8fa8470694f5a1f4b3157438aa256/src/data/ability.ts#L110">src/data/ability.ts:110</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="localize" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>localize</span><a href="#localize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="localize.localize-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">localize</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#localize.localize-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/interfaces_locales.Localizable.html">Localizable</a>.<a href="../interfaces/interfaces_locales.Localizable.html#localize">localize</a></p><ul><li>Defined in <a href="https://github.com/pagefaultgames/pokerogue/blob/0c920ba195c8fa8470694f5a1f4b3157438aa256/src/data/ability.ts#L65">src/data/ability.ts:65</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="partial" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>partial</span><a href="#partial" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="partial.partial-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">partial</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#partial.partial-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/pagefaultgames/pokerogue/blob/0c920ba195c8fa8470694f5a1f4b3157438aa256/src/data/ability.ts#L121">src/data/ability.ts:121</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="unimplemented" class="tsd-anchor"></a><h3 class="t