profectus-docs/assets/api_modules_game_modifiers.md.f8a2c59e.js

1 line
27 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{_ as e,c as t,o,N as a}from"./chunks/framework.0799945b.js";const u=JSON.parse('{"title":"Module: game/modifiers","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/modules/game/modifiers.md","lastUpdated":null}'),i={name:"api/modules/game/modifiers.md"},d=a('<h1 id="module-game-modifiers" tabindex="-1">Module: game/modifiers <a class="header-anchor" href="#module-game-modifiers" aria-label="Permalink to &quot;Module: game/modifiers&quot;"></a></h1><h2 id="interfaces" tabindex="-1">Interfaces <a class="header-anchor" href="#interfaces" aria-label="Permalink to &quot;Interfaces&quot;"></a></h2><h3 id="additivemodifieroptions" tabindex="-1">AdditiveModifierOptions <a class="header-anchor" href="#additivemodifieroptions" aria-label="Permalink to &quot;AdditiveModifierOptions&quot;"></a></h3><p>• <strong>AdditiveModifierOptions</strong>: <code>Object</code></p><p>An object that configures an additive modifier via <a href="./modifiers#createadditivemodifier">createAdditiveModifier</a>.</p><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th><th style="text-align:left;">Description</th></tr></thead><tbody><tr><td style="text-align:left;"><code>addend</code></td><td style="text-align:left;"><a href="./../util/computed#computable"><code>Computable</code></a>&lt;<a href="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a>&gt;</td><td style="text-align:left;">The amount to add to the input value.</td></tr><tr><td style="text-align:left;"><code>description?</code></td><td style="text-align:left;"><a href="./../util/computed#computable"><code>Computable</code></a>&lt;<a href="./../features/feature#coercablecomponent"><code>CoercableComponent</code></a>&gt;</td><td style="text-align:left;">Description of what this modifier is doing.</td></tr><tr><td style="text-align:left;"><code>enabled?</code></td><td style="text-align:left;"><a href="./../util/computed#computable"><code>Computable</code></a>&lt;<code>boolean</code>&gt;</td><td style="text-align:left;">A computable that will be processed and passed directly into the returned modifier.</td></tr><tr><td style="text-align:left;"><code>smallerIsBetter?</code></td><td style="text-align:left;"><code>boolean</code></td><td style="text-align:left;">Determines if numbers larger or smaller than 0 should be displayed as red.</td></tr></tbody></table><h4 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/5c11524/src/game/modifiers.tsx#L53" target="_blank" rel="noreferrer">profectus/src/game/modifiers.tsx:53</a></p><hr><h3 id="exponentialmodifieroptions" tabindex="-1">ExponentialModifierOptions <a class="header-anchor" href="#exponentialmodifieroptions" aria-label="Permalink to &quot;ExponentialModifierOptions&quot;"></a></h3><p>• <strong>ExponentialModifierOptions</strong>: <code>Object</code></p><p>An object that configures an exponential modifier via <a href="./modifiers#createexponentialmodifier">createExponentialModifier</a>.</p><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th><th style="text-align:left;">Description</th></tr></thead><tbody><tr><td style="text-align:left;"><code>description?</code></td><td style="text-align:left;"><a href="./../util/computed#computable"><code>Computable</code></a>&lt;<a href="./../features/feature#coercablecomponent"><code>CoercableComponent</code></a>&gt;</td><td style="text-align:left;">Description of what this modifier is doing.</td></tr><tr><td style="text-align:left;"><code>enabled?</code></td><td style="text-align:left;"><a href="./../util/computed#computable"><code>Computable</code></a>&lt;<code>boolean</code>&gt;</td><td style="text-align:left;">A computable that will be processed and passed directly into the returned modifier.</td></tr><tr><td style="text-align:left;"><code>exponent</code></td><td style="text-align:left;"><a href="./../util/computed#computable"><code>Computable</code></a>&lt;<a href="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a>&gt;</td><td style="text-align:left;">The amount to raise the input value to the power of.</td></tr><tr><td style="text-align:left;"><code>smallerIsBetter?</code></td><td style="text-align:left;"><code>boolean</code></td><td style="text-align:left;">Determines if numbers larger or smaller than 1 should be displayed as red.</td></tr><tr><td style="text-align:left;"><code>supportLowNumbers?</code></td><td style="text-align:left;"><code>boolean</code></td><td style="text-align:left;">Add 1 before calculating, then remove it afterwards. This prevents low numbers from becoming lower.</td></tr></tbody></table><h4 id="defined-in-1" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-1" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/5c11524/src/game/modifiers.tsx#L182" target="_blank" rel="noreferrer">profectus/src/game/modifiers.tsx:182</a></p><hr><h3 id="modifier" tabindex="-1">Modifier <a class="header-anchor" href="#modifier" aria-label="Permalink to &quot;Modifier&quot;"></a></h3><p>• <strong>Modifier</strong>: <code>Object</code></p><p>An object that can be used to apply or unapply some modification to a number. Being reversible requires the operation being invertible, but some features may rely on that. Descriptions can be optionally included for displaying them to the player. The built-in modifier creators are designed to display the modifiers using <a href="./modifiers#createmodifiersection">createModifierSection</a>.</p><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th><th style="text-align:left;">Description</th></tr></thead><tbody><tr><td style="text-align:left;"><code>apply</code></td><td style="text-align:left;">(<code>gain</code>: <a href="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a>) =&gt; <a href="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a></td><td style="text-align:left;">Applies some operation on the input and returns the result.</td></tr><tr><td style="text-align:left;"><code>description?</code></td><td style="text-align:left;"><a href="./../util/computed#processedcomputable"><code>ProcessedComputable</code></a>&lt;<a href="./../features/feature#coercablecomponent"><code>CoercableComponent</code></a>&gt;</td><td style="text-align:left;">A description of this modifier. <strong><code>See</code></strong> <a href="./modifiers#createmodifiersection">createModifierSection</a>.</td></tr><tr><td style="text-align:left;"><code>enabled?</code></td><td style="text-align:left;"><a href="./../util/computed#processedcomputable"><code>ProcessedComputable</code></a>&lt;<code>boolean</code>&gt;</td><td style="text-align:left;">Whether or not this modifier should be considered enabled. Typically for use with modifiers passed into <a href="./modifiers#createsequentialmodifier">createSequentialModifier</a>.</td></tr><tr><td style="text-align:left;"><code>getFormula?</code></td><td style="text-align:left;">(<code>gain</code>: <a href="./formulas/types#formulasource"><code>FormulaSource</code></a>) =&gt; <a href="./formulas/types#genericformula"><code>GenericFormula</code></a></td><td style="text-align:left;">Get a formula for this modifier. Required by some features.</td></tr><tr><td style="text-align:left;"><code>invert?</code></td><td style="text-align:left;">(<code>gain</code>: <a href="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a>) =&gt; <a href="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a></td><td style="text-align:left;">Reverses the operation applied by the apply property. Required by some features.</td></tr></tbody></table><h4 id="defined-in-2" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-2" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/5c11524/src/game/modifiers.tsx#L22" target="_blank" rel="noreferrer">profectus/src/game/modifiers.tsx:22</a></p><hr><h3 id="modifiersectionoptions" tabindex="-1">ModifierSectionOptions <a class="header-anchor" href="#modifiersectionoptions" aria-label="Permalink to &quot;ModifierSectionOptions&quot;"></a></h3><p>• <strong>ModifierSectionOptions</strong>: <code>Object</code></p><p>An object that configures a modifier section via <a href="./modifiers#createmodifiersection">createModifierSection</a>.</p><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th><th style="text-align:left;">Description</th></tr></thead><tbody><tr><td style="text-align:left;"><code>base?</code></td><td style="text-align:left;"><a href="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a></td><td style="text-align:left;">The base value that&#39;ll be passed into the modifier. Defaults to 1.</td></tr><tr><td style="text-align:left;"><code>baseText?</code></td><td style="text-align:left;"><a href="./../features/feature#coercablecomponent"><code>CoercableComponent</code></a></td><td style="text-align:left;">The label to use for the base value. Defaults to &quot;Base&quot;.</td></tr><tr><td style="text-align:left;"><code>modifier</code></td><td style="text-align:left;"><a href="./../util/common#withrequired"><code>WithRequired</code></a>&lt;<a href="./modifiers#modifier"><code>Modifier</code></a>, <code>&quot;description&quot;</code>&gt;</td><td style="text-align:left;">The modifier to render.</td></tr><tr><td style="text-align:left;"><code>smallerIsBetter?</code></td><td style="text-align:left;"><code>boolean</code></td><td style="text-align:left;">Determines if numbers larger or smaller than the base should be displayed as red.</td></tr><tr><td style="text-align:left;"><code>subtitle?</code></td><td style="text-align:left;"><code>string</code></td><td style="text-align:left;">Smaller text that appears in the header after the title.</td></tr><tr><td style="text-align:left;"><code>title</code></td><td style="text-align:left;"><code>string</code></td><td style="text-align:left;">The header for the section.</td></tr><tr><td style="text-align:left;"><code>unit?</code></td><td style="text-align:left;"><code>string</code></td><td style="text-align:left;">The unit of the value being modified, if any.</td></tr></tbody></table><h4 id="defined-in-3" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-3" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/5c11524/src/game/modifiers.tsx#L324" target="_blank" rel="noreferrer">profectus/src/game/modifiers.tsx:324</a></p><hr><h3 id="multiplicativemodifieroptions" tabindex="-1">MultiplicativeModifierOptions <a class="header-anchor" href="#multiplicativemodifieroptions" aria-label="Permalink to &quot;MultiplicativeModifierOptions&quot;"></a></h3><p>• <strong>MultiplicativeModifierOptions</strong>: <code>Object</code></p><p>An object that configures an multiplicative modifier via <a href="./modifiers#createmultiplicativemodifier">createMultiplicativeModifier</a>.</p><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th><th style="text-align:left;">Description</th></tr></thead><tbody><tr><td style="text-align:left;"><code>description?</code></td><td style="text-align:left;"><a href="./../util/computed#computable"><code>Computable</code></a>&lt;<a href="./../features/feature#coercablecomponent"><code>CoercableComponent</code></a>&gt;</td><td style="text-align:left;">Description of what this modifier is doing.</td></tr><tr><td style="text-align:left;"><code>enabled?</code></td><td style="text-align:left;"><a href="./../util/computed#computable"><code>Computable</code></a>&lt;<code>boolean</code>&gt;</td><td style="text-align:left;">A computable that will be processed and passed directly into the returned modifier.</td></tr><tr><td style="text-align:left;"><code>multiplier</code></td><td style="text-align:left;"><a href="./../util/computed#computable"><code>Computable</code></a>&lt;<a href="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a>&gt;</td><td style="text-align:left;">The amount to multiply the input value by.</td></tr><tr><td style="text-align:left;"><code>smallerIsBetter?</code></td><td style="text-align:left;"><code>boolean</code></td><td style="text-align:left;">Determines if numbers larger or smaller than 1 should be displayed as red.</td></tr></tbody></table><h4 id="defined-in-4" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-4" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/5c11524/src/game/modifiers.tsx#L118" target="_blank" rel="noreferrer">profectus/src/game/modifiers.tsx:118</a></p><h2 id="type-aliases" tabindex="-1">Type Aliases <a class="header-anchor" href="#type-aliases" aria-label="Permalink to &quot;Type Aliases&quot;"></a></h2><h3 id="modifierfromoptionalparams" tabindex="-1">ModifierFromOptionalParams <a class="header-anchor" href="#modifierfromoptionalparams" aria-label="Permalink to &quot;ModifierFromOptionalParams&quot;"></a></h3><p>Ƭ <strong>ModifierFromOptionalParams</strong>&lt;<code>T</code>, <code>S</code>&gt;: <code>undefined</code> extends <code>T</code> ? <code>undefined</code> extends <code>S</code> ? <a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys" target="_blank" rel="noreferrer"><code>Omit</code></a>&lt;<a href="./../util/common#withrequired"><code>WithRequired</code></a>&lt;<a href="./modifiers#modifier"><code>Modifier</code></a>, <code>&quot;invert&quot;</code> | <code>&quot;getFormula&quot;</code>&gt;, <code>&quot;description&quot;</code> | <code>&quot;enabled&quot;</code>&gt; : <a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys" target="_blank" rel="noreferrer"><code>Omit</code></a>&lt;<a href="./../util/common#withrequired"><code>WithRequired</code></a>&lt;<a href="./modifiers#modifier"><code>Modifier</code></a>, <code>&quot;invert&quot;</code> | <code>&quot;enabled&quot;</code> | <code>&quot;getFormula&quot;</code>&gt;, <code>&quot;description&quot;</code>&gt; : <code>undefined</code> extends <code>S</code> ? <a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys" target="_blank" rel="noreferrer"><code>Omit</code></a>&lt;<a href="./../util/common#withrequired"><code>WithRequired</code></a>&lt;<a href="./modifiers#modifier"><code>Modifier</code></a>, <code>&quot;invert&quot;</code> | <code>&quot;description&quot;</code> | <code>&quot;getFormula&quot;</code>&gt;, <code>&quot;enabled&quot;</code>&gt; : <a href="./../util/common#withrequired"><code>WithRequired</code></a>&lt;<a href="./modifiers#modifier"><code>Modifier</code></a>, <code>&quot;invert&quot;</code> | <code>&quot;enabled&quot;</code> | <code>&quot;description&quot;</code> | <code>&quot;getFormula&quot;</code>&gt;</p><p>Utility type used to narrow down a modifier type that will have a description and/or enabled property based on optional parameters, T and S (respectively).</p><h4 id="type-parameters" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters" aria-label="Permalink to &quot;Type parameters&quot;"></a></h4><table><thead><tr><th style="text-align:left;">Name</th></tr></thead><tbody><tr><td style="text-align:left;"><code>T</code></td></tr><tr><td style="text-align:left;"><code>S</code></td></tr></tbody></table><h4 id="defined-in-5" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-5" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/5c11524/src/game/modifiers.tsx#L44" target="_blank" rel="noreferrer">profectus/src/game/modifiers.tsx:44</a></p><h2 id="functions" tabindex="-1">Functions <a class="header-anchor" href="#functions" aria-label="Permalink to &quot;Functions&quot;"></a></h2><h3 id="createadditivemodifier" tabindex="-1">createAdditiveModifier <a class="header-anchor" href="#createadditivemodifier" aria-label="Permalink to &quot;createAdditiveModifier&quot;"></a></h3><p>▸ <strong>createAdditiveModifier</strong>&lt;<code>T</code>&gt;(<code>optionsFunc</code>): <a href="./modifiers#modifierfromoptionalparams"><code>ModifierFromOptionalParams</code></a>&lt;<code>T</code>[<code>&quot;description&quot;</code>], <code>T</code>[<code>&quot;enabled&quot;</code>]&gt;</p><p>Create a modifier that adds some value to the input value.</p><h5 id="type-parameters-1" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters-1" aria-label="Permalink to &quot;Type parameters&quot;"></a></h5><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>T</code></td><td style="text-align:left;">extends <a href="./modifiers#additivemodifieroptions"><code>AdditiveModifierOptions</code></a></td></tr></tbody></table><h5 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-label="Permalink to &quot;Parameters&quot;"></a></h5><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th><th style="text-align:left;">Description</th></tr></thead><tbody><tr><td style="text-align:left;"><code>optionsFunc</code></td><td style="text-align:left;"><a href="./../features/feature#optionsfunc"><code>OptionsFunc</code></a>&lt;<code>T</code>&gt;</td><td style="text-align:left;">Additive modifier options.</td></tr></tbody></table><h5 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-label="Permalink to &quot;Returns&quot;"></a></h5><p><a href="./modifiers#modifierfromoptionalparams"><code>ModifierFromOptionalParams</code></a>&lt;<code>T</code>[<code>&quot;description&quot;</code>], <code>T</code>[<code>&quot;enabled&quot;</code>]&gt;</p><h4 id="defined-in-6" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-6" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/5c11524/src/game/modifiers.tsx#L68" target="_blank" rel="noreferrer">profectus/src/game/modifiers.tsx:68</a></p><hr><h3 id="createexponentialmodifier" tabindex="-1">createExponentialModifier <a class="header-anchor" href="#createexponentialmodifier" aria-label="Permalink to &quot;createExponentialModifier&quot;"></a></h3><p>▸ <strong>createExponentialModifier</strong>&lt;<code>T</code>&gt;(<code>optionsFunc</code>): <a href="./modifiers#modifierfromoptionalparams"><code>ModifierFromOptionalParams</code></a>&lt;<code>T</code>[<code>&quot;description&quot;</code>], <code>T</code>[<code>&quot;enabled&quot;</code>]&gt;</p><p>Create a modifier that raises the input value to the power of some value.</p><h5 id="type-parameters-2" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters-2" aria-label="Permalink to &quot;Type parameters&quot;"></a></h5><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>T</code></td><td style="text-align:left;">extends <a href="./modifiers#exponentialmodifieroptions"><code>ExponentialModifierOptions</code></a></td></tr></tbody></table><h5 id="parameters-1" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-1" aria-label="Permalink to &quot;Parameters&quot;"></a></h5><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th><th style="text-align:left;">Description</th></tr></thead><tbody><tr><td style="text-align:left;"><code>optionsFunc</code></td><td style="text-align:left;"><a href="./../features/feature#optionsfunc"><code>OptionsFunc</code></a>&lt;<code>T</code>&gt;</td><td style="text-align:left;">Exponential modifier options.</td></tr></tbody></table><h5 id="returns-1" tabindex="-1">Returns <a class="header-anchor" href="#returns-1" aria-label="Permalink to &quot;Returns&quot;"></a></h5><p><a href="./modifiers#modifierfromoptionalparams"><code>ModifierFromOptionalParams</code></a>&lt;<code>T</code>[<code>&quot;description&quot;</code>], <code>T</code>[<code>&quot;enabled&quot;</code>]&gt;</p><h4 id="defined-in-7" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-7" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/5c11524/src/game/modifiers.tsx#L199" target="_blank" rel="noreferrer">profectus/src/game/modifiers.tsx:199</a></p><hr><h3 id="createmodifiersection" tabindex="-1">createModifierSection <a class="header-anchor" href="#createmodifiersection" aria-label="Permalink to &quot;createModifierSection&quot;"></a></h3><p>▸ <strong>createModifierSection</strong>(<code>options</code>): <code>Element</code></p><p>Create a JSX element that displays a modifier. Intended to be used with the output from <a href="./modifiers#createsequentialmodifier">createSequentialModifier</a>.</p><h5 id="parameters-2" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-2" aria-label="Permalink to &quot;Parameters&quot;"></a></h5><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th><th style="text-align:left;">Description</th></tr></thead><tbody><tr><td style="text-align:left;"><code>options</code></td><td style="text-align:left;"><a href="./modifiers#modifiersectionoptions"><code>ModifierSectionOptions</code></a></td><td style="text-align:left;">Modifier section options.</td></tr></tbody></table><h5 id="returns-2" tabindex="-1">Returns <a class="header-anchor" href="#returns-2" aria-label="Permalink to &quot;Returns&quot;"></a></h5><p><code>Element</code></p><h4 id="defined-in-8" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-8" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/5c11524/src/game/modifiers.tsx#L346" target="_blank" rel="noreferrer">profectus/src/game/modifiers.tsx:346</a></p><hr><h3 id="createmultiplicativemodifier" tabindex="-1">createMultiplicativeModifier <a class="header-anchor" href="#createmultiplicativemodifier" aria-label="Permalink to &quot;createMultiplicativeModifier&quot;"></a></h3><p>▸ <strong>createMultiplicativeModifier</strong>&lt;<code>T</code>&gt;(<code>optionsFunc</code>): <a href="./modifiers#modifierfromoptionalparams"><code>ModifierFromOptionalParams</code></a>&lt;<code>T</code>[<code>&quot;description&quot;</code>], <code>T</code>[<code>&quot;enabled&quot;</code>]&gt;</p><p>Create a modifier that multiplies the input value by some value.</p><h5 id="type-parameters-3" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters-3" aria-label="Permalink to &quot;Type parameters&quot;"></a></h5><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>T</code></td><td style="text-align:left;">extends <a href="./modifiers#multiplicativemodifieroptions"><code>MultiplicativeModifierOptions</code></a></td></tr></tbody></table><h5 id="parameters-3" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-3" aria-label="Permalink to &quot;Parameters&quot;"></a></h5><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th><th style="text-align:left;">Description</th></tr></thead><tbody><tr><td style="text-align:left;"><code>optionsFunc</code></td><td style="text-align:left;"><a href="./../features/feature#optionsfunc"><code>OptionsFunc</code></a>&lt;<code>T</code>&gt;</td><td style="text-align:left;">Multiplicative modifier options.</td></tr></tbody></table><h5 id="returns-3" tabindex="-1">Returns <a class="header-anchor" href="#returns-3" aria-label="Permalink to &quot;Returns&quot;"></a></h5><p><a href="./modifiers#modifierfromoptionalparams"><code>ModifierFromOptionalParams</code></a>&lt;<code>T</code>[<code>&quot;description&quot;</code>], <code>T</code>[<code>&quot;enabled&quot;</code>]&gt;</p><h4 id="defined-in-9" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-9" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/5c11524/src/game/modifiers.tsx#L133" target="_blank" rel="noreferrer">profectus/src/game/modifiers.tsx:133</a></p><hr><h3 id="createsequentialmodifier" tabindex="-1">createSequentialModifier <a class="header-anchor" href="#createsequentialmodifier" aria-label="Permalink to &quot;createSequentialModifier&quot;"></a></h3><p>▸ <strong>createSequentialModifier</strong>&lt;<code>T</code>, <code>S</code>&gt;(<code>modifiersFunc</code>): <code>S</code></p><p>Takes an array of modifiers and applies and reverses them in order. Modifiers that are not enabled will not be applied nor reversed. Also joins their descriptions together.</p><p><strong><code>See</code></strong></p><p><a href="./modifiers#createmodifiersection">createModifierSection</a>.</p><h5 id="type-parameters-4" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters-4" aria-label="Permalink to &quot;Type parameters&quot;"></a></h5><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>T</code></td><td style="text-align:left;">extends <a href="./modifiers#modifier"><code>Modifier</code></a>[]</td></tr><tr><td style="text-align:left;"><code>S</code></td><td style="text-align:left;"><code>T</code> extends <a href="./../util/common#withrequired"><code>WithRequired</code></a>&lt;<a href="./modifiers#modifier"><code>Modifier</code></a>, <code>&quot;invert&quot;</code>&gt;[] ? <a href="./../util/common#withrequired"><code>WithRequired</code></a>&lt;<a href="./modifiers#modifier"><code>Modifier</code></a>, <code>&quot;description&quot;</code> | <code>&quot;invert&quot;</code>&gt; : <a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys" target="_blank" rel="noreferrer"><code>Omit</code></a>&lt;<a href="./../util/common#withrequired"><code>WithRequired</code></a>&lt;<a href="./modifiers#modifier"><code>Modifier</code></a>, <code>&quot;description&quot;</code>&gt;, <code>&quot;invert&quot;</code>&gt;</td></tr></tbody></table><h5 id="parameters-4" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-4" aria-label="Permalink to &quot;Parameters&quot;"></a></h5><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th><th style="text-align:left;">Description</th></tr></thead><tbody><tr><td style="text-align:left;"><code>modifiersFunc</code></td><td style="text-align:left;">() =&gt; <code>T</code></td><td style="text-align:left;">The modifiers to perform sequentially.</td></tr></tbody></table><h5 id="returns-4" tabindex="-1">Returns <a class="header-anchor" href="#returns-4" aria-label="Permalink to &quot;Returns&quot;"></a></h5><p><code>S</code></p><h4 id="defined-in-10" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-10" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/5c11524/src/game/modifiers.tsx#L276" target="_blank" rel="noreferrer">profectus/src/game/modifiers.tsx:276</a></p>',104),r=[d];function l(n,c,s,f,h,m){return o(),t("div",null,r)}const b=e(i,[["render",l]]);export{u as __pageData,b as default};