{
  name: "Moonwake",
  rating: 4,
  num: -22002,
  flags: {},
  onStart(pokemon) {
    if (!pokemon.abilityState) pokemon.abilityState = {};
    if (pokemon.side?.active?.length > 1) {
      const ally = pokemon.side.active.find(p => p && p !== pokemon && !p.fainted);
      if (ally?.hasAbility?.("dawnbreak") && !pokemon.abilityState.moonwakeUsed) {
        pokemon.abilityState.moonwakeUsed = true;
        this.add("-ability", pokemon, "Moonwake");
        this.boost({ spd: 1 }, pokemon);
        return;
      }
    }
    this.add("-ability", pokemon, "Moonwake");
  },
  onModifyMove(move, pokemon, target) {
    move.ignoreAbility = true;
  }
}