Custom Multi Battles - fix defeat msg

This commit is contained in:
DizzyEggg 2018-11-24 17:06:48 +01:00
parent d52016bc31
commit 1c8e574646
3 changed files with 19 additions and 3 deletions

View file

@ -47,13 +47,21 @@ EverGrandeCity_PokemonLeague_1F_Pokemart_229624: @ 8229624
end
EverGrandeCity_PokemonLeague_1F_EventScript_229636:: @ 8229636
trainerbattle 10, 406, 0, NULL, EverGrandeCity_PokemonLeague_1F_Text_2297EF, NULL
trainerbattle 11, 402, 0, NULL, EverGrandeCity_PokemonLeague_1F_Text_2297EF, NULL
special SavePlayerParty
trainerbattle 10, 406, 0, NULL, EverGrandeCity_PokemonLeague_1F_Text_2297EF
trainerbattle 11, 402, 0, NULL, EverGrandeCity_PokemonLeague_1F_Text_2297EF
setvar VAR_0x8004, 11
setvar VAR_0x8005, 0
setvar VAR_0x8006, 404
setvar VAR_0x8007, 3
special DoSpecialTrainerBattle
waitstate
special LoadPlayerParty
lockall
checkflag FLAG_0x107
goto_eq EverGrandeCity_PokemonLeague_1F_EventScript_2296BB

View file

@ -1086,7 +1086,8 @@ void SetMapVarsToTrainer(void)
const u8 *BattleSetup_ConfigureTrainerBattle(const u8 *data)
{
InitTrainerBattleVariables();
if (TrainerBattleLoadArg8(data) != TRAINER_BATTLE_SET_TRAINER_B)
InitTrainerBattleVariables();
sTrainerBattleMode = TrainerBattleLoadArg8(data);
switch (sTrainerBattleMode)

View file

@ -1330,6 +1330,13 @@ static void HandleSpecialTrainerBattleEnd(void)
case SPECIAL_BATTLE_EREADER:
CopyEReaderTrainerFarewellMessage();
break;
case SPECIAL_BATTLE_MULTI:
for (i = 0; i < 3; i++)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES))
gSaveBlock1Ptr->playerParty[i] = gPlayerParty[i];
}
break;
}
SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);