Refactor move selection prevention to use interface

This commit is contained in:
Deukhoofd committed 2025-06-28 10:36:43 +02:00
1 parent 04cf585f5a
commit 2319160b52
12 files changed
+59 -27

No files matched your search

@@ -3,12 +3,12 @@ using PkmnLib.Static.Moves;
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
[Script(ScriptCategory.Pokemon, "taunt")]
public class TauntEffect(int turns) : Script
public class TauntEffect(int turns) : Script, IScriptPreventMoveSelection
{
private int _turns = turns;
/// <inheritdoc />
public override void PreventMoveSelection(IMoveChoice choice, ref bool prevent)
public void PreventMoveSelection(IMoveChoice choice, ref bool prevent)
{
if (choice.ChosenMove.MoveData.Category == MoveCategory.Status)
{