{
  num: -13016,
  accuracy: true,
  basePower: 0,
  category: "Status",
  name: "Mayuri Liquefied",
  pp: 1,
  priority: 0,
  flags: {},
  target: "self",
  type: "Poison",
  condition: {
    duration: 2,
    onStart(pokemon, source, sourceEffect) {
      const abilityEffect = this.dex?.abilities?.get("cruelresearch") || sourceEffect;
      const speciesName = String(pokemon.species?.name || "");
      if (speciesName !== "Mayuri-Liquefied" && pokemon.formeChange) {
        pokemon.formeChange("Mayuri-Liquefied", abilityEffect, true);
      }
      const key = pokemon.uuid || pokemon.name;
      pokemon.side.mayuriLiquefactionUsed = pokemon.side.mayuriLiquefactionUsed || {};
      pokemon.side.mayuriLiquefactionUsed[key] = true;
      pokemon.bleachCaptainLiquefactionUsed = true;
      pokemon.bleachCaptainLiquefied = true;
      pokemon.bleachCaptainAwaitingBankai = false;
      pokemon.bleachCaptainLiquefiedTurns = 2;
      pokemon.hp = pokemon.maxhp;
      this.add("-start", pokemon, "mayuriliquefied");
      this.add("-heal", pokemon, pokemon.getHealth, "[from] ability: Cruel Research");
    },
    onBeforeMovePriority: 99,
    onBeforeMove(pokemon) {
      if (!pokemon.bleachCaptainLiquefied) return;
      this.add("cant", pokemon, "mayuriliquefied");
      return false;
    },
    onDamagePriority: 1000,
    onDamage(damage, target, source, effect) {
      if (typeof damage !== "number" || damage <= 0) return;
      return 0;
    },
    onSetStatus(status, target, source, effect) {
      if (!target.bleachCaptainLiquefied) return;
      this.add("-immune", target, "[from] ability: Cruel Research");
      return false;
    },
    onTryAddVolatile(status, target, source, effect) {
      if (!target.bleachCaptainLiquefied) return;
      if (!status || status.id === "mayuriliquefied") return;
      this.add("-immune", target, "[from] ability: Cruel Research");
      return null;
    },
    onEnd(pokemon) {
      const abilityEffect = this.dex?.abilities?.get("cruelresearch");
      pokemon.bleachCaptainLiquefied = false;
      pokemon.bleachCaptainAwaitingBankai = true;
      delete pokemon.bleachCaptainLiquefiedTurns;
      if (String(pokemon.species?.name || "") === "Mayuri-Liquefied" && pokemon.formeChange) {
        pokemon.formeChange("Mayuri", abilityEffect, true);
      }
      if (!pokemon.hasAbility("cruelresearch")) {
        if (pokemon.setAbility) pokemon.setAbility("cruelresearch", pokemon, abilityEffect, true);
        if (!pokemon.hasAbility("cruelresearch")) pokemon.ability = "cruelresearch";
      }
      pokemon.hp = pokemon.maxhp;
      this.add("-end", pokemon, "mayuriliquefied");
      this.add("-heal", pokemon, pokemon.getHealth, "[from] ability: Cruel Research");
    }
  },
  secondary: null,
  shortDesc: "Hidden helper for Cruel Research's fatal-hit Liquefied guard.",
  desc: "Hidden helper for Cruel Research. A fatal hit is prevented, the user becomes Liquefied Mayuri for that turn plus one extra full turn, restores to full HP, cannot move or take damage, then returns to base so Bankai can trigger afterward."
}
