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,10 +1,10 @@
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
[Script(ScriptCategory.Move, "last_resort")]
public class LastResort : Script
public class LastResort : Script, IScriptPreventMoveSelection
{
/// <inheritdoc />
public override void PreventMoveSelection(IMoveChoice choice, ref bool prevent)
public void PreventMoveSelection(IMoveChoice choice, ref bool prevent)
{
var battleData = choice.User.BattleData;
if (battleData == null)