Heavy Ball modifier in config.

This commit is contained in:
Eduardo Quezada 2020-10-17 01:47:04 -03:00
parent e65f22a76c
commit 0dfbbde7ce
2 changed files with 22 additions and 10 deletions

View File

@ -18,5 +18,6 @@
#define P_KEY_FOSSILS GEN_7 // In Gen4+, all Gen 3 fossils became regular items.
#define P_KEY_ESCAPE_ROPE GEN_7 // In Gen8, Escape Rope became a Key Item.
#define P_LURE_BALL_MODIFIER GEN_7 // In Gen7+, Lure Ball's catch multiplier is x5 instead of x3.
#define P_HEAVY_BALL_MODIFIER GEN_7 // In Gen7+, Heavy Ball's ranges change. See Cmd_handleballthrow.
#endif // GUARD_CONSTANTS_ITEM_CONFIG_H

View File

@ -9855,16 +9855,27 @@ static void Cmd_handleballthrow(void)
break;
case ITEM_HEAVY_BALL:
i = GetPokedexHeightWeight(SpeciesToNationalPokedexNum(gBattleMons[gBattlerTarget].species), 1);
if (i < 1024)
ballMultiplier = 5;
else if (i < 2048)
ballMultiplier = 10;
else if (i < 3072)
ballMultiplier = 20;
else if (i < 4096)
ballMultiplier = 30;
else
ballMultiplier = 40;
#if P_HEAVY_BALL_MODIFIER >= GEN_7
if (i < 1000)
ballMultiplier = 5;
else if (i < 2000)
ballMultiplier = 10;
else if (i < 3000)
ballMultiplier = 20;
else
ballMultiplier = 30;
#else
if (i < 1024)
ballMultiplier = 5;
else if (i < 2048)
ballMultiplier = 10;
else if (i < 3072)
ballMultiplier = 20;
else if (i < 4096)
ballMultiplier = 30;
else
ballMultiplier = 40;
#endif
break;
case ITEM_FAST_BALL:
if (gBaseStats[gBattleMons[gBattlerTarget].species].baseSpeed >= 100)