Implements several more moves
This commit is contained in:
26
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/BellyDrum.cs
Normal file
26
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/BellyDrum.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using PkmnLib.Dynamic.Events;
|
||||
using PkmnLib.Dynamic.Models;
|
||||
using PkmnLib.Dynamic.ScriptHandling;
|
||||
using PkmnLib.Dynamic.ScriptHandling.Registry;
|
||||
using PkmnLib.Static;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user