More moves implemented
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Battle;
|
||||
|
||||
[Script(ScriptCategory.Battle, "fairy_lock")]
|
||||
public class FairyLockEffect : Script
|
||||
{
|
||||
private int _turns = 1;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void PreventSelfRunAway(IFleeChoice choice, ref bool prevent)
|
||||
{
|
||||
prevent = true;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void PreventSelfSwitch(ISwitchChoice choice, ref bool prevent)
|
||||
{
|
||||
prevent = true;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnEndTurn(IBattle battle)
|
||||
{
|
||||
if (_turns <= 0)
|
||||
RemoveSelf();
|
||||
_turns--;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user