-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Most event battles do not use DisplayEnemyTrainerTextAndStartBattle
and EndTrainerBattle
to trigger battle start, or handle post battle events. End battle event scripts share the same initial code, to check battle result:
ld a, [wIsInBattle]
cp $ff
Currently, labels fall into 5 categories: "AfterBattle", "Beat", "Defeated", "EndBattle", and "PostBattle".
CeruleanCityRivalDefeatedScript
CeruleanCityRocketDefeatedScript
ChampionsRoomRivalDefeatedScript
MtMoonB2FDefeatedSuperNerdScript
PokemonTower2FDefeatedRivalScript
CeruleanGymMistyPostBattleScript
CinnabarGymBlainePostBattleScript
FightingDojoKarateMasterPostBattleScript
FuchsiaGymKogaPostBattleScript
PewterGymBrockPostBattle
Route12SnorlaxPostBattleScript
Route16SnorlaxPostBattleScript
SaffronGymSabrinaPostBattle
ViridianGymGiovanniPostBattle
RocketHideoutB4FBeatGiovanniScript
Route22Rival1AfterBattleScript
Route22Rival2AfterBattleScript
Route24AfterRocketBattleScript
SilphCo11FGiovanniAfterBattleScript
SilphCo7FRivalAfterBattleScript
SSAnne2FRivalAfterBattleScript
VermilionGymLTSurgeAfterBattleScript
OaksLabRivalEndBattleScript
AgathasRoomAgathaEndBattleScript
BrunosRoomBrunoEndBattleScript
LancesRoomLanceEndBattleScript
LoreleisRoomLoreleiEndBattleScript
CinnabarGymOpenGateScript
PokemonTower6FMarowakBattleScript
Just like trainer texts share the same pattern (Battle, EndBattle, AfterBattle), it would be interesting to name these in a same fashion across all map scripts. "Defeated" and "Beat" should not be used, as these scripts are run regardless of battle result. I would personally go for "PostBattleScript", to set them apart from AfterBattleText, that are displayed only when a battle is won.
There are a few special cases:
OaksLabRivalEndBattleScript
does not check battle result.
Elite 4 EndBattle
scripts make a combined use of generic trainer scripts (to set trainer flags) and custom scripts, to force display of after battle text.
CinnabarGymOpenGateScript
is actually a post battle script, with a self-explanatory label.
Edit: added PokemonTower6FMarowakBattleScript
, which is also a post-battle event script.