# Extensions: User

These extensions specify the activation of a Trigger Key from a particular perspective. For example, attaching the <mark style="background-color:orange;">"\_player"</mark> extension would only activate Trigger Key's from the player's perspective, while attaching the <mark style="background-color:orange;">"\_foe"</mark> extension would only activate Trigger Keys from the opponent's perspective.\
\
However, not every key is compatible with these extensions. Since these extensions are used to specify the perspective of who has activated a specific key, any keys that occur during a point in battle that don't happen from any particular perspective aren't compatible.

For example, <mark style="background-color:purple;">"TargetHPLow"</mark> is compatible with these extensions, since it is possible to specify a particular battler that may have low HP. However, <mark style="background-color:purple;">"BattleEnd"</mark> would not be compatible with these extensions, since the end of the battle doesn't occur from any particular perspective, it's simply part of the structure of battle itself.\
\
As a rule of thumb, all of the keys in the subsections "Triggers: End of Battle", "Triggers: Variable", and "Triggers: Choices" are not compatible with these extensions. In addition, none of the keys in the "Wild Capture" subsection are compatible with these extensions since only the player is ever capable of capturing a Pokemon, so there isn't ever a need to specify any other perspective for those Trigger Keys.\
\
With all of that out of the way, here are all of the possible user extensions that can be used:

<details>

<summary><mark style="background-color:orange;"><strong>"_player"</strong></mark></summary>

Add this extension to a key so that it may only trigger when activated by one of the player's Pokemon. For example, <mark style="background-color:purple;">"BeforeMove"</mark> would trigger before any Pokemon uses a move, but <mark style="background-color:purple;">"BeforeMove\_player"</mark> would only ever trigger before one of the *player's* Pokemon uses a move.

</details>

<details>

<summary><mark style="background-color:orange;"><strong>"_player1"</strong></mark></summary>

Add this extension to a key so that it may only trigger when activated by the Pokemon that occupies the left-most position on the player's side (index 0). For example, <mark style="background-color:purple;">"BeforeMove\_player"</mark> would trigger before any of the Pokemon on the player's side uses a move, but <mark style="background-color:purple;">"BeforeMove\_player1"</mark> would only ever trigger before the first Pokemon on the player's side uses a move.

</details>

<details>

<summary><mark style="background-color:orange;"><strong>"_player2"</strong></mark></summary>

Add this extension to a key so that it may only trigger when activated by the Pokemon that occupies the right-most position (doubles) or center position (triples) on the player's side (index 2). For example, <mark style="background-color:purple;">"BeforeMove\_player1"</mark> would trigger before the first Pokemon on the player's side uses a move, but <mark style="background-color:purple;">"BeforeMove\_player2"</mark> would only ever trigger before the second Pokemon on the player's side uses a move. This extension does nothing in single battles.

</details>

<details>

<summary><mark style="background-color:orange;"><strong>"_player3"</strong></mark></summary>

Add this extension to a key so that it may only trigger when activated by the Pokemon that occupies the right-most position on the player's side (index 4). For example, <mark style="background-color:purple;">"BeforeMove\_player2"</mark> would trigger before the second Pokemon on the player's side uses a move, but <mark style="background-color:purple;">"BeforeMove\_player3"</mark> would only ever trigger before the third Pokemon on the player's side uses a move. This extension does nothing in single or double battles.

</details>

<details>

<summary><mark style="background-color:orange;"><strong>"_foe"</strong></mark></summary>

Add this extension to a key so that it may only trigger when activated by one of the opponent's Pokemon. For example, <mark style="background-color:purple;">"AfterMove"</mark> would trigger after any Pokemon uses a move, but <mark style="background-color:purple;">"AfterMove\_foe"</mark> would only ever trigger after one of the *opponent's* Pokemon uses a move.

</details>

<details>

<summary><mark style="background-color:orange;"><strong>"_foe1"</strong></mark></summary>

Add this extension to a key so that it may only trigger when activated by the Pokemon that occupies the right-most position on the opponent's side (index 1). For example, <mark style="background-color:purple;">"AfterMove\_foe"</mark> would trigger after any of the Pokemon on the opponent's side uses a move, but <mark style="background-color:purple;">"AfterMove\_foe1"</mark> would only ever trigger after the first Pokemon on the opponent's side uses a move.

</details>

<details>

<summary><mark style="background-color:orange;"><strong>"_foe2"</strong></mark></summary>

Add this extension to a key so that it may only trigger when activated by the Pokemon that occupies the left-most position (doubles) or center position (triples) on the opponent's side (index 3). For example, <mark style="background-color:purple;">"AfterMove\_foe1"</mark> would trigger after the first Pokemon on the opponent's side uses a move, but <mark style="background-color:purple;">"AfterMove\_foe2"</mark> would only ever trigger after the second Pokemon on the opponent's side uses a move. This extension does nothing in single battles.

</details>

<details>

<summary><mark style="background-color:orange;"><strong>"_foe3"</strong></mark></summary>

Add this extension to a key so that it may only trigger when activated by the Pokemon that occupies the left-most position on the opponent's side (index 5). For example, <mark style="background-color:purple;">"AfterMove\_foe2"</mark> would trigger after the second Pokemon on the opponent's side uses a move, but <mark style="background-color:purple;">"AfterMove\_foe3"</mark> would only ever trigger after the third Pokemon on the opponent's side uses a move. This extension does nothing in single or double battles.

</details>

<details>

<summary><mark style="background-color:orange;"><strong>"_ally"</strong></mark></summary>

Add this extension to a key so that it may only trigger when activated by a Pokemon owned by a partner trainer who is teamed up with the player. For example, <mark style="background-color:purple;">"BattlerFainted\_player"</mark> would trigger upon any Pokemon on the player's side fainting, but <mark style="background-color:purple;">"BattlerFainted\_ally"</mark> would only ever trigger upon a Pokemon owned by the player's partner fainting. Unlike "player" and "foe", there is only a single "ally" extension, since the player cannot ever have more than one partner trainer with them at a time, anyway.

</details>
