Deukhoofd 9ff4745c0a
All checks were successful
Build / Build (push) Successful in 49s
Finishes the last few moves
2025-05-18 12:20:21 +02:00

26 lines
744 B
C#

using PkmnLib.Static.Utils;
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
[Script(ScriptCategory.Move, "wake_up_slap")]
public class WakeUpSlap : Script
{
/// <inheritdoc />
public override void ChangeBasePower(IExecutingMove move, IPokemon target, byte hit, ref ushort basePower)
{
if (target.HasStatus(ScriptUtils.ResolveName<Status.Sleep>()))
{
basePower = basePower.MultiplyOrMax(2);
}
}
/// <inheritdoc />
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
{
// Wake up the target if it is asleep
if (target.HasStatus(ScriptUtils.ResolveName<Status.Sleep>()))
{
target.ClearStatus();
}
}
}