> For the complete documentation index, see [llms.txt](https://lucidious89-tutorials.gitbook.io/deluxe-battle-kit-tutorial/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lucidious89-tutorials.gitbook.io/deluxe-battle-kit-tutorial/deluxe-battle-kit-for-v21.1/mid-battle-scripting/trigger-keys/triggers-megas-and-primals.md).

# Triggers: Megas & Primals

These are keys which trigger upon a battler utilizing Mega Evolution or Primal Reversion.

* <mark style="background-color:purple;">**"BeforeMegaEvolution"**</mark>\
  Triggers when a battler is going to Mega Evolve this turn, but before that Pokemon actually Mega Evolves.<br>
* <mark style="background-color:purple;">**"AfterMegaEvolution"**</mark>\
  Triggers after a battler successfully Mega Evolves.<br>
* <mark style="background-color:purple;">**"BeforePrimalReversion"**</mark>\
  Triggers when a battler is going to Primal Revert, but before that Pokemon actually undergoes Primal Reversion.<br>
* <mark style="background-color:purple;">**"AfterPrimalReversion"**</mark>\
  Triggers when a battler successfully completes its Primal Reversion.

{% hint style="info" %}
Trigger Extensions: You may extend these keys with a species ID or a type ID to specify that they should only trigger when Mega Evolving or Primal Reverting a specific species, or species of a specific type. For example, <mark style="background-color:purple;">"BeforeMegaEvolution\_MAWILE"</mark> would trigger only when a Mawile is about to Mega Evolve, where <mark style="background-color:purple;">"AfterPrimalReversion\_WATER"</mark> would trigger only after a Water-type has Primal Reverted.
{% endhint %}
