{
  name: "Spinurgy",
  rating: 4,
  num: -212301,
  onStart(pokemon) {
    pokemon.m.spinurgyRPM = 60;
  },
  onSwitchIn(pokemon) {
    pokemon.m.spinurgyRPM = 60;
  },
  onResidualOrder: 28,
  onResidual(pokemon) {
    const current = pokemon.m.spinurgyRPM || 60;
    const newRPM = Math.min(480, current * 2);
    pokemon.m.spinurgyRPM = newRPM;
    this.add("-message", `${pokemon.name} is spinning at ${newRPM} RPM!`);
  },
  onEnd(pokemon) {
    delete pokemon.m.spinurgyRPM;
  },
  onModifyMove(move, pokemon) {
    const rpm = pokemon.m.spinurgyRPM || 60;
    const spinningMoves = ["icespinner", "rapidspin", "spinout", "rollout", "iceball", "steamroller", "flamewheel", "drillrun", "drillpeck", "gyroball", "geargrind", "mortalspin", "steelroller", "tripleaxel", "aurawheel", "rollingkick", "pulsarspiral"];
    let isSpinning = spinningMoves.includes(move.id);
    if (!isSpinning && rpm >= 480 && move.category === "Physical" && move.flags?.contact) {
      isSpinning = true;
    }
    if (!isSpinning) return;
    if (rpm >= 240) {
      move.basePower = this.chainModify(1.5);
    } else if (rpm >= 120) {
      move.basePower = this.chainModify(1.3);
    }
  }
}