26 lines
772 B
C#
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);
|
|
}
|
|
} |