Deukhoofd 7727f92f4e
All checks were successful
continuous-integration/drone/push Build is passing
Even more moves
2025-05-05 16:58:03 +02:00

28 lines
656 B
C#

using PkmnLib.Static.Utils;
namespace PkmnLib.Plugin.Gen7.Scripts.Battle;
[Script(ScriptCategory.Battle, "mud_sport")]
public class MudSportEffect : Script
{
private int _turnsLeft = 5;
/// <inheritdoc />
public override void ChangeBasePower(IExecutingMove move, IPokemon target, byte hit, ref ushort basePower)
{
if (move.UseMove.MoveType.Name == "electric")
{
basePower = basePower.MultiplyOrMax(2f / 3f);
}
}
/// <inheritdoc />
public override void OnEndTurn(IBattle battle)
{
_turnsLeft--;
if (_turnsLeft <= 0)
{
RemoveSelf();
}
}
}