mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-31 08:23:56 +01:00
Nest Ball modifier in config.
This commit is contained in:
parent
6676451353
commit
6af4425081
@ -22,5 +22,6 @@
|
|||||||
#define P_LURE_BALL_MODIFIER GEN_7 // In Gen7+, Lure Ball's catch multiplier is x5 instead of x3.
|
#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.
|
#define P_HEAVY_BALL_MODIFIER GEN_7 // In Gen7+, Heavy Ball's ranges change. See Cmd_handleballthrow.
|
||||||
#define P_NET_BALL_MODIFIER GEN_7 // In Gen7+, Net Ball's catch multiplier is x5 instead of x3.
|
#define P_NET_BALL_MODIFIER GEN_7 // In Gen7+, Net Ball's catch multiplier is x5 instead of x3.
|
||||||
|
#define P_NEST_BALL_MODIFIER GEN_7 // Nest Ball's formula varies depending on the Gen. See Cmd_handleballthrow.
|
||||||
|
|
||||||
#endif // GUARD_CONSTANTS_ITEM_CONFIG_H
|
#endif // GUARD_CONSTANTS_ITEM_CONFIG_H
|
||||||
|
@ -9797,12 +9797,23 @@ static void Cmd_handleballthrow(void)
|
|||||||
ballMultiplier = 35;
|
ballMultiplier = 35;
|
||||||
break;
|
break;
|
||||||
case ITEM_NEST_BALL:
|
case ITEM_NEST_BALL:
|
||||||
if (gBattleMons[gBattlerTarget].level < 40)
|
#if P_NEST_BALL_MODIFIER >= GEN_6
|
||||||
{
|
//((41 - Pokémon's level) ÷ 10)× if Pokémon's level is between 1 and 29, 1× otherwise.
|
||||||
ballMultiplier = 40 - gBattleMons[gBattlerTarget].level;
|
if (gBattleMons[gBattlerTarget].level < 30)
|
||||||
if (ballMultiplier <= 9)
|
ballMultiplier = 41 - gBattleMons[gBattlerTarget].level;
|
||||||
ballMultiplier = 10;
|
#elif P_NEST_BALL_MODIFIER == GEN_5
|
||||||
}
|
//((41 - Pokémon's level) ÷ 10)×, minimum 1×
|
||||||
|
if (gBattleMons[gBattlerTarget].level < 31)
|
||||||
|
ballMultiplier = 41 - gBattleMons[gBattlerTarget].level;
|
||||||
|
#else
|
||||||
|
//((40 - Pokémon's level) ÷ 10)×, minimum 1×
|
||||||
|
if (gBattleMons[gBattlerTarget].level < 40)
|
||||||
|
{
|
||||||
|
ballMultiplier = 40 - gBattleMons[gBattlerTarget].level;
|
||||||
|
if (ballMultiplier <= 9)
|
||||||
|
ballMultiplier = 10;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case ITEM_REPEAT_BALL:
|
case ITEM_REPEAT_BALL:
|
||||||
if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gBattlerTarget].species), FLAG_GET_CAUGHT))
|
if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gBattlerTarget].species), FLAG_GET_CAUGHT))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user