Finishes the last few moves
All checks were successful
Build / Build (push) Successful in 49s

This commit is contained in:
2025-05-18 12:20:21 +02:00
parent 3a9123b5ba
commit 9ff4745c0a
19 changed files with 585 additions and 27 deletions

View File

@@ -0,0 +1,26 @@
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();
}
}
}