From 14c243b273795bb44d5edd4861e834f3cd879a4f Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sat, 17 Oct 2020 02:08:58 -0300 Subject: [PATCH] Timer ball config. --- include/constants/item_config.h | 1 + src/battle_script_commands.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/constants/item_config.h b/include/constants/item_config.h index eacad0af30..f9524e5775 100644 --- a/include/constants/item_config.h +++ b/include/constants/item_config.h @@ -24,5 +24,6 @@ #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. #define P_REPEAT_BALL_MODIFIER GEN_7 // In Gen7+, Net Ball's catch multiplier is x3.5 instead of x3. +#define P_TIMER_BALL_MODIFIER GEN_7 // In Gen5+, Timer Ball's effectiveness increases by x0.3 per turn instead of x0.1 #endif // GUARD_CONSTANTS_ITEM_CONFIG_H diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 6f07c6bca3..a5895cbc73 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -9824,7 +9824,11 @@ static void Cmd_handleballthrow(void) #endif break; case ITEM_TIMER_BALL: - ballMultiplier = gBattleResults.battleTurnCounter + 10; + #if P_TIMER_BALL_MODIFIER >= GEN_5 + ballMultiplier = (gBattleResults.battleTurnCounter * 3) + 10; + #else + ballMultiplier = gBattleResults.battleTurnCounter + 10; + #endif if (ballMultiplier > 40) ballMultiplier = 40; break;