Refactor move selection prevention to use interface

This commit is contained in:
2025-06-28 10:36:43 +02:00
parent 04cf585f5a
commit 2319160b52
12 changed files with 59 additions and 27 deletions

View File

@@ -1,12 +1,12 @@
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
[Script(ScriptCategory.Pokemon, "throat_chop")]
public class ThroatChopEffect : Script
public class ThroatChopEffect : Script, IScriptPreventMoveSelection
{
private int _turns = 3;
/// <inheritdoc />
public override void PreventMoveSelection(IMoveChoice choice, ref bool prevent)
public void PreventMoveSelection(IMoveChoice choice, ref bool prevent)
{
if (choice.ChosenMove.MoveData.HasFlag("sound"))
prevent = true;