mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
add mirror armor check to two-stage stat decrease effects
This commit is contained in:
parent
996301d5d3
commit
f9272a89fa
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user