2 lines
484 KiB
JavaScript
2 lines
484 KiB
JavaScript
|
import{_ as e,c as t,o as a,N as r}from"./chunks/framework.0799945b.js";const p=JSON.parse('{"title":"Class: default<T>","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/classes/game/formulas/formulas.default.md","lastUpdated":null}'),o={name:"api/classes/game/formulas/formulas.default.md"},l=r('<h1 id="class-default-t" tabindex="-1">Class: default<T> <a class="header-anchor" href="#class-default-t" aria-label="Permalink to "Class: default<T\\>""></a></h1><p><a href="./../../../modules/game/formulas/formulas">game/formulas/formulas</a>.default</p><p>A class that can be used for cost/goal functions. It can be evaluated similar to a cost function, but also provides extra features for supported formulas. For example, a lot of math functions can be inverted. Typically, the use of these extra features is to support cost/goal functions that have multiple levels purchased/completed at once efficiently.</p><p><strong><code>See</code></strong></p><ul><li><a href="./../../../modules/game/formulas/formulas#calculatemaxaffordable">calculateMaxAffordable</a></li><li><a href="./../../../modules/game/requirements#createcostrequirement">createCostRequirement</a></li></ul><h2 id="type-parameters" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters" aria-label="Permalink to "Type parameters""></a></h2><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="./../../../modules/game/formulas/types#formulasource"><code>FormulaSource</code></a>] | <a href="./../../../modules/game/formulas/types#formulasource"><code>FormulaSource</code></a>[]</td></tr></tbody></table><h2 id="constructors" tabindex="-1">Constructors <a class="header-anchor" href="#constructors" aria-label="Permalink to "Constructors""></a></h2><h3 id="constructor" tabindex="-1">constructor <a class="header-anchor" href="#constructor" aria-label="Permalink to "constructor""></a></h3><p>• <strong>new default</strong><<code>T</code>>(<code>options</code>)</p><h4 id="type-parameters-1" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters-1" aria-label="Permalink to "Type parameters""></a></h4><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="./../../../modules/game/formulas/types#formulasource"><code>FormulaSource</code></a>] | <a href="./../../../modules/game/formulas/types#formulasource"><code>FormulaSource</code></a>[]</td></tr></tbody></table><h4 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-label="Permalink to "Parameters""></a></h4><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>options</code></td><td style="text-align:left;"><a href="./../../../modules/game/formulas/types#formulaoptions"><code>FormulaOptions</code></a><<code>T</code>></td></tr></tbody></table><h4 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-label="Permalink to "Defined in""></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/70cda5f/src/game/formulas/formulas.ts#L59" target="_blank" rel="noreferrer">profectus/src/game/formulas/formulas.ts:59</a></p><h2 id="properties" tabindex="-1">Properties <a class="header-anchor" href="#properties" aria-label="Permalink to "Properties""></a></h2><h3 id="applysubstitution" tabindex="-1">applySubstitution <a class="header-anchor" href="#applysubstitution" aria-label="Permalink to "applySubstitution""></a></h3><p>• <code>Private</code> <code>Readonly</code> <strong>applySubstitution</strong>: <code>undefined</code> | <a href
|