18 lines
647 B
C#

using PkmnLib.Plugin.Gen7.Scripts.Weather;
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
[Script(ScriptCategory.Move, "growth")]
public class Growth : Script, IScriptOnSecondaryEffect
{
/// <inheritdoc />
public void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
{
EventBatchId batchId = new();
sbyte amount = 1;
if (move.Battle.WeatherName == ScriptUtils.ResolveName<HarshSunlight>())
amount = 2;
move.User.ChangeStatBoost(Statistic.Attack, amount, true, false, batchId);
move.User.ChangeStatBoost(Statistic.SpecialAttack, amount, true, false, batchId);
}
}