Configuration to scale Critical Capture odds based on local Pokedex or estimated National Pokedex (#6250)
This commit is contained in:
parent
2b3589b44f
commit
fb28206f21
@ -245,9 +245,11 @@
|
||||
#define B_MOVE_DESCRIPTION_BUTTON L_BUTTON // If set to a button other than B_LAST_USED_BALL_BUTTON, pressing this button will open the move description menu
|
||||
|
||||
// Catching settings
|
||||
#define B_SEMI_INVULNERABLE_CATCH GEN_LATEST // In Gen4+, you cannot throw a ball against a Pokemon that is in a semi-invulnerable state (dig/fly/etc)
|
||||
#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_SEMI_INVULNERABLE_CATCH GEN_LATEST // In Gen4+, you cannot throw a ball against a Pokemon that is in a semi-invulnerable state (dig/fly/etc)
|
||||
#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_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.
|
||||
#define B_LAST_USED_BALL_CYCLE TRUE // If TRUE, then holding B_LAST_USED_BALL_BUTTON while pressing the D-Pad cycles through the balls
|
||||
|
||||
@ -16701,21 +16701,27 @@ void BS_DoStockpileStatChangesWearOff(void)
|
||||
static bool32 CriticalCapture(u32 odds)
|
||||
{
|
||||
u32 numCaught;
|
||||
u32 totalDexCount;
|
||||
|
||||
if (B_CRITICAL_CAPTURE == FALSE)
|
||||
return FALSE;
|
||||
|
||||
if (B_CRITICAL_CAPTURE_LOCAL_DEX == TRUE)
|
||||
totalDexCount = HOENN_DEX_COUNT;
|
||||
else
|
||||
totalDexCount = NATIONAL_DEX_COUNT;
|
||||
|
||||
numCaught = GetNationalPokedexCount(FLAG_GET_CAUGHT);
|
||||
|
||||
if (numCaught <= (NATIONAL_DEX_COUNT * 30) / 650)
|
||||
if (numCaught <= (totalDexCount * 30) / 650)
|
||||
odds = 0;
|
||||
else if (numCaught <= (NATIONAL_DEX_COUNT * 150) / 650)
|
||||
else if (numCaught <= (totalDexCount * 150) / 650)
|
||||
odds /= 2;
|
||||
else if (numCaught <= (NATIONAL_DEX_COUNT * 300) / 650)
|
||||
else if (numCaught <= (totalDexCount * 300) / 650)
|
||||
; // odds = (odds * 100) / 100;
|
||||
else if (numCaught <= (NATIONAL_DEX_COUNT * 450) / 650)
|
||||
else if (numCaught <= (totalDexCount * 450) / 650)
|
||||
odds = (odds * 150) / 100;
|
||||
else if (numCaught <= (NATIONAL_DEX_COUNT * 600) / 650)
|
||||
else if (numCaught <= (totalDexCount * 600) / 650)
|
||||
odds *= 2;
|
||||
else
|
||||
odds = (odds * 250) / 100;
|
||||
@ -16724,6 +16730,7 @@ static bool32 CriticalCapture(u32 odds)
|
||||
odds = (odds * (100 + B_CATCHING_CHARM_BOOST)) / 100;
|
||||
|
||||
odds /= 6;
|
||||
|
||||
if ((Random() % 255) < odds)
|
||||
return TRUE;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user