{
  onStart(pokemon) {
    this.add("-start", pokemon, "Magic Trick");
    const newatk = pokemon.storedStats.spa;
    const newspa = pokemon.storedStats.atk;
    pokemon.storedStats.atk = newatk;
    pokemon.storedStats.spa = newspa;
  },
  onCopy(pokemon) {
    const newatk = pokemon.storedStats.spa;
    const newspa = pokemon.storedStats.atk;
    pokemon.storedStats.atk = newatk;
    pokemon.storedStats.spa = newspa;
  },
  onEnd(pokemon) {
    this.add("-end", pokemon, "Magic Trick");
    const newatk = pokemon.storedStats.spa;
    const newspa = pokemon.storedStats.atk;
    pokemon.storedStats.atk = newatk;
    pokemon.storedStats.spa = newspa;
  },
  onRestart(pokemon) {
    pokemon.removeVolatile("Magic Trick");
  }
}