Refactor move selection prevention to use interface
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user