PkmnLib.NET/Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/Covet.cs

15 lines
428 B
C#
Raw Normal View History

2025-02-01 14:00:22 +00:00
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
[Script(ScriptCategory.Move, "covet")]
public class Covet : Script
{
/// <inheritdoc />
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
{
if (target.HeldItem == null)
return;
if (move.User.HeldItem != null)
return;
2025-03-02 13:03:51 +00:00
_ = move.User.SetHeldItem(target.RemoveHeldItemForBattle());
2025-02-01 14:00:22 +00:00
}
}