Even more abilities
This commit is contained in:
23
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/GaleWings.cs
Normal file
23
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/GaleWings.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
|
||||
|
||||
/// <summary>
|
||||
/// Gale Wings is an ability that gives priority to Flying-type moves when the Pokémon's HP is full.
|
||||
/// This ability is commonly associated with Fletchling, Fletchinder, and Talonflame.
|
||||
///
|
||||
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Gale_Wings_(Ability)">Bulbapedia - Gale Wings</see>
|
||||
/// </summary>
|
||||
[Script(ScriptCategory.Ability, "gale_wings")]
|
||||
public class GaleWings : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void ChangePriority(IMoveChoice choice, ref sbyte priority)
|
||||
{
|
||||
if (choice.User.CurrentHealth != choice.User.MaxHealth)
|
||||
return;
|
||||
// Defensive programming, should never happen
|
||||
if (priority == sbyte.MaxValue)
|
||||
return;
|
||||
|
||||
priority++;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user