Refactor move selection prevention to use interface
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
|
||||
[Script(ScriptCategory.Pokemon, "heal_block")]
|
||||
public class HealBlockEffect : Script
|
||||
public class HealBlockEffect : Script, IScriptPreventMoveSelection
|
||||
{
|
||||
private int _duration;
|
||||
|
||||
@@ -19,7 +19,7 @@ public class HealBlockEffect : Script
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void PreventMoveSelection(IMoveChoice choice, ref bool prevent)
|
||||
public void PreventMoveSelection(IMoveChoice choice, ref bool prevent)
|
||||
{
|
||||
if (choice.ChosenMove.MoveData.HasFlag("heal"))
|
||||
prevent = true;
|
||||
|
||||
Reference in New Issue
Block a user