This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Items.Pokeballs;
|
||||
|
||||
[ItemScript("heavy_ball")]
|
||||
public class HeavyBall : PokeballScript
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public HeavyBall(IItem item) : base(item)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void ChangeCatchRate(IPokemon target, ref byte catchRate)
|
||||
{
|
||||
var weight = target.WeightInKg;
|
||||
switch (weight)
|
||||
{
|
||||
case < 100:
|
||||
{
|
||||
catchRate.SubtractOrMin(20);
|
||||
break;
|
||||
}
|
||||
case < 200:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case < 300:
|
||||
{
|
||||
catchRate.AddOrMax(20);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
catchRate.AddOrMax(30);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user