{
  name: "Assassin's Warhead",
  rating: 4.5,
  flags: {},
  onStart(pokemon) {
    if (pokemon.jakuhoRaikobenUsed === undefined) pokemon.jakuhoRaikobenUsed = false;
    pokemon.assassinsWarheadReady = !pokemon.jakuhoRaikobenUsed;
    pokemon.assassinsWarheadFired = !!pokemon.jakuhoRaikobenUsed;
    this.add("-ability", pokemon, "Assassin's Warhead");
    const abilityEffect = this.dex.abilities.get("assassinswarhead");
    this.boost({ spe: -2 }, pokemon, pokemon, abilityEffect, true);
  },
  onDragOut(pokemon) {
    this.add("-activate", pokemon, "ability: Assassin's Warhead");
    return null;
  },
  onModifyMove(move, pokemon, target) {
    if (!pokemon || !move) return;
    if (move.id === "jakuhoraikoben" && pokemon.assassinsWarheadReady && !pokemon.jakuhoRaikobenUsed) {
      move.accuracy = true;
      move.infiltrates = true;
      move.breaksProtect = true;
    }
  },
  onBasePowerPriority: 20,
  onBasePower(basePower, attacker, defender, move) {
    if (!attacker || !move || move.id !== "jakuhoraikoben") return;
    if (!attacker.assassinsWarheadReady || attacker.jakuhoRaikobenUsed) return;
    return this.chainModify(1.2);
  },
  onAfterMoveSecondarySelf(source, target, move) {
    if (!source || !move || move.id !== "jakuhoraikoben") return;
    source.assassinsWarheadReady = false;
    source.assassinsWarheadFired = true;
  },
  onEnd(pokemon) {
    delete pokemon.assassinsWarheadReady;
    delete pokemon.assassinsWarheadFired;
  }
}
