From 4dc1b1dda3cd0472c2cca540a324459bdc854cba Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Wed, 10 Jan 2024 01:20:51 +0100 Subject: [PATCH] Revert "Update catch curve for pokeballs (#3685)" (#3955) This reverts commit 929ec54a3922915f9f4a0c8b822b99e70fb51d21. --- include/config/pokemon.h | 1 - src/battle_script_commands.c | 14 +++----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/include/config/pokemon.h b/include/config/pokemon.h index abdb728ac1..e833399eac 100644 --- a/include/config/pokemon.h +++ b/include/config/pokemon.h @@ -31,7 +31,6 @@ #define P_CUSTOM_GENDER_DIFF_ICONS TRUE // If TRUE, will give more Pokémon custom icons for their female forms, i.e. Hippopotas and Hippowdon #define P_LEGENDARY_PERFECT_IVS GEN_LATEST // Since Gen 6, Legendaries, Mythicals and Ultra Beasts found in the wild or given through gifts have at least 3 perfect IVs. #define P_EV_CAP GEN_LATEST // Since Gen 6, the max EVs per stat is 252 instead of 255. -#define P_CATCH_CURVE GEN_LATEST // Since Gen 6, the capture rate curve was changed to make pokeballs more effective on lower level pokemon // Flag settings // To use the following features in scripting, replace the 0s with the flag ID you're assigning it to. diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 26c1ffa09a..a509a4c8cb 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -14969,7 +14969,7 @@ static void Cmd_handleballthrow(void) if (gBattleResults.catchAttempts[gLastUsedItem - FIRST_BALL] < 255) gBattleResults.catchAttempts[gLastUsedItem - FIRST_BALL]++; - if (odds >= 255) // mon caught + if (odds > 254) // mon caught { BtlController_EmitBallThrowAnim(gBattlerAttacker, BUFFER_A, BALL_3_SHAKES_SUCCESS); MarkBattlerForControllerExec(gBattlerAttacker); @@ -15014,16 +15014,8 @@ static void Cmd_handleballthrow(void) } else { - if (P_CATCH_CURVE >= GEN_6) - { - odds = (255 * 255 * 255) / (odds * odds * odds); - odds = 65536 / Sqrt(Sqrt(Sqrt(Sqrt(odds)))); - } - else - { - odds = Sqrt(Sqrt(16711680 / odds)); - odds = 1048560 / odds; - } + odds = Sqrt(Sqrt(16711680 / odds)); + odds = 1048560 / odds; for (shakes = 0; shakes < maxShakes && Random() < odds; shakes++); }