2 lines
16 KiB
JavaScript
2 lines
16 KiB
JavaScript
|
import{_ as a,c as r,a0 as t,o as i}from"./chunks/framework.P9qPzDnn.js";const m=JSON.parse('{"title":"Interface: CostRequirement","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/game/requirements/interfaces/CostRequirement.md","filePath":"api/game/requirements/interfaces/CostRequirement.md","lastUpdated":null}'),o={name:"api/game/requirements/interfaces/CostRequirement.md"};function n(s,e,c,l,d,u){return i(),r("div",null,e[0]||(e[0]=[t('<p><a href="./../../../">Profectus</a> / <a href="./../">game/requirements</a> / CostRequirement</p><h1 id="interface-costrequirement" tabindex="-1">Interface: CostRequirement <a class="header-anchor" href="#interface-costrequirement" aria-label="Permalink to "Interface: CostRequirement""></a></h1><p>An object that can be used to describe a requirement to perform some purchase or other action.</p><h2 id="see" tabindex="-1">See <a class="header-anchor" href="#see" aria-label="Permalink to "See""></a></h2><p><a href="./../functions/createCostRequirement">createCostRequirement</a></p><h2 id="extends" tabindex="-1">Extends <a class="header-anchor" href="#extends" aria-label="Permalink to "Extends""></a></h2><ul><li><a href="./Requirement"><code>Requirement</code></a></li></ul><h2 id="properties" tabindex="-1">Properties <a class="header-anchor" href="#properties" aria-label="Permalink to "Properties""></a></h2><h3 id="canmaximize" tabindex="-1">canMaximize? <a class="header-anchor" href="#canmaximize" aria-label="Permalink to "canMaximize?""></a></h3><blockquote><p><code>optional</code> <strong>canMaximize</strong>: <a href="https://vuejs.org/api/utility-types.html#mayberef" target="_blank" rel="noreferrer"><code>MaybeRef</code></a><<code>boolean</code>></p></blockquote><p>Whether or not this requirement can have multiple levels of requirements that can be met at once. Requirement is assumed to not have multiple levels if this property not present.</p><h4 id="inherited-from" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from" aria-label="Permalink to "Inherited from""></a></h4><p><a href="./Requirement"><code>Requirement</code></a>.<a href="./Requirement#canmaximize"><code>canMaximize</code></a></p><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://code.incremental.social/profectus/Profectus/src/branch/main/src/game/requirements.tsx#L40" target="_blank" rel="noreferrer">profectus/src/game/requirements.tsx:40</a></p><hr><h3 id="cost" tabindex="-1">cost <a class="header-anchor" href="#cost" aria-label="Permalink to "cost""></a></h3><blockquote><p><strong>cost</strong>: <a href="https://vuejs.org/api/utility-types.html#mayberef" target="_blank" rel="noreferrer"><code>MaybeRef</code></a><<a href="./../../../lib/break_eternity/type-aliases/DecimalSource"><code>DecimalSource</code></a>> | <a href="./../../formulas/types/type-aliases/GenericFormula"><code>GenericFormula</code></a></p></blockquote><p>The amount of <a href="./CostRequirement#resource">resource</a> that must be met for this requirement. You can pass a formula, in which case maximizing will work out of the box (assuming its invertible and, for more accurate calculations, its integral is invertible). If you don't pass a formula then you can still support maximizing by passing a custom <a href="./CostRequirement#pay">pay</a> function.</p><h4 id="defined-in-1" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-1" aria-label="Permalink to "Defined in""></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/requirements.tsx#L99" target="_blank" rel="noreferrer">profectus/src/game/requirements.tsx:99</a></p><hr><h3 id="cumulativecost" tabindex="-1">cumulativeCost <a class="header-anchor" href="#cumulativecost" aria-label="Permalink to "cumulativeCost""></a></h3><blockquote><p
|