Files
PkmnLib.NET/Plugins/PkmnLib.Plugin.Gen7/Scripts/Pokemon/FocusEnergyEffect.cs
Deukhoofd d2a82b5fe3
All checks were successful
Build / Build (push) Successful in 3m12s
Many more tests and fixes
2026-08-27 17:11:12 +02:00

15 lines
475 B
C#

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