Home
API: chem

Function: scarcity()

lifecycle-kit

lifecycle-kit


lifecycle-kit / chem / scarcity

Function: scarcity()

scarcity(counts): number

Defined in: chem/elements.ts:242

How hard a molecule is to come by, from the scarcity of what it needs.

Rarer inputs make a rarer molecule, so a creature built on phosphorus is genuinely harder to grow than one built on carbon and water. Returns a positive number where larger means scarcer.

Parameters

counts

Record<string, number>

Returns

number