This commit is contained in:
@@ -3,10 +3,10 @@ using PkmnLib.Static.Moves;
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
|
||||
[Script(ScriptCategory.Move, "sucker_punch")]
|
||||
public class SuckerPunch : Script
|
||||
public class SuckerPunch : Script, IScriptOnBeforeHit
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void OnBeforeHit(IExecutingMove move, IPokemon target, byte hitIndex)
|
||||
public void OnBeforeHit(IExecutingMove move, IPokemon target, byte hitIndex)
|
||||
{
|
||||
var targetChoice = move.Battle.ChoiceQueue?.Where(x => x.User == target).FirstOrDefault();
|
||||
if (targetChoice is not IMoveChoice moveChoice ||
|
||||
|
||||
Reference in New Issue
Block a user