Refactor move selection prevention to use interface
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
|
||||
[Script(ScriptCategory.Pokemon, "torment")]
|
||||
public class TormentEffect(IMoveChoice? moveChoice) : Script
|
||||
public class TormentEffect(IMoveChoice? moveChoice) : Script, IScriptPreventMoveSelection
|
||||
{
|
||||
private IMoveChoice? _moveChoice = moveChoice;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void PreventMoveSelection(IMoveChoice choice, ref bool prevent)
|
||||
public void PreventMoveSelection(IMoveChoice choice, ref bool prevent)
|
||||
{
|
||||
if (_moveChoice == null)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user