# Guide to PolyCalculator

## An fast, dependable battle helper

It admittedly takes a few tries to get used to the command-line bot interface, but it'll exponentially help you decipher your best shot at winning Polytopia fights.

> ### Now, you only need to speak its language!

## Things to know

{% tabs %}
{% tab title="Essentials" %}

### The prefix is a dot: `.`

* The way to let the bot know you're talking to it.

{% hint style="success" %}
Simple and intuitive
{% endhint %}

### The most popular command: `.calc`

* You can use the simpler alias `.c`
* Units have two character codes
  * ex: `wa` for warrior, `sl` for battle sled
* The attacker and defender need to be separated by a comma `,`
* If no hp is provided, the max hp is assumed

> #### **The order in which you place the information doesn't matter!**

```bash
.c wa, sl 8
```

{% hint style="info" %}
&#x20;This short version will simulate the outcome of a fight where a full hp warrior (10 hp) will hit a battle sled (8 hp out of 15 hp).
{% endhint %}

You can go back up to the "More features" or get right into the [Fight commands](/fight-commands.md)!
{% endtab %}

{% tab title="More features" %}

* **Veteran status**: Automatic veteran status is added if you input a higher hp than maximum non-veteran or if you put a single `v` on the side of the unit that is veteran.
* **Defense bonus**: You can add a single `d` for the single shield bonus (from cities, Archery, Meditation or Aquatism) and `w` for the double, city wall, bonus.
* **Naval units**: You can just add `bo`, `sh` or `bs` to make the unit a boat, ship or battleship.

{% hint style="danger" %}
Make sure to include which land unit is in the naval unit.
{% endhint %}

```javascript
.c v sh 7 wa, gi 9 d
```

{% hint style="info" %}
This will return an attacking warrior inside a ship with 7 hp (out of 15 hp since veteran) attacking a giant with 9 hp (out of 40 hp) with a single defense bonus.
{% endhint %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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://docs.polycalculatorbot.com/master.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.
