# 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.

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

## Usage

Precondition is an optional field for [Choice](https://uyen18827.gitbook.io/veinif/components/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.
