Support for custom multi battle choose mons

This commit is contained in:
DizzyEggg 2019-04-01 21:56:25 +02:00
parent 83936185be
commit 88424b0ea3
2 changed files with 19 additions and 4 deletions

View File

@ -48,17 +48,29 @@ EverGrandeCity_PokemonLeague_1F_Pokemart_229624: @ 8229624
EverGrandeCity_PokemonLeague_1F_EventScript_229636:: @ 8229636
special SavePlayerParty
trainerbattle 10, TRAINER_WALLACE, 0, NULL, EverGrandeCity_PokemonLeague_1F_Text_2296E8
fadescreen 1
special ChooseHalfPartyForBattle
waitstate
@ Check here to see if the player didn't choose Cancel.
special ReducePlayerPartyToSelectedMons
setvar VAR_0x8004, 2
setvar VAR_0x8005, 4
special CallFrontierUtilFunc
trainerbattle 10, 1, 0, NULL, EverGrandeCity_PokemonLeague_1F_Text_2296E8
trainerbattle 11, TRAINER_ALEXA, 0, NULL, EverGrandeCity_PokemonLeague_1F_Text_2297EF
setvar VAR_0x8004, SPECIAL_BATTLE_MULTI
setvar VAR_0x8005, 0
setvar VAR_0x8005, 2 | 0x80
setvar VAR_0x8006, TRAINER_EDWARDO
setvar VAR_0x8007, TRAINER_BACK_PIC_LEAF
special DoSpecialTrainerBattle
waitstate
setvar VAR_0x8004, 6
special CallFrontierUtilFunc
special LoadPlayerParty
lockall

View File

@ -2397,6 +2397,9 @@ void DoSpecialTrainerBattle(void)
BattleTransition_StartOnField(GetWildBattleTransition());
else
BattleTransition_StartOnField(GetTrainerBattleTransition());
if (gSpecialVar_0x8005 & 0x80) // Skip mons restoring(done in the script)
gBattleScripting.specialTrainerBattleType = 0xFF;
break;
}
}