{
  num: -13014,
  accuracy: true,
  basePower: 0,
  category: "Status",
  name: "Konjiki Poison Mist",
  pp: 5,
  priority: 0,
  flags: { protect: 1, mirror: 1, metronome: 1 },
  bankaiOnly(source, move) {
    if (!source) return false;
    const species = source.species || source.template || {};
    const speciesName = species.name || species.species || "";
    const speciesId = species.id || "";
    const types = source.getTypes ? source.getTypes() : [];
    if (source.hasAbility?.("goldenpoisonwomb")) return true;
    if (speciesName === "Mayuri-Mega" || speciesName === "Mayuri-Bankai" || speciesId === "mayurimega" || speciesId === "mayuribankai") return true;
    if (species.forme === "Mega" && (species.baseSpecies === "Mayuri" || speciesName.includes("Mayuri"))) return true;
    if ((source.baseSpecies?.baseSpecies === "Mayuri" || species.baseSpecies === "Mayuri" || speciesName === "Mayuri") && types.includes("Bug")) return true;
    this.add("-fail", source, move);
    this.attrLastMove("[still]");
    return false;
  },
  onTry(source, target, move) {
    if (!this.effect.bankaiOnly.call(this, source, move)) return null;
  },
  onTryHit(target, source, move) {
    if (!this.effect.bankaiOnly.call(this, source, move)) return null;
  },
  onHit(target, source, move) {
    const formulas = ["nerve", "corrosive", "blood", "anesthetic", "adaptation"];
    const formula = source.goldenPoisonWombFormula || formulas[this.random(formulas.length)];
    const wasPoisoned = target.status === "psn" || target.status === "tox";
    if (wasPoisoned) {
      const toxicTurns = target.status === "tox" && target.statusState?.toxicTurns ? target.statusState.toxicTurns : 1;
      const fraction = target.status === "tox" ? Math.min(Math.max(toxicTurns, 1), 15) / 16 : 1 / 8;
      const multiplier = formula === "blood" ? 2 : 1;
      this.damage(Math.max(1, Math.floor((target.baseMaxhp || target.maxhp) * fraction * multiplier)), target, source, move);
    } else if (!target.status) {
      target.setStatus("tox", source, move, formula === "adaptation");
    }
    if (target.status === "psn" || target.status === "tox") {
      const sealed = this.randomChance(45, 100) && target.addVolatile("ashisogijizonerve", source, move);
      if (!sealed) this.boost({ spe: -2 }, target, source, move);
      if (formula === "corrosive") {
        this.boost({ def: -1, spd: -1 }, target, source, move);
      } else if (formula === "anesthetic") {
        this.boost({ accuracy: -1 }, target, source, move);
      } else if (formula === "blood") {
        if (this.randomChance(1, 2)) {
          this.boost({ spe: -1 }, target, source, move);
        } else {
          this.boost({ spd: -1 }, target, source, move);
        }
      } else if (formula === "adaptation") {
        this.boost({ spd: -1 }, target, source, move);
      }
    }
  },
  secondary: null,
  target: "allAdjacentFoes",
  type: "Poison",
  zMove: { boost: { spd: 1 } },
  contestType: "Clever",
  desc: "Bankai-only. Badly poisons all adjacent foes. Poisoned foes immediately take poison damage, then suffer Nerve Seal or a heavy Speed drop, with Golden Poison Womb's current formula adding another effect."
}
