mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-19 01:44:20 +01:00
small fixes, check GetCatchingBattler's semi-invulnerability
This commit is contained in:
parent
b94f710c80
commit
c077091dbf
@ -178,7 +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_4 // In Gen5+, you cannot throw a ball against a Pokemon that is in a semi-invulnerable state (dig/fly/etc)
|
||||
#define B_SEMI_INVULNERABLE_CATCH GEN_7 // In Gen4+, 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,8 +947,8 @@ 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)
|
||||
#if B_SEMI_INVULNERABLE_CATCH >= GEN_4
|
||||
else if (gStatuses3[GetCatchingBattler()] & STATUS3_SEMI_INVULNERABLE)
|
||||
{
|
||||
return 3; // in semi-invulnerable state
|
||||
}
|
||||
@ -983,7 +983,7 @@ void ItemUseInBattle_PokeBall(u8 taskId)
|
||||
else
|
||||
DisplayItemMessageInBattlePyramid(taskId, gText_BoxFull, Task_CloseBattlePyramidBagMessage);
|
||||
break;
|
||||
#if B_SEMI_INVULNERABLE_CATCH >= GEN_5
|
||||
#if B_SEMI_INVULNERABLE_CATCH >= GEN_4
|
||||
case 3: // Semi-Invulnerable
|
||||
if (!InBattlePyramid())
|
||||
DisplayItemMessage(taskId, 1, sText_CantThrowPokeBall_SemiInvulnerable, CloseItemMessage);
|
||||
|
Loading…
x
Reference in New Issue
Block a user