namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon; /// /// Attached script for to keep track of the consecutive turns of using Protect, /// or protect-like moves. /// [Script(ScriptCategory.Pokemon, "protection_failure")] public class ProtectionFailureScript : Script, IScriptOnBeforeTurnStart, IScriptOnEndTurn { public int ProtectTurns { get; set; } public bool UsedProtect { get; set; } /// public void OnBeforeTurnStart(ITurnChoice choice) { UsedProtect = false; } /// public void OnEndTurn(IScriptSource owner, IBattle battle) { if (!UsedProtect) { RemoveSelf(); } } }