{
  num: -130122,
  accuracy: 100,
  basePower: 90,
  category: "Special",
  name: "Bushogoma",
  pp: 10,
  priority: 0,
  flags: { protect: 1, mirror: 1, metronome: 1, wind: 1, slicing: 1 },
  onModifyMove(move, pokemon, target) {
    move.ignoreEvasion = true;
  },
  onBasePower(basePower, pokemon, target, move) {
    const last = target && (target.lastMoveUsed || target.lastMove);
    if (last && last.category === "Special") return this.chainModify(4 / 3);
  },
  onAfterMoveSecondarySelf(source, target, move) {
    if (!source || !source.hasAbility("katenkyokotsu")) return;
    if (!source.terastallized) source.setType(["Flying", "Steel"]);
    this.add("-activate", source, "ability: Katen Kyokotsu");
    source.shunsuiGamesWon = source.shunsuiGamesWon || {};
    const fresh = !source.shunsuiGamesWon.bushogoma;
    if (fresh) {
      source.shunsuiGamesWon.bushogoma = true;
      this.boost({spa: 1, spe: 1}, source, source, this.dex.abilities.get("katenkyokotsu"));
    }
    const score = Object.keys(source.shunsuiGamesWon).length;
    if (score >= 3 && !source.shunsuiGameMaster) {
      source.shunsuiGameMaster = true;
      this.boost({atk: 1, spe: 1}, source, source, this.dex.abilities.get("katenkyokotsu"));
      this.heal(Math.max(1, Math.floor(source.maxhp / 4)), source, source, this.dex.abilities.get("katenkyokotsu"));
    }
    let heal = source.shunsuiRepeatGamePenalty === "bushogoma" ? Math.floor(source.maxhp / 12) : Math.floor(source.maxhp / (source.shunsuiGameMaster ? 6 : 8));
    if (target && target.fainted) heal = Math.max(heal, Math.floor(source.maxhp / 3));
    this.heal(Math.max(1, heal), source, source, this.dex.abilities.get("katenkyokotsu"));
  },
  secondaries: [
    { chance: 100, boosts: { accuracy: -1 } },
    { chance: 30, volatileStatus: "confusion" }
  ],
  target: "allAdjacentFoes",
  type: "Flying",
  zMove: { basePower: 175 },
  contestType: "Cool",
  desc: "A spinning wind-blade game. It hits all adjacent foes, ignores evasion, lowers Accuracy, and may confuse. Winning shifts Shunsui to Flying/Steel, heals him, and adds to Katen Kyokotsu's score."
}
