Deukhoofd 1b9d137bb0
All checks were successful
Build / Build (push) Successful in 50s
Surprisingly, more abilities
2025-06-14 13:37:58 +02:00

17 lines
563 B
C#

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