diff --git a/include/constants/battle_config.h b/include/constants/battle_config.h index 0d6e87872..fa358de7a 100644 --- a/include/constants/battle_config.h +++ b/include/constants/battle_config.h @@ -124,16 +124,16 @@ #define B_SHOW_TARGETS TRUE // If set to TRUE, all available targets, for moves hitting 2 or 3 Pokémon, will be shown before selecting a move. #define B_SHOW_SPLIT_ICON TRUE // If set to TRUE, it will show an icon in the summary showing the move's category split. +// Critical Capture +#define B_CRITICAL_CAPTURE TRUE // If set to TRUE, Critical Capture will be enabled. +#define B_CATCHING_CHARM_BOOST 20 // % boost in Critical Capture odds if player has the Catching Charm. + // Other #define B_DOUBLE_WILD_CHANCE 0 // % chance of encountering two Pokémon in a Wild Encounter. #define B_SLEEP_TURNS GEN_6 // In Gen5+, sleep lasts for 1-3 turns instead of 2-5 turns. #define B_PARALYZE_ELECTRIC GEN_6 // In Gen6+, Electric type Pokémon can't be paralyzed. #define B_POWDER_GRASS GEN_6 // In Gen6+, Grass type Pokémon are immune to powder and spore moves. -// Critical Capture -#define B_CRITICAL_CAPTURE TRUE // if set to TRUE, critical capture will be enabled -#define B_CATCHING_CHARM_BOOST 20 // % boost in critical capture odds if player has the catching charm - // Animation Settings #define B_NEW_SWORD_PARTICLE TRUE // If set to TRUE, it updates Swords Dance's particle. #define B_NEW_LEECH_SEED_PARTICLE TRUE // If set to TRUE, it updates Leech Seed's animation particle. diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 151d95135..2e85e667f 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -12390,17 +12390,17 @@ static void Cmd_metalburstdamagecalculator(void) static bool32 CriticalCapture(u32 odds) { #if B_CRITICAL_CAPTURE == TRUE - u16 numCaught = GetNationalPokedexCount(FLAG_GET_CAUGHT); + u32 numCaught = GetNationalPokedexCount(FLAG_GET_CAUGHT); - if (numCaught <= 30) + if (numCaught <= (NUM_SPECIES * 30) / 650) odds = 0; - else if (numCaught <= 150) + else if (numCaught <= (NUM_SPECIES * 150) / 650) odds /= 2; - else if (numCaught <= 300) - ; - else if (numCaught <= 450) + else if (numCaught <= (NUM_SPECIES * 300) / 650) + ; // odds = (odds * 100) / 100; + else if (numCaught <= (NUM_SPECIES * 450) / 650) odds = (odds * 150) / 100; - else if (numCaught <= 600) + else if (numCaught <= (NUM_SPECIES * 600) / 650) odds *= 2; else odds = (odds * 250) / 100;