Fixes for masterball
This commit is contained in:
5 files changed
+381
-4
No files matched your search
@@ -3514,10 +3514,7 @@
|
||||
"flingPower": 0
|
||||
},
|
||||
"battleEffect": {
|
||||
"name": "pokeball_flat_modifier",
|
||||
"parameters": {
|
||||
"catchRate": 255
|
||||
}
|
||||
"name": "master_ball"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -24,6 +24,9 @@ public class Gen7CaptureLibrary : ICaptureLibrary
|
||||
if (target.Library.ScriptResolver.TryResolveBattleItemScript(captureItem, out var script) &&
|
||||
script is PokeballScript pokeballScript)
|
||||
{
|
||||
if (pokeballScript.IsAlwaysSuccessful(target))
|
||||
return new CaptureResult(true, 4, false);
|
||||
|
||||
pokeballScript.ChangeCatchRate(target, ref catchRate);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Items.Pokeballs;
|
||||
|
||||
[ItemScript("master_ball")]
|
||||
public class MasterBall(IItem item) : PokeballScript(item)
|
||||
{
|
||||
public override bool IsAlwaysSuccessful(IBattlePokemon target) => true;
|
||||
|
||||
public override void ChangeCatchRate(IBattlePokemon target, ref byte catchRate)
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user