{
  num: -21024,
  accuracy: true,
  basePower: 190,
  category: "Special",
  isNonstandard: "Past",
  name: "Total Cell Necrosis",
  pp: 1,
  priority: 0,
  flags: { protect: 1, mirror: 1 },
  isZ: "mewatomiumz",

  onHit(target, source, move) {
    if (!target || target.fainted) return;
    target.addVolatile("totalcellnecrosis", source);
  },

  condition: {
    duration: 3,
    onStart(pokemon) {
      this.add("-start", pokemon, "Necrosis");
    },
    onBeforeSwitchOut(pokemon) {
      if (!pokemon || pokemon.fainted) return;
      this.damage(pokemon.baseMaxhp / 4, pokemon, this.effectState.source);
      this.add("-end", pokemon, "Necrosis", "[silent]");
      pokemon.removeVolatile("totalcellnecrosis");
    },
    onEnd(pokemon) {
      this.add("-end", pokemon, "Necrosis");
    }
  },

  secondary: null,
  target: "normal",
  type: "Poison",
  contestType: "Clever"
}
