Refactor move selection prevention to use interface
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
|
||||
[Script(ScriptCategory.Pokemon, "disable")]
|
||||
public class DisableEffect : Script
|
||||
public class DisableEffect : Script, IScriptPreventMoveSelection
|
||||
{
|
||||
private int _turnsLeft = 4;
|
||||
private readonly StringKey _move;
|
||||
@@ -12,7 +12,7 @@ public class DisableEffect : Script
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void PreventMoveSelection(IMoveChoice choice, ref bool prevent)
|
||||
public void PreventMoveSelection(IMoveChoice choice, ref bool prevent)
|
||||
{
|
||||
if (choice.ChosenMove.MoveData.Name == _move)
|
||||
prevent = true;
|
||||
|
||||
Reference in New Issue
Block a user