> For the complete documentation index, see [llms.txt](https://october-studio.gitbook.io/monster-survivors-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://october-studio.gitbook.io/monster-survivors-documentation/abilities/abilities-system-structure.md).

# Abilities System Structure

<figure><img src="/files/dfKiYXNrGg4RJ7eN2gPK" alt=""><figcaption><p>Simplified diagram of Abilities System</p></figcaption></figure>

Each ability is described by a two classes - Ability Data and Ability Behavior.

#### Ability Data

<figure><img src="/files/mnm3sOhJ1xiF8kP0nJzL" alt="" width="471"><figcaption><p>Ability Data example</p></figcaption></figure>

Ability Data - is an abstract class that contains all the necessary information about the ability (such as it's type, title, description, prefab, levels, etc.). Each ability has it's unique class that inherits from the AbilityData. Ability Data class is a Scriptable Object, which means that it contains presistent information that does not get erased between game sessions.

Each ability has levels - the upgradable part of an ability. They usually contain such information as damage, projectiles count and speed, etc.

If an ability is an evolution, it has a evolution requirement - a list of abilities with their levels.&#x20;

<figure><img src="/files/UQLiAqMV2FfBlclRARBF" alt="" width="479"><figcaption><p>Evolution Requirement List example</p></figcaption></figure>

All Ability Data scriptable objects are stored in the AbilitiesDatabase scriptable object.

#### Ability Behavior

Ability Behavior is a gameplay representation of an ability. It has it's own prefab and implements the behavior of the ability. For example, FireballAbilityBehavior spawns fireball projectiles according to the FireballAbilityData parameters. It initiates the pool of fireball projectiles in it's Awake method, and starts AbilityCoroutine when it gets it's ability level. This coroutine is responsible for the spawning and initializing data of the fireball projectiles.

<figure><img src="/files/loUWQh9hfFqIzxB3Hd5U" alt="" width="563"><figcaption><p>Fireball Ability Prefab</p></figcaption></figure>

All Ability Behaviors are managed by an Ability Manager - a singleton object that are present in the Game scene hierarchy. It is responsible for spawning, upgrading, and removing ability behaviors, selecting ability types for the Abilities Window and Chest Window.&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://october-studio.gitbook.io/monster-survivors-documentation/abilities/abilities-system-structure.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
