# Alpaca Run States

During a race, your alpaca can be in one of three states: <mark style="color:red;">Rest</mark>, <mark style="color:yellow;">Run</mark>, or <mark style="color:green;">Sprint</mark>. In the <mark style="color:red;">Rest</mark> state, the alpaca is recuperating and not expending much energy, allowing it to recover stamina. The <mark style="color:yellow;">Run</mark> state is the default mode where the alpaca runs at a moderate pace without using stamina. In the <mark style="color:green;">Sprint</mark> state, the alpaca runs at high speed, consuming more stamina.

### Run State Calculation

The alpaca's state during a race is determined by its current speed relative to its stat thresholds:

#### Rest State

* **Condition:** *<mark style="color:yellow;">`currentSpeed`</mark>*` `` ``<= ` [`restThresholdSpeed`](https://docs.almightyalpacas.com/readme/alpaca-stats/speed)
* **Description:** The alpaca recovers stamina in this state.

#### Run State

* **Condition:** [`restThresholdSpeed`](https://docs.almightyalpacas.com/readme/alpaca-stats/speed) ` <`` `` `*<mark style="color:yellow;">`currentSpeed`</mark>* `<` [`sprintThresholdSpeed`](https://docs.almightyalpacas.com/readme/alpaca-stats/speed)
* **Description:** The default state where the alpaca runs at a moderate pace without consuming stamina.

#### Sprint State

* **Condition:** *<mark style="color:yellow;">`currentSpeed`</mark>*` `` ``>= ` [`sprintThresholdSpeed`](https://docs.almightyalpacas.com/readme/alpaca-stats/speed)
* **Description:** The alpaca runs at high speed, consuming more stamina.

***
