This commit is contained in:
17
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/StrengthSap.cs
Normal file
17
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/StrengthSap.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
|
||||
[Script(ScriptCategory.Move, "strength_sap")]
|
||||
public class StrengthSap : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
||||
{
|
||||
var attack = target.BoostedStats.Attack;
|
||||
if (!target.ChangeStatBoost(Statistic.Attack, -1, false))
|
||||
{
|
||||
move.GetHitData(target, hit).Fail();
|
||||
return;
|
||||
}
|
||||
move.User.Heal(attack);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user