{
  name: "Desert Spirit",
  rating: 4,
  num: -850,
  flags: {},

  onBasePowerPriority: 21,
  onBasePower(basePower, attacker, defender, move) {
    if (move.flags['sound']) {
      return this.chainModify([5325, 4096]);
    }
    if (['sandstorm', 'desertsand'].includes(attacker.effectiveWeather())) {
      return this.chainModify([5325, 4096]);
    }
  },

  onModifyMove(move, pokemon, target) {
    if (['sandstorm', 'desertsand'].includes(pokemon.effectiveWeather())) {
      move.flags = move.flags || {};
      move.flags.sound = 1;
      move.flags.bypasssub = 1;
    }
  },

  onSourceModifyDamage(damage, source, target, move) {
    if (move.flags['sound']) {
      return this.chainModify(0.5);
    }
  }
}
