pokerogue/main/functions/data_challenge.applyChallen...

82 lines
43 KiB
HTML
Raw Normal View History

2024-08-17 17:01:18 +00:00
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>applyChallenges | 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_challenge.html">data/challenge</a></li><li><a href="data_challenge.applyChallenges.html">applyChallenges</a></li></ul><h1>Function applyChallenges</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="applyChallenges" class="tsd-anchor"></a><span class="tsd-kind-call-signature">apply<wbr/>Challenges</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">gameMode</span>, <span class="tsd-kind-parameter">challengeType</span>, <span class="tsd-kind-parameter">pokemon</span>, <span class="tsd-kind-parameter">valid</span>, <span class="tsd-kind-parameter">dexAttr</span>, <span class="tsd-kind-parameter">soft</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#applyChallenges" 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>Apply all challenges that modify starter choice.</p>
2024-07-27 23:48:18 +00:00
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">gameMode</span>: <a href="../classes/game_mode.GameMode.html" class="tsd-signature-type tsd-kind-class">GameMode</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/game_mode.GameMode.html" class="tsd-kind-class">GameMode</a> The current gameMode</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">challengeType</span>: <a href="../enums/data_challenge.ChallengeType.html#STARTER_CHOICE" class="tsd-signature-type tsd-kind-enum-member">STARTER_CHOICE</a></span><div class="tsd-comment tsd-typography"><p><a href="../enums/data_challenge.ChallengeType.html" class="tsd-kind-enum">ChallengeType</a> ChallengeType.STARTER_CHOICE</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">pokemon</span>: <a href="../classes/data_pokemon_species.default.html" class="tsd-signature-type tsd-kind-class">default</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/data_pokemon_species.default.html" class="tsd-kind-class">PokemonSpecies</a> The pokemon to check the validity of.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">valid</span>: <a href="../classes/utils.BooleanHolder.html" class="tsd-signature-type tsd-kind-class">BooleanHolder</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/utils.BooleanHolder.html" class="tsd-kind-class">Utils.BooleanHolder</a> A BooleanHolder, the value gets set to false if the pokemon isn't allowed.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">dexAttr</span>: <a href="../interfaces/system_game_data.DexAttrProps.html" class="tsd-signature-type tsd-kind-interface">DexAttrProps</a></span><div class="tsd-comment tsd-typography"><p><a href="../interfaces/system_game_data.DexAttrProps.html" class="tsd-kind-interface">DexAttrProps</a> The dex attributes of the pokemon.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">soft</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>boolean If true, allow it if it could become a valid pokemon.</p>
2024-08-17 17:01:18 +00:00
</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 any challenge was successfully applied.</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/challenge.ts#L779">src/data/challenge.ts:779</a></li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="applyChallenges-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">apply<wbr/>Challenges</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">gameMode</span>, <span class="tsd-kind-parameter">challengeType</span>, <span class="tsd-kind-parameter">points</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#applyChallenges-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>Apply all challenges that modify available total starter points.</p>
2024-07-27 23:48:18 +00:00
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">gameMode</span>: <a href="../classes/game_mode.GameMode.html" class="tsd-signature-type tsd-kind-class">GameMode</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/game_mode.GameMode.html" class="tsd-kind-class">GameMode</a> The current gameMode</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">challengeType</span>: <a href="../enums/data_challenge.ChallengeType.html#STARTER_POINTS" class="tsd-signature-type tsd-kind-enum-member">STARTER_POINTS</a></span><div class="tsd-comment tsd-typography"><p><a href="../enums/data_challenge.ChallengeType.html" class="tsd-kind-enum">ChallengeType</a> ChallengeType.STARTER_POINTS</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">points</span>: <a href="../classes/utils.NumberHolder.html" class="tsd-signature-type tsd-kind-class">NumberHolder</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/utils.NumberHolder.html" class="tsd-kind-class">Utils.NumberHolder</a> The amount of points you have available.</p>
2024-06-08 05:08:50 +00:00
</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 any challenge was successfully applied.</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/challenge.ts#L787">src/data/challenge.ts:787</a></li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="applyChallenges-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">apply<wbr/>Challenges</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">gameMode</span>, <span class="tsd-kind-parameter">challengeType</span>, <span class="tsd-kind-parameter">species</span>, <span class="tsd-kind-parameter">cost</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#applyChallenges-2" 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>Apply all challenges that modify the cost of a starter.</p>
2024-07-27 23:48:18 +00:00
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">gameMode</span>: <a href="../classes/game_mode.GameMode.html" class="tsd-signature-type tsd-kind-class">GameMode</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/game_mode.GameMode.html" class="tsd-kind-class">GameMode</a> The current gameMode</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">challengeType</span>: <a href="../enums/data_challenge.ChallengeType.html#STARTER_COST" class="tsd-signature-type tsd-kind-enum-member">STARTER_COST</a></span><div class="tsd-comment tsd-typography"><p><a href="../enums/data_challenge.ChallengeType.html" class="tsd-kind-enum">ChallengeType</a> ChallengeType.STARTER_COST</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">species</span>: <a href="../enums/enums_species.Species.html" class="tsd-signature-type tsd-kind-enum">Species</a></span><div class="tsd-comment tsd-typography"><p><a href="../enums/enums_species.Species.html" class="tsd-kind-enum">Species</a> The pokemon to change the cost of.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">cost</span>: <a href="../classes/utils.NumberHolder.html" class="tsd-signature-type tsd-kind-class">NumberHolder</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>True if any challenge was successfully applied.</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/challenge.ts#L796">src/data/challenge.ts:796</a></li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="applyChallenges-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">apply<wbr/>Challenges</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">gameMode</span>, <span class="tsd-kind-parameter">challengeType</span>, <span class="tsd-kind-parameter">pokemon</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#applyChallenges-3" 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>Apply all challenges that modify a starter after selection.</p>
2024-07-27 23:48:18 +00:00
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">gameMode</span>: <a href="../classes/game_mode.GameMode.html" class="tsd-signature-type tsd-kind-class">GameMode</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/game_mode.GameMode.html" class="tsd-kind-class">GameMode</a> The current gameMode</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">challengeType</span>: <a href="../enums/data_challenge.ChallengeType.html#STARTER_MODIFY" class="tsd-signature-type tsd-kind-enum-member">STARTER_MODIFY</a></span><div class="tsd-comment tsd-typography"><p><a href="../enums/data_challenge.ChallengeType.html" class="tsd-kind-enum">ChallengeType</a> ChallengeType.STARTER_MODIFY</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">pokemon</span>: <a href="../classes/field_pokemon.default.html" class="tsd-signature-type tsd-kind-class">default</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/field_pokemon.default.html" class="tsd-kind-class">Pokemon</a> The starter pokemon to modify.</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 any challenge was successfully applied.</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/challenge.ts#L804">src/data/challenge.ts:804</a></li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="applyChallenges-4" class="tsd-anchor"></a><span class="tsd-kind-call-signature">apply<wbr/>Challenges</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">gameMode</span>, <span class="tsd-kind-parameter">challengeType</span>, <span class="tsd-kind-parameter">pokemon</span>, <span class="tsd-kind-parameter">valid</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#applyChallenges-4" 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>Apply all challenges that what pokemon you can have in battle.</p>
2024-07-27 23:48:18 +00:00
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">gameMode</span>: <a href="../classes/game_mode.GameMode.html" class="tsd-signature-type tsd-kind-class">GameMode</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/game_mode.GameMode.html" class="tsd-kind-class">GameMode</a> The current gameMode</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">challengeType</span>: <a href="../enums/data_challenge.ChallengeType.html#POKEMON_IN_BATTLE" class="tsd-signature-type tsd-kind-enum-member">POKEMON_IN_BATTLE</a></span><div class="tsd-comment tsd-typography"><p><a href="../enums/data_challenge.ChallengeType.html" class="tsd-kind-enum">ChallengeType</a> ChallengeType.POKEMON_IN_BATTLE</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">pokemon</span>: <a href="../classes/field_pokemon.default.html" class="tsd-signature-type tsd-kind-class">default</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/field_pokemon.default.html" class="tsd-kind-class">Pokemon</a> The pokemon to check the validity of.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">valid</span>: <a href="../classes/utils.BooleanHolder.html" class="tsd-signature-type tsd-kind-class">BooleanHolder</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/utils.BooleanHolder.html" class="tsd-kind-class">Utils.BooleanHolder</a> A BooleanHolder, the value gets set to false if the pokemon isn't allowed.</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 any challenge was successfully applied.</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/challenge.ts#L813">src/data/challenge.ts:813</a></li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="applyChallenges-5" class="tsd-anchor"></a><span class="tsd-kind-call-signature">apply<wbr/>Challenges</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">gameMode</span>, <span class="tsd-kind-parameter">challengeType</span>, <span class="tsd-kind-parameter">waveIndex</span>, <span class="tsd-kind-parameter">battleConfig</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#applyChallenges-5" 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>Apply all challenges that modify what fixed battles there are.</p>
2024-07-27 23:48:18 +00:00
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">gameMode</span>: <a href="../classes/game_mode.GameMode.html" class="tsd-signature-type tsd-kind-class">GameMode</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/game_mode.GameMode.html" class="tsd-kind-class">GameMode</a> The current gameMode</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">challengeType</span>: <a href="../enums/data_challenge.ChallengeType.html#FIXED_BATTLES" class="tsd-signature-type tsd-kind-enum-member">FIXED_BATTLES</a></span><div class="tsd-comment tsd-typography"><p><a href="../enums/data_challenge.ChallengeType.html" class="tsd-kind-enum">ChallengeType</a> ChallengeType.FIXED_BATTLES</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">waveIndex</span>: <span class="tsd-signature-type">Number</span></span><div class="tsd-comment tsd-typography"><p>Number The current wave index.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">battleConfig</span>: <a href="../classes/battle.FixedBattleConfig.html" class="tsd-signature-type tsd-kind-class">FixedBattleConfig</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/battle.FixedBattleConfig.html" class="tsd-kind-class">FixedBattleConfig</a> The battle config to modify.</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 any challenge was successfully applied.</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/challenge.ts#L822">src/data/challenge.ts:822</a></li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="applyChallenges-6" class="tsd-anchor"></a><span class="tsd-kind-call-signature">apply<wbr/>Challenges</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">gameMode</span>, <span class="tsd-kind-parameter">challengeType</span>, <span class="tsd-kind-parameter">effectiveness</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#applyChallenges-6" 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>Apply all challenges that modify type effectiveness.</p>
2024-09-01 22:17:02 +00:00
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">gameMode</span>: <a href="../classes/game_mode.GameMode.html" class="tsd-signature-type tsd-kind-class">GameMode</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/game_mode.GameMode.html" class="tsd-kind-class"><code>GameMode</code></a> The current gameMode</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">challengeType</span>: <a href="../enums/data_challenge.ChallengeType.html#TYPE_EFFECTIVENESS" class="tsd-signature-type tsd-kind-enum-member">TYPE_EFFECTIVENESS</a></span><div class="tsd-comment tsd-typography"><p><a href="../enums/data_challenge.ChallengeType.html" class="tsd-kind-enum"><code>ChallengeType</code></a> ChallengeType.TYPE_EFFECTIVENESS</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">effectiveness</span>: <a href="../classes/utils.NumberHolder.html" class="tsd-signature-type tsd-kind-class">NumberHolder</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/utils.NumberHolder.html" class="tsd-kind-class"><code>Utils.NumberHolder</code></a> The current effectiveness of the move.</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 any challenge was successfully applied.</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/challenge.ts#L830">src/data/challenge.ts:830</a></li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="applyChallenges-7" class="tsd-anchor"></a><span class="tsd-kind-call-signature">apply<wbr/>Challenges</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">gameMode</span>, <span class="tsd-kind-parameter">challengeType</span>, <span class="tsd-kind-parameter">level</span>, <span class="tsd-kind-parameter">levelCap</span>, <span class="tsd-kind-parameter">isTrainer</span>, <span class="tsd-kind-parameter">isBoss</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#applyChallenges-7" 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>Apply all challenges that modify what level AI are.</p>
2024-07-27 23:48:18 +00:00
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">gameMode</span>: <a href="../classes/game_mode.GameMode.html" class="tsd-signature-type tsd-kind-class">GameMode</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/game_mode.GameMode.html" class="tsd-kind-class">GameMode</a> The current gameMode</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">challengeType</span>: <a href="../enums/data_challenge.ChallengeType.html#AI_LEVEL" class="tsd-signature-type tsd-kind-enum-member">AI_LEVEL</a></span><div class="tsd-comment tsd-typography"><p><a href="../enums/data_challenge.ChallengeType.html" class="tsd-kind-enum">ChallengeType</a> ChallengeType.AI_LEVEL</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">level</span>: <a href="../classes/utils.IntegerHolder.html" class="tsd-signature-type tsd-kind-class">IntegerHolder</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/utils.IntegerHolder.html" class="tsd-kind-class">Utils.IntegerHolder</a> The generated level of the pokemon.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">levelCap</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number The maximum level cap for the current wave.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">isTrainer</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Boolean Whether this is a trainer pokemon.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">isBoss</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Boolean Whether this is a non-trainer boss pokemon.</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 any challenge was successfully applied.</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/challenge.ts#L841">src/data/challenge.ts:841</a></li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="applyChallenges-8" class="tsd-anchor"></a><span class="tsd-kind-call-signature">apply<wbr/>Challenges</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">gameMode</span>, <span class="tsd-kind-parameter">challengeType</span>, <span class="tsd-kind-parameter">pokemon</span>, <span class="tsd-kind-parameter">moveSlots</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#applyChallenges-8" 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>Apply all challenges that modify how many move slots the AI has.</p>
2024-07-27 23:48:18 +00:00
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">gameMode</span>: <a href="../classes/game_mode.GameMode.html" class="tsd-signature-type tsd-kind-class">GameMode</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/game_mode.GameMode.html" class="tsd-kind-class">GameMode</a> The current gameMode</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">challengeType</span>: <a href="../enums/data_challenge.ChallengeType.html#AI_MOVE_SLOTS" class="tsd-signature-type tsd-kind-enum-member">AI_MOVE_SLOTS</a></span><div class="tsd-comment tsd-typography"><p><a href="../enums/data_challenge.ChallengeType.html" class="tsd-kind-enum">ChallengeType</a> ChallengeType.AI_MOVE_SLOTS</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">pokemon</span>: <a href="../classes/field_pokemon.default.html" class="tsd-signature-type tsd-kind-class">default</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/field_pokemon.default.html" class="tsd-kind-class">Pokemon</a> The pokemon being considered.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">moveSlots</span>: <a href="../classes/utils.IntegerHolder.html" class="tsd-signature-type tsd-kind-class">IntegerHolder</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/utils.IntegerHolder.html" class="tsd-kind-class">Utils.IntegerHolder</a> The amount of move slots.</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 any challenge was successfully applied.</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/challenge.ts#L850">src/data/challenge.ts:850</a></li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="applyChallenges-9" class="tsd-anchor"></a><span class="tsd-kind-call-signature">apply<wbr/>Challenges</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">gameMode</span>, <span class="tsd-kind-parameter">challengeType</span>, <span class="tsd-kind-parameter">pokemon</span>, <span class="tsd-kind-parameter">hasPassive</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#applyChallenges-9" 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>Apply all challenges that modify whether a pokemon has its passive.</p>
2024-07-27 23:48:18 +00:00
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">gameMode</span>: <a href="../classes/game_mode.GameMode.html" class="tsd-signature-type tsd-kind-class">GameMode</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/game_mode.GameMode.html" class="tsd-kind-class">GameMode</a> The current gameMode</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">challengeType</span>: <a href="../enums/data_challenge.ChallengeType.html#PASSIVE_ACCESS" class="tsd-signature-type tsd-kind-enum-member">PASSIVE_ACCESS</a></span><div class="tsd-comment tsd-typography"><p><a href="../enums/data_challenge.ChallengeType.html" class="tsd-kind-enum">ChallengeType</a> ChallengeType.PASSIVE_ACCESS</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">pokemon</span>: <a href="../classes/field_pokemon.default.html" class="tsd-signature-type tsd-kind-class">default</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/field_pokemon.default.html" class="tsd-kind-class">Pokemon</a> The pokemon to modify.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">hasPassive</span>: <a href="../classes/utils.BooleanHolder.html" class="tsd-signature-type tsd-kind-class">BooleanHolder</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/utils.BooleanHolder.html" class="tsd-kind-class">Utils.BooleanHolder</a> Whether it has its passive.</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 any challenge was successfully applied.</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/challenge.ts#L859">src/data/challenge.ts:859</a></li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="applyChallenges-10" class="tsd-anchor"></a><span class="tsd-kind-call-signature">apply<wbr/>Challenges</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">gameMode</span>, <span class="tsd-kind-parameter">challengeType</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#applyChallenges-10" 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>Apply all challenges that modify the game modes settings.</p>
2024-07-27 23:48:18 +00:00
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">gameMode</span>: <a href="../classes/game_mode.GameMode.html" class="tsd-signature-type tsd-kind-class">GameMode</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/game_mode.GameMode.html" class="tsd-kind-class">GameMode</a> The current gameMode</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">challengeType</span>: <a href="../enums/data_challenge.ChallengeType.html#GAME_MODE_MODIFY" class="tsd-signature-type tsd-kind-enum-member">GAME_MODE_MODIFY</a></span><div class="tsd-comment tsd-typography"><p><a href="../enums/data_challenge.ChallengeType.html" class="tsd-kind-enum">ChallengeType</a> ChallengeType.GAME_MODE_MODIFY</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 any challenge was successfully applied.</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/challenge.ts#L866">src/data/challenge.ts:866</a></li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="applyChallenges-11" class="tsd-anchor"></a><span class="tsd-kind-call-signature">apply<wbr/>Challenges</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">gameMode</span>, <span class="tsd-kind-parameter">challengeType</span>, <span class="tsd-kind-parameter">pokemon</span>, <span class="tsd-kind-parameter">moveSource</span>, <span class="tsd-kind-parameter">move</span>, <span class="tsd-kind-parameter">level</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#applyChallenges-11" 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>Apply all challenges that modify what level a pokemon can access a move.</p>
2024-07-27 23:48:18 +00:00
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">gameMode</span>: <a href="../classes/game_mode.GameMode.html" class="tsd-signature-type tsd-kind-class">GameMode</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/game_mode.GameMode.html" class="tsd-kind-class">GameMode</a> The current gameMode</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">challengeType</span>: <a href="../enums/data_challenge.ChallengeType.html#MOVE_ACCESS" class="tsd-signature-type tsd-kind-enum-member">MOVE_ACCESS</a></span><div class="tsd-comment tsd-typography"><p><a href="../enums/data_challenge.ChallengeType.html" class="tsd-kind-enum">ChallengeType</a> ChallengeType.MOVE_ACCESS</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">pokemon</span>: <a href="../classes/field_pokemon.default.html" class="tsd-signature-type tsd-kind-class">default</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/field_pokemon.default.html" class="tsd-kind-class">Pokemon</a> What pokemon would learn the move.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">moveSource</span>: <a href="../enums/data_challenge.MoveSourceType.html" class="tsd-signature-type tsd-kind-enum">MoveSourceType</a></span><div class="tsd-comment tsd-typography"><p><a href="../enums/data_challenge.MoveSourceType.html" class="tsd-kind-enum">MoveSourceType</a> What source the pokemon would get the move from.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">move</span>: <a href="../enums/enums_moves.Moves.html" class="tsd-signature-type tsd-kind-enum">Moves</a></span><div class="tsd-comment tsd-typography"><p><a href="../enums/enums_moves.Moves.html" class="tsd-kind-enum">Moves</a> The move in question.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">level</span>: <a href="../classes/utils.IntegerHolder.html" class="tsd-signature-type tsd-kind-class">IntegerHolder</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/utils.IntegerHolder.html" class="tsd-kind-class">Utils.IntegerHolder</a> The level threshold for access.</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 any challenge was successfully applied.</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/challenge.ts#L877">src/data/challenge.ts:877</a></li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="applyChallenges-12" class="tsd-anchor"></a><span class="tsd-kind-call-signature">apply<wbr/>Challenges</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">gameMode</span>, <span class="tsd-kind-parameter">challengeType</span>, <span class="tsd-kind-parameter">pokemon</span>, <span class="tsd-kind-parameter">moveSource</span>, <span class="tsd-kind-parameter">move</span>, <span class="tsd-kind-parameter">weight</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#applyChallenges-12" 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>Apply all challenges that modify what weight a pokemon gives to move generation</p>
2024-07-27 23:48:18 +00:00
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">gameMode</span>: <a href="../classes/game_mode.GameMode.html" class="tsd-signature-type tsd-kind-class">GameMode</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/game_mode.GameMode.html" class="tsd-kind-class">GameMode</a> The current gameMode</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">challengeType</span>: <a href="../enums/data_challenge.ChallengeType.html#MOVE_WEIGHT" class="tsd-signature-type tsd-kind-enum-member">MOVE_WEIGHT</a></span><div class="tsd-comment tsd-typography"><p><a href="../enums/data_challenge.ChallengeType.html" class="tsd-kind-enum">ChallengeType</a> ChallengeType.MOVE_WEIGHT</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">pokemon</span>: <a href="../classes/field_pokemon.default.html" class="tsd-signature-type tsd-kind-class">default</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/field_pokemon.default.html" class="tsd-kind-class">Pokemon</a> What pokemon would learn the move.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">moveSource</span>: <a href="../enums/data_challenge.MoveSourceType.html" class="tsd-signature-type tsd-kind-enum">MoveSourceType</a></span><div class="tsd-comment tsd-typography"><p><a href="../enums/data_challenge.MoveSourceType.html" class="tsd-kind-enum">MoveSourceType</a> What source the pokemon would get the move from.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">move</span>: <a href="../enums/enums_moves.Moves.html" class="tsd-signature-type tsd-kind-enum">Moves</a></span><div class="tsd-comment tsd-typography"><p><a href="../enums/enums_moves.Moves.html" class="tsd-kind-enum">Moves</a> The move in question.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">weight</span>: <a href="../classes/utils.IntegerHolder.html" class="tsd-signature-type tsd-kind-class">IntegerHolder</a></span><div class="tsd-comment tsd-typography"><p><a href="../classes/utils.IntegerHolder.html" class="tsd-kind-class">Utils.IntegerHolder</a> The weight of the move.</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 any challenge was successfully applied.</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/challenge.ts#L888">src/data/challenge.ts:888</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>pokemon-rogue-battle</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>