# Выбор способа броска гранаты

Логика выбора способа броска гранаты хранится в `\properties\animation_selector\`**`human_grenade_throw_type.inc`**

Выбор способа броска гранаты запускается перед броском гранаты по запросу `grenade_throw_type` и не меняется до следующего броска. \
В логике выбора используются проверки :

* `cover_type` - тип укрытия, из которого происходит бросок;
* `throwing_range` - расстояние броска;
* `item_in_hand` - проверка предмета в руках юнита

Доступные способы броска гранаты в игре `Men of War II` (можно добавлять свои):

* `forward` - через движение руки вертикально;
* `side` - через движение руки горизонтально;
* `force` - с усилием;
* `mega` - с большим усилием.

**Способ броска гранаты** не является выбором анимаций броска гранаты. \
Способ броска гранаты можно проверять в файлах **Селектора анимаций**, используя в блоке `if`  для проверки параметр  `human_throw_type`.

<details>

<summary>Пример выбора способа броска гранаты</summary>

```
{grenade_throw_type 
    {if cover_type "snipe_cover" 
        {type "forward"} 
    } 
    {if item_in_hand "m24" "f1" "mk1" "m39" "m61" ; light frag grenades 
        {if throwing_range 0 5 
            {type "forward"} 
        } 
        {if throwing_range 5 10 
            {type "side"} 
        } 
        {if throwing_range 10 20 
            {type "force"} 
        } 
        {type "mega"} 
    }
    [...]
}
```

</details>

<details>

<summary>Пример выбора анимации в Селекторе анимаций по проверке способа броска гранаты </summary>

```
{lie_throw_begin 
    {if human_throw_type "force" "mega" 
        {anm "lie_throw_grenade_1_begin"} 
    } 
    {anm "lie_throw_grenade_begin"} 
}
```

</details>


---

# 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://bestway-1.gitbook.io/documentation/gem-rts-v1-ru/animacii/anymatsyonnaia_systema_yunytov/animation_selector/vybor-sposoba-broska-granaty.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.
