16 lines
508 B
C#
16 lines
508 B
C#
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
|
|
|
[Script(ScriptCategory.Move, "gyro_ball")]
|
|
public class GyroBall : Script, IScriptChangeBasePower
|
|
{
|
|
/// <inheritdoc />
|
|
public void ChangeBasePower(IExecutingMove move, IPokemon target, byte hit, ref ushort basePower)
|
|
{
|
|
if (move.User.BoostedStats.Speed == 0)
|
|
{
|
|
basePower = 1;
|
|
return;
|
|
}
|
|
basePower = (ushort)Math.Min(150, 25 * target.BoostedStats.Speed / move.User.BoostedStats.Speed + 1);
|
|
}
|
|
} |