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