This commit is contained in:
26
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/WakeUpSlap.cs
Normal file
26
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/WakeUpSlap.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user