From ce3dec43a7c0855f03ff74226f8169bba4a637df Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sun, 4 Sep 2022 17:21:23 -0300 Subject: [PATCH 1/2] Fixed ball multiplier fallthroughs --- src/battle_script_commands.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 18fa5bbdff..7eebbff1c0 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -13721,10 +13721,12 @@ static void Cmd_handleballthrow(void) { case ITEM_ULTRA_BALL: ballMultiplier = 20; + break; 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 From 89550ed05d3377423f04285551f779ca7b0481c0 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sun, 4 Sep 2022 18:54:23 -0300 Subject: [PATCH 2/2] Updated Sport Ball's modifier. --- include/constants/battle_config.h | 1 + src/battle_script_commands.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/constants/battle_config.h b/include/constants/battle_config.h index 89134daf91..d9e0abf104 100644 --- a/include/constants/battle_config.h +++ b/include/constants/battle_config.h @@ -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 diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 7eebbff1c0..944255cfc9 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -13722,9 +13722,11 @@ 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: