import{_ase,cast,oasr,Nasa}from"./chunks/framework.0799945b.js";constp=JSON.parse('{"title":"Module: game/requirements","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/modules/game/requirements.md","lastUpdated":null}'),i={name:"api/modules/game/requirements.md"},o=a('<h1id="module-game-requirements"tabindex="-1">Module:game/requirements<aclass="header-anchor"href="#module-game-requirements"aria-label="Permalink to "Module: game/requirements""></a></h1><h2id="interfaces"tabindex="-1">Interfaces<aclass="header-anchor"href="#interfaces"aria-label="Permalinkto"Interfaces""></a></h2><h3id="costrequirementoptions"tabindex="-1">CostRequirementOptions<aclass="header-anchor"href="#costrequirementoptions"aria-label="Permalinkto"CostRequirementOptions""></a></h3><p>•<strong>CostRequirementOptions</strong>:<code>Object</code></p><p>Anobjectthatconfiguresa<ahref="./requirements#requirement">Requirement</a>basedonaresourcecost.</p><table><thead><tr><thstyle="text-align:left;">Name</th><thstyle="text-align:left;">Type</th><thstyle="text-align:left;">Description</th></tr></thead><tbody><tr><tdstyle="text-align:left;"><code>cost</code></td><tdstyle="text-align:left;"><ahref="./../util/computed#computable"><code>Computable</code></a><<ahref="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a>>|<ahref="./formulas/types#genericformula"><code>GenericFormula</code></a></td><tdstyle="text-align:left;">Theamountof<ahref="./requirements#resource">resource</a>thatmustbemetforthisrequirement.Youcanpassaformula,inwhichcasemaximizingwillworkoutofthebox(assumingitsinvertibleand,formoreaccuratecalculations,itsintegralisinvertible).Ifyoudon'tpassaformulathenyoucanstillsupportmaximizingbypassingacustom<ahref="./requirements#pay">pay</a>function.</td></tr><tr><tdstyle="text-align:left;"><code>pay?</code></td><tdstyle="text-align:left;">(<code>amount?</code>:<ahref="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a>)=><code>void</code></td><tdstyle="text-align:left;">Pass-throughto<ahref="./requirements#pay">pay</a>.Mayberequiredformaximizingsupport.<strong><code>See</code></strong><ahref="./requirements#cost">cost</a>forrestrictionsonmaximizingsupport.</td></tr><tr><tdstyle="text-align:left;"><code>requiresPay?</code></td><tdstyle="text-align:left;"><ahref="./../util/computed#computable"><code>Computable</code></a><<code>boolean</code>></td><tdstyle="text-align:left;">Pass-throughto<ahref="./requirements#requirespay">requiresPay</a>.Ifnotsettofalse,thedefault<ahref="./requirements#pay">pay</a>functionwillremove<ahref="./requirements#cost">cost</a>from<ahref="./requirements#resource">resource</a>.</td></tr><tr><tdstyle="text-align:left;"><code>resource</code></td><tdstyle="text-align:left;"><ahref="./../features/resource#resource"><code>Resource</code></a><<ahref="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a>></td><tdstyle="text-align:left;">Theresourcethatwillbecheckedformeetingthe<ahref="./requirements#cost">cost</a>.</td></tr><tr><tdstyle="text-align:left;"><code>spendResources?</code></td><tdstyle="text-align:left;"><ahref="./../util/computed#computable"><code>Computable</code></a><<code>boolean</code>></td><tdstyle="text-align:left;">Whencalculatingmultiplelevelstobehandledatonce,whetheritshouldconsiderresourcesusedforeachlevelasspent.Settingthistofalsecausescalculationstobefasterwithlargernumbersandsupportsmoremathfunctions.<strong><code>See</code></strong></td></tr><tr><tdstyle="text-align:left;"><code>visibility?</code></td><tdstyle="text-align:left;"><ahref="./../util/computed#computable"><code>Computable</code></a><<code>boolean</code>|<ahref="./../features/feature#visible"><code>Visible</code></a>|<ahref="./../features/feature#none"><code>None</code></a