mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-19 01:44:20 +01:00
Fix uses of gBattlescriptCurrInstr
- VARIOUS_SWAP_STATS and moveend could branch inside their own arguments. - VARIOUS_JUMP_IF_LAST_USED_ITEM_BERRY was implemented in reverse.
This commit is contained in:
parent
ca5a45d34d
commit
4e19d1aaec
@ -5412,7 +5412,7 @@ static void Cmd_moveend(void)
|
|||||||
gStatuses3[gBattlerTarget] |= STATUS3_SMACKED_DOWN;
|
gStatuses3[gBattlerTarget] |= STATUS3_SMACKED_DOWN;
|
||||||
gStatuses3[gBattlerTarget] &= ~(STATUS3_MAGNET_RISE | STATUS3_TELEKINESIS | STATUS3_ON_AIR);
|
gStatuses3[gBattlerTarget] &= ~(STATUS3_MAGNET_RISE | STATUS3_TELEKINESIS | STATUS3_ON_AIR);
|
||||||
effect = TRUE;
|
effect = TRUE;
|
||||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
BattleScriptPush(gBattlescriptCurrInstr);
|
||||||
gBattlescriptCurrInstr = BattleScript_MoveEffectSmackDown;
|
gBattlescriptCurrInstr = BattleScript_MoveEffectSmackDown;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -5425,7 +5425,7 @@ static void Cmd_moveend(void)
|
|||||||
BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1);
|
BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1);
|
||||||
MarkBattlerForControllerExec(gActiveBattler);
|
MarkBattlerForControllerExec(gActiveBattler);
|
||||||
effect = TRUE;
|
effect = TRUE;
|
||||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
BattleScriptPush(gBattlescriptCurrInstr);
|
||||||
switch (gBattleMoves[gCurrentMove].argument)
|
switch (gBattleMoves[gCurrentMove].argument)
|
||||||
{
|
{
|
||||||
case STATUS1_PARALYSIS:
|
case STATUS1_PARALYSIS:
|
||||||
@ -10103,9 +10103,9 @@ static void Cmd_various(void)
|
|||||||
return;
|
return;
|
||||||
case VARIOUS_JUMP_IF_LAST_USED_ITEM_BERRY:
|
case VARIOUS_JUMP_IF_LAST_USED_ITEM_BERRY:
|
||||||
if (ItemId_GetPocket(gLastUsedItem) == POCKET_BERRIES)
|
if (ItemId_GetPocket(gLastUsedItem) == POCKET_BERRIES)
|
||||||
gBattlescriptCurrInstr += 7;
|
|
||||||
else
|
|
||||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3);
|
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3);
|
||||||
|
else
|
||||||
|
gBattlescriptCurrInstr += 7;
|
||||||
return;
|
return;
|
||||||
case VARIOUS_JUMP_IF_LAST_USED_ITEM_HOLD_EFFECT:
|
case VARIOUS_JUMP_IF_LAST_USED_ITEM_HOLD_EFFECT:
|
||||||
if (ItemId_GetHoldEffect(gLastUsedItem) == gBattlescriptCurrInstr[3])
|
if (ItemId_GetHoldEffect(gLastUsedItem) == gBattlescriptCurrInstr[3])
|
||||||
@ -10188,6 +10188,8 @@ static void Cmd_various(void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
PREPARE_STAT_BUFFER(gBattleTextBuff1, statId);
|
PREPARE_STAT_BUFFER(gBattleTextBuff1, statId);
|
||||||
|
gBattlescriptCurrInstr += 4;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case VARIOUS_TEATIME_TARGETS:
|
case VARIOUS_TEATIME_TARGETS:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user