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

19 lines
571 B
C#
Raw Normal View History

2025-03-07 15:16:22 +00:00
using System.Collections.Generic;
using PkmnLib.Static.Utils;
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
[Script(ScriptCategory.Move, "grudge")]
public class Grudge : Script
{
/// <inheritdoc />
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
{
move.User.Volatile.StackOrAdd("grudge", () =>
{
move.User.Library.ScriptResolver.TryResolve(ScriptCategory.Pokemon, "grudge",
new Dictionary<StringKey, object?>(), out var script);
return script;
});
}
}