fixed bug giving immunity to full-paralysis when B_MAGIC_GUARD is >= GEN_4 (#6032)
This commit is contained in:
parent
9ed3b176f0
commit
e4e4460636
@ -156,7 +156,7 @@
|
||||
// In Gen3, Effect Spore has a 10% chance to sleep, poison or paralyze, with an equal chance.
|
||||
// In Gen4, it's 30%. In Gen5+ it has 11% to sleep, 9% chance to poison and 10% chance to paralyze.
|
||||
#define B_PICKUP_WILD GEN_LATEST // In Gen9+, Pickup allows its user to pickup its own used item at the end of the turn in wild battles.
|
||||
#define B_MAGIC_GUARD GEN_LATEST // In Gen4+, Magic Guard ignores immobilization caused by paralysis
|
||||
#define B_MAGIC_GUARD GEN_LATEST // In Gen4 only, Magic Guard ignores immobilization caused by paralysis
|
||||
|
||||
// Item settings
|
||||
#define B_HP_BERRIES GEN_LATEST // In Gen4+, berries which restore HP activate immediately after HP drops to half. In Gen3, the effect occurs at the end of the turn.
|
||||
|
||||
@ -3507,7 +3507,7 @@ u8 AtkCanceller_UnableToUseMove(u32 moveType)
|
||||
case CANCELLER_PARALYSED: // paralysis
|
||||
if (!gBattleStruct->isAtkCancelerForCalledMove
|
||||
&& gBattleMons[gBattlerAttacker].status1 & STATUS1_PARALYSIS
|
||||
&& (GetBattlerAbility(gBattlerAttacker) != ABILITY_MAGIC_GUARD && B_MAGIC_GUARD >= GEN_4)
|
||||
&& !(B_MAGIC_GUARD == GEN_4 && GetBattlerAbility(gBattlerAttacker) == ABILITY_MAGIC_GUARD)
|
||||
&& !RandomPercentage(RNG_PARALYSIS, 75))
|
||||
{
|
||||
gProtectStructs[gBattlerAttacker].prlzImmobility = TRUE;
|
||||
|
||||
@ -18,7 +18,7 @@ SINGLE_BATTLE_TEST("Magic Guard prevents recoil damage to the user")
|
||||
|
||||
SINGLE_BATTLE_TEST("Magic Guard ignores immobilization that can be caused by paralysis")
|
||||
{
|
||||
if (B_MAGIC_GUARD >= GEN_4)
|
||||
if (B_MAGIC_GUARD == GEN_4)
|
||||
PASSES_RANDOMLY(1, 1, RNG_PARALYSIS);
|
||||
else
|
||||
PASSES_RANDOMLY(75, 100, RNG_PARALYSIS);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user