Files
PkmnLib.NET/Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/PollenPuff.cs
2026-08-28 15:31:54 +02:00

26 lines
772 B
C#

using PkmnLib.Static.Moves;
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
[Script(ScriptCategory.Move, "pollen_puff")]
public class PollenPuff : Script, IScriptOnSecondaryEffect, IScriptChangeCategory
{
/// <inheritdoc />
/// <inheritdoc />
public void ChangeCategory(IExecutingMove move, IBattlePokemon target, byte hitIndex, ref MoveCategory category)
{
if (move.User.SideIndex == target.SideIndex)
{
category = MoveCategory.Status;
}
}
/// <inheritdoc />
public void OnSecondaryEffect(IExecutingMove move, IBattlePokemon target, byte hit)
{
if (move.User.SideIndex != target.SideIndex)
return;
var maxHealth = target.MaxHealth;
target.Heal(maxHealth / 2);
}
}