diff --git a/include/config/battle.h b/include/config/battle.h index 82dd059754..6f48f0fc19 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -289,6 +289,7 @@ #define B_CATCHING_CHARM_BOOST 20 // % boost in Critical Capture odds if player has the Catching Charm. #define B_CRITICAL_CAPTURE TRUE // If set to TRUE, Critical Capture will be enabled. #define B_CRITICAL_CAPTURE_LOCAL_DEX TRUE // If set to FALSE, Critical Capture % is based off of the National Pokedex estimated by enabled generations. +#define B_CRITICAL_CAPTURE_IF_OWNED GEN_LATEST // In Gen9, a capture appear critical if the pokemon you are trying to catch already has a dex entry (has already been caught) #define B_LAST_USED_BALL TRUE // If TRUE, the "last used ball" feature from Gen 7 will be implemented #define B_LAST_USED_BALL_BUTTON R_BUTTON // If last used ball is implemented, this button (or button combo) will trigger throwing the last used ball. diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index d39642dd21..3b2eeeb942 100755 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -13674,9 +13674,13 @@ static void Cmd_handleballthrow(void) if (shakes == maxShakes) // mon caught, copy of the code above { - if (IsCriticalCapture()) + enum NationalDexOrder natDexNo = SpeciesToNationalPokedexNum(gBattleMons[gBattlerTarget].species); + if ((B_CRITICAL_CAPTURE_IF_OWNED >= GEN_9 && GetSetPokedexFlag(natDexNo, FLAG_GET_CAUGHT)) + || IsCriticalCapture()) + { + gBattleSpritesDataPtr->animationData->isCriticalCapture = TRUE; gBattleSpritesDataPtr->animationData->criticalCaptureSuccess = TRUE; - + } TryBattleFormChange(gBattlerTarget, FORM_CHANGE_END_BATTLE); gBattlescriptCurrInstr = BattleScript_SuccessBallThrow; struct Pokemon *caughtMon = GetBattlerMon(gBattlerTarget);