Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi battle interface fix #2335

Merged
merged 1 commit into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/battle_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,9 @@ static void InitLastUsedBallAssets(void)
// This function is here to cover a specific case - one player's mon in a 2 vs 1 double battle. In this scenario - display singles layout.
u32 WhichBattleCoords(u32 battlerId) // 0 - singles, 1 - doubles
{
if (GetBattlerPosition(battlerId) == B_POSITION_PLAYER_LEFT && gPlayerPartyCount == 1)
if (GetBattlerPosition(battlerId) == B_POSITION_PLAYER_LEFT
&& gPlayerPartyCount == 1
&& !(gBattleTypeFlags & BATTLE_TYPE_MULTI))
return 0;
else
return IsDoubleBattle();
Expand Down
4 changes: 2 additions & 2 deletions src/party_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -6158,10 +6158,10 @@ void ChooseMonForWirelessMinigame(void)

static u8 GetPartyLayoutFromBattleType(void)
{
if (!IsDoubleBattle() || gPlayerPartyCount == 1) // Draw the single layout in a double battle where the player has only one pokemon.
return PARTY_LAYOUT_SINGLE;
if (IsMultiBattle() == TRUE)
return PARTY_LAYOUT_MULTI;
if (!IsDoubleBattle() || gPlayerPartyCount == 1) // Draw the single layout in a double battle where the player has only one pokemon.
return PARTY_LAYOUT_SINGLE;
return PARTY_LAYOUT_DOUBLE;
}

Expand Down