> For the complete documentation index, see [llms.txt](https://thelastwar.gitbook.io/thelastwar-eng/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://thelastwar.gitbook.io/thelastwar-eng/the-game/war/defend.md).

# Defend

![](/files/xcVDZxEtLjMKErCtmPFw)

At the beginning, **in the early versions of the game**, **village defenses will be automatic in the sense that if the user is disconnected at the moment of an attack**, t**hese defenses will protect the village. This implies that the village can be attacked even if the player is absent at that moment.**

For the player, **it's recommended to upgrade village defenses and walls**, as this is a secure way to ensure progress in the game. **If these defenses weaken, it's highly probable that another player will siege and attack the village more easily when it's more vulnerable.**

After being attacked by another playe&#x72;**,&#x20;**<mark style="color:green;">**a temporary protection will be obtained to prevent similar attacks.**</mark> This defense will be provisional and will have a specific duration, depending on the damage received in the village.

**Once online for four consecutive hours, the game will disconnect for fifteen minutes.** During this time, while playing, **attacks cannot be received.** Therefore, it will automatically disconnect to allow the village to be attacked, maintaining the game's dynamics.


---

# 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://thelastwar.gitbook.io/thelastwar-eng/the-game/war/defend.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.
