mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-31 16:30:00 +01:00
critical capture config option and catching charm
This commit is contained in:
parent
3af9a65506
commit
a6c3d950f6
@ -130,6 +130,10 @@
|
|||||||
#define B_PARALYZE_ELECTRIC GEN_6 // In Gen6+, Electric type Pokémon can't be paralyzed.
|
#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.
|
#define B_POWDER_GRASS GEN_6 // In Gen6+, Grass type Pokémon are immune to powder and spore moves.
|
||||||
|
|
||||||
|
// Critical Capture
|
||||||
|
#define CRITICAL_CAPTURE TRUE // if set to TRUE, critical capture will be enabled
|
||||||
|
#define CATCHING_CHARM_BOOST 20 // % boost in critical capture odds if player has the catching charm
|
||||||
|
|
||||||
// Animation Settings
|
// Animation Settings
|
||||||
#define B_NEW_SWORD_PARTICLE TRUE // If set to TRUE, it updates Swords Dance's particle.
|
#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.
|
#define B_NEW_LEECH_SEED_PARTICLE TRUE // If set to TRUE, it updates Leech Seed's animation particle.
|
||||||
|
@ -12389,25 +12389,34 @@ static void Cmd_metalburstdamagecalculator(void)
|
|||||||
|
|
||||||
static bool32 CriticalCapture(u32 odds)
|
static bool32 CriticalCapture(u32 odds)
|
||||||
{
|
{
|
||||||
u16 numCaught = GetNationalPokedexCount(FLAG_GET_CAUGHT);
|
#if CRITICAL_CAPTURE == TRUE
|
||||||
|
u16 numCaught = GetNationalPokedexCount(FLAG_GET_CAUGHT);
|
||||||
|
|
||||||
if (numCaught <= 30)
|
if (numCaught <= 30)
|
||||||
odds = 0;
|
odds = 0;
|
||||||
else if (numCaught <= 150)
|
else if (numCaught <= 150)
|
||||||
odds /= 2;
|
odds /= 2;
|
||||||
else if (numCaught <= 300)
|
else if (numCaught <= 300)
|
||||||
;
|
;
|
||||||
else if (numCaught <= 450)
|
else if (numCaught <= 450)
|
||||||
odds = (odds * 150) / 100;
|
odds = (odds * 150) / 100;
|
||||||
else if (numCaught <= 600)
|
else if (numCaught <= 600)
|
||||||
odds *= 2;
|
odds *= 2;
|
||||||
else
|
else
|
||||||
odds = (odds * 250) / 100;
|
odds = (odds * 250) / 100;
|
||||||
|
|
||||||
odds /= 6;
|
#ifdef ITEM_CATCHING_CHARM
|
||||||
if ((Random() % 255) < odds)
|
if (CheckBagHasItem(ITEM_CATCHING_CHARM, 1))
|
||||||
return TRUE;
|
odds = (odds * (100 + CATCHING_CHARM_BOOST)) / 100;
|
||||||
|
#endif
|
||||||
|
|
||||||
return FALSE;
|
odds /= 6;
|
||||||
|
if ((Random() % 255) < odds)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user