mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Fixed 2v1 handling when debug menu is enabled (#3223)
This commit is contained in:
parent
d143d508e0
commit
82c65d37e7
@ -565,13 +565,12 @@ static void CB2_InitBattleInternal(void)
|
|||||||
gBattle_BG3_X = 0;
|
gBattle_BG3_X = 0;
|
||||||
gBattle_BG3_Y = 0;
|
gBattle_BG3_Y = 0;
|
||||||
|
|
||||||
#if DEBUG_OVERWORLD_MENU == FALSE
|
#if DEBUG_OVERWORLD_MENU == TRUE
|
||||||
|
|
||||||
gBattleTerrain = BattleSetup_GetTerrainId();
|
|
||||||
#else
|
|
||||||
if (!gIsDebugBattle)
|
if (!gIsDebugBattle)
|
||||||
gBattleTerrain = BattleSetup_GetTerrainId();
|
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
|
gBattleTerrain = BattleSetup_GetTerrainId();
|
||||||
|
}
|
||||||
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED)
|
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED)
|
||||||
gBattleTerrain = BATTLE_TERRAIN_BUILDING;
|
gBattleTerrain = BATTLE_TERRAIN_BUILDING;
|
||||||
|
|
||||||
@ -594,27 +593,19 @@ static void CB2_InitBattleInternal(void)
|
|||||||
else
|
else
|
||||||
SetMainCallback2(CB2_HandleStartBattle);
|
SetMainCallback2(CB2_HandleStartBattle);
|
||||||
|
|
||||||
#if DEBUG_OVERWORLD_MENU == FALSE
|
#if DEBUG_OVERWORLD_MENU == TRUE
|
||||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED)))
|
|
||||||
{
|
|
||||||
CreateNPCTrainerParty(&gEnemyParty[0], gTrainerBattleOpponent_A, TRUE);
|
|
||||||
if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS && !BATTLE_TWO_VS_ONE_OPPONENT)
|
|
||||||
CreateNPCTrainerParty(&gEnemyParty[PARTY_SIZE / 2], gTrainerBattleOpponent_B, FALSE);
|
|
||||||
SetWildMonHeldItem();
|
|
||||||
CalculateEnemyPartyCount();
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if (!gIsDebugBattle)
|
if (!gIsDebugBattle)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED)))
|
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED)))
|
||||||
{
|
{
|
||||||
CreateNPCTrainerParty(&gEnemyParty[0], gTrainerBattleOpponent_A, TRUE);
|
CreateNPCTrainerParty(&gEnemyParty[0], gTrainerBattleOpponent_A, TRUE);
|
||||||
if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS)
|
if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS && !BATTLE_TWO_VS_ONE_OPPONENT)
|
||||||
CreateNPCTrainerParty(&gEnemyParty[PARTY_SIZE / 2], gTrainerBattleOpponent_B, FALSE);
|
CreateNPCTrainerParty(&gEnemyParty[PARTY_SIZE / 2], gTrainerBattleOpponent_B, FALSE);
|
||||||
SetWildMonHeldItem();
|
SetWildMonHeldItem();
|
||||||
|
CalculateEnemyPartyCount();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
gMain.inBattle = TRUE;
|
gMain.inBattle = TRUE;
|
||||||
gSaveBlock2Ptr->frontier.disableRecordBattle = FALSE;
|
gSaveBlock2Ptr->frontier.disableRecordBattle = FALSE;
|
||||||
|
Loading…
Reference in New Issue
Block a user