1 line
9.5 KiB
JavaScript
1 line
9.5 KiB
JavaScript
import{_ as r,c as a,a0 as t,o}from"./chunks/framework.P9qPzDnn.js";const m=JSON.parse('{"title":"Interface: CostRequirementOptions","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/game/requirements/interfaces/CostRequirementOptions.md","filePath":"api/game/requirements/interfaces/CostRequirementOptions.md","lastUpdated":null}'),i={name:"api/game/requirements/interfaces/CostRequirementOptions.md"};function n(s,e,c,l,u,h){return o(),a("div",null,e[0]||(e[0]=[t('<p><a href="./../../../">Profectus</a> / <a href="./../">game/requirements</a> / CostRequirementOptions</p><h1 id="interface-costrequirementoptions" tabindex="-1">Interface: CostRequirementOptions <a class="header-anchor" href="#interface-costrequirementoptions" aria-label="Permalink to "Interface: CostRequirementOptions""></a></h1><p>An object that configures a <a href="./Requirement">Requirement</a> based on a resource cost.</p><h2 id="properties" tabindex="-1">Properties <a class="header-anchor" href="#properties" aria-label="Permalink to "Properties""></a></h2><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#maybereforgetter" target="_blank" rel="noreferrer"><code>MaybeRefOrGetter</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="./CostRequirementOptions#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="./CostRequirementOptions#pay">pay</a> function.</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#L62" target="_blank" rel="noreferrer">profectus/src/game/requirements.tsx:62</a></p><hr><h3 id="cumulativecost" tabindex="-1">cumulativeCost? <a class="header-anchor" href="#cumulativecost" aria-label="Permalink to "cumulativeCost?""></a></h3><blockquote><p><code>optional</code> <strong>cumulativeCost</strong>: <a href="https://vuejs.org/api/utility-types.html#maybereforgetter" target="_blank" rel="noreferrer"><code>MaybeRefOrGetter</code></a><<code>boolean</code>></p></blockquote><p>When calculating multiple levels to be handled at once, whether it should consider resources used for each level as spent. Setting this to false causes calculations to be faster with larger numbers and supports more math functions.</p><h4 id="see" tabindex="-1">See <a class="header-anchor" href="#see" aria-label="Permalink to "See""></a></h4><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#L75" target="_blank" rel="noreferrer">profectus/src/game/requirements.tsx:75</a></p><hr><h3 id="directsum" tabindex="-1">directSum? <a class="header-anchor" href="#directsum" aria-label="Permalink to "directSum?""></a></h3><blockquote><p><code>optional</code> <strong>directSum</strong>: <a href="https://vuejs.org/api/utility-types.html#maybereforgetter" target="_blank" rel="noreferrer"><code>MaybeRefOrGetter</code></a><<code>number</code>></p></blockquote><p>When calculating requirement for multiple levels, how many should be directly summed for increase accuracy. High numbers can cause lag. Defaults to 10 if cumulative cost, 0 otherwise.</p><h4 id="defined-in-2" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-2" aria-label="Permalink to "Defined in""></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/requirements.tsx#L83" target="_blank" rel="noreferrer">profectus/src/game/requirements.tsx:83</a></p><hr><h3 id="maxbulkamount" tabindex="-1">maxBulkAmount? <a class="header-anchor" href="#maxbulkamount" aria-label="Permalink to "maxBulkAmount?""></a></h3><blockquote><p><code>optional</code> <strong>maxBulkAmount</strong>: <a href="https://vuejs.org/api/utility-types.html#maybereforgetter" target="_blank" rel="noreferrer"><code>MaybeRefOrGetter</code></a><<a href="./../../../lib/break_eternity/type-aliases/DecimalSource"><code>DecimalSource</code></a>></p></blockquote><p>Upper limit on levels that can be performed at once. Defaults to 1.</p><h4 id="defined-in-3" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-3" aria-label="Permalink to "Defined in""></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/requirements.tsx#L79" target="_blank" rel="noreferrer">profectus/src/game/requirements.tsx:79</a></p><hr><h3 id="pay" tabindex="-1">pay()? <a class="header-anchor" href="#pay" aria-label="Permalink to "pay()?""></a></h3><blockquote><p><code>optional</code> <strong>pay</strong>: (<code>amount</code>?) => <code>void</code></p></blockquote><p>Pass-through to <a href="./Requirement#pay">Requirement.pay</a>. May be required for maximizing support.</p><h4 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-label="Permalink to "Parameters""></a></h4><h5 id="amount" tabindex="-1">amount? <a class="header-anchor" href="#amount" aria-label="Permalink to "amount?""></a></h5><p><a href="./../../../lib/break_eternity/type-aliases/DecimalSource"><code>DecimalSource</code></a></p><h4 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-label="Permalink to "Returns""></a></h4><p><code>void</code></p><h4 id="see-1" tabindex="-1">See <a class="header-anchor" href="#see-1" aria-label="Permalink to "See""></a></h4><p><a href="./CostRequirementOptions#cost">cost</a> for restrictions on maximizing support.</p><h4 id="defined-in-4" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-4" aria-label="Permalink to "Defined in""></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/requirements.tsx#L88" target="_blank" rel="noreferrer">profectus/src/game/requirements.tsx:88</a></p><hr><h3 id="requirespay" tabindex="-1">requiresPay? <a class="header-anchor" href="#requirespay" aria-label="Permalink to "requiresPay?""></a></h3><blockquote><p><code>optional</code> <strong>requiresPay</strong>: <a href="https://vuejs.org/api/utility-types.html#maybereforgetter" target="_blank" rel="noreferrer"><code>MaybeRefOrGetter</code></a><<code>boolean</code>></p></blockquote><p>Pass-through to <a href="./Requirement">["requiresPay"]</a>. If not set to false, the default <a href="./CostRequirementOptions#pay">pay</a> function will remove <a href="./CostRequirementOptions#cost">cost</a> from <a href="./CostRequirementOptions#resource">resource</a>.</p><h4 id="defined-in-5" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-5" aria-label="Permalink to "Defined in""></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/requirements.tsx#L70" target="_blank" rel="noreferrer">profectus/src/game/requirements.tsx:70</a></p><hr><h3 id="resource" tabindex="-1">resource <a class="header-anchor" href="#resource" aria-label="Permalink to "resource""></a></h3><blockquote><p><strong>resource</strong>: <a href="./../../../features/resources/resource/interfaces/Resource"><code>Resource</code></a></p></blockquote><p>The resource that will be checked for meeting the <a href="./CostRequirementOptions#cost">cost</a>.</p><h4 id="defined-in-6" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-6" aria-label="Permalink to "Defined in""></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/requirements.tsx#L58" target="_blank" rel="noreferrer">profectus/src/game/requirements.tsx:58</a></p><hr><h3 id="visibility" tabindex="-1">visibility? <a class="header-anchor" href="#visibility" aria-label="Permalink to "visibility?""></a></h3><blockquote><p><code>optional</code> <strong>visibility</strong>: <a href="https://vuejs.org/api/utility-types.html#maybereforgetter" target="_blank" rel="noreferrer"><code>MaybeRefOrGetter</code></a><<code>boolean</code> | <a href="./../../../features/feature/enumerations/Visibility#visible"><code>Visible</code></a> | <a href="./../../../features/feature/enumerations/Visibility#none"><code>None</code></a>></p></blockquote><p>Pass-through to <a href="./Requirement#visibility">Requirement.visibility</a>.</p><h4 id="defined-in-7" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-7" aria-label="Permalink to "Defined in""></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/requirements.tsx#L66" target="_blank" rel="noreferrer">profectus/src/game/requirements.tsx:66</a></p>',59)]))}const f=r(i,[["render",n]]);export{m as __pageData,f as default};
|