2025-03-08 15:48:33 +01:00

14 lines
372 B
C#

namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
[Script(ScriptCategory.Move, "knock_off")]
public class KnockOff : Script
{
/// <inheritdoc />
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
{
if (target.RemoveHeldItemForBattle() is null)
{
move.GetHitData(target, hit).Fail();
}
}
}