Max Guard actually protects / Max Moves bypass protect
This commit is contained in:
parent
ec4b330b9b
commit
06151cf051
2 changed files with 9 additions and 7 deletions
|
@ -1601,7 +1601,8 @@ static void Cmd_attackcanceler(void)
|
|||
}
|
||||
|
||||
// Z-moves and Max Moves bypass protection, but deal reduced damage (factored in CalcFinalDmg)
|
||||
if (gBattleStruct->zmove.active && IS_BATTLER_PROTECTED(gBattlerTarget))
|
||||
if ((gBattleStruct->zmove.active || IsMaxMove(gCurrentMove))
|
||||
&& IS_BATTLER_PROTECTED(gBattlerTarget))
|
||||
{
|
||||
BattleScriptPush(cmd->nextInstr);
|
||||
gBattlescriptCurrInstr = BattleScript_CouldntFullyProtect;
|
||||
|
|
|
@ -8312,13 +8312,11 @@ bool32 IsBattlerProtected(u8 battlerId, u16 move)
|
|||
}
|
||||
|
||||
// Z-Moves and Max Moves bypass protection (except Max Guard for Max Moves).
|
||||
if (IsMaxMove(move)
|
||||
&& !(gProtectStructs[battlerId].maxGuarded
|
||||
&& gBattleMoves[move].argument != MAX_EFFECT_BYPASS_PROTECT)
|
||||
if ((IsMaxMove(move)
|
||||
&& !(gProtectStructs[battlerId].maxGuarded
|
||||
&& gBattleMoves[move].argument != MAX_EFFECT_BYPASS_PROTECT))
|
||||
|| gBattleStruct->zmove.active)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (move == MOVE_TEATIME)
|
||||
return FALSE;
|
||||
|
@ -8345,6 +8343,8 @@ bool32 IsBattlerProtected(u8 battlerId, u16 move)
|
|||
return TRUE;
|
||||
else if (gProtectStructs[battlerId].kingsShielded && gBattleMoves[move].power != 0)
|
||||
return TRUE;
|
||||
else if (gProtectStructs[battlerId].maxGuarded)
|
||||
return TRUE;
|
||||
else if (gSideStatuses[GetBattlerSide(battlerId)] & SIDE_STATUS_QUICK_GUARD
|
||||
&& GetChosenMovePriority(gBattlerAttacker) > 0)
|
||||
return TRUE;
|
||||
|
@ -9689,7 +9689,8 @@ static u32 CalcFinalDmg(u32 dmg, u16 move, u8 battlerAtk, u8 battlerDef, u8 move
|
|||
}
|
||||
|
||||
// Z-Moves and Max Moves bypass Protect and do 25% of their original damage
|
||||
if (gBattleStruct->zmove.active && IS_BATTLER_PROTECTED(battlerDef))
|
||||
if ((gBattleStruct->zmove.active || IsMaxMove(move))
|
||||
&& IS_BATTLER_PROTECTED(battlerDef))
|
||||
{
|
||||
MulModifier(&finalModifier, UQ_4_12(0.25));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue