24 lines
715 B
C#
24 lines
715 B
C#
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();
|
|
}
|
|
}
|
|
} |