config for catching semi-invulnerable mons
This commit is contained in:
parent
8a6aee7546
commit
883a249836
2 changed files with 17 additions and 1 deletions
|
@ -178,6 +178,7 @@
|
|||
#define B_POWDER_GRASS GEN_7 // In Gen6+, Grass-type Pokémon are immune to powder and spore moves.
|
||||
#define B_STEEL_RESISTANCES GEN_7 // In Gen6+, Steel-type Pokémon are no longer resistant to Dark-type and Ghost-type moves.
|
||||
#define B_THUNDERSTORM_TERRAIN TRUE // If TRUE, overworld Thunderstorm generates Rain and Electric Terrain as in Gen 8.
|
||||
#define B_SEMI_INVULNERABLE_CATCH GEN_5 // In Gen5+, you cannot throw a ball against a Pokemon that is in a semi-invulnerable state (dig/fly/etc)
|
||||
|
||||
// Animation Settings
|
||||
#define B_NEW_SWORD_PARTICLE FALSE // If set to TRUE, it updates Swords Dance's particle.
|
||||
|
|
|
@ -947,11 +947,18 @@ u32 CanThrowBall(void)
|
|||
{
|
||||
return 2; // No room for mon
|
||||
}
|
||||
#if B_SEMI_INVULNERABLE_CATCH >= GEN_5
|
||||
else if (gStatuses3[B_POSITION_OPPONENT_LEFT] & STATUS3_SEMI_INVULNERABLE)
|
||||
{
|
||||
return 3; // in semi-invulnerable state
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0; // usable
|
||||
}
|
||||
|
||||
static const u8 sText_CantThrowPokeBall_TwoMons[] = _("Cannot throw a ball!\nThere are two pokemon out there!\p");
|
||||
static const u8 sText_CantThrowPokeBall_TwoMons[] = _("Cannot throw a ball!\nThere are two Pokémon out there!\p");
|
||||
static const u8 sText_CantThrowPokeBall_SemiInvulnerable[] = _("Cannot throw a ball!\nThere's no Pokémon in sight!\p");
|
||||
void ItemUseInBattle_PokeBall(u8 taskId)
|
||||
{
|
||||
switch (CanThrowBall())
|
||||
|
@ -976,6 +983,14 @@ void ItemUseInBattle_PokeBall(u8 taskId)
|
|||
else
|
||||
DisplayItemMessageInBattlePyramid(taskId, gText_BoxFull, Task_CloseBattlePyramidBagMessage);
|
||||
break;
|
||||
#if B_SEMI_INVULNERABLE_CATCH >= GEN_5
|
||||
case 3: // Semi-Invulnerable
|
||||
if (!InBattlePyramid())
|
||||
DisplayItemMessage(taskId, 1, sText_CantThrowPokeBall_SemiInvulnerable, CloseItemMessage);
|
||||
else
|
||||
DisplayItemMessageInBattlePyramid(taskId, sText_CantThrowPokeBall_SemiInvulnerable, Task_CloseBattlePyramidBagMessage);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue