More abilities
This commit is contained in:
20
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/Triage.cs
Normal file
20
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/Triage.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
|
||||
|
||||
/// <summary>
|
||||
/// Triage is an ability that gives priority to healing moves.
|
||||
///
|
||||
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Triage_(Ability)">Bulbapedia - Triage</see>
|
||||
/// </summary>
|
||||
[Script(ScriptCategory.Ability, "triage")]
|
||||
public class Triage : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void ChangePriority(IMoveChoice choice, ref sbyte priority)
|
||||
{
|
||||
if (!choice.ChosenMove.MoveData.HasFlag("heal"))
|
||||
return;
|
||||
if (priority == sbyte.MaxValue)
|
||||
return;
|
||||
priority++;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user