This commit is contained in:
17
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/Soundproof.cs
Normal file
17
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/Soundproof.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user