> For the complete documentation index, see [llms.txt](https://docs.almightyalpacas.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.almightyalpacas.com/readme/alpaca-run-states.md).

# 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`](/readme/alpaca-stats/speed.md)
* **Description:** The alpaca recovers stamina in this state.

#### Run State

* **Condition:** [`restThresholdSpeed`](/readme/alpaca-stats/speed.md) ` <`` `` `*<mark style="color:yellow;">`currentSpeed`</mark>* `<` [`sprintThresholdSpeed`](/readme/alpaca-stats/speed.md)
* **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`](/readme/alpaca-stats/speed.md)
* **Description:** The alpaca runs at high speed, consuming more stamina.

***
