ref: fcb573f4ac006b73827b6fc317fc7501e17004ae
dir: /scripts/Route25.asm/
Route25_Script: call Route25Script_515e1 call EnableAutoTextBoxDrawing ld hl, Route25TrainerHeader0 ld de, Route25_ScriptPointers ld a, [wRoute25CurScript] call ExecuteCurMapScriptInTable ld [wRoute25CurScript], a ret Route25Script_515e1: ld hl, wCurrentMapScriptFlags bit 6, [hl] res 6, [hl] ret z CheckEventHL EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING ret nz CheckEventReuseHL EVENT_MET_BILL_2 jr nz, .asm_515ff ResetEventReuseHL EVENT_BILL_SAID_USE_CELL_SEPARATOR ld a, HS_BILL_POKEMON ld [wMissableObjectIndex], a predef_jump ShowObject .asm_515ff CheckEventAfterBranchReuseHL EVENT_GOT_SS_TICKET, EVENT_MET_BILL_2 ret z SetEventReuseHL EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING ld a, HS_NUGGET_BRIDGE_GUY ld [wMissableObjectIndex], a predef HideObject ld a, HS_BILL_1 ld [wMissableObjectIndex], a predef HideObject ld a, HS_BILL_2 ld [wMissableObjectIndex], a predef_jump ShowObject Route25_ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle Route25_TextPointers: dw Route25Text1 dw Route25Text2 dw Route25Text3 dw Route25Text4 dw Route25Text5 dw Route25Text6 dw Route25Text7 dw Route25Text8 dw Route25Text9 dw PickUpItemText dw Route25Text11 Route25TrainerHeader0: dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_0 db ($2 << 4) ; trainer's view range dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_0 dw Route25BattleText1 ; TextBeforeBattle dw Route25AfterBattleText1 ; TextAfterBattle dw Route25EndBattleText1 ; TextEndBattle dw Route25EndBattleText1 ; TextEndBattle Route25TrainerHeader1: dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_1 db ($3 << 4) ; trainer's view range dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_1 dw Route25BattleText2 ; TextBeforeBattle dw Route25AfterBattleText2 ; TextAfterBattle dw Route25EndBattleText2 ; TextEndBattle dw Route25EndBattleText2 ; TextEndBattle Route25TrainerHeader2: dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_2 db ($3 << 4) ; trainer's view range dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_2 dw Route25BattleText3 ; TextBeforeBattle dw Route25AfterBattleText3 ; TextAfterBattle dw Route25EndBattleText3 ; TextEndBattle dw Route25EndBattleText3 ; TextEndBattle Route25TrainerHeader3: dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_3 db ($2 << 4) ; trainer's view range dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_3 dw Route25BattleText4 ; TextBeforeBattle dw Route25AfterBattleText4 ; TextAfterBattle dw Route25EndBattleText4 ; TextEndBattle dw Route25EndBattleText4 ; TextEndBattle Route25TrainerHeader4: dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_4 db ($4 << 4) ; trainer's view range dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_4 dw Route25BattleText5 ; TextBeforeBattle dw Route25AfterBattleText5 ; TextAfterBattle dw Route25EndBattleText5 ; TextEndBattle dw Route25EndBattleText5 ; TextEndBattle Route25TrainerHeader5: dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_5 db ($4 << 4) ; trainer's view range dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_5 dw Route25BattleText6 ; TextBeforeBattle dw Route25AfterBattleText6 ; TextAfterBattle dw Route25EndBattleText6 ; TextEndBattle dw Route25EndBattleText6 ; TextEndBattle Route25TrainerHeader6: dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_6 db ($3 << 4) ; trainer's view range dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_6 dw Route25BattleText7 ; TextBeforeBattle dw Route25AfterBattleText7 ; TextAfterBattle dw Route25EndBattleText7 ; TextEndBattle dw Route25EndBattleText7 ; TextEndBattle Route25TrainerHeader7: dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_7, 1 db ($2 << 4) ; trainer's view range dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_7, 1 dw Route25BattleText8 ; TextBeforeBattle dw Route25AfterBattleText8 ; TextAfterBattle dw Route25EndBattleText8 ; TextEndBattle dw Route25EndBattleText8 ; TextEndBattle Route25TrainerHeader8: dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_8, 1 db ($2 << 4) ; trainer's view range dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_8, 1 dw Route25BattleText9 ; TextBeforeBattle dw Route25AfterBattleText9 ; TextAfterBattle dw Route25EndBattleText9 ; TextEndBattle dw Route25EndBattleText9 ; TextEndBattle db $ff Route25Text1: text_asm ld hl, Route25TrainerHeader0 call TalkToTrainer jp TextScriptEnd Route25Text2: text_asm ld hl, Route25TrainerHeader1 call TalkToTrainer jp TextScriptEnd Route25Text3: text_asm ld hl, Route25TrainerHeader2 call TalkToTrainer jp TextScriptEnd Route25Text4: text_asm ld hl, Route25TrainerHeader3 call TalkToTrainer jp TextScriptEnd Route25Text5: text_asm ld hl, Route25TrainerHeader4 call TalkToTrainer jp TextScriptEnd Route25Text6: text_asm ld hl, Route25TrainerHeader5 call TalkToTrainer jp TextScriptEnd Route25Text7: text_asm ld hl, Route25TrainerHeader6 call TalkToTrainer jp TextScriptEnd Route25Text8: text_asm ld hl, Route25TrainerHeader7 call TalkToTrainer jp TextScriptEnd Route25Text9: text_asm ld hl, Route25TrainerHeader8 call TalkToTrainer jp TextScriptEnd Route25BattleText1: text_far _Route25BattleText1 text_end Route25EndBattleText1: text_far _Route25EndBattleText1 text_end Route25AfterBattleText1: text_far _Route25AfterBattleText1 text_end Route25BattleText2: text_far _Route25BattleText2 text_end Route25EndBattleText2: text_far _Route25EndBattleText2 text_end Route25AfterBattleText2: text_far _Route25AfterBattleText2 text_end Route25BattleText3: text_far _Route25BattleText3 text_end Route25EndBattleText3: text_far _Route25EndBattleText3 text_end Route25AfterBattleText3: text_far _Route25AfterBattleText3 text_end Route25BattleText4: text_far _Route25BattleText4 text_end Route25EndBattleText4: text_far _Route25EndBattleText4 text_end Route25AfterBattleText4: text_far _Route25AfterBattleText4 text_end Route25BattleText5: text_far _Route25BattleText5 text_end Route25EndBattleText5: text_far _Route25EndBattleText5 text_end Route25AfterBattleText5: text_far _Route25AfterBattleText5 text_end Route25BattleText6: text_far _Route25BattleText6 text_end Route25EndBattleText6: text_far _Route25EndBattleText6 text_end Route25AfterBattleText6: text_far _Route25AfterBattleText6 text_end Route25BattleText7: text_far _Route25BattleText7 text_end Route25EndBattleText7: text_far _Route25EndBattleText7 text_end Route25AfterBattleText7: text_far _Route25AfterBattleText7 text_end Route25BattleText8: text_far _Route25BattleText8 text_end Route25EndBattleText8: text_far _Route25EndBattleText8 text_end Route25AfterBattleText8: text_far _Route25AfterBattleText8 text_end Route25BattleText9: text_far _Route25BattleText9 text_end Route25EndBattleText9: text_far _Route25EndBattleText9 text_end Route25AfterBattleText9: text_far _Route25AfterBattleText9 text_end Route25Text11: text_far _Route25Text11 text_end