namespace PkmnLib.Plugin.Gen7.Scripts.Battle; [Script(ScriptCategory.Battle, "fairy_lock")] public class FairyLockEffect : Script, IScriptOnEndTurn, IScriptPreventSelfRunAway, IScriptPreventSelfSwitch { private int _turns = 1; /// public void PreventSelfRunAway(IFleeChoice choice, ref bool prevent) { prevent = true; } /// public void PreventSelfSwitch(ISwitchChoice choice, ref bool prevent) { prevent = true; } /// public void OnEndTurn(IScriptSource owner, IBattle battle) { if (_turns <= 0) RemoveSelf(); _turns--; } }