21 lines
473 B
C#
21 lines
473 B
C#
namespace PkmnLib.Plugin.Gen7.Scripts.Side;
|
|
|
|
[Script(ScriptCategory.Side, "swamp_effect")]
|
|
public class SwampEffect : Script, IScriptChangeSpeed
|
|
{
|
|
private int _turns = 5;
|
|
|
|
/// <inheritdoc />
|
|
public void ChangeSpeed(ITurnChoice choice, ref uint speed)
|
|
{
|
|
speed /= 4;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override void OnEndTurn(IScriptSource owner, IBattle battle)
|
|
{
|
|
_turns--;
|
|
if (_turns <= 0)
|
|
RemoveSelf();
|
|
}
|
|
} |