{
  num: -13066,
  accuracy: 100,
  basePower: 140,
  category: "Special",
  name: "Gokei",
  pp: 5,
  priority: 0,
  flags: {protect: 1, mirror: 1, distance: 1, bypasssub: 1},
  infiltrates: true,
  breaksProtect: true,
  onTryMove(pokemon) {
    if (pokemon?.hasAbility?.("senbonzakurakageyoshi") || String(pokemon?.species?.name || "").includes("Bankai")) return;
    this.add("-fail", pokemon, "move: Gokei");
    return false;
  },
  onHit(target, source, move) {
    if (target) target.addVolatile("gokei", source, move);
  },
  condition: {
    duration: 2,
    onStart(pokemon) {
      this.add("-start", pokemon, "Gokei");
    },
    onTrapPokemon(pokemon) {
      pokemon.tryTrap(true);
    },
    onResidualOrder: 13,
    onResidual(pokemon) {
      this.damage(Math.max(1, Math.floor((pokemon.maxhp || pokemon.baseMaxhp || 1) / 16)), pokemon);
    },
    onEnd(pokemon) {
      this.add("-end", pokemon, "Gokei");
    }
  },
  onAfterMoveSecondarySelf(pokemon, target, move) {
    if (pokemon) this.boost({def: -1, spd: -1}, pokemon, pokemon, move, true);
  },
  secondary: null,
  target: "normal",
  type: "Steel",
  zMove: {basePower: 200},
  contestType: "Beautiful",
  desc: "Bankai-only. Surrounds the target in a blade-petal sphere, traps it, bypasses Substitute, and leaves Byakuya less guarded."
}
