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

21 lines
697 B
C#

using PkmnLib.Plugin.Gen7.Scripts.Pokemon;
using PkmnLib.Static.Utils;
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
[Script(ScriptCategory.Move, "spit_up")]
public class SpitUp : Script
{
/// <inheritdoc />
public override void ChangeBasePower(IExecutingMove move, IPokemon target, byte hit, ref ushort basePower)
{
var stockpileEffect = move.User.Volatile.Get<StockpileEffect>();
if (stockpileEffect == null || stockpileEffect.StockpileCount == 0)
{
move.GetHitData(target, hit).Fail();
return;
}
var stockpileCount = stockpileEffect.StockpileCount;
basePower = basePower.MultiplyOrMax(stockpileCount);
}
}