Precondition

Preconditions are conditions that must be met before player can proceed with a choice.

Interface

Bellow is the interface - the structure that all preconditions conform to.

export interface Precondition {
    stat?: Array<Stat>,
    item?: Array<Items>,
    style?: conStyle, //type: show, hidden or hideReason
};

Usage

Precondition is an optional field for Choice and Item. It is checked by checkChoiceCondition().

Behaviour

Precondition perform checks with the player's inventory and stat. If the checks failed, the choice will be disabled.

Last updated

Was this helpful?