namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
///
/// 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.
///
/// Bulbapedia - Gale Wings
///
[Script(ScriptCategory.Ability, "gale_wings")]
public class GaleWings : Script
{
///
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++;
}
}