This plugin adds various new keys to be used by the Deluxe Battle Kit's mid-battle scripting functionality.
Trigger Keys
These are keys which trigger upon a battler utilizing Terastallization or its mechanics.
"BeforeTerastallize"
Triggers when a battler is going to Terastallize this turn, but before that Pokemon actually Terastallizes.
"AfterTerastallize"
Triggers after a battler successfully Terastallizes.
"BeforeTeraMove"
Triggers right before a battler's selected move boosted by Terastallization is about to be executed.
Trigger Extensions 1: You may extend these keys with a species ID or a type ID to specify that they should only trigger when Terastallizing a specific species, or species with a specific Tera Type. For example, "BeforeTerastallize_OGERPON" would trigger only when an Ogerpon is about to Terastallize, where "AfterTerastallize_STELLAR" would trigger only after a Pokemon has Terastallized into the Stellar-type.
Trigger Extensions 2: For the "BeforeTeraMove" key specifically, you can also use a move ID to specify a specific move. For example, "BeforeTeraMove_TERABLAST" would only trigger before the move Tera Blast is used, but only if the move is being boosted by Terastallization.
Command Keys
These are keys which trigger certain actions related to Terastallization to take place during battle, such as forcing a trainer to Terastallize, or disabling its use.
"terastallize" => Boolean or String
Forces the battler to Terastallize when set to true, as long as they are able to. If set to a string instead, you can customize a message that will display upon this Terastallization triggering. Note that this can even be used to force a wild Pokemon to Terastallize, as long as they are capable of it.
Unlike natural Terastallization, you can use this to force Terastallization to happen at any point in battle, even at the end of the turn or after the battler has already attacked. This cannot happen if a different action with this battler has been chosen however, such as switching it out or using an item.
"disableTera" => Boolean
Toggles the availability of Terastallization for the owner of the battler. If set to true, Terastallization will be disabled for this trainer. If set to false, Terastallization will no longer be disabled, allowing this trainer to use it again even if they've already used Terastallization prior in this battle.
Hardcoding
Here's a list of methods and/or properties that you might want to reference when hardcoding a midbattle script, since this plugin adds a lot of new custom content which you may need to call on to make certain things happen:
Battle Class
pbHasTeraOrb?(idxBattler)
Returns true if the trainer who owns the battler at index idxBattler has an item in their inventory that allows for Terastallization.
pbGetTeraOrbName(idxBattler)
Returns the name of the specific item in a trainer's inventory that allows for Terastallization. The specific trainer's inventory checked for is the one who owns the battler at index idxBattler.
pbCanTerastallize?(idxBattler)
Returns true if the battler at index idxBattler is capable of Terastallizing.
pbTerastallize(idxBattler)
Begins the Terastallization process for the battler at index idxBattler.
Battle::Battler Class
tera?
Returns true if this battler is Terastallized.
tera_form?
Returns true if this battler is Terastallized into a unique Tera Form.
hasTera?
Returns true if this battler is capable of using Terastallization.
unTera(break)
Forces a battler's Terastallization state to end. If the break argument is set to true, the battler's Terastallization will end with a dramatic Tera Break animation, instead of simply fading away.