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

24 lines
730 B
C#

using System;
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
[Script(ScriptCategory.Move, "psych_up")]
public class PsychUp : Script
{
/// <inheritdoc />
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
{
var targetStats = target.StatBoost;
var userStats = move.User.StatBoost;
foreach (Statistic stat in Enum.GetValues(typeof(Statistic)))
{
var targetStat = targetStats.GetStatistic(stat);
var userStat = userStats.GetStatistic(stat);
if (targetStat != userStat)
{
userStats.SetStatistic(stat, targetStat);
}
}
move.User.RecalculateBoostedStats();
}
}