21 lines
697 B
C#
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);
|
|
}
|
|
} |