namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
///
/// Soundproof is an ability that grants immunity to sound-based moves.
///
/// Bulbapedia - Soundproof
///
[Script(ScriptCategory.Ability, "soundproof")]
public class Soundproof : Script
{
///
public override void IsInvulnerableToMove(IExecutingMove move, IPokemon target, ref bool invulnerable)
{
if (move.UseMove.HasFlag("sound"))
invulnerable = true;
}
}