mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-22 04:04:15 +01:00
z status moves did not work properly
This commit is contained in:
parent
e537be76ea
commit
930a88b0e2
@ -1774,7 +1774,7 @@ u8 TrySetCantSelectMoveBattleScript(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (!gBattleStruct->zmove.active && gDisableStructs[gActiveBattler].tauntTimer != 0 && IS_MOVE_STATUS(move))
|
||||
if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && gDisableStructs[gActiveBattler].tauntTimer != 0 && IS_MOVE_STATUS(move))
|
||||
{
|
||||
gCurrentMove = move;
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_PALACE)
|
||||
@ -1789,7 +1789,7 @@ u8 TrySetCantSelectMoveBattleScript(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (!gBattleStruct->zmove.active && gDisableStructs[gActiveBattler].throatChopTimer != 0 && gBattleMoves[move].flags & FLAG_SOUND)
|
||||
if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && gDisableStructs[gActiveBattler].throatChopTimer != 0 && gBattleMoves[move].flags & FLAG_SOUND)
|
||||
{
|
||||
gCurrentMove = move;
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_PALACE)
|
||||
@ -1804,7 +1804,7 @@ u8 TrySetCantSelectMoveBattleScript(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (!gBattleStruct->zmove.active && GetImprisonedMovesCount(gActiveBattler, move))
|
||||
if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && GetImprisonedMovesCount(gActiveBattler, move))
|
||||
{
|
||||
gCurrentMove = move;
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_PALACE)
|
||||
@ -1819,7 +1819,7 @@ u8 TrySetCantSelectMoveBattleScript(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (!gBattleStruct->zmove.active && IsGravityPreventingMove(move))
|
||||
if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && IsGravityPreventingMove(move))
|
||||
{
|
||||
gCurrentMove = move;
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_PALACE)
|
||||
@ -1834,7 +1834,7 @@ u8 TrySetCantSelectMoveBattleScript(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (!gBattleStruct->zmove.active && IsHealBlockPreventingMove(gActiveBattler, move))
|
||||
if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && IsHealBlockPreventingMove(gActiveBattler, move))
|
||||
{
|
||||
gCurrentMove = move;
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_PALACE)
|
||||
@ -1849,7 +1849,7 @@ u8 TrySetCantSelectMoveBattleScript(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (!gBattleStruct->zmove.active && IsBelchPreventingMove(gActiveBattler, move))
|
||||
if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && IsBelchPreventingMove(gActiveBattler, move))
|
||||
{
|
||||
gCurrentMove = move;
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_PALACE)
|
||||
@ -3547,7 +3547,7 @@ u8 AtkCanceller_UnableToUseMove(void)
|
||||
gBattleStruct->atkCancellerTracker++;
|
||||
break;
|
||||
case CANCELLER_DISABLED: // disabled move
|
||||
if (gDisableStructs[gBattlerAttacker].disabledMove == gCurrentMove && gDisableStructs[gBattlerAttacker].disabledMove != MOVE_NONE)
|
||||
if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && gDisableStructs[gBattlerAttacker].disabledMove == gCurrentMove && gDisableStructs[gBattlerAttacker].disabledMove != MOVE_NONE)
|
||||
{
|
||||
gProtectStructs[gBattlerAttacker].usedDisabledMove = TRUE;
|
||||
gBattleScripting.battler = gBattlerAttacker;
|
||||
@ -3559,7 +3559,7 @@ u8 AtkCanceller_UnableToUseMove(void)
|
||||
gBattleStruct->atkCancellerTracker++;
|
||||
break;
|
||||
case CANCELLER_HEAL_BLOCKED:
|
||||
if (gStatuses3[gBattlerAttacker] & STATUS3_HEAL_BLOCK && IsHealBlockPreventingMove(gBattlerAttacker, gCurrentMove))
|
||||
if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && gStatuses3[gBattlerAttacker] & STATUS3_HEAL_BLOCK && IsHealBlockPreventingMove(gBattlerAttacker, gCurrentMove))
|
||||
{
|
||||
gProtectStructs[gBattlerAttacker].usedHealBlockedMove = TRUE;
|
||||
gBattleScripting.battler = gBattlerAttacker;
|
||||
@ -3583,7 +3583,7 @@ u8 AtkCanceller_UnableToUseMove(void)
|
||||
gBattleStruct->atkCancellerTracker++;
|
||||
break;
|
||||
case CANCELLER_TAUNTED: // taunt
|
||||
if (gDisableStructs[gBattlerAttacker].tauntTimer && IS_MOVE_STATUS(gCurrentMove))
|
||||
if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && gDisableStructs[gBattlerAttacker].tauntTimer && IS_MOVE_STATUS(gCurrentMove))
|
||||
{
|
||||
gProtectStructs[gBattlerAttacker].usedTauntedMove = TRUE;
|
||||
CancelMultiTurnMoves(gBattlerAttacker);
|
||||
@ -3594,7 +3594,7 @@ u8 AtkCanceller_UnableToUseMove(void)
|
||||
gBattleStruct->atkCancellerTracker++;
|
||||
break;
|
||||
case CANCELLER_IMPRISONED: // imprisoned
|
||||
if (GetImprisonedMovesCount(gBattlerAttacker, gCurrentMove))
|
||||
if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && GetImprisonedMovesCount(gBattlerAttacker, gCurrentMove))
|
||||
{
|
||||
gProtectStructs[gBattlerAttacker].usedImprisonedMove = TRUE;
|
||||
CancelMultiTurnMoves(gBattlerAttacker);
|
||||
@ -3758,7 +3758,7 @@ u8 AtkCanceller_UnableToUseMove(void)
|
||||
gBattleStruct->atkCancellerTracker++;
|
||||
break;
|
||||
case CANCELLER_THROAT_CHOP:
|
||||
if (gDisableStructs[gBattlerAttacker].throatChopTimer && gBattleMoves[gCurrentMove].flags & FLAG_SOUND)
|
||||
if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && gDisableStructs[gBattlerAttacker].throatChopTimer && gBattleMoves[gCurrentMove].flags & FLAG_SOUND)
|
||||
{
|
||||
gProtectStructs[gBattlerAttacker].usedThroatChopPreventedMove = TRUE;
|
||||
CancelMultiTurnMoves(gBattlerAttacker);
|
||||
|
Loading…
x
Reference in New Issue
Block a user