Adds more abilities
This commit is contained in:
21
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/Damp.cs
Normal file
21
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/Damp.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
|
||||
|
||||
/// <summary>
|
||||
/// Damp is an ability that prevents the use of Self-Destruct and Explosion moves.
|
||||
/// When a Pokémon with this ability is on the field, any attempt to use these moves will fail.
|
||||
/// This ability affects both allies and opponents.
|
||||
///
|
||||
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Damp_(Ability)">Bulbapedia - Damp</see>
|
||||
/// </summary>
|
||||
[Script(ScriptCategory.Ability, "damp")]
|
||||
public class Damp : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void FailIncomingMove(IExecutingMove move, IPokemon target, ref bool fail)
|
||||
{
|
||||
if (move.UseMove.Name == "self_destruct" || move.UseMove.Name == "explosion")
|
||||
{
|
||||
fail = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user