Skip to content

Profectus / game/requirements / Requirement

Interface: Requirement ​

An object that can be used to describe a requirement to perform some purchase or other action.

See ​

createCostRequirement

Extended by ​

Properties ​

canMaximize? ​

optional canMaximize: MaybeRef<boolean>

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.

Defined in ​

profectus/src/game/requirements.tsx:40


display()? ​

optional display: (amount?) => Renderable

The display for this specific requirement. Required if visibility can be Visibility.Visible.

Parameters ​

amount? ​

DecimalSource

Returns ​

Renderable

Defined in ​

profectus/src/game/requirements.tsx:24


partialDisplay()? ​

optional partialDisplay: (amount?) => Renderable

The display for this specific requirement. This is used for displays multiple requirements condensed. Required if visibility can be Visibility.Visible.

Parameters ​

amount? ​

DecimalSource

Returns ​

Renderable

Defined in ​

profectus/src/game/requirements.tsx:20


pay()? ​

optional pay: (amount?) => void

Perform any effects to the game state that should happen when the requirement gets triggered.

Parameters ​

amount? ​

DecimalSource

The amount of levels of requirements to pay for.

Returns ​

void

Defined in ​

profectus/src/game/requirements.tsx:45


requirementMet ​

requirementMet: MaybeRef<boolean | DecimalSource>

Whether or not this requirement has been met.

Defined in ​

profectus/src/game/requirements.tsx:32


requiresPay ​

requiresPay: MaybeRef<boolean>

Whether or not this requirement will need to affect the game state when whatever is using this requirement gets triggered.

Defined in ​

profectus/src/game/requirements.tsx:36


visibility ​

visibility: MaybeRef<boolean | Visibility>

Whether or not this requirement should be displayed in Vue Features. displayRequirements will respect this property.

Defined in ​

profectus/src/game/requirements.tsx:28