Bunch more moves, changes in how additional information for items works.
This commit is contained in:
28
Plugins/PkmnLib.Plugin.Gen7/Scripts/Battle/MudSportEffect.cs
Normal file
28
Plugins/PkmnLib.Plugin.Gen7/Scripts/Battle/MudSportEffect.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
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 byte basePower)
|
||||
{
|
||||
if (move.UseMove.MoveType.Name == "electric")
|
||||
{
|
||||
basePower = basePower.MultiplyOrMax(2f / 3f);
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnEndTurn(IBattle battle)
|
||||
{
|
||||
_turnsLeft--;
|
||||
if (_turnsLeft <= 0)
|
||||
{
|
||||
RemoveSelf();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user