Skip to content

Commit

Permalink
Merge pull request #2290 from AsparagusEduardo/RHH/pr/ballMulti_fix
Browse files Browse the repository at this point in the history
Fixed ball multiplier fallthroughs
  • Loading branch information
ghoulslash authored Sep 6, 2022
2 parents 75c4e7d + 89550ed commit 51a569b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/constants/battle_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
#define B_LURE_BALL_MODIFIER GEN_7 // In Gen7+, Lure Ball's catch multiplier is x5 instead of x3.
#define B_HEAVY_BALL_MODIFIER GEN_7 // In Gen7+, Heavy Ball's ranges change. See Cmd_handleballthrow.
#define B_DREAM_BALL_MODIFIER GEN_8 // In Gen8, Dream Ball's catch multiplier is x4 when the target is asleep or has the ability Comatose.
#define B_SPORT_BALL_MODIFIER GEN_8 // In Gen8, Sport Ball's catch multiplier was reduced from x1.5 to x1.
#define B_SERENE_GRACE_BOOST GEN_7 // In Gen5+, Serene Grace boosts the added flinch chance of King's Rock and Razor Fang.

// Flag settings
Expand Down
6 changes: 5 additions & 1 deletion src/battle_script_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -13721,10 +13721,14 @@ static void Cmd_handleballthrow(void)
{
case ITEM_ULTRA_BALL:
ballMultiplier = 20;
break;
#if B_SPORT_BALL_MODIFIER <= GEN_7
case ITEM_SPORT_BALL:
#endif
case ITEM_GREAT_BALL:
case ITEM_SAFARI_BALL:
case ITEM_SPORT_BALL:
ballMultiplier = 15;
break;
case ITEM_NET_BALL:
if (IS_BATTLER_OF_TYPE(gBattlerTarget, TYPE_WATER) || IS_BATTLER_OF_TYPE(gBattlerTarget, TYPE_BUG))
#if B_NET_BALL_MODIFIER >= GEN_7
Expand Down

0 comments on commit 51a569b

Please sign in to comment.