Deukhoofd 77d7b86a3c
All checks were successful
Build / Build (push) Successful in 1m2s
Implement most pokeballs
2025-07-20 11:15:45 +02:00

22 lines
599 B
C#

using PkmnLib.Plugin.Gen7.Libraries.Battling;
namespace PkmnLib.Plugin.Gen7.Scripts.Items.Pokeballs;
[ItemScript("repeat_ball")]
public class RepeatBall : PokeballScript
{
/// <inheritdoc />
public RepeatBall(IItem item) : base(item)
{
}
/// <inheritdoc />
public override void ChangeCatchRate(IPokemon target, ref byte catchRate)
{
if (target.Library.CaptureLibrary is Gen7CaptureLibrary captureLibrary &&
captureLibrary.HasPokemonBeenCaughtBefore(target.Species))
{
catchRate = catchRate.MultiplyOrMax(3.5f);
}
}
}