This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Items.Pokeballs;
|
||||
|
||||
[ItemScript("nest_ball")]
|
||||
public class NestBall : PokeballScript
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public NestBall(IItem item) : base(item)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void ChangeCatchRate(IPokemon target, ref byte catchRate)
|
||||
{
|
||||
if (target.Level >= 30)
|
||||
return;
|
||||
var modifier = (41 - target.Level) / 10f;
|
||||
catchRate = catchRate.MultiplyOrMax(modifier);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user