mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-14 15:43:43 +01:00
fix mirror armor setstatchanger, handle reflected stat blockage
This commit is contained in:
parent
ffcba355b0
commit
592a1dab63
@ -2894,7 +2894,7 @@ BattleScript_MirrorArmorReflect::
|
||||
call BattleScript_AbilityPopUp
|
||||
jumpifsubstituteblocks BattleScript_AbilityNoSpecificStatLoss
|
||||
BattleScript_MirrorArmorReflectStatLoss:
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_NOT_PROTECT_AFFECTED, BattleScript_MirrorArmorReflectWontFall
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_NOT_PROTECT_AFFECTED | STAT_BUFF_ALLOW_PTR, BattleScript_MirrorArmorReflectEnd
|
||||
jumpifbyte CMP_LESS_THAN, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_MirrorArmorReflectAnim
|
||||
goto BattleScript_MirrorArmorReflectWontFall
|
||||
BattleScript_MirrorArmorReflectAnim:
|
||||
|
@ -9689,10 +9689,12 @@ static u32 ChangeStatBuffs(s8 statValue, u32 statId, u32 flags, const u8 *BS_ptr
|
||||
{
|
||||
if (flags == STAT_BUFF_ALLOW_PTR)
|
||||
{
|
||||
SET_STATCHANGER(statId, GET_STAT_BUFF_VALUE(statValue) | STAT_BUFF_NEGATIVE, TRUE);
|
||||
BattleScriptPush(BS_ptr);
|
||||
gBattleScripting.battler = gActiveBattler;
|
||||
gBattlerAbility = gActiveBattler;
|
||||
gBattlescriptCurrInstr = BattleScript_MirrorArmorReflect;
|
||||
RecordAbilityBattle(gActiveBattler, gBattleMons[gActiveBattler].ability);
|
||||
}
|
||||
return STAT_CHANGE_DIDNT_WORK;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user