Deukhoofd 1b9d137bb0
All checks were successful
Build / Build (push) Successful in 50s
Surprisingly, more abilities
2025-06-14 13:37:58 +02:00

21 lines
499 B
C#

namespace PkmnLib.Plugin.Gen7.Scripts.Battle;
[Script(ScriptCategory.Battle, "trick_room")]
public class TrickRoomEffect : Script
{
private int _turnsLeft = 5;
/// <inheritdoc />
public override void ChangeSpeed(ITurnChoice choice, ref uint speed)
{
speed = uint.MaxValue - speed;
}
/// <inheritdoc />
public override void OnEndTurn(IScriptSource owner, IBattle battle)
{
_turnsLeft--;
if (_turnsLeft <= 0)
RemoveSelf();
}
}