Files
PkmnLib.NET/Plugins/PkmnLib.Plugin.Gen7/Scripts/Pokemon/FocusEnergyEffect.cs

15 lines
481 B
C#

namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
[Script(ScriptCategory.Pokemon, "increased_critical_stage")]
public class FocusEnergyEffect : Script, IScriptChangeCriticalStage
{
public void ChangeCriticalStage(IExecutingMove move, IBattlePokemon target, byte hit, ref byte stage)
{
if (stage == byte.MaxValue)
{
move.GetHitData(target, hit).Fail();
return;
}
stage = (byte)Math.Min(stage + 2, byte.MaxValue);
}
}