add mirror armor check to two-stage stat decrease effects

This commit is contained in:
ghoulslash 2021-10-12 21:09:27 -04:00
parent 996301d5d3
commit f9272a89fa

View File

@ -3016,9 +3016,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
case MOVE_EFFECT_EVS_MINUS_1:
flags = affectsUser | certain;
if (mirrorArmorReflected && !affectsUser)
{
flags |= STAT_BUFF_ALLOW_PTR;
}
if (ChangeStatBuffs(SET_STAT_BUFF_VALUE(1) | STAT_BUFF_NEGATIVE,
gBattleScripting.moveEffect - MOVE_EFFECT_ATK_MINUS_1 + 1,
@ -3063,11 +3061,15 @@ void SetMoveEffect(bool32 primary, u32 certain)
case MOVE_EFFECT_SP_DEF_MINUS_2:
case MOVE_EFFECT_ACC_MINUS_2:
case MOVE_EFFECT_EVS_MINUS_2:
flags = affectsUser | certain;
if (mirrorArmorReflected && !affectsUser)
flags |= STAT_BUFF_ALLOW_PTR;
if (ChangeStatBuffs(SET_STAT_BUFF_VALUE(2) | STAT_BUFF_NEGATIVE,
gBattleScripting.moveEffect - MOVE_EFFECT_ATK_MINUS_2 + 1,
affectsUser, 0))
flags, gBattlescriptCurrInstr + 1))
{
gBattlescriptCurrInstr++;
if (!mirrorArmorReflected)
gBattlescriptCurrInstr++;
}
else
{