15 lines
475 B
C#
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);
|
|
}
|
|
} |