# Alpaca Resources

Your alpaca relies on two key resources: <mark style="color:green;">Stamina</mark> and <mark style="color:purple;">Tickets</mark>. <mark style="color:green;">Stamina</mark> is crucial as it dictates your alpaca's [**Run States**](https://docs.almightyalpacas.com/readme/alpaca-run-states). It serves as the energy reserve that your alpaca draws upon to move and sprint. Effective stamina management ensures your alpaca can perform optimally throughout the race. <mark style="color:purple;">Tickets</mark> are essential for activating [<mark style="color:purple;">**Skills**</mark>](https://docs.almightyalpacas.com/readme/skills). Every alpaca receives one ticket every X seconds.

#### Stamina Management

* [<mark style="color:green;">**Sprint Phase**</mark>](https://docs.almightyalpacas.com/readme/alpaca-run-states)**:** Stamina decreases during the Sprint state. The rate of decrease is determined by the alpaca's <mark style="color:green;">**Stamina Decrease Rate**</mark> stat.
* [<mark style="color:yellow;">**Run Phase**</mark>](https://docs.almightyalpacas.com/readme/alpaca-run-states)**:** Stamina does not decrease while in the Run state, maintaining a moderate pace without consuming stamina.
* [<mark style="color:red;">**Rest Phase**</mark>](https://docs.almightyalpacas.com/readme/alpaca-run-states)**:** Stamina increases during the Rest state, allowing recovery. The rate of recovery is influenced by the <mark style="color:green;">**Stamina Increase Rate**</mark> stat.

## Tickets

Tickets are crucial for activating [<mark style="color:red;">**Active Skills**</mark>](https://docs.almightyalpacas.com/readme/skills/active-skills) during a race.

#### Ticket System

* **Earning Tickets:** One ticket every `SKILL_ACTIVATION_STEPS` steps.
* **Using Tickets:** Active skills cost 1 ticket each. Passive skills do not require tickets.
* **Skill Activation:** Skills are chosen based on readiness and conditions.

***

#### Ticket Brains

The ticket system is managed by different brains that control ticket earning and usage. The current brain in use is the **Time Interval Dropper**.

**Time Interval Dropper**

* **Function:** Drops a ticket every `SKILL_ACTIVATION_STEPS` steps.
* **Mechanism:** Checks if enough steps have been taken since the last ticket was earned. If so, the alpaca earns a ticket.

***

#### Key Points

* **Earn Tickets:** One ticket every `SKILL_ACTIVATION_STEPS` steps.
* **Active Skills:** Cost 1 ticket each.
* **Passive Skills:** No ticket required.
* **Skill Selection:** Based on readiness and effectiveness.

Effective ticket management allows strategic skill activation to gain a competitive edge.
