Instant Win option in Battle Debug
This commit is contained in:
parent
a1e67572b6
commit
165e7502bc
@ -116,6 +116,7 @@ u32 GeneratePersonalityForGender(u32 gender, u32 species);
|
||||
void CustomTrainerPartyAssignMoves(struct Pokemon *mon, const struct TrainerMon *partyEntry);
|
||||
bool32 CanPlayerForfeitNormalTrainerBattle(void);
|
||||
bool32 DidPlayerForfeitNormalTrainerBattle(void);
|
||||
void BattleDebug_WonBattle(void);
|
||||
|
||||
extern struct MultiPartnerMenuPokemon gMultiPartnerParty[MULTI_PARTY_SIZE];
|
||||
|
||||
|
||||
@ -114,6 +114,7 @@ enum
|
||||
LIST_ITEM_AI_INFO,
|
||||
LIST_ITEM_AI_PARTY,
|
||||
LIST_ITEM_VARIOUS,
|
||||
LIST_ITEM_INSTANT_WIN,
|
||||
LIST_ITEM_COUNT
|
||||
};
|
||||
|
||||
@ -376,6 +377,7 @@ static const struct ListMenuItem sMainListItems[] =
|
||||
{COMPOUND_STRING("AI Info"), LIST_ITEM_AI_INFO},
|
||||
{COMPOUND_STRING("AI Party"), LIST_ITEM_AI_PARTY},
|
||||
{COMPOUND_STRING("Various"), LIST_ITEM_VARIOUS},
|
||||
{COMPOUND_STRING("Instant Win"), LIST_ITEM_INSTANT_WIN},
|
||||
};
|
||||
|
||||
static const struct ListMenuItem sStatsListItems[] =
|
||||
@ -1243,6 +1245,13 @@ static void Task_DebugMenuProcessInput(u8 taskId)
|
||||
SwitchToAiPartyView(taskId);
|
||||
return;
|
||||
}
|
||||
else if (listItemId == LIST_ITEM_INSTANT_WIN && JOY_NEW(A_BUTTON))
|
||||
{
|
||||
BattleDebug_WonBattle();
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
gTasks[taskId].func = Task_DebugMenuFadeOut;
|
||||
return;
|
||||
}
|
||||
data->currentMainListItemId = listItemId;
|
||||
|
||||
// Create the secondary menu list.
|
||||
@ -1445,6 +1454,7 @@ static void CreateSecondaryListMenu(struct BattleDebugMenu *data)
|
||||
listTemplate.items = sSideStatusListItems;
|
||||
itemsCount = ARRAY_COUNT(sSideStatusListItems);
|
||||
break;
|
||||
case LIST_ITEM_INSTANT_WIN:
|
||||
case LIST_ITEM_AI_MOVES_PTS:
|
||||
case LIST_ITEM_AI_INFO:
|
||||
return;
|
||||
|
||||
@ -6142,3 +6142,10 @@ bool32 DidPlayerForfeitNormalTrainerBattle(void)
|
||||
|
||||
return (gBattleOutcome == B_OUTCOME_FORFEITED);
|
||||
}
|
||||
|
||||
// Wins the battle instantly. Used in the battle debug with LIST_ITEM_INSTANT_WIN
|
||||
void BattleDebug_WonBattle(void)
|
||||
{
|
||||
gBattleOutcome |= B_OUTCOME_WON;
|
||||
gBattleMainFunc = sEndTurnFuncsTable[gBattleOutcome & 0x7F];
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user