22 lines
582 B
C#
22 lines
582 B
C#
namespace PkmnLib.Plugin.Gen7.Scripts.Items.Pokeballs;
|
|
|
|
[ItemScript("net_ball")]
|
|
public class NetBall : PokeballScript
|
|
{
|
|
/// <inheritdoc />
|
|
public NetBall(IItem item) : base(item)
|
|
{
|
|
}
|
|
|
|
private static readonly StringKey WaterType = "water";
|
|
private static readonly StringKey BugType = "bug";
|
|
|
|
/// <inheritdoc />
|
|
public override void ChangeCatchRate(IPokemon target, ref byte catchRate)
|
|
{
|
|
if (target.Types.Any(x => x.Name == WaterType || x.Name == BugType))
|
|
{
|
|
catchRate = catchRate.MultiplyOrMax(3.5f);
|
|
}
|
|
}
|
|
} |