{
  onStart(pokemon, source) {
    this.add("-start", pokemon, "move: Centifuge", "[of] " + source);
  },
  onResidualOrder: 14,
  onResidual(pokemon) {
    const source = this.effectState.source;
    if (source && (!source.isActive || source.hp <= 0 || !source.activeTurns)) {
      delete pokemon.volatiles["centifuge"];
      this.add("-end", pokemon, "Centifuge", "[partiallytrapped]", "[silent]");
      return;
    }
    this.boost({ def: -1, spd: -1 }, pokemon, source, this.dex.getActiveMove("centifuge"));
  },
  onTrapPokemon(pokemon) {
    if (this.effectState.source && this.effectState.source.isActive)
      pokemon.tryTrap();
  }
}