Deukhoofd 1feb27e826
All checks were successful
Build / Build (push) Successful in 50s
More work on refactor to interfaces
2025-06-29 12:03:51 +02:00

25 lines
801 B
C#

namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
[Script(ScriptCategory.Move, "smelling_salts")]
public class SmellingSalts : Script, IScriptOnSecondaryEffect, IScriptChangeMoveDamage
{
/// <inheritdoc />
public void ChangeMoveDamage(IExecutingMove move, IPokemon target, byte hit, ref uint damage)
{
// If the target is paralyzed, double the damage
if (target.HasStatus(ScriptUtils.ResolveName<Status.Paralyzed>()))
{
damage *= 2;
}
}
/// <inheritdoc />
public void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
{
// If the target is paralyzed, remove the paralysis
if (target.HasStatus(ScriptUtils.ResolveName<Status.Paralyzed>()))
{
target.ClearStatus();
}
}
}