Deukhoofd 7727f92f4e
All checks were successful
continuous-integration/drone/push Build is passing
Even more moves
2025-05-05 16:58:03 +02:00

20 lines
649 B
C#

namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
[Script(ScriptCategory.Move, "belly_drum")]
public class BellyDrum : Script
{
/// <inheritdoc />
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
{
var maxHealthHalved = target.BoostedStats.Hp / 2;
if (target.CurrentHealth <= maxHealthHalved)
{
move.GetHitData(target, hit).Fail();
return;
}
target.Damage(maxHealthHalved, DamageSource.Misc);
// Raising the user's Attack by 12 stages should always set it to +6.
target.ChangeStatBoost(Statistic.Attack, 12, true);
}
}