Optional
sourceWhen given a battler tag or json representing one, load the data for it. This is meant to be inherited from by any battler tag with custom attributes
A battler tag
Adds a stockpile stack to a pokemon, up to a maximum of 3 stacks. Note that onOverlap defers to this method.
If a stack is added, a message is displayed and the pokemon's DEF and SPDEF are increased by 1. For each stat, an internal counter is incremented (by 1) if the stat was successfully changed.
Removing the tag removes all stacks, and the pokemon's DEF and SPDEF are decreased by one stage for each stack which had successfully changed that particular stat during onAdd.
Battler tag enabling the Stockpile mechanic. This tag handles:
Stack tracking, including max limit enforcement (which is replicated in Stockpile for redundancy).
Stat changes on adding a stack. Adding a stockpile stack attempts to raise the pokemon's DEF and SPDEF by +1.
Stat changes on removal of (all) stacks.