> For the complete documentation index, see [llms.txt](https://timeshuffle.gitbook.io/tims-whitepaper-jan-01-22/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://timeshuffle.gitbook.io/tims-whitepaper-jan-01-22/gameplay/battles-storyline.md).

# Battles Storyline

### **Basics**

The two participating teams (3 to 5 Heroes each) are positioned against each other. At the beginning of the battle, the order of turns is calculated based on the Heroes initiative and might change mid-battle. Each Hero takes their turn in succession, with the player that owns it choosing and taking action with it. The possible actions a player can do are:<br>

* [x] *Move* - move the Hero on the map. Move range depends on current stats and effects&#x20;
* [x] *Attack* - close or ranged attack if there’s an enemy/enemies in range&#x20;
* [x] *Use skill* - skill could lead to various effects - movement, attacking, stat modifiers, initiative changes, etc. The battle is over when all Heroes from an army are destroyed.<br>

### **Interactive battle environment**

When in battle, the terrain on which it happens might have different effects on both players’ teams. Depending on the time period and the area you fight in, randomly distributed effects will either create advantages or disadvantages depending on the battlefield terrain. Terrains can contain obstacles, making movement or attacking harder or giving an advantage to one of the parties. Various Hero skills could affect or alter the environment before or in the middle of a battle.  Terrains are completely procedurally generated by the game’s AI and blockchain oracle before the battle starts.

#### **PvE battles**

In Player vs. Environment battles, the opposing army is controlled by an adaptive AI with dynamic scripting (based on ML algorithms and historical data), making the PvE opponents smarter the more the game is played. PvE battles are separated into two major types:

* [x] *Mission fights* - when playing through the campaign, players will face various opponent armies related to the current mission they are in. Mission opponents can have more than 5 Heroes in their team to make battles more interesting and challenging.&#x20;
* [x] *Random encounters* - when multiple players are doing the same mission, a random encounter can be triggered where both players need to face the opposing faction’s player mid-mission as an additional step (with a separate reward pool). These battles are again controlled by the AI, but they are based on the real team each Player is using for the mission.

#### **PvP battles**

Player vs. Player battles are separated into two major types:

* [x] *Passive* - each Player can prepare a team of their choice and let it fight with other players while deployed (even if the Player is offline). These battles are completely operated by the AI, and the outcome is mostly based on available skills and the advancement of the AI.
* [x] *Real-time* - these battles are happening in real-time between actual Players. When challenged, a Player can accept a battle invitation within a specific time frame so both Players are online and can participate in the battle. When engaging in a real-time battle, both Players willingly agree to bet the Heroes in their fighting team. The winner of the battles takes one of the losing players’ Heroes (RNG chosen).


---

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

```
GET https://timeshuffle.gitbook.io/tims-whitepaper-jan-01-22/gameplay/battles-storyline.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
