18 lines
474 B
C#

namespace PkmnLib.Plugin.Gen7.Scripts.Side;
public class QuickGuardEffect : Script, IScriptIsInvulnerableToMove
{
/// <inheritdoc />
/// <inheritdoc />
public void IsInvulnerableToMove(IExecutingMove move, IPokemon target, ref bool invulnerable)
{
if (move.UseMove.Priority > 0)
invulnerable = true;
}
/// <inheritdoc />
public override void OnEndTurn(IScriptSource owner, IBattle battle)
{
RemoveSelf();
}
}