enumerate events

This commit is contained in:
YamaArashi 2015-07-20 18:32:02 -07:00
parent 13e28b0ece
commit fcab935a0f
137 changed files with 4107 additions and 1654 deletions

View file

@ -30,3 +30,4 @@ INCLUDE "constants/credits_constants.asm"
INCLUDE "constants/music_constants.asm" INCLUDE "constants/music_constants.asm"
INCLUDE "constants/tilesets.asm" INCLUDE "constants/tilesets.asm"
INCLUDE "constants/starter_mons.asm" INCLUDE "constants/starter_mons.asm"
INCLUDE "constants/event_constants.asm"

2562
constants/event_constants.asm Executable file

File diff suppressed because it is too large Load diff

View file

@ -207,8 +207,7 @@ HoFLoadMonPlayerPicTileIDs: ; 7036d (1c:436d)
predef_jump CopyTileIDsFromList predef_jump CopyTileIDsFromList
HoFDisplayPlayerStats: ; 70377 (1c:4377) HoFDisplayPlayerStats: ; 70377 (1c:4377)
ld hl, wd747 SetEvent EVENT_003
set 3, [hl]
predef DisplayDexRating predef DisplayDexRating
coord hl, 0, 4 coord hl, 0, 4
ld b, $6 ld b, $6

View file

@ -314,8 +314,7 @@ GymTrashScript: ; 5ddfc (17:5dfc)
ld [wcd5b], a ld [wcd5b], a
; Don't do the trash can puzzle if it's already been done. ; Don't do the trash can puzzle if it's already been done.
ld a, [wd773] CheckEvent EVENT_2ND_LOCK_OPENED
bit 0, a
jr z, .ok jr z, .ok
tx_pre_jump VermilionGymTrashText tx_pre_jump VermilionGymTrashText
@ -335,8 +334,7 @@ GymTrashScript: ; 5ddfc (17:5dfc)
.openFirstLock .openFirstLock
; Next can is trying for the second switch. ; Next can is trying for the second switch.
ld hl, wd773 SetEvent EVENT_1ST_LOCK_OPENED
set 1, [hl]
ld hl, GymTrashCans ld hl, GymTrashCans
ld a, [wcd5b] ld a, [wcd5b]
@ -379,8 +377,7 @@ GymTrashScript: ; 5ddfc (17:5dfc)
jr z, .openSecondLock jr z, .openSecondLock
; Reset the cans. ; Reset the cans.
ld hl, wd773 ResetEvent EVENT_1ST_LOCK_OPENED
res 1, [hl]
call Random call Random
and $e and $e
@ -391,8 +388,7 @@ GymTrashScript: ; 5ddfc (17:5dfc)
.openSecondLock .openSecondLock
; Completed the trash can puzzle. ; Completed the trash can puzzle.
ld hl, wd773 SetEvent EVENT_2ND_LOCK_OPENED
set 0, [hl]
ld hl, wd126 ld hl, wd126
set 6, [hl] set 6, [hl]

View file

@ -152,8 +152,7 @@ CinnabarIslandPokecenterBenchGuyText: ; 624df (18:64df)
SaffronCityPokecenterBenchGuyText: ; 624e4 (18:64e4) SaffronCityPokecenterBenchGuyText: ; 624e4 (18:64e4)
TX_ASM TX_ASM
ld a, [wd838] CheckEvent EVENT_78F
bit 7, a
ld hl, SaffronCityPokecenterBenchGuyText2 ld hl, SaffronCityPokecenterBenchGuyText2
jr nz, .asm_624f2 jr nz, .asm_624f2
ld hl, SaffronCityPokecenterBenchGuyText1 ld hl, SaffronCityPokecenterBenchGuyText1

View file

@ -36,8 +36,7 @@ StrengthsAndWeaknessesText: ; 1e983 (7:6983)
db "@" db "@"
SafariZoneCheck: ; 1e988 (7:6988) SafariZoneCheck: ; 1e988 (7:6988)
ld hl, wd790 CheckEventHL EVENT_IN_SAFARI_ZONE ; if we are not in the Safari Zone,
bit 7, [hl]; if we are not in the Safari Zone,
jr z, SafariZoneGameStillGoing ; don't bother printing game over text jr z, SafariZoneGameStillGoing ; don't bother printing game over text
ld a, [W_NUMSAFARIBALLS] ld a, [W_NUMSAFARIBALLS]
and a and a
@ -85,8 +84,7 @@ SafariZoneGameOver: ; 1e9b0 (7:69b0)
ld [wDestinationWarpID], a ld [wDestinationWarpID], a
ld a, $5 ld a, $5
ld [W_SAFARIZONEENTRANCECURSCRIPT], a ld [W_SAFARIZONEENTRANCECURSCRIPT], a
ld hl, wd790 SetEvent EVENT_SAFARI_GAME_OVER
set 6, [hl]
ld a, $1 ld a, $1
ld [wSafariZoneGameOver], a ld [wSafariZoneGameOver], a
ret ret
@ -191,7 +189,7 @@ CinnabarQuizQuestionsText6: ; 1ea85 (7:6a85)
db "@" db "@"
CinnabarGymQuiz_1ea8a: ; 1ea8a (7:6a8a) CinnabarGymQuiz_1ea8a: ; 1ea8a (7:6a8a)
ld hl, wd79c EventFlagAddress hl, EVENT_2A8
predef_jump FlagActionPredef predef_jump FlagActionPredef
CinnabarGymQuiz_1ea92: ; 1ea92 (7:6a92) CinnabarGymQuiz_1ea92: ; 1ea92 (7:6a92)
@ -208,6 +206,7 @@ CinnabarGymQuiz_1ea92: ; 1ea92 (7:6a92)
ld hl, CinnabarGymQuizCorrectText ld hl, CinnabarGymQuizCorrectText
call PrintText call PrintText
ld a, [$ffe0] ld a, [$ffe0]
AdjustEventBit EVENT_2A8, 0
ld c, a ld c, a
ld b, FLAG_SET ld b, FLAG_SET
call CinnabarGymQuiz_1ea8a call CinnabarGymQuiz_1ea8a
@ -221,9 +220,10 @@ CinnabarGymQuiz_1ea92: ; 1ea92 (7:6a92)
call PrintText call PrintText
ld a, [$ffdb] ld a, [$ffdb]
add $2 add $2
AdjustEventBit EVENT_29A, 2
ld c, a ld c, a
ld b, FLAG_TEST ld b, FLAG_TEST
ld hl, wd79a EventFlagAddress hl, EVENT_29A
predef FlagActionPredef predef FlagActionPredef
ld a, c ld a, c
and a and a
@ -240,6 +240,7 @@ CinnabarGymQuizCorrectText: ; 1eae3 (7:6ae3)
TX_ASM TX_ASM
ld a, [$ffe0] ld a, [$ffe0]
AdjustEventBit EVENT_2A8, 0
ld c, a ld c, a
ld b, FLAG_TEST ld b, FLAG_TEST
call CinnabarGymQuiz_1ea8a call CinnabarGymQuiz_1ea8a
@ -277,6 +278,7 @@ CinnabarGymQuiz_1eb0a: ; 1eb0a (7:6b0a)
push bc push bc
ld a, [$ffdb] ld a, [$ffdb]
ld [$ffe0], a ld [$ffe0], a
AdjustEventBit EVENT_2A8, 0
ld c, a ld c, a
ld b, FLAG_TEST ld b, FLAG_TEST
call CinnabarGymQuiz_1ea8a call CinnabarGymQuiz_1ea8a
@ -320,12 +322,11 @@ BillsHousePC: ; 1eb6e (7:6b6e)
ld a, [wSpriteStateData1 + 9] ld a, [wSpriteStateData1 + 9]
cp SPRITE_FACING_UP cp SPRITE_FACING_UP
ret nz ret nz
ld a, [wd7f2] CheckEvent EVENT_55F
bit 7, a
jr nz, .asm_1ebd2 jr nz, .asm_1ebd2
bit 3, a CheckEventReuseA EVENT_55B
jr nz, .asm_1eb86 jr nz, .asm_1eb86
bit 6, a CheckEventReuseA EVENT_55E
jr nz, .asm_1eb8b jr nz, .asm_1eb8b
.asm_1eb86 .asm_1eb86
tx_pre_jump BillsHouseMonitorText tx_pre_jump BillsHouseMonitorText
@ -354,8 +355,7 @@ BillsHousePC: ; 1eb6e (7:6b6e)
call PlaySound call PlaySound
call WaitForSoundToFinish call WaitForSoundToFinish
call PlayDefaultMusic call PlayDefaultMusic
ld hl, wd7f2 SetEvent EVENT_55B
set 3, [hl]
ret ret
.asm_1ebd2 .asm_1ebd2
ld a, $1 ld a, $1

View file

@ -432,8 +432,7 @@ ItemUseBall: ; d687 (3:5687)
call ClearSprites call ClearSprites
call SendNewMonToBox call SendNewMonToBox
ld hl,ItemUseBallText07 ld hl,ItemUseBallText07
ld a,[wd7f1] CheckEvent EVENT_550
bit 0,a ;already met Bill?
jr nz,.sendToBox2 jr nz,.sendToBox2
ld hl,ItemUseBallText08 ld hl,ItemUseBallText08
.sendToBox2 .sendToBox2
@ -1375,8 +1374,7 @@ ItemUseEscapeRope: ; dfaf (3:5faf)
set 6,[hl] set 6,[hl]
ld hl,wd72e ld hl,wd72e
res 4,[hl] res 4,[hl]
ld hl,wd790 ResetEvent EVENT_IN_SAFARI_ZONE
res 7,[hl] ; unset Safari Zone bit
xor a xor a
ld [W_NUMSAFARIBALLS],a ld [W_NUMSAFARIBALLS],a
ld [W_SAFARIZONEENTRANCECURSCRIPT],a ld [W_SAFARIZONEENTRANCECURSCRIPT],a
@ -1584,8 +1582,7 @@ ItemUsePokeflute: ; e140 (3:6140)
ld a,[W_CURMAP] ld a,[W_CURMAP]
cp a,ROUTE_12 cp a,ROUTE_12
jr nz,.notRoute12 jr nz,.notRoute12
ld a,[wd7d8] CheckEvent EVENT_BEAT_ROUTE12_SNORLAX
bit 7,a ; has the player beaten Route 12 Snorlax yet?
jr nz,.noSnorlaxToWakeUp jr nz,.noSnorlaxToWakeUp
; if the player hasn't beaten Route 12 Snorlax ; if the player hasn't beaten Route 12 Snorlax
ld hl,Route12SnorlaxFluteCoords ld hl,Route12SnorlaxFluteCoords
@ -1593,14 +1590,12 @@ ItemUsePokeflute: ; e140 (3:6140)
jr nc,.noSnorlaxToWakeUp jr nc,.noSnorlaxToWakeUp
ld hl,PlayedFluteHadEffectText ld hl,PlayedFluteHadEffectText
call PrintText call PrintText
ld hl,wd7d8 SetEvent EVENT_FIGHT_ROUTE12_SNORLAX
set 6,[hl] ; trigger Snorlax fight (handled by map script)
ret ret
.notRoute12 .notRoute12
cp a,ROUTE_16 cp a,ROUTE_16
jr nz,.noSnorlaxToWakeUp jr nz,.noSnorlaxToWakeUp
ld a,[wd7e0] CheckEvent EVENT_BEAT_ROUTE16_SNORLAX
bit 1,a ; has the player beaten Route 16 Snorlax yet?
jr nz,.noSnorlaxToWakeUp jr nz,.noSnorlaxToWakeUp
; if the player hasn't beaten Route 16 Snorlax ; if the player hasn't beaten Route 16 Snorlax
ld hl,Route16SnorlaxFluteCoords ld hl,Route16SnorlaxFluteCoords
@ -1608,8 +1603,7 @@ ItemUsePokeflute: ; e140 (3:6140)
jr nc,.noSnorlaxToWakeUp jr nc,.noSnorlaxToWakeUp
ld hl,PlayedFluteHadEffectText ld hl,PlayedFluteHadEffectText
call PrintText call PrintText
ld hl,wd7e0 SetEvent EVENT_FIGHT_ROUTE16_SNORLAX
set 0,[hl] ; trigger Snorlax fight (handled by map script)
ret ret
.noSnorlaxToWakeUp .noSnorlaxToWakeUp
ld hl,PlayedFluteNoEffectText ld hl,PlayedFluteNoEffectText

View file

@ -5,8 +5,7 @@ DisplayPCMainMenu:: ; 213c8 (8:53c8)
ld a, [wNumHoFTeams] ld a, [wNumHoFTeams]
and a and a
jr nz, .leaguePCAvailable jr nz, .leaguePCAvailable
ld a, [wd74b] CheckEvent EVENT_GOT_POKEDEX
bit 5, a ; received pokedex?
jr z, .noOaksPC jr z, .noOaksPC
ld a, [wNumHoFTeams] ld a, [wNumHoFTeams]
and a and a
@ -29,8 +28,7 @@ DisplayPCMainMenu:: ; 213c8 (8:53c8)
call UpdateSprites call UpdateSprites
ld a, 3 ld a, 3
ld [wMaxMenuItem], a ld [wMaxMenuItem], a
ld a, [wd7f1] CheckEvent EVENT_550
bit 0, a
jr nz, .metBill jr nz, .metBill
coord hl, 2, 2 coord hl, 2, 2
ld de, SomeonesPCText ld de, SomeonesPCText
@ -47,8 +45,7 @@ DisplayPCMainMenu:: ; 213c8 (8:53c8)
ld h, b ld h, b
ld de, PlayersPCText ld de, PlayersPCText
call PlaceString call PlaceString
ld a, [wd74b] CheckEvent EVENT_GOT_POKEDEX
bit 5, a ; received pokedex?
jr z, .noOaksPC2 jr z, .noOaksPC2
coord hl, 2, 6 coord hl, 2, 6
ld de, OaksPCText ld de, OaksPCText

View file

@ -74,8 +74,7 @@ BillsPC: ; 17ee4 (5:7ee4)
ld a, SFX_ENTER_PC ld a, SFX_ENTER_PC
call PlaySound call PlaySound
call WaitForSoundToFinish call WaitForSoundToFinish
ld a, [wd7f1] ;has to do with having met Bill CheckEvent EVENT_550
bit 0, a
jr nz, .billsPC ;if you've met bill, use that bill's instead of someone's jr nz, .billsPC ;if you've met bill, use that bill's instead of someone's
ld hl, AccessedSomeonesPCText ld hl, AccessedSomeonesPCText
jr .printText jr .printText

View file

@ -24,8 +24,7 @@ RedisplayStartMenu:: ; 2adf (0:2adf)
and a and a
jr nz,.loop jr nz,.loop
; if the player pressed tried to go past the top item, wrap around to the bottom ; if the player pressed tried to go past the top item, wrap around to the bottom
ld a,[wd74b] CheckEvent EVENT_GOT_POKEDEX
bit 5,a ; does the player have the pokedex?
ld a,6 ; there are 7 menu items with the pokedex, so the max index is 6 ld a,6 ; there are 7 menu items with the pokedex, so the max index is 6
jr nz,.wrapMenuItemId jr nz,.wrapMenuItemId
dec a ; there are only 6 menu items without the pokedex dec a ; there are only 6 menu items without the pokedex
@ -37,8 +36,7 @@ RedisplayStartMenu:: ; 2adf (0:2adf)
bit 7,a bit 7,a
jr z,.buttonPressed jr z,.buttonPressed
; if the player pressed tried to go past the bottom item, wrap around to the top ; if the player pressed tried to go past the bottom item, wrap around to the top
ld a,[wd74b] CheckEvent EVENT_GOT_POKEDEX
bit 5,a ; does the player have the pokedex?
ld a,[wCurrentMenuItem] ld a,[wCurrentMenuItem]
ld c,7 ; there are 7 menu items with the pokedex ld c,7 ; there are 7 menu items with the pokedex
jr nz,.checkIfPastBottom jr nz,.checkIfPastBottom
@ -59,8 +57,7 @@ RedisplayStartMenu:: ; 2adf (0:2adf)
and a,%00001010 ; was the Start button or B button pressed? and a,%00001010 ; was the Start button or B button pressed?
jp nz,CloseStartMenu jp nz,CloseStartMenu
call SaveScreenTilesToBuffer2 ; copy background from wTileMap to wTileMapBackup2 call SaveScreenTilesToBuffer2 ; copy background from wTileMap to wTileMapBackup2
ld a,[wd74b] CheckEvent EVENT_GOT_POKEDEX
bit 5,a ; does the player have the pokedex?
ld a,[wCurrentMenuItem] ld a,[wCurrentMenuItem]
jr nz,.displayMenuItem jr nz,.displayMenuItem
inc a ; adjust position to account for missing pokedex menu item inc a ; adjust position to account for missing pokedex menu item

View file

@ -1,8 +1,7 @@
CableClubNPC: ; 71c5 (1:71c5) CableClubNPC: ; 71c5 (1:71c5)
ld hl, CableClubNPCWelcomeText ld hl, CableClubNPCWelcomeText
call PrintText call PrintText
ld a, [wd74b] CheckEvent EVENT_GOT_POKEDEX
bit 5, a ; received pokedex?
jp nz, .receivedPokedex jp nz, .receivedPokedex
; if the player hasn't received the pokedex ; if the player hasn't received the pokedex
ld c, 60 ld c, 60

View file

@ -65,9 +65,7 @@ GiveFossilToCinnabarLab: ; 61006 (18:5006)
callba RemoveItemByID callba RemoveItemByID
ld hl, LabFossil_610b8 ld hl, LabFossil_610b8
call PrintText call PrintText
ld hl, wd7a3 SetEvents EVENT_2E0, EVENT_2E1
set 0, [hl]
set 1, [hl]
ret ret
.asm_610a7 .asm_610a7
ld hl, LabFossil_610bd ld hl, LabFossil_610bd

View file

@ -23,10 +23,7 @@ DisplayDexRating: ; 44169 (11:4169)
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ; load text pointer into hl ld l, a ; load text pointer into hl
ld a, [wd747] CheckAndResetEventA EVENT_003
bit 3, a
res 3, a
ld [wd747], a
jr nz, .label3 jr nz, .label3
push hl push hl
ld hl, PokedexRatingText_441cc ld hl, PokedexRatingText_441cc

View file

@ -287,8 +287,7 @@ OverworldLoopLessDelay::
ld hl,wd72c ld hl,wd72c
res 0,[hl] ; indicate that the player has stepped thrice since the last battle res 0,[hl] ; indicate that the player has stepped thrice since the last battle
.doneStepCounting .doneStepCounting
ld a,[wd790] CheckEvent EVENT_IN_SAFARI_ZONE
bit 7,a ; in the safari zone?
jr z,.notSafariZone jr z,.notSafariZone
callba SafariZoneCheckSteps callba SafariZoneCheckSteps
ld a,[wSafariZoneGameOver] ld a,[wSafariZoneGameOver]
@ -320,8 +319,7 @@ OverworldLoopLessDelay::
ld a,[W_CURMAP] ld a,[W_CURMAP]
cp a,CINNABAR_GYM cp a,CINNABAR_GYM
jr nz,.notCinnabarGym jr nz,.notCinnabarGym
ld hl,wd79b SetEvent EVENT_2A7
set 7,[hl]
.notCinnabarGym .notCinnabarGym
ld hl,wd72e ld hl,wd72e
set 5,[hl] set 5,[hl]

View file

@ -79,6 +79,432 @@ bcd3: MACRO
coins equs "bcd2" coins equs "bcd2"
money equs "bcd3" money equs "bcd3"
;\1 = event index
;\2 = return result in carry instead of zero flag
CheckEvent: MACRO
event_byte = ((\1) / 8)
ld a, [wEventFlags + event_byte]
IF _NARG > 1
IF ((\1) % 8) == 7
add a
ELSE
REPT ((\1) % 8) + 1
rrca
ENDR
ENDC
ELSE
bit (\1) % 8, a
ENDC
ENDM
;\1 = event index
CheckEventReuseA: MACRO
IF event_byte != ((\1) / 8)
event_byte = ((\1) / 8)
ld a, [wEventFlags + event_byte]
ENDC
bit (\1) % 8, a
ENDM
;\1 = reg
;\2 = event index
;\3 = event index this event is relative to (optional, this is needed when there is a fixed flag address)
EventFlagBit: MACRO
IF _NARG > 2
ld \1, ((\3) % 8) + ((\2) - (\3))
ELSE
ld \1, (\2) % 8
ENDC
ENDM
;\1 = reg
;\2 = event index
EventFlagAddress: MACRO
event_byte = ((\2) / 8)
ld \1, wEventFlags + event_byte
ENDM
;\1 = event index
CheckEventHL: MACRO
event_byte = ((\1) / 8)
ld hl, wEventFlags + event_byte
bit (\1) % 8, [hl]
ENDM
;\1 = event index
CheckEventReuseHL: MACRO
IF event_byte != ((\1) / 8)
event_byte = ((\1) / 8)
ld hl, wEventFlags + event_byte
ENDC
bit (\1) % 8, [hl]
ENDM
; dangerous, only use when HL is guaranteed to be the desired value
;\1 = event index
CheckEventForceReuseHL: MACRO
event_byte = ((\1) / 8)
bit (\1) % 8, [hl]
ENDM
;\1 = event index
;\2 = event index of the last event used before the branch
CheckEventAfterBranchReuseHL: MACRO
event_byte = ((\2) / 8)
IF event_byte != ((\1) / 8)
event_byte = ((\1) / 8)
ld hl, wEventFlags + event_byte
ENDC
bit (\1) % 8, [hl]
ENDM
;\1 = event index
CheckAndSetEvent: MACRO
event_byte = ((\1) / 8)
ld hl, wEventFlags + event_byte
bit (\1) % 8, [hl]
set (\1) % 8, [hl]
ENDM
;\1 = event index
CheckAndResetEvent: MACRO
event_byte = ((\1) / 8)
ld hl, wEventFlags + event_byte
bit (\1) % 8, [hl]
res (\1) % 8, [hl]
ENDM
;\1 = event index
CheckAndSetEventA: MACRO
ld a, [wEventFlags + ((\1) / 8)]
bit (\1) % 8, a
set (\1) % 8, a
ld [wEventFlags + ((\1) / 8)], a
ENDM
;\1 = event index
CheckAndResetEventA: MACRO
ld a, [wEventFlags + ((\1) / 8)]
bit (\1) % 8, a
res (\1) % 8, a
ld [wEventFlags + ((\1) / 8)], a
ENDM
;\1 = event index
SetEvent: MACRO
event_byte = ((\1) / 8)
ld hl, wEventFlags + event_byte
set (\1) % 8, [hl]
ENDM
;\1 = event index
SetEventReuseHL: MACRO
IF event_byte != ((\1) / 8)
event_byte = ((\1) / 8)
ld hl, wEventFlags + event_byte
ENDC
set (\1) % 8, [hl]
ENDM
;\1 = event index
;\2 = event index of the last event used before the branch
SetEventAfterBranchReuseHL: MACRO
event_byte = ((\2) / 8)
IF event_byte != ((\1) / 8)
event_byte = ((\1) / 8)
ld hl, wEventFlags + event_byte
ENDC
set (\1) % 8, [hl]
ENDM
; dangerous, only use when HL is guaranteed to be the desired value
;\1 = event index
SetEventForceReuseHL: MACRO
event_byte = ((\1) / 8)
set (\1) % 8, [hl]
ENDM
;\1 = event index
;\2 = event index
;\3 = event index (optional)
SetEvents: MACRO
SetEvent \1
SetEventReuseHL \2
IF _NARG > 2
SetEventReuseHL \3
ENDC
ENDM
;\1 = event index
ResetEvent: MACRO
event_byte = ((\1) / 8)
ld hl, wEventFlags + event_byte
res (\1) % 8, [hl]
ENDM
;\1 = event index
ResetEventReuseHL: MACRO
IF event_byte != ((\1) / 8)
event_byte = ((\1) / 8)
ld hl, wEventFlags + event_byte
ENDC
res (\1) % 8, [hl]
ENDM
;\1 = event index
;\2 = event index of the last event used before the branch
ResetEventAfterBranchReuseHL: MACRO
event_byte = ((\2) / 8)
IF event_byte != ((\1) / 8)
event_byte = ((\1) / 8)
ld hl, wEventFlags + event_byte
ENDC
res (\1) % 8, [hl]
ENDM
; dangerous, only use when HL is guaranteed to be the desired value
;\1 = event index
ResetEventForceReuseHL: MACRO
event_byte = ((\1) / 8)
res (\1) % 8, [hl]
ENDM
;\1 = event index
;\2 = event index
;\3 = event index (optional)
ResetEvents: MACRO
ResetEvent \1
ResetEventReuseHL \2
IF _NARG > 2
ResetEventReuseHL \3
ENDC
ENDM
;\1 = event index
;\2 = number of bytes away from the base address (optional, for matching the ROM)
dbEventFlagBit: MACRO
IF _NARG > 1
db ((\1) % 8) + ((\2) * 8)
ELSE
db ((\1) % 8)
ENDC
ENDM
;\1 = event index
;\2 = number of bytes away from the base address (optional, for matching the ROM)
dwEventFlagAddress: MACRO
IF _NARG > 1
dw wEventFlags + ((\1) / 8) - (\2)
ELSE
dw wEventFlags + ((\1) / 8)
ENDC
ENDM
;\1 = start
;\2 = end
SetEventRange: MACRO
event_start_byte = ((\1) / 8)
event_end_byte = ((\2) / 8)
IF event_end_byte < event_start_byte
FAIL "Incorrect argument order in SetEventRange."
ENDC
IF event_start_byte == event_end_byte
ld a, [wEventFlags + event_start_byte]
or (1 << (((\2) % 8) + 1)) - (1 << ((\1) % 8))
ld [wEventFlags + event_start_byte], a
ELSE
event_fill_start = event_start_byte + 1
event_fill_count = event_end_byte - event_start_byte - 1
IF ((\1) % 8) == 0
event_fill_start = -1 + event_fill_start
event_fill_count = 1 + event_fill_count
ELSE
ld a, [wEventFlags + event_start_byte]
or $ff - ((1 << ((\1) % 8)) - 1)
ld [wEventFlags + event_start_byte], a
ENDC
IF ((\2) % 8) == 7
event_fill_count = 1 + event_fill_count
ENDC
IF event_fill_count == 1
ld hl, wEventFlags + event_fill_start
ld [hl], $ff
ENDC
IF event_fill_count > 1
ld a, $ff
ld hl, wEventFlags + event_fill_start
REPT -1 + event_fill_count
ld [hli], a
ENDR
ld [hl], a
ENDC
IF ((\2) % 8) == 0
ld hl, wEventFlags + event_end_byte
set 0, [hl]
ELSE
IF ((\2) % 8) != 7
ld a, [wEventFlags + event_end_byte]
or (1 << (((\2) % 8) + 1)) - 1
ld [wEventFlags + event_end_byte], a
ENDC
ENDC
ENDC
ENDM
;\1 = start
;\2 = end
;\3 = assume a is 0 if present
ResetEventRange: MACRO
event_start_byte = ((\1) / 8)
event_end_byte = ((\2) / 8)
IF event_end_byte < event_start_byte
FAIL "Incorrect argument order in ResetEventRange."
ENDC
IF event_start_byte == event_end_byte
ld a, [wEventFlags + event_start_byte]
and ~((1 << (((\2) % 8) + 1)) - (1 << ((\1) % 8))) & $ff
ld [wEventFlags + event_start_byte], a
ELSE
event_fill_start = event_start_byte + 1
event_fill_count = event_end_byte - event_start_byte - 1
IF ((\1) % 8) == 0
event_fill_start = -1 + event_fill_start
event_fill_count = 1 + event_fill_count
ELSE
ld a, [wEventFlags + event_start_byte]
and ~($ff - ((1 << ((\1) % 8)) - 1)) & $ff
ld [wEventFlags + event_start_byte], a
ENDC
IF ((\2) % 8) == 7
event_fill_count = 1 + event_fill_count
ENDC
IF event_fill_count == 1
ld hl, wEventFlags + event_fill_start
ld [hl], 0
ENDC
IF event_fill_count > 1
ld hl, wEventFlags + event_fill_start
; force xor a if we just to wrote to it above
IF (_NARG < 3) || (((\1) % 8) != 0)
xor a
ENDC
REPT -1 + event_fill_count
ld [hli], a
ENDR
ld [hl], a
ENDC
IF ((\2) % 8) == 0
ld hl, wEventFlags + event_end_byte
res 0, [hl]
ELSE
IF ((\2) % 8) != 7
ld a, [wEventFlags + event_end_byte]
and ~((1 << (((\2) % 8) + 1)) - 1) $ ff
ld [wEventFlags + event_end_byte], a
ENDC
ENDC
ENDC
ENDM
; returns whether both events are set in Z flag
;\1 = event index 1
;\2 = event index 2
CheckBothEventsSet: MACRO
IF ((\1) / 8) == ((\2) / 8)
ld a, [wEventFlags + ((\1) / 8)]
and (1 << ((\1) % 8)) | (1 << ((\2) % 8))
cp (1 << ((\1) % 8)) | (1 << ((\2) % 8))
ELSE
; This case doesn't happen in the original ROM.
IF ((\1) % 8) == ((\2) % 8)
push hl
ld a, [wEventFlags + ((\1) / 8)]
ld hl, wEventFlags + ((\2) / 8)
and [hl]
cpl
bit ((\1) % 8), a
pop hl
ELSE
push bc
ld a, [wEventFlags + ((\1) / 8)]
and (1 << ((\1) % 8))
ld b, a
ld a, [wEventFlags + ((\2) / 8)]
and (1 << ((\2) % 8))
or b
cp (1 << ((\1) % 8)) | (1 << ((\2) % 8))
pop bc
ENDC
ENDC
ENDM
; returns the complement of whether either event is set in Z flag
;\1 = event index 1
;\2 = event index 2
CheckEitherEventSet: MACRO
IF ((\1) / 8) == ((\2) / 8)
ld a, [wEventFlags + ((\1) / 8)]
and (1 << ((\1) % 8)) | (1 << ((\2) % 8))
ELSE
; This case doesn't happen in the original ROM.
IF ((\1) % 8) == ((\2) % 8)
push hl
ld a, [wEventFlags + ((\1) / 8)]
ld hl, wEventFlags + ((\2) / 8)
or [hl]
bit ((\1) % 8), a
pop hl
ELSE
push bc
ld a, [wEventFlags + ((\1) / 8)]
and (1 << ((\1) % 8))
ld b, a
ld a, [wEventFlags + ((\2) / 8)]
and (1 << ((\2) % 8))
or b
pop bc
ENDC
ENDC
ENDM
; for handling fixed event bits when events are inserted/removed
;\1 = event index
;\2 = fixed flag bit
AdjustEventBit: MACRO
IF ((\1) % 8) != (\2)
add ((\1) % 8) - (\2)
ENDC
ENDM
;\1 = r ;\1 = r
;\2 = X ;\2 = X
;\3 = Y ;\3 = Y

View file

@ -1002,8 +1002,7 @@ DisplayTextIDInit: ; 7096 (1:7096)
; if text ID is 0 (i.e. the start menu) ; if text ID is 0 (i.e. the start menu)
; Note that the start menu text border is also drawn in the function directly ; Note that the start menu text border is also drawn in the function directly
; below this, so this seems unnecessary. ; below this, so this seems unnecessary.
ld a,[wd74b] CheckEvent EVENT_GOT_POKEDEX
bit 5,a ; does the player have the pokedex?
; start menu with pokedex ; start menu with pokedex
coord hl, 10, 0 coord hl, 10, 0
ld b,$0e ld b,$0e
@ -1071,8 +1070,7 @@ DisplayTextIDInit: ; 7096 (1:7096)
; function that displays the start menu ; function that displays the start menu
DrawStartMenu: ; 710b (1:710b) DrawStartMenu: ; 710b (1:710b)
ld a,[wd74b] CheckEvent EVENT_GOT_POKEDEX
bit 5,a ; does the player have the pokedex?
; menu with pokedex ; menu with pokedex
coord hl, 10, 0 coord hl, 10, 0
ld b,$0e ld b,$0e
@ -1098,8 +1096,7 @@ DrawStartMenu: ; 710b (1:710b)
ld hl,wd730 ld hl,wd730
set 6,[hl] ; no pauses between printing each letter set 6,[hl] ; no pauses between printing each letter
coord hl, 12, 2 coord hl, 12, 2
ld a,[wd74b] CheckEvent EVENT_GOT_POKEDEX
bit 5,a ; does the player have the pokedex?
; case for not having pokdex ; case for not having pokdex
ld a,$06 ld a,$06
jr z,.storeMenuItemCount jr z,.storeMenuItemCount
@ -2763,9 +2760,7 @@ CheckForForcedBikeSurf: ; cdc0 (3:4dc0)
ld a, [W_CURMAP] ld a, [W_CURMAP]
cp SEAFOAM_ISLANDS_5 cp SEAFOAM_ISLANDS_5
ret nz ret nz
ld a, [wd881] CheckBothEventsSet EVENT_9D0, EVENT_9D1
and $3
cp $3
ret z ret z
ld hl, CoordsData_cdf7 ld hl, CoordsData_cdf7
call ArePlayerCoordsInArray call ArePlayerCoordsInArray

View file

@ -13,8 +13,7 @@ AgathaScript_76443: ; 76443 (1d:6443)
bit 5, [hl] bit 5, [hl]
res 5, [hl] res 5, [hl]
ret z ret z
ld a, [wd865] CheckEvent EVENT_BEAT_AGATHAS_ROOM_TRAINER_0
bit 1, a
jr z, .asm_76457 jr z, .asm_76457
ld a, $e ld a, $e
jp AgathaScript_76459 jp AgathaScript_76459
@ -70,9 +69,7 @@ AgathaScript0: ; 76490 (1d:6490)
ld a, [wCoordIndex] ld a, [wCoordIndex]
cp $3 cp $3
jr c, .asm_764b4 jr c, .asm_764b4
ld hl, wd865 CheckAndSetEvent EVENT_8F6
bit 6, [hl]
set 6, [hl]
jr z, AgathaScript_76474 jr z, AgathaScript_76474
.asm_764b4 .asm_764b4
ld a, $2 ld a, $2
@ -124,9 +121,9 @@ AgathaTextPointers: ; 76505 (1d:6505)
AgathaTrainerHeaders: ; 76509 (1d:6509) AgathaTrainerHeaders: ; 76509 (1d:6509)
AgathaTrainerHeader0: ; 76509 (1d:6509) AgathaTrainerHeader0: ; 76509 (1d:6509)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_AGATHAS_ROOM_TRAINER_0
db ($0 << 4) ; trainer's view range db ($0 << 4) ; trainer's view range
dw wd865 ; flag's byte dwEventFlagAddress EVENT_BEAT_AGATHAS_ROOM_TRAINER_0
dw AgathaBeforeBattleText ; TextBeforeBattle dw AgathaBeforeBattleText ; TextBeforeBattle
dw AgathaAfterBattleText ; TextAfterBattle dw AgathaAfterBattleText ; TextAfterBattle
dw AgathaEndBattleText ; TextEndBattle dw AgathaEndBattleText ; TextEndBattle

View file

@ -8,8 +8,7 @@ BikeShopTextPointers: ; 1d73f (7:573f)
BikeShopText1: ; 1d745 (7:5745) BikeShopText1: ; 1d745 (7:5745)
TX_ASM TX_ASM
ld a, [wd75f] CheckEvent EVENT_0C0
bit 0, a
jr z, .asm_260d4 jr z, .asm_260d4
ld hl, BikeShopText_1d82f ld hl, BikeShopText_1d82f
call PrintText call PrintText
@ -26,8 +25,7 @@ BikeShopText1: ; 1d745 (7:5745)
ld a, BIKE_VOUCHER ld a, BIKE_VOUCHER
ld [$ffdb], a ld [$ffdb], a
callba RemoveItemByID callba RemoveItemByID
ld hl, wd75f SetEvent EVENT_0C0
set 0, [hl]
ld hl, BikeShopText_1d824 ld hl, BikeShopText_1d824
call PrintText call PrintText
jr .Done jr .Done
@ -131,8 +129,7 @@ BikeShopText_1d843: ; 1d843 (7:5843)
BikeShopText3: ; 1d848 (7:5848) BikeShopText3: ; 1d848 (7:5848)
TX_ASM TX_ASM
ld a, [wd75f] CheckEvent EVENT_0C0
bit 0, a
ld hl, BikeShopText_1d861 ld hl, BikeShopText_1d861
jr nz, .asm_34d2d jr nz, .asm_34d2d
ld hl, BikeShopText_1d85c ld hl, BikeShopText_1d85c

View file

@ -51,8 +51,7 @@ BillsHouseScript2: ; 1e7a6 (7:67a6)
ld a, HS_BILL_POKEMON ld a, HS_BILL_POKEMON
ld [wcc4d], a ld [wcc4d], a
predef HideObject predef HideObject
ld hl, wd7f2 SetEvent EVENT_55E
set 6, [hl]
xor a xor a
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld a, $3 ld a, $3
@ -60,8 +59,7 @@ BillsHouseScript2: ; 1e7a6 (7:67a6)
ret ret
BillsHouseScript3: ; 1e7c5 (7:67c5) BillsHouseScript3: ; 1e7c5 (7:67c5)
ld a, [wd7f2] CheckEvent EVENT_55B
bit 3, a
ret z ret z
ld a, $f0 ld a, $f0
ld [wJoyIgnore], a ld [wJoyIgnore], a
@ -103,10 +101,8 @@ BillsHouseScript4: ; 1e80d (7:680d)
ret nz ret nz
xor a xor a
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld hl, wd7f2 SetEvent EVENT_55D
set 5, [hl] SetEvent EVENT_550
ld hl, wd7f1
set 0, [hl]
ld a, $0 ld a, $0
ld [W_BILLSHOUSECURSCRIPT], a ld [W_BILLSHOUSECURSCRIPT], a
ret ret
@ -163,8 +159,7 @@ BillsHouseText_1e86f: ; 1e86f (7:686f)
BillsHouseText2: ; 1e874 (7:6874) BillsHouseText2: ; 1e874 (7:6874)
TX_ASM TX_ASM
ld a, [wd7f2] CheckEvent EVENT_55C
bit 4, a
jr nz, .asm_1e8a9 jr nz, .asm_1e8a9
ld hl, BillThankYouText ld hl, BillThankYouText
call PrintText call PrintText
@ -173,8 +168,7 @@ BillsHouseText2: ; 1e874 (7:6874)
jr nc, .BagFull jr nc, .BagFull
ld hl, SSTicketReceivedText ld hl, SSTicketReceivedText
call PrintText call PrintText
ld hl, wd7f2 SetEvent EVENT_55C
set 4, [hl]
ld a, HS_CERULEAN_GUARD_1 ld a, HS_CERULEAN_GUARD_1
ld [wcc4d], a ld [wcc4d], a
predef ShowObject predef ShowObject

View file

@ -9,8 +9,7 @@ BluesHouseScriptPointers: ; 19b47 (6:5b47)
dw BluesHouseScript1 dw BluesHouseScript1
BluesHouseScript0: ; 19b4b (6:5b4b) BluesHouseScript0: ; 19b4b (6:5b4b)
ld hl,wd74a SetEvent EVENT_019
set 1,[hl]
; trigger the next script ; trigger the next script
ld a,1 ld a,1
@ -27,11 +26,9 @@ BluesHouseTextPointers: ; 19b57 (6:5b57)
BluesHouseText1: ; 19b5d (6:5b5d) BluesHouseText1: ; 19b5d (6:5b5d)
TX_ASM TX_ASM
ld a,[wd74a] CheckEvent EVENT_018
bit 0,a
jr nz,.GotMap jr nz,.GotMap
ld a,[wd74b] CheckEvent EVENT_GOT_POKEDEX
bit 5,a
jr nz,.GiveMap jr nz,.GiveMap
ld hl,DaisyInitialText ld hl,DaisyInitialText
call PrintText call PrintText
@ -47,8 +44,7 @@ BluesHouseText1: ; 19b5d (6:5b5d)
predef HideObject ; hide table map object predef HideObject ; hide table map object
ld hl,GotMapText ld hl,GotMapText
call PrintText call PrintText
ld hl,wd74a SetEvent EVENT_018
set 0,[hl]
jr .done jr .done
.GotMap .GotMap
ld hl,DaisyUseMapText ld hl,DaisyUseMapText

View file

@ -13,8 +13,7 @@ BrunoScript_762ec: ; 762ec (1d:62ec)
bit 5, [hl] bit 5, [hl]
res 5, [hl] res 5, [hl]
ret z ret z
ld a, [wd864] CheckEvent EVENT_BEAT_BRUNOS_ROOM_TRAINER_0
bit 1, a
jr z, .asm_76300 jr z, .asm_76300
ld a, $5 ld a, $5
jp BrunoScript_76302 jp BrunoScript_76302
@ -70,9 +69,7 @@ BrunoScript0: ; 76339 (1d:6339)
ld a, [wCoordIndex] ld a, [wCoordIndex]
cp $3 cp $3
jr c, .asm_7635d jr c, .asm_7635d
ld hl, wd864 CheckAndSetEvent EVENT_8EE
bit 6, [hl]
set 6, [hl]
jr z, BrunoScript_7631d jr z, BrunoScript_7631d
.asm_7635d .asm_7635d
ld a, $2 ld a, $2
@ -121,9 +118,9 @@ BrunoTextPointers: ; 763a8 (1d:63a8)
BrunoTrainerHeaders: ; 763ac (1d:63ac) BrunoTrainerHeaders: ; 763ac (1d:63ac)
BrunoTrainerHeader0: ; 763ac (1d:63ac) BrunoTrainerHeader0: ; 763ac (1d:63ac)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_BRUNOS_ROOM_TRAINER_0
db ($0 << 4) ; trainer's view range db ($0 << 4) ; trainer's view range
dw wd864 ; flag's byte dwEventFlagAddress EVENT_BEAT_BRUNOS_ROOM_TRAINER_0
dw BrunoBeforeBattleText ; TextBeforeBattle dw BrunoBeforeBattleText ; TextBeforeBattle
dw BrunoAfterBattleText ; TextAfterBattle dw BrunoAfterBattleText ; TextAfterBattle
dw BrunoEndBattleText ; TextEndBattle dw BrunoEndBattleText ; TextEndBattle

View file

@ -1,10 +1,7 @@
CeladonCityScript: ; 19956 (6:5956) CeladonCityScript: ; 19956 (6:5956)
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld hl, wd77e ResetEvents EVENT_1B8, EVENT_1BF
res 0, [hl] ResetEvent EVENT_67F
res 7, [hl]
ld hl, wd816
res 7, [hl]
ret ret
CeladonCityTextPointers: ; 19966 (6:5966) CeladonCityTextPointers: ; 19966 (6:5966)
@ -45,8 +42,7 @@ CeladonCityText4: ; 19999 (6:5999)
CeladonCityText5: ; 1999e (6:599e) CeladonCityText5: ; 1999e (6:599e)
TX_ASM TX_ASM
ld a, [wd777] CheckEvent EVENT_180
bit 0, a
jr nz, .asm_7053f jr nz, .asm_7053f
ld hl, TM41PreText ld hl, TM41PreText
call PrintText call PrintText
@ -59,8 +55,7 @@ CeladonCityText5: ; 1999e (6:599e)
.Success .Success
ld hl, ReceivedTM41Text ld hl, ReceivedTM41Text
call PrintText call PrintText
ld hl, wd777 SetEvent EVENT_180
set 0, [hl]
jr .Done jr .Done
.asm_7053f .asm_7053f
ld hl, TM41ExplanationText ld hl, TM41ExplanationText

View file

@ -27,16 +27,14 @@ CeladonDinerText4: ; 4916e (12:516e)
CeladonDinerText5: ; 49173 (12:5173) CeladonDinerText5: ; 49173 (12:5173)
TX_ASM TX_ASM
ld a, [wd783] CheckEvent EVENT_1E0
bit 0, a
jr nz, .asm_eb14d jr nz, .asm_eb14d
ld hl, CeladonDinerText_491a7 ld hl, CeladonDinerText_491a7
call PrintText call PrintText
ld bc, (COIN_CASE << 8) | 1 ld bc, (COIN_CASE << 8) | 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld hl, wd783 SetEvent EVENT_1E0
set 0, [hl]
ld hl, ReceivedCoinCaseText ld hl, ReceivedCoinCaseText
call PrintText call PrintText
jr .asm_68b61 jr .asm_68b61

View file

@ -28,8 +28,7 @@ CeladonGameCornerScript_48bec: ; 48bec (12:4bec)
bit 5, [hl] bit 5, [hl]
res 5, [hl] res 5, [hl]
ret z ret z
ld a, [wd77e] CheckEvent EVENT_1B9
bit 1, a
ret nz ret nz
ld a, $2a ld a, $2a
ld [wd09f], a ld [wd09f], a
@ -227,8 +226,7 @@ CeladonGameCornerText4: ; 48d45 (12:4d45)
CeladonGameCornerText5: ; 48d4a (12:4d4a) CeladonGameCornerText5: ; 48d4a (12:4d4a)
TX_ASM TX_ASM
ld a, [wd77e] CheckEvent EVENT_1BA
bit 2, a
jr nz, .asm_48d89 jr nz, .asm_48d89
ld hl, CeladonGameCornerText_48d9c ld hl, CeladonGameCornerText_48d9c
call PrintText call PrintText
@ -246,8 +244,7 @@ CeladonGameCornerText5: ; 48d4a (12:4d4a)
ld hl, hCoins + 1 ld hl, hCoins + 1
ld c, $2 ld c, $2
predef AddBCDPredef predef AddBCDPredef
ld hl, wd77e SetEvent EVENT_1BA
set 2, [hl]
ld a, $1 ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, Received10CoinsText ld hl, Received10CoinsText
@ -286,8 +283,7 @@ CeladonGameCornerText6: ; 48db1 (12:4db1)
CeladonGameCornerText7: ; 48db6 (12:4db6) CeladonGameCornerText7: ; 48db6 (12:4db6)
TX_ASM TX_ASM
ld a, [wd77c] CheckEvent EVENT_1A9
bit 1, a
ld hl, CeladonGameCornerText_48dca ld hl, CeladonGameCornerText_48dca
jr z, .asm_48dc4 jr z, .asm_48dc4
ld hl, CeladonGameCornerText_48dcf ld hl, CeladonGameCornerText_48dcf
@ -309,8 +305,7 @@ CeladonGameCornerText8: ; 48dd4 (12:4dd4)
CeladonGameCornerText9: ; 48dd9 (12:4dd9) CeladonGameCornerText9: ; 48dd9 (12:4dd9)
TX_ASM TX_ASM
ld a, [wd77e] CheckEvent EVENT_1BC
bit 4, a
jr nz, .asm_48e13 jr nz, .asm_48e13
ld hl, CeladonGameCornerText_48e26 ld hl, CeladonGameCornerText_48e26
call PrintText call PrintText
@ -328,8 +323,7 @@ CeladonGameCornerText9: ; 48dd9 (12:4dd9)
ld hl, hCoins + 1 ld hl, hCoins + 1
ld c, $2 ld c, $2
predef AddBCDPredef predef AddBCDPredef
ld hl, wd77e SetEvent EVENT_1BC
set 4, [hl]
ld hl, Received20CoinsText ld hl, Received20CoinsText
jr .asm_48e20 jr .asm_48e20
.asm_48e13 .asm_48e13
@ -362,8 +356,7 @@ CeladonGameCornerText_48e36: ; 48e36 (12:4e36)
CeladonGameCornerText10: ; 48e3b (12:4e3b) CeladonGameCornerText10: ; 48e3b (12:4e3b)
TX_ASM TX_ASM
ld a, [wd77e] CheckEvent EVENT_1BB
bit 3, a
jr nz, .asm_48e75 jr nz, .asm_48e75
ld hl, CeladonGameCornerText_48e88 ld hl, CeladonGameCornerText_48e88
call PrintText call PrintText
@ -381,8 +374,7 @@ CeladonGameCornerText10: ; 48e3b (12:4e3b)
ld hl, hCoins + 1 ld hl, hCoins + 1
ld c, $2 ld c, $2
predef AddBCDPredef predef AddBCDPredef
ld hl, wd77e SetEvent EVENT_1BB
set 3, [hl]
ld hl, CeladonGameCornerText_48e8d ld hl, CeladonGameCornerText_48e8d
jr .asm_48e82 jr .asm_48e82
.asm_48e75 .asm_48e75
@ -457,8 +449,7 @@ CeladonGameCornerText12: ; 48edd (12:4edd)
ld a, SFX_GO_INSIDE ld a, SFX_GO_INSIDE
call PlaySound call PlaySound
call WaitForSoundToFinish call WaitForSoundToFinish
ld hl, wd77e SetEvent EVENT_1B9
set 1, [hl]
ld a, $43 ld a, $43
ld [wd09f], a ld [wd09f], a
ld bc, $0208 ld bc, $0208

View file

@ -46,16 +46,14 @@ CeladonGymText_48963: ; 48963 (12:4963)
ld a, $9 ld a, $9
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd77c SetEvent EVENT_1A9
set 1, [hl]
ld bc, (TM_21 << 8) | 1 ld bc, (TM_21 << 8) | 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld a, $a ld a, $a
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd77c SetEvent EVENT_1A8
set 0, [hl]
jr .asm_4898c jr .asm_4898c
.BagFull .BagFull
ld a, $b ld a, $b
@ -68,11 +66,7 @@ CeladonGymText_48963: ; 48963 (12:4963)
set 3, [hl] set 3, [hl]
; deactivate gym trainers ; deactivate gym trainers
ld a, [wd77c] SetEventRange EVENT_BEAT_CELADON_GYM_TRAINER_0, EVENT_BEAT_CELADON_GYM_TRAINER_7
or %11111100
ld [wd77c], a
ld hl, wd77d
set 0, [hl]
jp CeladonGymText_48943 jp CeladonGymText_48943
@ -91,63 +85,63 @@ CeladonGymTextPointers: ; 489a6 (12:49a6)
CeladonGymTrainerHeaders: ; 489bc (12:49bc) CeladonGymTrainerHeaders: ; 489bc (12:49bc)
CeladonGymTrainerHeader0: ; 489bc (12:49bc) CeladonGymTrainerHeader0: ; 489bc (12:49bc)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_0
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd77c ; flag's byte dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_0
dw CeladonGymBattleText2 ; TextBeforeBattle dw CeladonGymBattleText2 ; TextBeforeBattle
dw CeladonGymAfterBattleText2 ; TextAfterBattle dw CeladonGymAfterBattleText2 ; TextAfterBattle
dw CeladonGymEndBattleText2 ; TextEndBattle dw CeladonGymEndBattleText2 ; TextEndBattle
dw CeladonGymEndBattleText2 ; TextEndBattle dw CeladonGymEndBattleText2 ; TextEndBattle
CeladonGymTrainerHeader2: ; 489c8 (12:49c8) CeladonGymTrainerHeader2: ; 489c8 (12:49c8)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_2
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd77c ; flag's byte dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_2
dw CeladonGymBattleText3 ; TextBeforeBattle dw CeladonGymBattleText3 ; TextBeforeBattle
dw CeladonGymAfterBattleText3 ; TextAfterBattle dw CeladonGymAfterBattleText3 ; TextAfterBattle
dw CeladonGymEndBattleText3 ; TextEndBattle dw CeladonGymEndBattleText3 ; TextEndBattle
dw CeladonGymEndBattleText3 ; TextEndBattle dw CeladonGymEndBattleText3 ; TextEndBattle
CeladonGymTrainerHeader3: ; 489d4 (12:49d4) CeladonGymTrainerHeader3: ; 489d4 (12:49d4)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_3
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd77c ; flag's byte dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_3
dw CeladonGymBattleText4 ; TextBeforeBattle dw CeladonGymBattleText4 ; TextBeforeBattle
dw CeladonGymAfterBattleText4 ; TextAfterBattle dw CeladonGymAfterBattleText4 ; TextAfterBattle
dw CeladonGymEndBattleText4 ; TextEndBattle dw CeladonGymEndBattleText4 ; TextEndBattle
dw CeladonGymEndBattleText4 ; TextEndBattle dw CeladonGymEndBattleText4 ; TextEndBattle
CeladonGymTrainerHeader4: ; 489e0 (12:49e0) CeladonGymTrainerHeader4: ; 489e0 (12:49e0)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_4
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd77c ; flag's byte dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_4
dw CeladonGymBattleText5 ; TextBeforeBattle dw CeladonGymBattleText5 ; TextBeforeBattle
dw CeladonGymAfterBattleText5 ; TextAfterBattle dw CeladonGymAfterBattleText5 ; TextAfterBattle
dw CeladonGymEndBattleText5 ; TextEndBattle dw CeladonGymEndBattleText5 ; TextEndBattle
dw CeladonGymEndBattleText5 ; TextEndBattle dw CeladonGymEndBattleText5 ; TextEndBattle
CeladonGymTrainerHeader5: ; 489ec (12:49ec) CeladonGymTrainerHeader5: ; 489ec (12:49ec)
db $6 ; flag's bit dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_5
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd77c ; flag's byte dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_5
dw CeladonGymBattleText6 ; TextBeforeBattle dw CeladonGymBattleText6 ; TextBeforeBattle
dw CeladonGymAfterBattleText6 ; TextAfterBattle dw CeladonGymAfterBattleText6 ; TextAfterBattle
dw CeladonGymEndBattleText6 ; TextEndBattle dw CeladonGymEndBattleText6 ; TextEndBattle
dw CeladonGymEndBattleText6 ; TextEndBattle dw CeladonGymEndBattleText6 ; TextEndBattle
CeladonGymTrainerHeader6: ; 489f8 (12:49f8) CeladonGymTrainerHeader6: ; 489f8 (12:49f8)
db $7 ; flag's bit dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_6
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd77c ; flag's byte dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_6
dw CeladonGymBattleText7 ; TextBeforeBattle dw CeladonGymBattleText7 ; TextBeforeBattle
dw CeladonGymAfterBattleText7 ; TextAfterBattle dw CeladonGymAfterBattleText7 ; TextAfterBattle
dw CeladonGymEndBattleText7 ; TextEndBattle dw CeladonGymEndBattleText7 ; TextEndBattle
dw CeladonGymEndBattleText7 ; TextEndBattle dw CeladonGymEndBattleText7 ; TextEndBattle
CeladonGymTrainerHeader7: ; 48a04 (12:4a04) CeladonGymTrainerHeader7: ; 48a04 (12:4a04)
db $8 ; flag's bit dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_7, 1
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd77c ; flag's byte dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_7, 1
dw CeladonGymBattleText8 ; TextBeforeBattle dw CeladonGymBattleText8 ; TextBeforeBattle
dw CeladonGymAfterBattleText8 ; TextAfterBattle dw CeladonGymAfterBattleText8 ; TextAfterBattle
dw CeladonGymEndBattleText8 ; TextEndBattle dw CeladonGymEndBattleText8 ; TextEndBattle
@ -157,10 +151,9 @@ CeladonGymTrainerHeader7: ; 48a04 (12:4a04)
CeladonGymText1: ; 48a11 (12:4a11) CeladonGymText1: ; 48a11 (12:4a11)
TX_ASM TX_ASM
ld a, [wd77c] CheckEvent EVENT_1A9
bit 1, a
jr z, .asm_48a2d jr z, .asm_48a2d
bit 0, a CheckEventReuseA EVENT_1A8
jr nz, .asm_48a25 jr nz, .asm_48a25
call z, CeladonGymText_48963 call z, CeladonGymText_48963
call DisableWaitingAfterTextDisplay call DisableWaitingAfterTextDisplay

View file

@ -22,16 +22,14 @@ CeladonMart3TextPointers: ; 48228 (12:4228)
CeladonMart3Text1: ; 4824a (12:424a) CeladonMart3Text1: ; 4824a (12:424a)
TX_ASM TX_ASM
ld a, [wd778] CheckEvent EVENT_18F
bit 7, a
jr nz, .asm_a5463 jr nz, .asm_a5463
ld hl, TM18PreReceiveText ld hl, TM18PreReceiveText
call PrintText call PrintText
ld bc, (TM_18 << 8) | 1 ld bc, (TM_18 << 8) | 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld hl, wd778 SetEvent EVENT_18F
set 7, [hl]
ld hl, ReceivedTM18Text ld hl, ReceivedTM18Text
jr .asm_81359 jr .asm_81359
.BagFull .BagFull

View file

@ -83,8 +83,7 @@ CeladonMartRoofScript_4840c: ; 4840c (12:440c)
jr z, .asm_484b6 jr z, .asm_484b6
cp SODA_POP cp SODA_POP
jr z, .asm_48492 jr z, .asm_48492
ld a, [wd778] CheckEvent EVENT_18E
bit 6, a
jr nz, .asm_484e0 jr nz, .asm_484e0
ld hl, CeladonMartRoofText_48515 ld hl, CeladonMartRoofText_48515
call PrintText call PrintText
@ -94,12 +93,10 @@ CeladonMartRoofScript_4840c: ; 4840c (12:440c)
jr nc, .BagFull jr nc, .BagFull
ld hl, ReceivedTM49Text ld hl, ReceivedTM49Text
call PrintText call PrintText
ld hl, wd778 SetEvent EVENT_18E
set 6, [hl]
ret ret
.asm_48492 .asm_48492
ld a, [wd778] CheckEvent EVENT_18D
bit 5, a
jr nz, .asm_484e0 jr nz, .asm_484e0
ld hl, CeladonMartRoofText_48504 ld hl, CeladonMartRoofText_48504
call PrintText call PrintText
@ -109,12 +106,10 @@ CeladonMartRoofScript_4840c: ; 4840c (12:440c)
jr nc, .BagFull jr nc, .BagFull
ld hl, CeladonMartRoofText_4850a ld hl, CeladonMartRoofText_4850a
call PrintText call PrintText
ld hl, wd778 SetEvent EVENT_18D
set 5, [hl]
ret ret
.asm_484b6 .asm_484b6
ld a, [wd778] CheckEvent EVENT_18C
bit 4, a
jr nz, .asm_484e0 jr nz, .asm_484e0
ld hl, CeladonMartRoofText_484f3 ld hl, CeladonMartRoofText_484f3
call PrintText call PrintText
@ -124,8 +119,7 @@ CeladonMartRoofScript_4840c: ; 4840c (12:440c)
jr nc, .BagFull jr nc, .BagFull
ld hl, CeladonMartRoofText_484f9 ld hl, CeladonMartRoofText_484f9
call PrintText call PrintText
ld hl, wd778 SetEvent EVENT_18C
set 4, [hl]
ret ret
.BagFull .BagFull
ld hl, CeladonMartRoofText_48526 ld hl, CeladonMartRoofText_48526

View file

@ -25,8 +25,7 @@ CeruleanCityScript4: ; 194a7 (6:54a7)
jp z, CeruleanCityScript_1948c jp z, CeruleanCityScript_1948c
ld a, $f0 ld a, $f0
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld hl, wd75b SetEvent EVENT_0A7
set 7, [hl]
ld a, $2 ld a, $2
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
@ -36,8 +35,7 @@ CeruleanCityScript4: ; 194a7 (6:54a7)
ret ret
CeruleanCityScript0: ; 194c8 (6:54c8) CeruleanCityScript0: ; 194c8 (6:54c8)
ld a, [wd75b] CheckEvent EVENT_0A7
bit 7, a
jr nz, .asm_194f7 jr nz, .asm_194f7
ld hl, CeruleanCityCoords1 ld hl, CeruleanCityCoords1
call ArePlayerCoordsInArray call ArePlayerCoordsInArray
@ -58,8 +56,7 @@ CeruleanCityScript0: ; 194c8 (6:54c8)
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
jp DisplayTextID jp DisplayTextID
.asm_194f7 .asm_194f7
ld a, [wd75a] CheckEvent EVENT_098
bit 0, a
ret nz ret nz
ld hl, CeruleanCityCoords2 ld hl, CeruleanCityCoords2
call ArePlayerCoordsInArray call ArePlayerCoordsInArray
@ -170,8 +167,7 @@ CeruleanCityScript2: ; 195b1 (6:55b1)
call CeruleanCityScript_1955d call CeruleanCityScript_1955d
ld a, $f0 ld a, $f0
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld hl, wd75a SetEvent EVENT_098
set 0, [hl]
ld a, $1 ld a, $1
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
@ -252,8 +248,7 @@ CeruleanCityTextPointers: ; 1962d (6:562d)
CeruleanCityText1: ; 1964f (6:564f) CeruleanCityText1: ; 1964f (6:564f)
TX_ASM TX_ASM
ld a, [wd75a] ; rival battle flag CheckEvent EVENT_098
bit 0, a
; do pre-battle text ; do pre-battle text
jr z, .PreBattleText jr z, .PreBattleText
; or talk about bill ; or talk about bill
@ -284,8 +279,7 @@ CeruleanCityText_19677: ; 19677 (6:5677)
CeruleanCityText2: ; 1967c (6:567c) CeruleanCityText2: ; 1967c (6:567c)
TX_ASM TX_ASM
ld a, [wd75b] CheckEvent EVENT_0A7
bit 7, a
jr nz, .asm_4ca20 jr nz, .asm_4ca20
ld hl, CeruleanCityText_196d9 ld hl, CeruleanCityText_196d9
call PrintText call PrintText

View file

@ -46,16 +46,14 @@ CeruleanGymScript_5c70d: ; 5c70d (17:470d)
ld a, $5 ld a, $5
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd75e SetEvent EVENT_0BF
set 7, [hl]
ld bc, (TM_11 << 8) | 1 ld bc, (TM_11 << 8) | 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld a, $6 ld a, $6
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd75e SetEvent EVENT_0BE
set 6, [hl]
jr .asm_5c736 jr .asm_5c736
.BagFull .BagFull
ld a, $7 ld a, $7
@ -68,9 +66,7 @@ CeruleanGymScript_5c70d: ; 5c70d (17:470d)
set 1, [hl] set 1, [hl]
; deactivate gym trainers ; deactivate gym trainers
ld hl, wd75e SetEvents EVENT_BEAT_CERULEAN_GYM_TRAINER_0, EVENT_BEAT_CERULEAN_GYM_TRAINER_1
set 2, [hl]
set 3, [hl]
jp CeruleanGymScript_5c6ed jp CeruleanGymScript_5c6ed
@ -85,18 +81,18 @@ CeruleanGymTextPointers: ; 5c74a (17:474a)
CeruleanGymTrainerHeaders: ; 5c758 (17:4758) CeruleanGymTrainerHeaders: ; 5c758 (17:4758)
CeruleanGymTrainerHeader0: ; 5c758 (17:4758) CeruleanGymTrainerHeader0: ; 5c758 (17:4758)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_CERULEAN_GYM_TRAINER_0
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd75e ; flag's byte dwEventFlagAddress EVENT_BEAT_CERULEAN_GYM_TRAINER_0
dw CeruleanGymBattleText1 ; TextBeforeBattle dw CeruleanGymBattleText1 ; TextBeforeBattle
dw CeruleanGymAfterBattleText1 ; TextAfterBattle dw CeruleanGymAfterBattleText1 ; TextAfterBattle
dw CeruleanGymEndBattleText1 ; TextEndBattle dw CeruleanGymEndBattleText1 ; TextEndBattle
dw CeruleanGymEndBattleText1 ; TextEndBattle dw CeruleanGymEndBattleText1 ; TextEndBattle
CeruleanGymTrainerHeader1: ; 5c764 (17:4764) CeruleanGymTrainerHeader1: ; 5c764 (17:4764)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_CERULEAN_GYM_TRAINER_1
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd75e ; flag's byte dwEventFlagAddress EVENT_BEAT_CERULEAN_GYM_TRAINER_1
dw CeruleanGymBattleText2 ; TextBeforeBattle dw CeruleanGymBattleText2 ; TextBeforeBattle
dw CeruleanGymAfterBattleText2 ; TextAfterBattle dw CeruleanGymAfterBattleText2 ; TextAfterBattle
dw CeruleanGymEndBattleText2 ; TextEndBattle dw CeruleanGymEndBattleText2 ; TextEndBattle
@ -106,10 +102,9 @@ CeruleanGymTrainerHeader1: ; 5c764 (17:4764)
CeruleanGymText1: ; 5c771 (17:4771) CeruleanGymText1: ; 5c771 (17:4771)
TX_ASM TX_ASM
ld a, [wd75e] CheckEvent EVENT_0BF
bit 7, a
jr z, .asm_5c78d jr z, .asm_5c78d
bit 6, a CheckEventReuseA EVENT_0BE
jr nz, .asm_5c785 jr nz, .asm_5c785
call z, CeruleanGymScript_5c70d call z, CeruleanGymScript_5c70d
call DisableWaitingAfterTextDisplay call DisableWaitingAfterTextDisplay
@ -203,8 +198,7 @@ CeruleanGymAfterBattleText2: ; 5c80c (17:480c)
CeruleanGymText4: ; 5c811 (17:4811) CeruleanGymText4: ; 5c811 (17:4811)
TX_ASM TX_ASM
ld a, [wd75e] CheckEvent EVENT_0BF
bit 7, a
jr nz, .asm_5c821 jr nz, .asm_5c821
ld hl, CeruleanGymText_5c82a ld hl, CeruleanGymText_5c82a
call PrintText call PrintText

View file

@ -15,8 +15,7 @@ CinnabarGymScript_75759: ; 75759 (1d:5759)
bit 5, [hl] bit 5, [hl]
res 5, [hl] res 5, [hl]
call nz, Func_3ead call nz, Func_3ead
ld hl, wd79b ResetEvent EVENT_2A7
res 7, [hl]
ret ret
CinnabarGymScript_75772: ; 75772 (1d:5772) CinnabarGymScript_75772: ; 75772 (1d:5772)
ld hl, Gym7CityName ld hl, Gym7CityName
@ -98,9 +97,10 @@ CinnabarGymScript2: ; 757f6 (1d:57f6)
jp z, CinnabarGymScript_75792 jp z, CinnabarGymScript_75792
ld a, [wTrainerHeaderFlagBit] ld a, [wTrainerHeaderFlagBit]
ld [$ffdb], a ld [$ffdb], a
AdjustEventBit EVENT_29A, 2
ld c, a ld c, a
ld b, FLAG_TEST ld b, FLAG_TEST
ld hl, wd79a EventFlagAddress hl, EVENT_29A
call CinnabarGymScript_757f1 call CinnabarGymScript_757f1
ld a, c ld a, c
and a and a
@ -112,15 +112,17 @@ CinnabarGymScript2: ; 757f6 (1d:57f6)
.asm_7581b .asm_7581b
ld a, [wTrainerHeaderFlagBit] ld a, [wTrainerHeaderFlagBit]
ld [$ffdb], a ld [$ffdb], a
AdjustEventBit EVENT_29A, 2
ld c, a ld c, a
ld b, FLAG_SET ld b, FLAG_SET
ld hl, wd79a EventFlagAddress hl, EVENT_29A
call CinnabarGymScript_757f1 call CinnabarGymScript_757f1
ld a, [wTrainerHeaderFlagBit] ld a, [wTrainerHeaderFlagBit]
sub $2 sub $2
AdjustEventBit EVENT_2A8, 0
ld c, a ld c, a
ld b, FLAG_SET ld b, FLAG_SET
ld hl, wd79c EventFlagAddress hl, EVENT_2A8
call CinnabarGymScript_757f1 call CinnabarGymScript_757f1
call Func_3ead call Func_3ead
xor a xor a
@ -141,16 +143,14 @@ CinnabarGymScript3_75857: ; 75857 (1d:5857)
ld a, $a ld a, $a
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd79a SetEvent EVENT_299
set 1, [hl]
ld bc, (TM_38 << 8) | 1 ld bc, (TM_38 << 8) | 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld a, $b ld a, $b
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd79a SetEvent EVENT_298
set 0, [hl]
jr .asm_75880 jr .asm_75880
.BagFull .BagFull
ld a, $c ld a, $c
@ -163,11 +163,7 @@ CinnabarGymScript3_75857: ; 75857 (1d:5857)
set 6, [hl] set 6, [hl]
; deactivate gym trainers ; deactivate gym trainers
ld a, [wd79a] SetEventRange EVENT_29A, EVENT_2A0
or %11111100
ld [wd79a], a
ld hl, wd79b
set 0, [hl]
ld hl, wd126 ld hl, wd126
set 5, [hl] set 5, [hl]
@ -210,10 +206,9 @@ CinnabarGymScript_758b7: ; 758b7 (1d:58b7)
CinnabarGymText1: ; 758df (1d:58df) CinnabarGymText1: ; 758df (1d:58df)
TX_ASM TX_ASM
ld a, [wd79a] CheckEvent EVENT_299
bit 1, a
jr z, .asm_d9332 jr z, .asm_d9332
bit 0, a CheckEventReuseA EVENT_298
jr nz, .asm_3012f jr nz, .asm_3012f
call z, CinnabarGymScript3_75857 call z, CinnabarGymScript3_75857
call DisableWaitingAfterTextDisplay call DisableWaitingAfterTextDisplay
@ -263,8 +258,7 @@ TM38NoRoomText: ; 75934 (1d:5934)
CinnabarGymText2: ; 75939 (1d:5939) CinnabarGymText2: ; 75939 (1d:5939)
TX_ASM TX_ASM
call CinnabarGymScript_757a0 call CinnabarGymScript_757a0
ld a, [wd79a] CheckEvent EVENT_29A
bit 2, a
jr nz, .asm_46bb4 jr nz, .asm_46bb4
ld hl, CinnabarGymText_7595f ld hl, CinnabarGymText_7595f
call PrintText call PrintText
@ -292,8 +286,7 @@ CinnabarGymText_75969: ; 75969 (1d:5969)
CinnabarGymText3: ; 7596e (1d:596e) CinnabarGymText3: ; 7596e (1d:596e)
TX_ASM TX_ASM
call CinnabarGymScript_757a0 call CinnabarGymScript_757a0
ld a, [wd79a] CheckEvent EVENT_29B
bit 3, a
jr nz, .asm_4b406 jr nz, .asm_4b406
ld hl, CinnabarGymText_75994 ld hl, CinnabarGymText_75994
call PrintText call PrintText
@ -321,8 +314,7 @@ CinnabarGymText_7599e: ; 7599e (1d:599e)
CinnabarGymText4: ; 759a3 (1d:59a3) CinnabarGymText4: ; 759a3 (1d:59a3)
TX_ASM TX_ASM
call CinnabarGymScript_757a0 call CinnabarGymScript_757a0
ld a, [wd79a] CheckEvent EVENT_29C
bit 4, a
jr nz, .asm_c0673 jr nz, .asm_c0673
ld hl, CinnabarGymText_759c9 ld hl, CinnabarGymText_759c9
call PrintText call PrintText
@ -350,8 +342,7 @@ CinnabarGymText_759d3: ; 759d3 (1d:59d3)
CinnabarGymText5: ; 759d8 (1d:59d8) CinnabarGymText5: ; 759d8 (1d:59d8)
TX_ASM TX_ASM
call CinnabarGymScript_757a0 call CinnabarGymScript_757a0
ld a, [wd79a] CheckEvent EVENT_29D
bit 5, a
jr nz, .asm_5cfd7 jr nz, .asm_5cfd7
ld hl, CinnabarGymText_759fe ld hl, CinnabarGymText_759fe
call PrintText call PrintText
@ -379,8 +370,7 @@ CinnabarGymText_75a08: ; 75a08 (1d:5a08)
CinnabarGymText6: ; 75a0d (1d:5a0d) CinnabarGymText6: ; 75a0d (1d:5a0d)
TX_ASM TX_ASM
call CinnabarGymScript_757a0 call CinnabarGymScript_757a0
ld a, [wd79a] CheckEvent EVENT_29E
bit 6, a
jr nz, .asm_776b4 jr nz, .asm_776b4
ld hl, CinnabarGymText_75a33 ld hl, CinnabarGymText_75a33
call PrintText call PrintText
@ -408,8 +398,7 @@ CinnabarGymText_75a3d: ; 75a3d (1d:5a3d)
CinnabarGymText7: ; 75a42 (1d:5a42) CinnabarGymText7: ; 75a42 (1d:5a42)
TX_ASM TX_ASM
call CinnabarGymScript_757a0 call CinnabarGymScript_757a0
ld a, [wd79a] CheckEvent EVENT_29F
bit 7, a
jr nz, .asm_2f755 jr nz, .asm_2f755
ld hl, CinnabarGymText_75a68 ld hl, CinnabarGymText_75a68
call PrintText call PrintText
@ -437,8 +426,7 @@ CinnabarGymText_75a72: ; 75a72 (1d:5a72)
CinnabarGymText8: ; 75a77 (1d:5a77) CinnabarGymText8: ; 75a77 (1d:5a77)
TX_ASM TX_ASM
call CinnabarGymScript_757a0 call CinnabarGymScript_757a0
ld a, [wd79b] CheckEvent EVENT_2A0
bit 0, a
jr nz, .asm_d87be jr nz, .asm_d87be
ld hl, CinnabarGymText_75a9d ld hl, CinnabarGymText_75a9d
call PrintText call PrintText
@ -465,8 +453,7 @@ CinnabarGymText_75aa7: ; 75aa7 (1d:5aa7)
CinnabarGymText9: ; 75aac (1d:5aac) CinnabarGymText9: ; 75aac (1d:5aac)
TX_ASM TX_ASM
ld a, [wd79a] CheckEvent EVENT_299
bit 1, a
jr nz, .asm_627d9 jr nz, .asm_627d9
ld hl, CinnabarGymText_75ac2 ld hl, CinnabarGymText_75ac2
jr .asm_0b11d jr .asm_0b11d

View file

@ -2,10 +2,8 @@ CinnabarIslandScript: ; 1ca19 (7:4a19)
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld hl, wd126 ld hl, wd126
set 5, [hl] set 5, [hl]
ld hl, wd796 ResetEvent EVENT_278
res 0, [hl] ResetEvent EVENT_2E1
ld hl, wd7a3
res 1, [hl]
ld hl, CinnabarIslandScriptPointers ld hl, CinnabarIslandScriptPointers
ld a, [W_CINNABARISLANDCURSCRIPT] ld a, [W_CINNABARISLANDCURSCRIPT]
jp CallFunctionInTable jp CallFunctionInTable

View file

@ -12,8 +12,7 @@ CopycatsHouse2FTextPointers: ; 5cc74 (17:4c74)
CopycatsHouse2FText1: ; 5cc82 (17:4c82) CopycatsHouse2FText1: ; 5cc82 (17:4c82)
TX_ASM TX_ASM
ld a, [wd7af] CheckEvent EVENT_340
bit 0, a
jr nz, .asm_7ccf3 jr nz, .asm_7ccf3
ld a, $1 ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld [wDoNotWaitForButtonPressAfterDisplayingText], a
@ -32,8 +31,7 @@ CopycatsHouse2FText1: ; 5cc82 (17:4c82)
ld a, POKE_DOLL ld a, POKE_DOLL
ld [$ffdb], a ld [$ffdb], a
callba RemoveItemByID callba RemoveItemByID
ld hl, wd7af SetEvent EVENT_340
set 0, [hl]
jr .asm_62ecd jr .asm_62ecd
.BagFull .BagFull
ld hl, TM31NoRoomText ld hl, TM31NoRoomText

View file

@ -3,8 +3,7 @@ FanClubScript: ; 59b70 (16:5b70)
FanClubBikeInBag: FanClubBikeInBag:
; check if any bike paraphernalia in bag ; check if any bike paraphernalia in bag
ld a, [wd771] CheckEvent EVENT_GOT_BIKE_VOUCHER
bit 1, a ; got bike voucher?
ret nz ret nz
ld b, BICYCLE ld b, BICYCLE
call IsItemInBag call IsItemInBag
@ -25,19 +24,16 @@ FanClubTextPointers: ; 59b84 (16:5b84)
FanClubText1: FanClubText1:
; pikachu fan ; pikachu fan
TX_ASM TX_ASM
ld a, [wd771] CheckEvent EVENT_157
bit 7, a
jr nz, .mineisbetter jr nz, .mineisbetter
ld hl, .normaltext ld hl, .normaltext
call PrintText call PrintText
ld hl, wd771 SetEvent EVENT_156
set 6, [hl]
jr .done jr .done
.mineisbetter .mineisbetter
ld hl, .bettertext ld hl, .bettertext
call PrintText call PrintText
ld hl, wd771 ResetEvent EVENT_157
res 7, [hl]
.done .done
jp TextScriptEnd jp TextScriptEnd
@ -52,19 +48,16 @@ FanClubText1:
FanClubText2: FanClubText2:
; seel fan ; seel fan
TX_ASM TX_ASM
ld a, [wd771] CheckEvent EVENT_156
bit 6, a
jr nz, .mineisbetter jr nz, .mineisbetter
ld hl, .normaltext ld hl, .normaltext
call PrintText call PrintText
ld hl, wd771 SetEvent EVENT_157
set 7, [hl]
jr .done jr .done
.mineisbetter .mineisbetter
ld hl, .bettertext ld hl, .bettertext
call PrintText call PrintText
ld hl, wd771 ResetEvent EVENT_156
res 6, [hl]
.done .done
jp TextScriptEnd jp TextScriptEnd
@ -125,8 +118,7 @@ FanClubText5:
jr nc, .BagFull jr nc, .BagFull
ld hl, .receivedvouchertext ld hl, .receivedvouchertext
call PrintText call PrintText
ld hl, wd771 SetEvent EVENT_GOT_BIKE_VOUCHER
set 1, [hl]
jr .done jr .done
.BagFull .BagFull
ld hl, .bagfulltext ld hl, .bagfulltext

View file

@ -21,15 +21,13 @@ FightingDojoScriptPointers: ; 5cd7b (17:4d7b)
dw FightingDojoScript3 dw FightingDojoScript3
FightingDojoScript1: ; 5cd83 (17:4d83) FightingDojoScript1: ; 5cd83 (17:4d83)
ld a, [wd7b1] CheckEvent EVENT_350
bit 0, a
ret nz ret nz
call CheckFightingMapTrainers call CheckFightingMapTrainers
ld a, [wTrainerHeaderFlagBit] ld a, [wTrainerHeaderFlagBit]
and a and a
ret nz ret nz
ld a, [wd7b1] CheckEvent EVENT_351
bit 1, a
ret nz ret nz
xor a xor a
ld [hJoyHeld], a ld [hJoyHeld], a
@ -72,9 +70,7 @@ FightingDojoScript3: ; 5cdc6 (17:4dc6)
.asm_5cde4 .asm_5cde4
ld a, $f0 ld a, $f0
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld a, [wd7b1] SetEventRange EVENT_351, EVENT_BEAT_FIGHTING_DOJO_TRAINER_3
or $3e
ld [wd7b1], a
ld a, $8 ld a, $8
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
@ -96,36 +92,36 @@ FightingDojoTextPointers: ; 5ce03 (17:4e03)
FightingDojoTrainerHeaders: ; 5ce13 (17:4e13) FightingDojoTrainerHeaders: ; 5ce13 (17:4e13)
FightingDojoTrainerHeader0: ; 5ce13 (17:4e13) FightingDojoTrainerHeader0: ; 5ce13 (17:4e13)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_FIGHTING_DOJO_TRAINER_0
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7b1 ; flag's byte dwEventFlagAddress EVENT_BEAT_FIGHTING_DOJO_TRAINER_0
dw FightingDojoBattleText1 ; TextBeforeBattle dw FightingDojoBattleText1 ; TextBeforeBattle
dw FightingDojoAfterBattleText1 ; TextAfterBattle dw FightingDojoAfterBattleText1 ; TextAfterBattle
dw FightingDojoEndBattleText1 ; TextEndBattle dw FightingDojoEndBattleText1 ; TextEndBattle
dw FightingDojoEndBattleText1 ; TextEndBattle dw FightingDojoEndBattleText1 ; TextEndBattle
FightingDojoTrainerHeader1: ; 5ce1f (17:4e1f) FightingDojoTrainerHeader1: ; 5ce1f (17:4e1f)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_FIGHTING_DOJO_TRAINER_1
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7b1 ; flag's byte dwEventFlagAddress EVENT_BEAT_FIGHTING_DOJO_TRAINER_1
dw FightingDojoBattleText2 ; TextBeforeBattle dw FightingDojoBattleText2 ; TextBeforeBattle
dw FightingDojoAfterBattleText2 ; TextAfterBattle dw FightingDojoAfterBattleText2 ; TextAfterBattle
dw FightingDojoEndBattleText2 ; TextEndBattle dw FightingDojoEndBattleText2 ; TextEndBattle
dw FightingDojoEndBattleText2 ; TextEndBattle dw FightingDojoEndBattleText2 ; TextEndBattle
FightingDojoTrainerHeader2: ; 5ce2b (17:4e2b) FightingDojoTrainerHeader2: ; 5ce2b (17:4e2b)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_FIGHTING_DOJO_TRAINER_2
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7b1 ; flag's byte dwEventFlagAddress EVENT_BEAT_FIGHTING_DOJO_TRAINER_2
dw FightingDojoBattleText3 ; TextBeforeBattle dw FightingDojoBattleText3 ; TextBeforeBattle
dw FightingDojoAfterBattleText3 ; TextAfterBattle dw FightingDojoAfterBattleText3 ; TextAfterBattle
dw FightingDojoEndBattleText3 ; TextEndBattle dw FightingDojoEndBattleText3 ; TextEndBattle
dw FightingDojoEndBattleText3 ; TextEndBattle dw FightingDojoEndBattleText3 ; TextEndBattle
FightingDojoTrainerHeader3: ; 5ce37 (17:4e37) FightingDojoTrainerHeader3: ; 5ce37 (17:4e37)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_FIGHTING_DOJO_TRAINER_3
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7b1 ; flag's byte dwEventFlagAddress EVENT_BEAT_FIGHTING_DOJO_TRAINER_3
dw FightingDojoBattleText4 ; TextBeforeBattle dw FightingDojoBattleText4 ; TextBeforeBattle
dw FightingDojoAfterBattleText4 ; TextAfterBattle dw FightingDojoAfterBattleText4 ; TextAfterBattle
dw FightingDojoEndBattleText4 ; TextEndBattle dw FightingDojoEndBattleText4 ; TextEndBattle
@ -135,10 +131,9 @@ FightingDojoTrainerHeader3: ; 5ce37 (17:4e37)
FightingDojoText1: ; 5ce44 (17:4e44) FightingDojoText1: ; 5ce44 (17:4e44)
TX_ASM TX_ASM
ld a, [wd7b1] CheckEvent EVENT_350
bit 0, a
jp nz, .continue1 jp nz, .continue1
bit 1, a CheckEventReuseA EVENT_351
jp nz, .continue2 jp nz, .continue2
ld hl, FightingDojoText_5ce8e ld hl, FightingDojoText_5ce8e
call PrintText call PrintText
@ -257,8 +252,7 @@ FightingDojoAfterBattleText4: ; 5cf01 (17:4f01)
FightingDojoText6: ; 5cf06 (17:4f06) FightingDojoText6: ; 5cf06 (17:4f06)
; Hitmonlee Poké Ball ; Hitmonlee Poké Ball
TX_ASM TX_ASM
ld a, [wd7b1] CheckEitherEventSet EVENT_356, EVENT_357
and %11000000
jr z, .GetMon jr z, .GetMon
ld hl, OtherHitmonText ld hl, OtherHitmonText
call PrintText call PrintText
@ -282,9 +276,7 @@ FightingDojoText6: ; 5cf06 (17:4f06)
ld a, HS_FIGHTING_DOJO_GIFT_1 ld a, HS_FIGHTING_DOJO_GIFT_1
ld [wcc4d], a ld [wcc4d], a
predef HideObject predef HideObject
ld hl, wd7b1 SetEvents EVENT_356, EVENT_350
set 6, [hl]
set 0, [hl]
.done .done
jp TextScriptEnd jp TextScriptEnd
@ -295,8 +287,7 @@ WantHitmonleeText: ; 5cf49 (17:4f49)
FightingDojoText7: ; 5cf4e (17:4f4e) FightingDojoText7: ; 5cf4e (17:4f4e)
; Hitmonchan Poké Ball ; Hitmonchan Poké Ball
TX_ASM TX_ASM
ld a, [wd7b1] CheckEitherEventSet EVENT_356, EVENT_357
and %11000000
jr z, .GetMon jr z, .GetMon
ld hl, OtherHitmonText ld hl, OtherHitmonText
call PrintText call PrintText
@ -315,9 +306,7 @@ FightingDojoText7: ; 5cf4e (17:4f4e)
ld c,30 ld c,30
call GivePokemon call GivePokemon
jr nc, .done jr nc, .done
ld hl, wd7b1 SetEvents EVENT_357, EVENT_350
set 7, [hl]
set 0, [hl]
; once Poké Ball is taken, hide sprite ; once Poké Ball is taken, hide sprite
ld a, HS_FIGHTING_DOJO_GIFT_2 ld a, HS_FIGHTING_DOJO_GIFT_2

View file

@ -135,10 +135,9 @@ FuchsiaCityLaprasText: ; 19aef (6:5aef)
FuchsiaCityText24: ; 19af4 (6:5af4) FuchsiaCityText24: ; 19af4 (6:5af4)
TX_ASM TX_ASM
ld a, [wd7f6] CheckEvent EVENT_57E
bit 6, a
jr nz, .asm_3b4e8 jr nz, .asm_3b4e8
bit 7, a CheckEventReuseA EVENT_57F
jr nz, .asm_667d5 jr nz, .asm_667d5
ld hl, FuchsiaCityText_19b2a ld hl, FuchsiaCityText_19b2a
call PrintText call PrintText

View file

@ -46,16 +46,14 @@ FuchsiaGymScript3_75497: ; 75497 (1d:5497)
ld a, $9 ld a, $9
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd792 SetEvent EVENT_259
set 1, [hl]
ld bc, (TM_06 << 8) | 1 ld bc, (TM_06 << 8) | 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld a, $a ld a, $a
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd792 SetEvent EVENT_258
set 0, [hl]
jr .asm_754c0 jr .asm_754c0
.BagFull .BagFull
ld a, $b ld a, $b
@ -68,9 +66,7 @@ FuchsiaGymScript3_75497: ; 75497 (1d:5497)
set 4, [hl] set 4, [hl]
; deactivate gym trainers ; deactivate gym trainers
ld a, [wd792] SetEventRange EVENT_BEAT_FUCHSIA_GYM_TRAINER_0, EVENT_BEAT_FUCHSIA_GYM_TRAINER_6
or %11111100
ld [wd792], a
jp FuchsiaGymScript_75477 jp FuchsiaGymScript_75477
@ -89,54 +85,54 @@ FuchsiaGymTextPointers: ; 754d5 (1d:54d5)
FuchsiaGymTrainerHeaders: ; 754eb (1d:54eb) FuchsiaGymTrainerHeaders: ; 754eb (1d:54eb)
FuchsiaGymTrainerHeader0: ; 754eb (1d:54eb) FuchsiaGymTrainerHeader0: ; 754eb (1d:54eb)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_0
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd792 ; flag's byte dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_0
dw FuchsiaGymBattleText1 ; TextBeforeBattle dw FuchsiaGymBattleText1 ; TextBeforeBattle
dw FuchsiaGymAfterBattleText1 ; TextAfterBattle dw FuchsiaGymAfterBattleText1 ; TextAfterBattle
dw FuchsiaGymEndBattleText1 ; TextEndBattle dw FuchsiaGymEndBattleText1 ; TextEndBattle
dw FuchsiaGymEndBattleText1 ; TextEndBattle dw FuchsiaGymEndBattleText1 ; TextEndBattle
FuchsiaGymTrainerHeader2: ; 754f7 (1d:54f7) FuchsiaGymTrainerHeader2: ; 754f7 (1d:54f7)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_2
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd792 ; flag's byte dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_2
dw FuchsiaGymBattleText2 ; TextBeforeBattle dw FuchsiaGymBattleText2 ; TextBeforeBattle
dw FuchsiaGymAfterBattleText2 ; TextAfterBattle dw FuchsiaGymAfterBattleText2 ; TextAfterBattle
dw FuchsiaGymEndBattleText2 ; TextEndBattle dw FuchsiaGymEndBattleText2 ; TextEndBattle
dw FuchsiaGymEndBattleText2 ; TextEndBattle dw FuchsiaGymEndBattleText2 ; TextEndBattle
FuchsiaGymTrainerHeader3: ; 75503 (1d:5503) FuchsiaGymTrainerHeader3: ; 75503 (1d:5503)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_3
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd792 ; flag's byte dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_3
dw FuchsiaGymBattleText3 ; TextBeforeBattle dw FuchsiaGymBattleText3 ; TextBeforeBattle
dw FuchsiaGymAfterBattleText3 ; TextAfterBattle dw FuchsiaGymAfterBattleText3 ; TextAfterBattle
dw FuchsiaGymEndBattleText3 ; TextEndBattle dw FuchsiaGymEndBattleText3 ; TextEndBattle
dw FuchsiaGymEndBattleText3 ; TextEndBattle dw FuchsiaGymEndBattleText3 ; TextEndBattle
FuchsiaGymTrainerHeader4: ; 7550f (1d:550f) FuchsiaGymTrainerHeader4: ; 7550f (1d:550f)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_4
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd792 ; flag's byte dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_4
dw FuchsiaGymBattleText4 ; TextBeforeBattle dw FuchsiaGymBattleText4 ; TextBeforeBattle
dw FuchsiaGymAfterBattleText4 ; TextAfterBattle dw FuchsiaGymAfterBattleText4 ; TextAfterBattle
dw FuchsiaGymEndBattleText4 ; TextEndBattle dw FuchsiaGymEndBattleText4 ; TextEndBattle
dw FuchsiaGymEndBattleText4 ; TextEndBattle dw FuchsiaGymEndBattleText4 ; TextEndBattle
FuchsiaGymTrainerHeader5: ; 7551b (1d:551b) FuchsiaGymTrainerHeader5: ; 7551b (1d:551b)
db $6 ; flag's bit dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_5
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd792 ; flag's byte dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_5
dw FuchsiaGymBattleText5 ; TextBeforeBattle dw FuchsiaGymBattleText5 ; TextBeforeBattle
dw FuchsiaGymAfterBattleText5 ; TextAfterBattle dw FuchsiaGymAfterBattleText5 ; TextAfterBattle
dw FuchsiaGymEndBattleText5 ; TextEndBattle dw FuchsiaGymEndBattleText5 ; TextEndBattle
dw FuchsiaGymEndBattleText5 ; TextEndBattle dw FuchsiaGymEndBattleText5 ; TextEndBattle
FuchsiaGymTrainerHeader6: ; 75527 (1d:5527) FuchsiaGymTrainerHeader6: ; 75527 (1d:5527)
db $7 ; flag's bit dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_6
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd792 ; flag's byte dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_6
dw FuchsiaGymBattleText6 ; TextBeforeBattle dw FuchsiaGymBattleText6 ; TextBeforeBattle
dw FuchsiaGymAfterBattleText6 ; TextAfterBattle dw FuchsiaGymAfterBattleText6 ; TextAfterBattle
dw FuchsiaGymEndBattleText6 ; TextEndBattle dw FuchsiaGymEndBattleText6 ; TextEndBattle
@ -146,10 +142,9 @@ FuchsiaGymTrainerHeader6: ; 75527 (1d:5527)
FuchsiaGymText1: ; 75534 (1d:5534) FuchsiaGymText1: ; 75534 (1d:5534)
TX_ASM TX_ASM
ld a, [wd792] CheckEvent EVENT_259
bit 1, a
jr z, .asm_181b6 jr z, .asm_181b6
bit 0, a CheckEventReuseA EVENT_258
jr nz, .asm_adc3b jr nz, .asm_adc3b
call z, FuchsiaGymScript3_75497 call z, FuchsiaGymScript3_75497
call DisableWaitingAfterTextDisplay call DisableWaitingAfterTextDisplay
@ -318,8 +313,7 @@ FuchsiaGymAfterBattleText6: ; 75635 (1d:5635)
FuchsiaGymText8: ; 7563a (1d:563a) FuchsiaGymText8: ; 7563a (1d:563a)
TX_ASM TX_ASM
ld a, [wd792] CheckEvent EVENT_259
bit 1, a
ld hl, FuchsiaGymText_75653 ld hl, FuchsiaGymText_75653
jr nz, .asm_50671 jr nz, .asm_50671
ld hl, FuchsiaGymText_7564e ld hl, FuchsiaGymText_7564e

View file

@ -10,14 +10,12 @@ FuchsiaHouse2TextPointers: ; 750b8 (1d:50b8)
FuchsiaHouse2Text1: ; 750c2 (1d:50c2) FuchsiaHouse2Text1: ; 750c2 (1d:50c2)
TX_ASM TX_ASM
ld a, [wd78e] CheckEvent EVENT_238
bit 0, a
jr nz, .subtract jr nz, .subtract
ld b,GOLD_TEETH ld b,GOLD_TEETH
call IsItemInBag call IsItemInBag
jr nz, .asm_3f30f jr nz, .asm_3f30f
ld a, [wd78e] CheckEvent EVENT_239
bit 1, a
jr nz, .asm_60cba jr nz, .asm_60cba
ld hl, WardenGibberishText1 ld hl, WardenGibberishText1
call PrintText call PrintText
@ -36,8 +34,7 @@ FuchsiaHouse2Text1: ; 750c2 (1d:50c2)
ld a, GOLD_TEETH ld a, GOLD_TEETH
ld [$ffdb], a ld [$ffdb], a
callba RemoveItemByID callba RemoveItemByID
ld hl, wd78e SetEvent EVENT_239
set 1, [hl]
.asm_60cba .asm_60cba
ld hl, WardenThankYouText ld hl, WardenThankYouText
call PrintText call PrintText
@ -46,8 +43,7 @@ FuchsiaHouse2Text1: ; 750c2 (1d:50c2)
jr nc, .BagFull jr nc, .BagFull
ld hl, ReceivedHM04Text ld hl, ReceivedHM04Text
call PrintText call PrintText
ld hl, wd78e SetEvent EVENT_238
set 0, [hl]
jr .asm_52039 jr .asm_52039
.subtract .subtract
ld hl, HM04ExplanationText ld hl, HM04ExplanationText

View file

@ -94,8 +94,7 @@ GaryScript3: ; 75fbb (1d:5fbb)
cp $ff cp $ff
jp z, GaryScript_75f29 jp z, GaryScript_75f29
call UpdateSprites call UpdateSprites
ld hl, wd867 SetEvent EVENT_901
set 1, [hl]
ld a, $f0 ld a, $f0
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld a, $1 ld a, $1
@ -249,8 +248,7 @@ GaryTextPointers: ; 760d6 (1d:60d6)
GaryText1: ; 760e0 (1d:60e0) GaryText1: ; 760e0 (1d:60e0)
TX_ASM TX_ASM
ld a, [wd867] CheckEvent EVENT_901
bit 1, a
ld hl, GaryText_760f4 ld hl, GaryText_760f4
jr z, .asm_17e9f jr z, .asm_17e9f
ld hl, GaryText_76103 ld hl, GaryText_76103

View file

@ -39,12 +39,8 @@ HallofFameRoomScript2: ; 5a4bb (16:64bb)
ld [hl], a ld [hl], a
ld [W_LANCECURSCRIPT], a ld [W_LANCECURSCRIPT], a
ld [W_HALLOFFAMEROOMCURSCRIPT], a ld [W_HALLOFFAMEROOMCURSCRIPT], a
ld hl, wd863 ; Elite 4 events
ld [hli], a ResetEventRange EVENT_8E0, EVENT_907, 1
ld [hli], a
ld [hli], a
ld [hli], a
ld [hl], a
xor a xor a
ld [W_HALLOFFAMEROOMCURSCRIPT], a ld [W_HALLOFFAMEROOMCURSCRIPT], a
ld a, PALLET_TOWN ld a, PALLET_TOWN

View file

@ -5,18 +5,13 @@ IndigoPlateauLobbyScript: ; 19c5b (6:5c5b)
bit 6, [hl] bit 6, [hl]
res 6, [hl] res 6, [hl]
ret z ret z
ld hl, wd869 ResetEvent EVENT_917
res 7, [hl]
ld hl, wd734 ld hl, wd734
bit 1, [hl] bit 1, [hl]
res 1, [hl] res 1, [hl]
ret z ret z
ld hl, wd863 ; Elite 4 events
xor a ResetEventRange EVENT_8E0, EVENT_8FF
ld [hli], a
ld [hli], a
ld [hli], a
ld [hl], a
ret ret
IndigoPlateauLobbyTextPointers: ; 19c7f (6:5c7f) IndigoPlateauLobbyTextPointers: ; 19c7f (6:5c7f)

View file

@ -10,8 +10,7 @@ Lab3TextPointers: ; 75c8a (1d:5c8a)
Lab3Text1: ; 75c94 (1d:5c94) Lab3Text1: ; 75c94 (1d:5c94)
TX_ASM TX_ASM
ld a, [wd7a1] CheckEvent EVENT_2D7
bit 7, a
jr nz, .asm_e551a jr nz, .asm_e551a
ld hl, TM35PreReceiveText ld hl, TM35PreReceiveText
call PrintText call PrintText
@ -20,8 +19,7 @@ Lab3Text1: ; 75c94 (1d:5c94)
jr nc, .BagFull jr nc, .BagFull
ld hl, ReceivedTM35Text ld hl, ReceivedTM35Text
call PrintText call PrintText
ld hl, wd7a1 SetEvent EVENT_2D7
set 7, [hl]
jr .asm_eb896 jr .asm_eb896
.BagFull .BagFull
ld hl, TM35NoRoomText ld hl, TM35NoRoomText

View file

@ -49,8 +49,7 @@ FossilsList: ; 75d68 (1d:5d68)
Lab4Text1: ; 75d6c (1d:5d6c) Lab4Text1: ; 75d6c (1d:5d6c)
TX_ASM TX_ASM
ld a, [wd7a3] CheckEvent EVENT_2E0
bit 0, a
jr nz, .asm_75d96 jr nz, .asm_75d96
ld hl, Lab4Text_75dc6 ld hl, Lab4Text_75dc6
call PrintText call PrintText
@ -75,17 +74,13 @@ Lab4Text1: ; 75d6c (1d:5d6c)
call LoadFossilItemAndMonNameBank1D call LoadFossilItemAndMonNameBank1D
ld hl, Lab4Text_75dd5 ld hl, Lab4Text_75dd5
call PrintText call PrintText
ld hl, wd7a3 SetEvent EVENT_2E2
set 2, [hl]
ld a, [W_FOSSILMON] ld a, [W_FOSSILMON]
ld b, a ld b, a
ld c, 30 ld c, 30
call GivePokemon call GivePokemon
jr nc, .asm_75d93 jr nc, .asm_75d93
ld hl, wd7a3 ResetEvents EVENT_2E0, EVENT_2E1, EVENT_2E2
res 0, [hl]
res 1, [hl]
res 2, [hl]
jr .asm_75d93 jr .asm_75d93
Lab4Text_75dc6: ; 75dc6 (1d:5dc6) Lab4Text_75dc6: ; 75dc6 (1d:5dc6)

View file

@ -13,8 +13,7 @@ LanceScript_5a2c4: ; 5a2c4 (16:62c4)
bit 5, [hl] bit 5, [hl]
res 5, [hl] res 5, [hl]
ret z ret z
ld a, [wd866] CheckEvent EVENT_8FF
bit 7, a
jr nz, .asm_5a2da jr nz, .asm_5a2da
ld a, $31 ld a, $31
ld b, $32 ld b, $32
@ -52,8 +51,7 @@ LanceScript4: ; 5a304 (16:6304)
ret ret
LanceScript0: ; 5a305 (16:6305) LanceScript0: ; 5a305 (16:6305)
ld a, [wd866] CheckEvent EVENT_8FE
bit 6, a
ret nz ret nz
ld hl, CoordsData_5a33e ld hl, CoordsData_5a33e
call ArePlayerCoordsInArray call ArePlayerCoordsInArray
@ -69,9 +67,7 @@ LanceScript0: ; 5a305 (16:6305)
.asm_5a325 .asm_5a325
cp $5 cp $5
jr z, LanceScript_5a35b jr z, LanceScript_5a35b
ld hl, wd866 CheckAndSetEvent EVENT_8FF
bit 7, [hl]
set 7, [hl]
ret nz ret nz
ld hl, wd126 ld hl, wd126
set 5, [hl] set 5, [hl]
@ -133,9 +129,9 @@ LanceTextPointers: ; 5a395 (16:6395)
LanceTrainerHeaders: ; 5a397 (16:6397) LanceTrainerHeaders: ; 5a397 (16:6397)
LanceTrainerHeader0: ; 5a397 (16:6397) LanceTrainerHeader0: ; 5a397 (16:6397)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_LANCES_ROOM_TRAINER_0
db ($0 << 4) ; trainer's view range db ($0 << 4) ; trainer's view range
dw wd866 ; flag's byte dwEventFlagAddress EVENT_BEAT_LANCES_ROOM_TRAINER_0
dw LanceBeforeBattleText ; TextBeforeBattle dw LanceBeforeBattleText ; TextBeforeBattle
dw LanceAfterBattleText ; TextAfterBattle dw LanceAfterBattleText ; TextAfterBattle
dw LanceEndBattleText ; TextEndBattle dw LanceEndBattleText ; TextEndBattle
@ -160,6 +156,5 @@ LanceEndBattleText: ; 5a3b3 (16:63b3)
LanceAfterBattleText: ; 5a3b8 (16:63b8) LanceAfterBattleText: ; 5a3b8 (16:63b8)
TX_FAR _LanceAfterBattleText TX_FAR _LanceAfterBattleText
TX_ASM TX_ASM
ld hl, wd866 SetEvent EVENT_8FE
set 6, [hl]
jp TextScriptEnd jp TextScriptEnd

View file

@ -12,8 +12,7 @@ LavenderHouse1TextPointers: ; 1d8ac (7:58ac)
LavenderHouse1Text1: ; 1d8b8 (7:58b8) LavenderHouse1Text1: ; 1d8b8 (7:58b8)
TX_ASM TX_ASM
ld a, [wd7e0] CheckEvent EVENT_4CF
bit 7, a
jr nz, .asm_72e5d jr nz, .asm_72e5d
ld hl, LavenderHouse1Text_1d8d1 ld hl, LavenderHouse1Text_1d8d1
call PrintText call PrintText
@ -34,8 +33,7 @@ LavenderHouse1Text_1d8d6: ; 1d8d6 (7:58d6)
LavenderHouse1Text2: ; 1d8db (7:58db) LavenderHouse1Text2: ; 1d8db (7:58db)
TX_ASM TX_ASM
ld a, [wd7e0] CheckEvent EVENT_4CF
bit 7, a
jr nz, .asm_06470 jr nz, .asm_06470
ld hl, LavenderHouse1Text_1d8f4 ld hl, LavenderHouse1Text_1d8f4
call PrintText call PrintText
@ -70,8 +68,7 @@ LavenderHouse1Text4: ; 1d90b (7:590b)
LavenderHouse1Text5: ; 1d918 (7:5918) LavenderHouse1Text5: ; 1d918 (7:5918)
TX_ASM TX_ASM
ld a, [wd76c] CheckEvent EVENT_128
bit 0, a
jr nz, .asm_15ac2 jr nz, .asm_15ac2
ld hl, LavenderHouse1Text_1d94c ld hl, LavenderHouse1Text_1d94c
call PrintText call PrintText
@ -80,8 +77,7 @@ LavenderHouse1Text5: ; 1d918 (7:5918)
jr nc, .BagFull jr nc, .BagFull
ld hl, ReceivedFluteText ld hl, ReceivedFluteText
call PrintText call PrintText
ld hl, wd76c SetEvent EVENT_128
set 0, [hl]
jr .asm_da749 jr .asm_da749
.BagFull .BagFull
ld hl, FluteNoRoomText ld hl, FluteNoRoomText

View file

@ -15,8 +15,7 @@ LavenderHouse2Text1: ; 1d9b6 (7:59b6)
LavenderHouse2Text2: ; 1d9c3 (7:59c3) LavenderHouse2Text2: ; 1d9c3 (7:59c3)
TX_ASM TX_ASM
ld a, [wd7e0] CheckEvent EVENT_4CF
bit 7, a
jr nz, .asm_65711 jr nz, .asm_65711
ld hl, LavenderHouse2Text_1d9dc ld hl, LavenderHouse2Text_1d9dc
call PrintText call PrintText

View file

@ -12,8 +12,7 @@ LavenderMartText2: ; 5c935 (17:4935)
LavenderMartText3: ; 5c93a (17:493a) LavenderMartText3: ; 5c93a (17:493a)
TX_ASM TX_ASM
ld a, [wd7e0] CheckEvent EVENT_4CF
bit 7, a
jr nz, .asm_c88d4 jr nz, .asm_c88d4
ld hl, LavenderMart_5c953 ld hl, LavenderMart_5c953
call PrintText call PrintText

View file

@ -15,8 +15,7 @@ LoreleiScript_76191: ; 76191 (1d:6191)
ret z ret z
ld hl, wd734 ld hl, wd734
set 1, [hl] set 1, [hl]
ld a, [wd863] CheckEvent EVENT_BEAT_LORELEIS_ROOM_TRAINER_0
bit 1, a
jr z, .asm_761a9 jr z, .asm_761a9
ld a, $5 ld a, $5
jr .asm_761ab jr .asm_761ab
@ -71,9 +70,7 @@ LoreleiScript0: ; 761e2 (1d:61e2)
ld a, [wCoordIndex] ld a, [wCoordIndex]
cp $3 cp $3
jr c, .asm_76206 jr c, .asm_76206
ld hl, wd863 CheckAndSetEvent EVENT_8E6
bit 6, [hl]
set 6, [hl]
jr z, LoreleiScript_761c6 jr z, LoreleiScript_761c6
.asm_76206 .asm_76206
ld a, $2 ld a, $2
@ -121,9 +118,9 @@ LoreleiTextPointers: ; 76251 (1d:6251)
LoreleiTrainerHeaders: ; 76255 (1d:6255) LoreleiTrainerHeaders: ; 76255 (1d:6255)
LoreleiTrainerHeader0: ; 76255 (1d:6255) LoreleiTrainerHeader0: ; 76255 (1d:6255)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_LORELEIS_ROOM_TRAINER_0
db ($0 << 4) ; trainer's view range db ($0 << 4) ; trainer's view range
dw wd863 ; flag's byte dwEventFlagAddress EVENT_BEAT_LORELEIS_ROOM_TRAINER_0
dw LoreleiBeforeBattleText ; TextBeforeBattle dw LoreleiBeforeBattleText ; TextBeforeBattle
dw LoreleiAfterBattleText ; TextAfterBattle dw LoreleiAfterBattleText ; TextAfterBattle
dw LoreleiEndBattleText ; TextEndBattle dw LoreleiEndBattleText ; TextEndBattle

View file

@ -13,8 +13,7 @@ Mansion1Subscript1: ; 442c5 (11:42c5)
bit 5, [hl] bit 5, [hl]
res 5, [hl] res 5, [hl]
ret z ret z
ld a, [wd796] CheckEvent EVENT_278
bit 0, a
jr nz, .asm_442ec jr nz, .asm_442ec
ld bc, $060c ld bc, $060c
call Mansion1Script_4430b call Mansion1Script_4430b
@ -69,9 +68,9 @@ Mansion1TextPointers: ; 4432c (11:432c)
Mansion1TrainerHeaders: ; 44334 (11:4334) Mansion1TrainerHeaders: ; 44334 (11:4334)
Mansion1TrainerHeader0: ; 44334 (11:4334) Mansion1TrainerHeader0: ; 44334 (11:4334)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_MANSION_1_TRAINER_0
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd798 ; flag's byte dwEventFlagAddress EVENT_BEAT_MANSION_1_TRAINER_0
dw Mansion1BattleText2 ; TextBeforeBattle dw Mansion1BattleText2 ; TextBeforeBattle
dw Mansion1AfterBattleText2 ; TextAfterBattle dw Mansion1AfterBattleText2 ; TextAfterBattle
dw Mansion1EndBattleText2 ; TextEndBattle dw Mansion1EndBattleText2 ; TextEndBattle
@ -113,11 +112,9 @@ Mansion1Text4: ; 4435a (11:435a)
call PrintText call PrintText
ld a, SFX_GO_INSIDE ld a, SFX_GO_INSIDE
call PlaySound call PlaySound
ld hl, wd796 CheckAndSetEvent EVENT_278
bit 0, [hl]
set 0, [hl]
jr z, .asm_44392 jr z, .asm_44392
res 0, [hl] ResetEventReuseHL EVENT_278
jr .asm_44392 jr .asm_44392
.asm_4438c .asm_4438c
ld hl, MansionSwitchNotPressedText ld hl, MansionSwitchNotPressedText

View file

@ -13,8 +13,7 @@ Mansion2Script_51fee: ; 51fee (14:5fee)
bit 5, [hl] bit 5, [hl]
res 5, [hl] res 5, [hl]
ret z ret z
ld a, [wd796] CheckEvent EVENT_278
bit 0, a
jr nz, .asm_52016 jr nz, .asm_52016
ld a, $e ld a, $e
ld bc, $204 ld bc, $204
@ -66,9 +65,9 @@ Mansion2TextPointers: ; 5204d (14:604d)
Mansion2TrainerHeaders: ; 52057 (14:6057) Mansion2TrainerHeaders: ; 52057 (14:6057)
Mansion2TrainerHeader0: ; 52057 (14:6057) Mansion2TrainerHeader0: ; 52057 (14:6057)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_MANSION_2_TRAINER_0
db ($0 << 4) ; trainer's view range db ($0 << 4) ; trainer's view range
dw wd847 ; flag's byte dwEventFlagAddress EVENT_BEAT_MANSION_2_TRAINER_0
dw Mansion2BattleText1 ; TextBeforeBattle dw Mansion2BattleText1 ; TextBeforeBattle
dw Mansion2AfterBattleText1 ; TextAfterBattle dw Mansion2AfterBattleText1 ; TextAfterBattle
dw Mansion2EndBattleText1 ; TextEndBattle dw Mansion2EndBattleText1 ; TextEndBattle
@ -119,11 +118,9 @@ Mansion2Text5: ; 52087 (14:6087)
call PrintText call PrintText
ld a, SFX_GO_INSIDE ld a, SFX_GO_INSIDE
call PlaySound call PlaySound
ld hl, wd796 CheckAndSetEvent EVENT_278
bit 0, [hl]
set 0, [hl]
jr z, .asm_520bf jr z, .asm_520bf
res 0, [hl] ResetEventReuseHL EVENT_278
jr .asm_520bf jr .asm_520bf
.asm_520b9 .asm_520b9
ld hl, Mansion2Text_520cc ld hl, Mansion2Text_520cc

View file

@ -13,8 +13,7 @@ Mansion3Script_52204: ; 52204 (14:6204)
bit 5, [hl] bit 5, [hl]
res 5, [hl] res 5, [hl]
ret z ret z
ld a, [wd796] CheckEvent EVENT_278
bit 0, a
jr nz, .asm_52224 jr nz, .asm_52224
ld a, $e ld a, $e
ld bc, $207 ld bc, $207
@ -93,18 +92,18 @@ Mansion3TextPointers: ; 5228a (14:628a)
Mansion3TrainerHeaders: ; 52296 (14:6296) Mansion3TrainerHeaders: ; 52296 (14:6296)
Mansion3TrainerHeader0: ; 52296 (14:6296) Mansion3TrainerHeader0: ; 52296 (14:6296)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_MANSION_3_TRAINER_0
db ($0 << 4) ; trainer's view range db ($0 << 4) ; trainer's view range
dw wd849 ; flag's byte dwEventFlagAddress EVENT_BEAT_MANSION_3_TRAINER_0
dw Mansion3BattleText1 ; TextBeforeBattle dw Mansion3BattleText1 ; TextBeforeBattle
dw Mansion3AfterBattleText1 ; TextAfterBattle dw Mansion3AfterBattleText1 ; TextAfterBattle
dw Mansion3EndBattleText1 ; TextEndBattle dw Mansion3EndBattleText1 ; TextEndBattle
dw Mansion3EndBattleText1 ; TextEndBattle dw Mansion3EndBattleText1 ; TextEndBattle
Mansion3TrainerHeader2: ; 522a2 (14:62a2) Mansion3TrainerHeader2: ; 522a2 (14:62a2)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_MANSION_3_TRAINER_2
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd849 ; flag's byte dwEventFlagAddress EVENT_BEAT_MANSION_3_TRAINER_2
dw Mansion3BattleText2 ; TextBeforeBattle dw Mansion3BattleText2 ; TextBeforeBattle
dw Mansion3AfterBattleText2 ; TextAfterBattle dw Mansion3AfterBattleText2 ; TextAfterBattle
dw Mansion3EndBattleText2 ; TextEndBattle dw Mansion3EndBattleText2 ; TextEndBattle

View file

@ -13,8 +13,7 @@ Mansion4Script_523cf: ; 523cf (14:63cf)
bit 5, [hl] bit 5, [hl]
res 5, [hl] res 5, [hl]
ret z ret z
ld a, [wd796] CheckEvent EVENT_278
bit 0, a
jr nz, .asm_523ff jr nz, .asm_523ff
ld a, $e ld a, $e
ld bc, $80d ld bc, $80d
@ -72,18 +71,18 @@ Mansion4TextPointers: ; 52436 (14:6436)
Mansion4TrainerHeaders: ; 52448 (14:6448) Mansion4TrainerHeaders: ; 52448 (14:6448)
Mansion4TrainerHeader0: ; 52448 (14:6448) Mansion4TrainerHeader0: ; 52448 (14:6448)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_MANSION_4_TRAINER_0
db ($0 << 4) ; trainer's view range db ($0 << 4) ; trainer's view range
dw wd84b ; flag's byte dwEventFlagAddress EVENT_BEAT_MANSION_4_TRAINER_0
dw Mansion4BattleText1 ; TextBeforeBattle dw Mansion4BattleText1 ; TextBeforeBattle
dw Mansion4AfterBattleText1 ; TextAfterBattle dw Mansion4AfterBattleText1 ; TextAfterBattle
dw Mansion4EndBattleText1 ; TextEndBattle dw Mansion4EndBattleText1 ; TextEndBattle
dw Mansion4EndBattleText1 ; TextEndBattle dw Mansion4EndBattleText1 ; TextEndBattle
Mansion4TrainerHeader2: ; 52454 (14:6454) Mansion4TrainerHeader2: ; 52454 (14:6454)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_MANSION_4_TRAINER_2
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd84b ; flag's byte dwEventFlagAddress EVENT_BEAT_MANSION_4_TRAINER_2
dw Mansion4BattleText2 ; TextBeforeBattle dw Mansion4BattleText2 ; TextBeforeBattle
dw Mansion4AfterBattleText2 ; TextAfterBattle dw Mansion4AfterBattleText2 ; TextAfterBattle
dw Mansion4EndBattleText2 ; TextEndBattle dw Mansion4EndBattleText2 ; TextEndBattle

View file

@ -30,63 +30,63 @@ MtMoon1TextPointers: ; 499e1 (12:59e1)
MtMoon1TrainerHeaders: ; 499fd (12:59fd) MtMoon1TrainerHeaders: ; 499fd (12:59fd)
MtMoon1TrainerHeader0: ; 499fd (12:59fd) MtMoon1TrainerHeader0: ; 499fd (12:59fd)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_0
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7f5 ; flag's byte dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_0
dw MtMoon1BattleText2 ; TextBeforeBattle dw MtMoon1BattleText2 ; TextBeforeBattle
dw MtMoon1AfterBattleText2 ; TextAfterBattle dw MtMoon1AfterBattleText2 ; TextAfterBattle
dw MtMoon1EndBattleText2 ; TextEndBattle dw MtMoon1EndBattleText2 ; TextEndBattle
dw MtMoon1EndBattleText2 ; TextEndBattle dw MtMoon1EndBattleText2 ; TextEndBattle
MtMoon1TrainerHeader2: ; 49a09 (12:5a09) MtMoon1TrainerHeader2: ; 49a09 (12:5a09)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_2
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7f5 ; flag's byte dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_2
dw MtMoon1BattleText3 ; TextBeforeBattle dw MtMoon1BattleText3 ; TextBeforeBattle
dw MtMoon1AfterBattleText3 ; TextAfterBattle dw MtMoon1AfterBattleText3 ; TextAfterBattle
dw MtMoon1EndBattleText3 ; TextEndBattle dw MtMoon1EndBattleText3 ; TextEndBattle
dw MtMoon1EndBattleText3 ; TextEndBattle dw MtMoon1EndBattleText3 ; TextEndBattle
MtMoon1TrainerHeader3: ; 49a15 (12:5a15) MtMoon1TrainerHeader3: ; 49a15 (12:5a15)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_3
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7f5 ; flag's byte dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_3
dw MtMoon1BattleText4 ; TextBeforeBattle dw MtMoon1BattleText4 ; TextBeforeBattle
dw MtMoon1AfterBattleText4 ; TextAfterBattle dw MtMoon1AfterBattleText4 ; TextAfterBattle
dw MtMoon1EndBattleText4 ; TextEndBattle dw MtMoon1EndBattleText4 ; TextEndBattle
dw MtMoon1EndBattleText4 ; TextEndBattle dw MtMoon1EndBattleText4 ; TextEndBattle
MtMoon1TrainerHeader4: ; 49a21 (12:5a21) MtMoon1TrainerHeader4: ; 49a21 (12:5a21)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_4
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7f5 ; flag's byte dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_4
dw MtMoon1BattleText5 ; TextBeforeBattle dw MtMoon1BattleText5 ; TextBeforeBattle
dw MtMoon1AfterBattleText5 ; TextAfterBattle dw MtMoon1AfterBattleText5 ; TextAfterBattle
dw MtMoon1EndBattleText5 ; TextEndBattle dw MtMoon1EndBattleText5 ; TextEndBattle
dw MtMoon1EndBattleText5 ; TextEndBattle dw MtMoon1EndBattleText5 ; TextEndBattle
MtMoon1TrainerHeader5: ; 49a2d (12:5a2d) MtMoon1TrainerHeader5: ; 49a2d (12:5a2d)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_5
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7f5 ; flag's byte dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_5
dw MtMoon1BattleText6 ; TextBeforeBattle dw MtMoon1BattleText6 ; TextBeforeBattle
dw MtMoon1AfterBattleText6 ; TextAfterBattle dw MtMoon1AfterBattleText6 ; TextAfterBattle
dw MtMoon1EndBattleText6 ; TextEndBattle dw MtMoon1EndBattleText6 ; TextEndBattle
dw MtMoon1EndBattleText6 ; TextEndBattle dw MtMoon1EndBattleText6 ; TextEndBattle
MtMoon1TrainerHeader6: ; 49a39 (12:5a39) MtMoon1TrainerHeader6: ; 49a39 (12:5a39)
db $6 ; flag's bit dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_6
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7f5 ; flag's byte dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_6
dw MtMoon1BattleText7 ; TextBeforeBattle dw MtMoon1BattleText7 ; TextBeforeBattle
dw MtMoon1AfterBattleText7 ; TextAfterBattle dw MtMoon1AfterBattleText7 ; TextAfterBattle
dw MtMoon1EndBattleText7 ; TextEndBattle dw MtMoon1EndBattleText7 ; TextEndBattle
dw MtMoon1EndBattleText7 ; TextEndBattle dw MtMoon1EndBattleText7 ; TextEndBattle
MtMoon1TrainerHeader7: ; 49a45 (12:5a45) MtMoon1TrainerHeader7: ; 49a45 (12:5a45)
db $7 ; flag's bit dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_7
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7f5 ; flag's byte dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_7
dw MtMoon1BattleText8 ; TextBeforeBattle dw MtMoon1BattleText8 ; TextBeforeBattle
dw MtMoon1AfterBattleText8 ; TextAfterBattle dw MtMoon1AfterBattleText8 ; TextAfterBattle
dw MtMoon1EndBattleText8 ; TextEndBattle dw MtMoon1EndBattleText8 ; TextEndBattle

View file

@ -5,8 +5,7 @@ MtMoon3Script: ; 49d0b (12:5d0b)
ld a, [W_MTMOON3CURSCRIPT] ld a, [W_MTMOON3CURSCRIPT]
call ExecuteCurMapScriptInTable call ExecuteCurMapScriptInTable
ld [W_MTMOON3CURSCRIPT], a ld [W_MTMOON3CURSCRIPT], a
ld a, [wd7f6] CheckEvent EVENT_579
bit 1, a
ret z ret z
ld hl, CoordsData_49d37 ld hl, CoordsData_49d37
call ArePlayerCoordsInArray call ArePlayerCoordsInArray
@ -54,8 +53,7 @@ MtMoon3ScriptPointers: ; 49d63 (12:5d63)
dw MtMoon3Script5 dw MtMoon3Script5
MtMoon3Script0: ; 49d6f (12:5d6f) MtMoon3Script0: ; 49d6f (12:5d6f)
ld a, [wd7f6] CheckEvent EVENT_579
bit 1, a
jp nz, MtMoon3Script_49d91 jp nz, MtMoon3Script_49d91
ld a, [W_YCOORD] ld a, [W_YCOORD]
cp $8 cp $8
@ -70,8 +68,7 @@ MtMoon3Script0: ; 49d6f (12:5d6f)
jp DisplayTextID jp DisplayTextID
MtMoon3Script_49d91: ; 49d91 (12:5d91) MtMoon3Script_49d91: ; 49d91 (12:5d91)
ld a, [wd7f6] CheckEitherEventSet EVENT_57E, EVENT_57F
and $c0
jp z, CheckFightingMapTrainers jp z, CheckFightingMapTrainers
ret ret
@ -81,8 +78,7 @@ MtMoon3Script3: ; 49d9a (12:5d9a)
jp z, MtMoon3Script_49d58 jp z, MtMoon3Script_49d58
call UpdateSprites call UpdateSprites
call Delay3 call Delay3
ld hl, wd7f6 SetEvent EVENT_579
set 1, [hl]
xor a xor a
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld a, $0 ld a, $0
@ -142,8 +138,7 @@ MtMoon3Script5: ; 49dfb (12:5dfb)
ld a, $a ld a, $a
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, [wd7f6] CheckEvent EVENT_57E
bit 6, a
jr z, .asm_49e1d jr z, .asm_49e1d
ld a, HS_MT_MOON_3_FOSSIL_2 ld a, HS_MT_MOON_3_FOSSIL_2
jr .asm_49e1f jr .asm_49e1f
@ -173,36 +168,36 @@ MtMoon3TextPointers: ; 49e34 (12:5e34)
MtMoon3TrainerHeaders: ; 49e48 (12:5e48) MtMoon3TrainerHeaders: ; 49e48 (12:5e48)
MtMoon3TrainerHeader0: ; 49e48 (12:5e48) MtMoon3TrainerHeader0: ; 49e48 (12:5e48)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_MT_MOON_3_TRAINER_0
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7f6 ; flag's byte dwEventFlagAddress EVENT_BEAT_MT_MOON_3_TRAINER_0
dw MtMoon3BattleText2 ; TextBeforeBattle dw MtMoon3BattleText2 ; TextBeforeBattle
dw MtMoon3AfterBattleText2 ; TextAfterBattle dw MtMoon3AfterBattleText2 ; TextAfterBattle
dw MtMoon3EndBattleText2 ; TextEndBattle dw MtMoon3EndBattleText2 ; TextEndBattle
dw MtMoon3EndBattleText2 ; TextEndBattle dw MtMoon3EndBattleText2 ; TextEndBattle
MtMoon3TrainerHeader2: ; 49e54 (12:5e54) MtMoon3TrainerHeader2: ; 49e54 (12:5e54)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_MT_MOON_3_TRAINER_2
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7f6 ; flag's byte dwEventFlagAddress EVENT_BEAT_MT_MOON_3_TRAINER_2
dw MtMoon3BattleText3 ; TextBeforeBattle dw MtMoon3BattleText3 ; TextBeforeBattle
dw MtMoon3AfterBattleText3 ; TextAfterBattle dw MtMoon3AfterBattleText3 ; TextAfterBattle
dw MtMoon3EndBattleText3 ; TextEndBattle dw MtMoon3EndBattleText3 ; TextEndBattle
dw MtMoon3EndBattleText3 ; TextEndBattle dw MtMoon3EndBattleText3 ; TextEndBattle
MtMoon3TrainerHeader3: ; 49e60 (12:5e60) MtMoon3TrainerHeader3: ; 49e60 (12:5e60)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_MT_MOON_3_TRAINER_3
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7f6 ; flag's byte dwEventFlagAddress EVENT_BEAT_MT_MOON_3_TRAINER_3
dw MtMoon3BattleText4 ; TextBeforeBattle dw MtMoon3BattleText4 ; TextBeforeBattle
dw MtMoon3AfterBattleText4 ; TextAfterBattle dw MtMoon3AfterBattleText4 ; TextAfterBattle
dw MtMoon3EndBattleText4 ; TextEndBattle dw MtMoon3EndBattleText4 ; TextEndBattle
dw MtMoon3EndBattleText4 ; TextEndBattle dw MtMoon3EndBattleText4 ; TextEndBattle
MtMoon3TrainerHeader4: ; 49e6c (12:5e6c) MtMoon3TrainerHeader4: ; 49e6c (12:5e6c)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_MT_MOON_3_TRAINER_4
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7f6 ; flag's byte dwEventFlagAddress EVENT_BEAT_MT_MOON_3_TRAINER_4
dw MtMoon3BattleText5 ; TextBeforeBattle dw MtMoon3BattleText5 ; TextBeforeBattle
dw MtMoon3AfterBattleText5 ; TextAfterBattle dw MtMoon3AfterBattleText5 ; TextAfterBattle
dw MtMoon3EndBattleText5 ; TextEndBattle dw MtMoon3EndBattleText5 ; TextEndBattle
@ -212,8 +207,7 @@ MtMoon3TrainerHeader4: ; 49e6c (12:5e6c)
MtMoon3Text1: ; 49e79 (12:5e79) MtMoon3Text1: ; 49e79 (12:5e79)
TX_ASM TX_ASM
ld a, [wd7f6] CheckEvent EVENT_579
bit 1, a
jr z, .asm_49e8d jr z, .asm_49e8d
and $c0 and $c0
jr nz, .asm_49eb8 jr nz, .asm_49eb8
@ -284,8 +278,7 @@ MtMoon3Text6: ; 49ee9 (12:5ee9)
ld a, HS_MT_MOON_3_FOSSIL_1 ld a, HS_MT_MOON_3_FOSSIL_1
ld [wcc4d], a ld [wcc4d], a
predef HideObject predef HideObject
ld hl, wd7f6 SetEvent EVENT_57E
set 6, [hl]
ld a, $4 ld a, $4
ld [W_MTMOON3CURSCRIPT], a ld [W_MTMOON3CURSCRIPT], a
ld [W_CURMAPSCRIPT], a ld [W_CURMAPSCRIPT], a
@ -313,8 +306,7 @@ MtMoon3Text7: ; 49f29 (12:5f29)
ld a, HS_MT_MOON_3_FOSSIL_2 ld a, HS_MT_MOON_3_FOSSIL_2
ld [wcc4d], a ld [wcc4d], a
predef HideObject predef HideObject
ld hl, wd7f6 SetEvent EVENT_57F
set 7, [hl]
ld a, $4 ld a, $4
ld [W_MTMOON3CURSCRIPT], a ld [W_MTMOON3CURSCRIPT], a
ld [W_CURMAPSCRIPT], a ld [W_CURMAPSCRIPT], a

View file

@ -23,8 +23,7 @@ MtMoonPokecenterText3: ; 492e7 (12:52e7)
MtMoonPokecenterText4: ; 492ec (12:52ec) MtMoonPokecenterText4: ; 492ec (12:52ec)
TX_ASM TX_ASM
ld a, [wd7c6] CheckEvent EVENT_BOUGHT_MAGIKARP, 1
add a
jp c, .alreadyBoughtMagikarp jp c, .alreadyBoughtMagikarp
ld hl, MtMoonPokecenterText_4935c ld hl, MtMoonPokecenterText_4935c
call PrintText call PrintText
@ -59,8 +58,7 @@ MtMoonPokecenterText4: ; 492ec (12:52ec)
ld a, MONEY_BOX ld a, MONEY_BOX
ld [wTextBoxID], a ld [wTextBoxID], a
call DisplayTextBoxID call DisplayTextBoxID
ld hl, wd7c6 SetEvent EVENT_BOUGHT_MAGIKARP
set 7, [hl]
jr .done jr .done
.choseNo .choseNo
ld hl, MtMoonPokecenterText_49361 ld hl, MtMoonPokecenterText_49361

View file

@ -54,15 +54,13 @@ Museum1FText1: ; 5c135 (17:4135)
cp $c cp $c
jp z, Museum1FScript_5c1f9 jp z, Museum1FScript_5c1f9
.asm_d49e7 .asm_d49e7
ld a, [wd754] CheckEvent EVENT_068
bit 0, a
jr nz, .asm_31a16 jr nz, .asm_31a16
ld hl, Museum1FText_5c23d ld hl, Museum1FText_5c23d
call PrintText call PrintText
jp Museum1FScriptEnd jp Museum1FScriptEnd
.asm_b8709 .asm_b8709
ld a, [wd754] CheckEvent EVENT_068
bit 0, a
jr z, .asm_3ded4 jr z, .asm_3ded4
.asm_31a16 .asm_31a16
ld hl, Museum1FText_5c242 ld hl, Museum1FText_5c242
@ -93,8 +91,7 @@ Museum1FText1: ; 5c135 (17:4135)
.asm_0f3e3 .asm_0f3e3
ld hl, Museum1FText_5c224 ld hl, Museum1FText_5c224
call PrintText call PrintText
ld hl, wd754 SetEvent EVENT_068
set 0, [hl]
xor a xor a
ld [wPriceTemp], a ld [wPriceTemp], a
ld [wPriceTemp + 1], a ld [wPriceTemp + 1], a
@ -190,16 +187,14 @@ Museum1FText_5c251: ; 5c251 (17:4251)
Museum1FText3: ; 5c256 (17:4256) Museum1FText3: ; 5c256 (17:4256)
TX_ASM TX_ASM
ld a, [wd754] CheckEvent EVENT_069
bit 1, a
jr nz, .asm_5c285 jr nz, .asm_5c285
ld hl, Museum1FText_5c28e ld hl, Museum1FText_5c28e
call PrintText call PrintText
ld bc, (OLD_AMBER << 8) | 1 ld bc, (OLD_AMBER << 8) | 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld hl, wd754 SetEvent EVENT_069
set 1, [hl]
ld a, HS_OLD_AMBER ld a, HS_OLD_AMBER
ld [wcc4d], a ld [wcc4d], a
predef HideObject predef HideObject

View file

@ -1,6 +1,5 @@
OaksLabScript: ; 1cb0e (7:4b0e) OaksLabScript: ; 1cb0e (7:4b0e)
ld a, [wd74b] CheckEvent EVENT_026
bit 6, a
call nz, OaksLabScript_1d076 call nz, OaksLabScript_1d076
ld a, $1 ld a, $1
ld [wAutoTextBoxDrawingControl], a ld [wAutoTextBoxDrawingControl], a
@ -32,8 +31,7 @@ OaksLabScriptPointers: ; 1cb28 (7:4b28)
dw OaksLabScript18 dw OaksLabScript18
OaksLabScript0: ; 1cb4e (7:4b4e) OaksLabScript0: ; 1cb4e (7:4b4e)
ld a, [wd74b] CheckEvent EVENT_027
bit 7, a
ret z ret z
ld a, [wNPCMovementScriptFunctionNum] ld a, [wNPCMovementScriptFunctionNum]
and a and a
@ -110,10 +108,8 @@ OaksLabScript4: ; 1cbd2 (7:4bd2)
ld a, [wSimulatedJoypadStatesIndex] ld a, [wSimulatedJoypadStatesIndex]
and a and a
ret nz ret nz
ld hl, wd747 SetEvent EVENT_STOPPED_FROM_LEAVING_PALLET
set 0, [hl] SetEvent EVENT_FOLLOWED_OAK_INSIDE_LAB
ld hl, wd74b
set 0, [hl]
ld a, $1 ld a, $1
ld [H_SPRITEINDEX], a ld [H_SPRITEINDEX], a
ld a, SPRITE_FACING_UP ld a, SPRITE_FACING_UP
@ -146,8 +142,7 @@ OaksLabScript5: ; 1cbfd (7:4bfd)
ld a, $14 ld a, $14
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd74b SetEvent EVENT_OAK_ASKED_TO_CHOOSE_MON
set 1, [hl]
xor a xor a
ld [wJoyIgnore], a ld [wJoyIgnore], a
@ -336,8 +331,7 @@ OaksLabScript9: ; 1cd00 (7:4d00)
ld a, $e ld a, $e
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd74b SetEvent EVENT_GOT_STARTER
set 2, [hl]
xor a xor a
ld [wJoyIgnore], a ld [wJoyIgnore], a
@ -435,8 +429,7 @@ OaksLabScript12: ; 1ce03 (7:4e03)
ld [hSpriteFacingDirection], a ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
predef HealParty predef HealParty
ld hl, wd74b SetEvent EVENT_BATTLED_RIVAL_IN_OAKS_LAB
set 3, [hl]
ld a, $d ld a, $d
ld [W_OAKSLABCURSCRIPT], a ld [W_OAKSLABCURSCRIPT], a
@ -603,10 +596,8 @@ OaksLabScript16: ; 1cf12 (7:4f12)
ld a, $1b ld a, $1b
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd74b SetEvent EVENT_GOT_POKEDEX
set 5, [hl] SetEvent EVENT_038
ld hl, wd74e
set 0, [hl]
ld a, HS_LYING_OLD_MAN ld a, HS_LYING_OLD_MAN
ld [wcc4d], a ld [wcc4d], a
predef HideObject predef HideObject
@ -641,10 +632,9 @@ OaksLabScript17: ; 1cfd4 (7:4fd4)
ld a, HS_OAKS_LAB_RIVAL ld a, HS_OAKS_LAB_RIVAL
ld [wcc4d], a ld [wcc4d], a
predef HideObject predef HideObject
ld hl, wd7eb SetEvent EVENT_520
set 0, [hl] ResetEventReuseHL EVENT_521
res 1, [hl] SetEventReuseHL EVENT_527
set 7, [hl]
ld a, HS_ROUTE_22_RIVAL_1 ld a, HS_ROUTE_22_RIVAL_1
ld [wcc4d], a ld [wcc4d], a
predef ShowObject predef ShowObject
@ -772,8 +762,7 @@ OaksLabTextPointers: ; 1d082 (7:5082)
OaksLabText28: ; 1d0ce (7:50ce) OaksLabText28: ; 1d0ce (7:50ce)
OaksLabText1: ; 1d0ce (7:50ce) OaksLabText1: ; 1d0ce (7:50ce)
TX_ASM TX_ASM
ld a, [wd74b] CheckEvent EVENT_FOLLOWED_OAK_INSIDE_LAB
bit 0, a
jr nz, .asm_1d0de jr nz, .asm_1d0de
ld hl, OaksLabGaryText1 ld hl, OaksLabGaryText1
call PrintText call PrintText
@ -839,10 +828,9 @@ OaksLabScript_1d133: ; 1d133 (7:5133)
ld [wd11e], a ld [wd11e], a
ld a, b ld a, b
ld [wSpriteIndex], a ld [wSpriteIndex], a
ld a, [wd74b] CheckEvent EVENT_GOT_STARTER
bit 2, a
jp nz, OaksLabScript_1d22d jp nz, OaksLabScript_1d22d
bit 1, a CheckEventReuseA EVENT_OAK_ASKED_TO_CHOOSE_MON
jr nz, OaksLabScript_1d157 jr nz, OaksLabScript_1d157
ld hl, OaksLabText39 ld hl, OaksLabText39
call PrintText call PrintText
@ -976,8 +964,7 @@ OaksLabLastMonText: ; 1d243 (7:5243)
OaksLabText32: ; 1d248 (7:5248) OaksLabText32: ; 1d248 (7:5248)
OaksLabText5: ; 1d248 (7:5248) OaksLabText5: ; 1d248 (7:5248)
TX_ASM TX_ASM
ld a, [wd747] CheckEvent EVENT_006
bit 6, a
jr nz, .asm_1d266 jr nz, .asm_1d266
ld hl, wPokedexOwned ld hl, wPokedexOwned
ld b, wPokedexOwnedEnd - wPokedexOwned ld b, wPokedexOwnedEnd - wPokedexOwned
@ -985,8 +972,7 @@ OaksLabText5: ; 1d248 (7:5248)
ld a, [wd11e] ld a, [wd11e]
cp $2 cp $2
jr c, .asm_1d279 jr c, .asm_1d279
ld a, [wd74b] CheckEvent EVENT_GOT_POKEDEX
bit 5, a
jr z, .asm_1d279 jr z, .asm_1d279
.asm_1d266 .asm_1d266
ld hl, OaksLabText_1d31d ld hl, OaksLabText_1d31d
@ -999,13 +985,11 @@ OaksLabText5: ; 1d248 (7:5248)
ld b,POKE_BALL ld b,POKE_BALL
call IsItemInBag call IsItemInBag
jr nz, .asm_1d2e7 jr nz, .asm_1d2e7
ld a, [wd7eb] CheckEvent EVENT_525
bit 5, a
jr nz, .asm_1d2d0 jr nz, .asm_1d2d0
ld a, [wd74b] CheckEvent EVENT_GOT_POKEDEX
bit 5, a
jr nz, .asm_1d2c8 jr nz, .asm_1d2c8
bit 3, a CheckEventReuseA EVENT_BATTLED_RIVAL_IN_OAKS_LAB
jr nz, .asm_1d2a9 jr nz, .asm_1d2a9
ld a, [wd72e] ld a, [wd72e]
bit 3, a bit 3, a
@ -1036,9 +1020,7 @@ OaksLabText5: ; 1d248 (7:5248)
call PrintText call PrintText
jr .asm_1d2ed jr .asm_1d2ed
.asm_1d2d0 .asm_1d2d0
ld hl, wd74b CheckAndSetEvent EVENT_GOT_POKEBALLS_FROM_OAK
bit 4, [hl]
set 4, [hl]
jr nz, .asm_1d2e7 jr nz, .asm_1d2e7
ld bc, (POKE_BALL << 8) | 5 ld bc, (POKE_BALL << 8) | 5
call GiveItem call GiveItem

View file

@ -1,9 +1,7 @@
PalletTownScript: ; 18e5b (6:4e5b) PalletTownScript: ; 18e5b (6:4e5b)
ld a,[wd74b] CheckEvent EVENT_GOT_POKEBALLS_FROM_OAK
bit 4,a
jr z,.next jr z,.next
ld hl,wd747 SetEvent EVENT_006
set 6,[hl]
.next .next
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld hl,PalletTownScriptPointers ld hl,PalletTownScriptPointers
@ -20,8 +18,7 @@ PalletTownScriptPointers: ; 18e73 (6:4e73)
dw PalletTownScript6 dw PalletTownScript6
PalletTownScript0: ; 18e81 (6:4e81) PalletTownScript0: ; 18e81 (6:4e81)
ld a,[wd747] CheckEvent EVENT_STOPPED_FROM_LEAVING_PALLET
bit 0,a
ret nz ret nz
ld a,[W_YCOORD] ld a,[W_YCOORD]
cp 1 ; is player near north exit? cp 1 ; is player near north exit?
@ -38,8 +35,7 @@ PalletTownScript0: ; 18e81 (6:4e81)
call PlayMusic call PlayMusic
ld a,$FC ld a,$FC
ld [wJoyIgnore],a ld [wJoyIgnore],a
ld hl,wd74b SetEvent EVENT_027
set 7,[hl]
; trigger the next script ; trigger the next script
ld a,1 ld a,1
@ -134,14 +130,12 @@ PalletTownScript4: ; 18f4b (6:4f4b)
ret ret
PalletTownScript5: ; 18f56 (6:4f56) PalletTownScript5: ; 18f56 (6:4f56)
ld a,[wd74a] CheckEvent EVENT_01A
bit 2,a
jr nz,.next jr nz,.next
and 3 and 3
cp 3 cp 3
jr nz,.next jr nz,.next
ld hl,wd74a SetEvent EVENT_01A
set 2,[hl]
ld a,HS_DAISY_SITTING ld a,HS_DAISY_SITTING
ld [wcc4d],a ld [wcc4d],a
predef HideObject predef HideObject
@ -149,11 +143,9 @@ PalletTownScript5: ; 18f56 (6:4f56)
ld [wcc4d],a ld [wcc4d],a
predef_jump ShowObject predef_jump ShowObject
.next .next
ld a,[wd74b] CheckEvent EVENT_GOT_POKEBALLS_FROM_OAK
bit 4,a
ret z ret z
ld hl,wd74b SetEvent EVENT_026
set 6,[hl]
PalletTownScript6: ; 18f87 (6:4f87) PalletTownScript6: ; 18f87 (6:4f87)
ret ret

View file

@ -16,14 +16,12 @@ PewterCityScriptPointers: ; 19243 (6:5243)
PewterCityScript0: ; 19251 (6:5251) PewterCityScript0: ; 19251 (6:5251)
xor a xor a
ld [W_MUSEUM1FCURSCRIPT], a ld [W_MUSEUM1FCURSCRIPT], a
ld hl, wd754 ResetEvent EVENT_068
res 0, [hl]
call PewterCityScript_1925e call PewterCityScript_1925e
ret ret
PewterCityScript_1925e: ; 1925e (6:525e) PewterCityScript_1925e: ; 1925e (6:525e)
ld a, [wd755] CheckEvent EVENT_077
bit 7, a
ret nz ret nz
ld hl, CoordsData_19277 ld hl, CoordsData_19277
call ArePlayerCoordsInArray call ArePlayerCoordsInArray

View file

@ -46,16 +46,14 @@ PewterGymScript_5c3df: ; 5c3df (17:43df)
ld a, $4 ld a, $4
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd755 SetEvent EVENT_077
set 7, [hl]
ld bc, (TM_34 << 8) | 1 ld bc, (TM_34 << 8) | 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld a, $5 ld a, $5
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd755 SetEvent EVENT_076
set 6, [hl]
jr .asm_5c408 jr .asm_5c408
.BagFull .BagFull
ld a, $6 ld a, $6
@ -74,13 +72,10 @@ PewterGymScript_5c3df: ; 5c3df (17:43df)
ld [wcc4d], a ld [wcc4d], a
predef HideObject predef HideObject
ld hl, wd7eb ResetEvents EVENT_520, EVENT_527
res 0, [hl]
res 7, [hl]
; deactivate gym trainers ; deactivate gym trainers
ld hl, wd755 SetEvent EVENT_BEAT_PEWTER_GYM_TRAINER_0
set 2, [hl]
jp PewterGymScript_5c3bf jp PewterGymScript_5c3bf
@ -94,9 +89,9 @@ PewterGymTextPointers: ; 5c435 (17:4435)
PewterGymTrainerHeaders: ; 5c441 (17:4441) PewterGymTrainerHeaders: ; 5c441 (17:4441)
PewterGymTrainerHeader0: ; 5c441 (17:4441) PewterGymTrainerHeader0: ; 5c441 (17:4441)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_PEWTER_GYM_TRAINER_0
db ($5 << 4) ; trainer's view range db ($5 << 4) ; trainer's view range
dw wd755 ; flag's byte dwEventFlagAddress EVENT_BEAT_PEWTER_GYM_TRAINER_0
dw PewterGymBattleText1 ; TextBeforeBattle dw PewterGymBattleText1 ; TextBeforeBattle
dw PewterGymAfterBattleText1 ; TextAfterBattle dw PewterGymAfterBattleText1 ; TextAfterBattle
dw PewterGymEndBattleText1 ; TextEndBattle dw PewterGymEndBattleText1 ; TextEndBattle
@ -106,10 +101,9 @@ PewterGymTrainerHeader0: ; 5c441 (17:4441)
PewterGymText1: ; 5c44e (17:444e) PewterGymText1: ; 5c44e (17:444e)
TX_ASM TX_ASM
ld a, [wd755] CheckEvent EVENT_077
bit 7, a
jr z, .asm_5c46a jr z, .asm_5c46a
bit 6, a CheckEventReuseA EVENT_076
jr nz, .asm_5c462 jr nz, .asm_5c462
call z, PewterGymScript_5c3df call z, PewterGymScript_5c3df
call DisableWaitingAfterTextDisplay call DisableWaitingAfterTextDisplay

View file

@ -17,8 +17,7 @@ PokemonTower2ScriptPointers: ; 60509 (18:4509)
dw PokemonTower2Script2 dw PokemonTower2Script2
PokemonTower2Script0: ; 6050f (18:450f) PokemonTower2Script0: ; 6050f (18:450f)
ld a, [wd764] CheckEvent EVENT_0EF
bit 7, a
ret nz ret nz
ld hl, CoordsData_6055e ld hl, CoordsData_6055e
call ArePlayerCoordsInArray call ArePlayerCoordsInArray
@ -29,15 +28,13 @@ PokemonTower2Script0: ; 6050f (18:450f)
ld c, BANK(Music_MeetRival) ld c, BANK(Music_MeetRival)
ld a, MUSIC_MEET_RIVAL ld a, MUSIC_MEET_RIVAL
call PlayMusic call PlayMusic
ld hl, wd764 ResetEvent EVENT_0EE
res 6, [hl]
ld a, [wCoordIndex] ld a, [wCoordIndex]
cp $1 cp $1
ld a, PLAYER_DIR_UP ld a, PLAYER_DIR_UP
ld b, SPRITE_FACING_DOWN ld b, SPRITE_FACING_DOWN
jr nz, .asm_60544 jr nz, .asm_60544
ld hl, wd764 SetEvent EVENT_0EE
set 6, [hl]
ld a, PLAYER_DIR_LEFT ld a, PLAYER_DIR_LEFT
ld b, SPRITE_FACING_RIGHT ld b, SPRITE_FACING_RIGHT
.asm_60544 .asm_60544
@ -66,14 +63,12 @@ PokemonTower2Script1: ; 60563 (18:4563)
jp z, PokemonTower2Script_604fe jp z, PokemonTower2Script_604fe
ld a, $f0 ld a, $f0
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld hl, wd764 SetEvent EVENT_0EF
set 7, [hl]
ld a, $1 ld a, $1
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld de, MovementData_605b2 ld de, MovementData_605b2
ld a, [wd764] CheckEvent EVENT_0EE
bit 6, a
jr nz, .asm_60589 jr nz, .asm_60589
ld de, MovementData_605a9 ld de, MovementData_605a9
.asm_60589 .asm_60589
@ -132,8 +127,7 @@ PokemonTower2TextPointers: ; 605db (18:45db)
PokemonTower2Text1: ; 605df (18:45df) PokemonTower2Text1: ; 605df (18:45df)
TX_ASM TX_ASM
ld a, [wd764] CheckEvent EVENT_0EF
bit 7, a
jr z, .asm_16f24 jr z, .asm_16f24
ld hl, PokemonTower2Text_6063c ld hl, PokemonTower2Text_6063c
call PrintText call PrintText

View file

@ -20,27 +20,27 @@ PokemonTower3TextPointers: ; 606e5 (18:46e5)
PokemonTower3TrainerHeaders: ; 606ed (18:46ed) PokemonTower3TrainerHeaders: ; 606ed (18:46ed)
PokemonTower3TrainerHeader0: ; 606ed (18:46ed) PokemonTower3TrainerHeader0: ; 606ed (18:46ed)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_POKEMONTOWER_3_TRAINER_0
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd765 ; flag's byte dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_3_TRAINER_0
dw PokemonTower3BattleText1 ; TextBeforeBattle dw PokemonTower3BattleText1 ; TextBeforeBattle
dw PokemonTower3AfterBattleText1 ; TextAfterBattle dw PokemonTower3AfterBattleText1 ; TextAfterBattle
dw PokemonTower3EndBattleText1 ; TextEndBattle dw PokemonTower3EndBattleText1 ; TextEndBattle
dw PokemonTower3EndBattleText1 ; TextEndBattle dw PokemonTower3EndBattleText1 ; TextEndBattle
PokemonTower3TrainerHeader1: ; 606f9 (18:46f9) PokemonTower3TrainerHeader1: ; 606f9 (18:46f9)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_POKEMONTOWER_3_TRAINER_1
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd765 ; flag's byte dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_3_TRAINER_1
dw PokemonTower3BattleText2 ; TextBeforeBattle dw PokemonTower3BattleText2 ; TextBeforeBattle
dw PokemonTower3AfterBattleText2 ; TextAfterBattle dw PokemonTower3AfterBattleText2 ; TextAfterBattle
dw PokemonTower3EndBattleText2 ; TextEndBattle dw PokemonTower3EndBattleText2 ; TextEndBattle
dw PokemonTower3EndBattleText2 ; TextEndBattle dw PokemonTower3EndBattleText2 ; TextEndBattle
PokemonTower3TrainerHeader2: ; 60705 (18:4705) PokemonTower3TrainerHeader2: ; 60705 (18:4705)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_POKEMONTOWER_3_TRAINER_2
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd765 ; flag's byte dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_3_TRAINER_2
dw PokemonTower3BattleText3 ; TextBeforeBattle dw PokemonTower3BattleText3 ; TextBeforeBattle
dw PokemonTower3AfterBattleText3 ; TextAfterBattle dw PokemonTower3AfterBattleText3 ; TextAfterBattle
dw PokemonTower3EndBattleText3 ; TextEndBattle dw PokemonTower3EndBattleText3 ; TextEndBattle

View file

@ -22,27 +22,27 @@ PokemonTower4TextPointers: ; 6080f (18:480f)
PokemonTower4TrainerHeaders: ; 6081b (18:481b) PokemonTower4TrainerHeaders: ; 6081b (18:481b)
PokemonTower4TrainerHeader0: ; 6081b (18:481b) PokemonTower4TrainerHeader0: ; 6081b (18:481b)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_POKEMONTOWER_4_TRAINER_0
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd766 ; flag's byte dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_4_TRAINER_0
dw PokemonTower4BattleText1 ; TextBeforeBattle dw PokemonTower4BattleText1 ; TextBeforeBattle
dw PokemonTower4AfterBattleText1 ; TextAfterBattle dw PokemonTower4AfterBattleText1 ; TextAfterBattle
dw PokemonTower4EndBattleText1 ; TextEndBattle dw PokemonTower4EndBattleText1 ; TextEndBattle
dw PokemonTower4EndBattleText1 ; TextEndBattle dw PokemonTower4EndBattleText1 ; TextEndBattle
PokemonTower4TrainerHeader1: ; 60827 (18:4827) PokemonTower4TrainerHeader1: ; 60827 (18:4827)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_POKEMONTOWER_4_TRAINER_1
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd766 ; flag's byte dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_4_TRAINER_1
dw PokemonTower4BattleText2 ; TextBeforeBattle dw PokemonTower4BattleText2 ; TextBeforeBattle
dw PokemonTower4AfterBattleText2 ; TextAfterBattle dw PokemonTower4AfterBattleText2 ; TextAfterBattle
dw PokemonTower4EndBattleText2 ; TextEndBattle dw PokemonTower4EndBattleText2 ; TextEndBattle
dw PokemonTower4EndBattleText2 ; TextEndBattle dw PokemonTower4EndBattleText2 ; TextEndBattle
PokemonTower4TrainerHeader2: ; 60833 (18:4833) PokemonTower4TrainerHeader2: ; 60833 (18:4833)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_POKEMONTOWER_4_TRAINER_2
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd766 ; flag's byte dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_4_TRAINER_2
dw PokemonTower4BattleText3 ; TextBeforeBattle dw PokemonTower4BattleText3 ; TextBeforeBattle
dw PokemonTower4AfterBattleText3 ; TextAfterBattle dw PokemonTower4AfterBattleText3 ; TextAfterBattle
dw PokemonTower4EndBattleText3 ; TextEndBattle dw PokemonTower4EndBattleText3 ; TextEndBattle

View file

@ -18,13 +18,10 @@ PokemonTower5Script0: ; 6094b (18:494b)
jr c, .asm_60960 jr c, .asm_60960
ld hl, wd72e ld hl, wd72e
res 4, [hl] res 4, [hl]
ld hl, wd767 ResetEvent EVENT_107
res 7, [hl]
jp CheckFightingMapTrainers jp CheckFightingMapTrainers
.asm_60960 .asm_60960
ld hl, wd767 CheckAndSetEvent EVENT_107
bit 7, [hl]
set 7, [hl]
ret nz ret nz
xor a xor a
ld [hJoyHeld], a ld [hJoyHeld], a
@ -62,36 +59,36 @@ PokemonTower5TextPointers: ; 6099b (18:499b)
PokemonTower5TrainerHeaders: ; 609a9 (18:49a9) PokemonTower5TrainerHeaders: ; 609a9 (18:49a9)
PokemonTower5TrainerHeader0: ; 609a9 (18:49a9) PokemonTower5TrainerHeader0: ; 609a9 (18:49a9)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_POKEMONTOWER_5_TRAINER_0
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd767 ; flag's byte dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_5_TRAINER_0
dw PokemonTower5BattleText1 ; TextBeforeBattle dw PokemonTower5BattleText1 ; TextBeforeBattle
dw PokemonTower5AfterBattleText1 ; TextAfterBattle dw PokemonTower5AfterBattleText1 ; TextAfterBattle
dw PokemonTower5EndBattleText1 ; TextEndBattle dw PokemonTower5EndBattleText1 ; TextEndBattle
dw PokemonTower5EndBattleText1 ; TextEndBattle dw PokemonTower5EndBattleText1 ; TextEndBattle
PokemonTower5TrainerHeader1: ; 609b5 (18:49b5) PokemonTower5TrainerHeader1: ; 609b5 (18:49b5)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_POKEMONTOWER_5_TRAINER_1
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd767 ; flag's byte dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_5_TRAINER_1
dw PokemonTower5BattleText2 ; TextBeforeBattle dw PokemonTower5BattleText2 ; TextBeforeBattle
dw PokemonTower5AfterBattleText2 ; TextAfterBattle dw PokemonTower5AfterBattleText2 ; TextAfterBattle
dw PokemonTower5EndBattleText2 ; TextEndBattle dw PokemonTower5EndBattleText2 ; TextEndBattle
dw PokemonTower5EndBattleText2 ; TextEndBattle dw PokemonTower5EndBattleText2 ; TextEndBattle
PokemonTower5TrainerHeader2: ; 609c1 (18:49c1) PokemonTower5TrainerHeader2: ; 609c1 (18:49c1)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_POKEMONTOWER_5_TRAINER_2
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd767 ; flag's byte dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_5_TRAINER_2
dw PokemonTower5BattleText3 ; TextBeforeBattle dw PokemonTower5BattleText3 ; TextBeforeBattle
dw PokemonTower5AfterBattleText3 ; TextAfterBattle dw PokemonTower5AfterBattleText3 ; TextAfterBattle
dw PokemonTower5EndBattleText3 ; TextEndBattle dw PokemonTower5EndBattleText3 ; TextEndBattle
dw PokemonTower5EndBattleText3 ; TextEndBattle dw PokemonTower5EndBattleText3 ; TextEndBattle
PokemonTower5TrainerHeader3: ; 609cd (18:49cd) PokemonTower5TrainerHeader3: ; 609cd (18:49cd)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_POKEMONTOWER_5_TRAINER_3
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd767 ; flag's byte dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_5_TRAINER_3
dw PokemonTower5BattleText4 ; TextBeforeBattle dw PokemonTower5BattleText4 ; TextBeforeBattle
dw PokemonTower5AfterBattleText4 ; TextAfterBattle dw PokemonTower5AfterBattleText4 ; TextAfterBattle
dw PokemonTower5EndBattleText4 ; TextEndBattle dw PokemonTower5EndBattleText4 ; TextEndBattle

View file

@ -22,8 +22,7 @@ PokemonTower6ScriptPointers: ; 60b0d (18:4b0d)
dw PokemonTower6Script4 dw PokemonTower6Script4
PokemonTower6Script0: ; 60b17 (18:4b17) PokemonTower6Script0: ; 60b17 (18:4b17)
ld a, [wd768] CheckEvent EVENT_10F
bit 7, a
jp nz, CheckFightingMapTrainers jp nz, CheckFightingMapTrainers
ld hl, CoordsData_60b45 ld hl, CoordsData_60b45
call ArePlayerCoordsInArray call ArePlayerCoordsInArray
@ -60,8 +59,7 @@ PokemonTower6Script4: ; 60b48 (18:4b48)
ld a, [wBattleResult] ld a, [wBattleResult]
and a and a
jr nz, .asm_60b82 jr nz, .asm_60b82
ld hl, wd768 SetEvent EVENT_10F
set 7, [hl]
ld a, $7 ld a, $7
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
@ -107,27 +105,27 @@ PokemonTower6TextPointers: ; 60bb1 (18:4bb1)
PokemonTower6TrainerHeaders: ; 60bbf (18:4bbf) PokemonTower6TrainerHeaders: ; 60bbf (18:4bbf)
PokemonTower6TrainerHeader0: ; 60bbf (18:4bbf) PokemonTower6TrainerHeader0: ; 60bbf (18:4bbf)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_POKEMONTOWER_6_TRAINER_0
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd768 ; flag's byte dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_6_TRAINER_0
dw PokemonTower6BattleText1 ; TextBeforeBattle dw PokemonTower6BattleText1 ; TextBeforeBattle
dw PokemonTower6AfterBattleText1 ; TextAfterBattle dw PokemonTower6AfterBattleText1 ; TextAfterBattle
dw PokemonTower6EndBattleText1 ; TextEndBattle dw PokemonTower6EndBattleText1 ; TextEndBattle
dw PokemonTower6EndBattleText1 ; TextEndBattle dw PokemonTower6EndBattleText1 ; TextEndBattle
PokemonTower6TrainerHeader1: ; 60bcb (18:4bcb) PokemonTower6TrainerHeader1: ; 60bcb (18:4bcb)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_POKEMONTOWER_6_TRAINER_1
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd768 ; flag's byte dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_6_TRAINER_1
dw PokemonTower6BattleText2 ; TextBeforeBattle dw PokemonTower6BattleText2 ; TextBeforeBattle
dw PokemonTower6AfterBattleText2 ; TextAfterBattle dw PokemonTower6AfterBattleText2 ; TextAfterBattle
dw PokemonTower6EndBattleText2 ; TextEndBattle dw PokemonTower6EndBattleText2 ; TextEndBattle
dw PokemonTower6EndBattleText2 ; TextEndBattle dw PokemonTower6EndBattleText2 ; TextEndBattle
PokemonTower6TrainerHeader2: ; 60bd7 (18:4bd7) PokemonTower6TrainerHeader2: ; 60bd7 (18:4bd7)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_POKEMONTOWER_6_TRAINER_2
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd768 ; flag's byte dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_6_TRAINER_2
dw PokemonTower6BattleText3 ; TextBeforeBattle dw PokemonTower6BattleText3 ; TextBeforeBattle
dw PokemonTower6AfterBattleText3 ; TextAfterBattle dw PokemonTower6AfterBattleText3 ; TextAfterBattle
dw PokemonTower6EndBattleText3 ; TextEndBattle dw PokemonTower6EndBattleText3 ; TextEndBattle

View file

@ -206,27 +206,27 @@ PokemonTower7TextPointers: ; 60e3f (18:4e3f)
PokemonTower7TrainerHeaders: ; 60e47 (18:4e47) PokemonTower7TrainerHeaders: ; 60e47 (18:4e47)
PokemonTower7TrainerHeader0: ; 60e47 (18:4e47) PokemonTower7TrainerHeader0: ; 60e47 (18:4e47)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_POKEMONTOWER_7_TRAINER_0
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd769 ; flag's byte dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_7_TRAINER_0
dw PokemonTower7BattleText1 ; TextBeforeBattle dw PokemonTower7BattleText1 ; TextBeforeBattle
dw PokemonTower7AfterBattleText1 ; TextAfterBattle dw PokemonTower7AfterBattleText1 ; TextAfterBattle
dw PokemonTower7EndBattleText1 ; TextEndBattle dw PokemonTower7EndBattleText1 ; TextEndBattle
dw PokemonTower7EndBattleText1 ; TextEndBattle dw PokemonTower7EndBattleText1 ; TextEndBattle
PokemonTower7TrainerHeader1: ; 60e53 (18:4e53) PokemonTower7TrainerHeader1: ; 60e53 (18:4e53)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_POKEMONTOWER_7_TRAINER_1
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd769 ; flag's byte dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_7_TRAINER_1
dw PokemonTower7BattleText2 ; TextBeforeBattle dw PokemonTower7BattleText2 ; TextBeforeBattle
dw PokemonTower7AfterBattleText2 ; TextAfterBattle dw PokemonTower7AfterBattleText2 ; TextAfterBattle
dw PokemonTower7EndBattleText2 ; TextEndBattle dw PokemonTower7EndBattleText2 ; TextEndBattle
dw PokemonTower7EndBattleText2 ; TextEndBattle dw PokemonTower7EndBattleText2 ; TextEndBattle
PokemonTower7TrainerHeader2: ; 60e5f (18:4e5f) PokemonTower7TrainerHeader2: ; 60e5f (18:4e5f)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_POKEMONTOWER_7_TRAINER_2
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd769 ; flag's byte dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_7_TRAINER_2
dw PokemonTower7BattleText3 ; TextBeforeBattle dw PokemonTower7BattleText3 ; TextBeforeBattle
dw PokemonTower7AfterBattleText3 ; TextAfterBattle dw PokemonTower7AfterBattleText3 ; TextAfterBattle
dw PokemonTower7EndBattleText3 ; TextEndBattle dw PokemonTower7EndBattleText3 ; TextEndBattle
@ -256,10 +256,8 @@ PokemonTower7FujiText:
TX_ASM TX_ASM
ld hl, TowerRescueFujiText ld hl, TowerRescueFujiText
call PrintText call PrintText
ld hl, wd7e0 SetEvent EVENT_4CF
set 7, [hl] SetEvent EVENT_117
ld hl, wd769
set 7, [hl]
ld a, HS_LAVENDER_HOUSE_1_MR_FUJI ld a, HS_LAVENDER_HOUSE_1_MR_FUJI
ld [wcc4d], a ld [wcc4d], a
predef ShowObject predef ShowObject

View file

@ -30,81 +30,81 @@ PowerPlantTextPointers: ; 1e2df (7:62df)
PowerPlantTrainerHeaders: ; 1e2fb (7:62fb) PowerPlantTrainerHeaders: ; 1e2fb (7:62fb)
PowerPlantTrainerHeader0: ; 1e2fb (7:62fb) PowerPlantTrainerHeader0: ; 1e2fb (7:62fb)
db 1 ; flag's bit dbEventFlagBit EVENT_BEAT_POWER_PLANT_TRAINER_0
db 0 ; view range db 0 ; view range
dw wd7d3 ; flag's byte dwEventFlagAddress EVENT_BEAT_POWER_PLANT_TRAINER_0
dw VoltorbBattleText ; TextBeforeBattle dw VoltorbBattleText ; TextBeforeBattle
dw VoltorbBattleText ; TextAfterBattle dw VoltorbBattleText ; TextAfterBattle
dw VoltorbBattleText ; TextEndBattle dw VoltorbBattleText ; TextEndBattle
dw VoltorbBattleText ; TextEndBattle dw VoltorbBattleText ; TextEndBattle
PowerPlantTrainerHeader1: ; 1e307 (7:6307) PowerPlantTrainerHeader1: ; 1e307 (7:6307)
db 2 ; flag's bit dbEventFlagBit EVENT_BEAT_POWER_PLANT_TRAINER_1
db 0 ; view range db 0 ; view range
dw wd7d3 ; flag's byte dwEventFlagAddress EVENT_BEAT_POWER_PLANT_TRAINER_1
dw VoltorbBattleText ; TextBeforeBattle dw VoltorbBattleText ; TextBeforeBattle
dw VoltorbBattleText ; TextAfterBattle dw VoltorbBattleText ; TextAfterBattle
dw VoltorbBattleText ; TextEndBattle dw VoltorbBattleText ; TextEndBattle
dw VoltorbBattleText ; TextEndBattle dw VoltorbBattleText ; TextEndBattle
PowerPlantTrainerHeader2: ; 1e313 (7:6313) PowerPlantTrainerHeader2: ; 1e313 (7:6313)
db 3 ; flag's bit dbEventFlagBit EVENT_BEAT_POWER_PLANT_TRAINER_2
db 0 ; view range db 0 ; view range
dw wd7d3 ; flag's byte dwEventFlagAddress EVENT_BEAT_POWER_PLANT_TRAINER_2
dw VoltorbBattleText ; TextBeforeBattle dw VoltorbBattleText ; TextBeforeBattle
dw VoltorbBattleText ; TextAfterBattle dw VoltorbBattleText ; TextAfterBattle
dw VoltorbBattleText ; TextEndBattle dw VoltorbBattleText ; TextEndBattle
dw VoltorbBattleText ; TextEndBattle dw VoltorbBattleText ; TextEndBattle
PowerPlantTrainerHeader3: ; 1e31f (7:631f) PowerPlantTrainerHeader3: ; 1e31f (7:631f)
db 4 ; flag's bit dbEventFlagBit EVENT_BEAT_POWER_PLANT_TRAINER_3
db 0 ; view range db 0 ; view range
dw wd7d3 ; flag's byte dwEventFlagAddress EVENT_BEAT_POWER_PLANT_TRAINER_3
dw VoltorbBattleText ; TextBeforeBattle dw VoltorbBattleText ; TextBeforeBattle
dw VoltorbBattleText ; TextAfterBattle dw VoltorbBattleText ; TextAfterBattle
dw VoltorbBattleText ; TextEndBattle dw VoltorbBattleText ; TextEndBattle
dw VoltorbBattleText ; TextEndBattle dw VoltorbBattleText ; TextEndBattle
PowerPlantTrainerHeader4: ; 1e32b (7:632b) PowerPlantTrainerHeader4: ; 1e32b (7:632b)
db 5 ; flag's bit dbEventFlagBit EVENT_BEAT_POWER_PLANT_TRAINER_4
db 0 ; view range db 0 ; view range
dw wd7d3 ; flag's byte dwEventFlagAddress EVENT_BEAT_POWER_PLANT_TRAINER_4
dw VoltorbBattleText ; TextBeforeBattle dw VoltorbBattleText ; TextBeforeBattle
dw VoltorbBattleText ; TextAfterBattle dw VoltorbBattleText ; TextAfterBattle
dw VoltorbBattleText ; TextEndBattle dw VoltorbBattleText ; TextEndBattle
dw VoltorbBattleText ; TextEndBattle dw VoltorbBattleText ; TextEndBattle
PowerPlantTrainerHeader5: ; 1e337 (7:6337) PowerPlantTrainerHeader5: ; 1e337 (7:6337)
db 6 ; flag's bit dbEventFlagBit EVENT_BEAT_POWER_PLANT_TRAINER_5
db 0 ; view range db 0 ; view range
dw wd7d3 ; flag's byte dwEventFlagAddress EVENT_BEAT_POWER_PLANT_TRAINER_5
dw VoltorbBattleText ; TextBeforeBattle dw VoltorbBattleText ; TextBeforeBattle
dw VoltorbBattleText ; TextAfterBattle dw VoltorbBattleText ; TextAfterBattle
dw VoltorbBattleText ; TextEndBattle dw VoltorbBattleText ; TextEndBattle
dw VoltorbBattleText ; TextEndBattle dw VoltorbBattleText ; TextEndBattle
PowerPlantTrainerHeader6: ; 1e343 (7:6343) PowerPlantTrainerHeader6: ; 1e343 (7:6343)
db 7 ; flag's bit dbEventFlagBit EVENT_BEAT_POWER_PLANT_TRAINER_6
db 0 ; view range db 0 ; view range
dw wd7d3 ; flag's byte dwEventFlagAddress EVENT_BEAT_POWER_PLANT_TRAINER_6
dw VoltorbBattleText ; TextBeforeBattle dw VoltorbBattleText ; TextBeforeBattle
dw VoltorbBattleText ; TextAfterBattle dw VoltorbBattleText ; TextAfterBattle
dw VoltorbBattleText ; TextEndBattle dw VoltorbBattleText ; TextEndBattle
dw VoltorbBattleText ; TextEndBattle dw VoltorbBattleText ; TextEndBattle
PowerPlantTrainerHeader7: ; 1e34f (7:634f) PowerPlantTrainerHeader7: ; 1e34f (7:634f)
db 8 ; flag's bit dbEventFlagBit EVENT_BEAT_POWER_PLANT_TRAINER_7, 1
db 0 ; view range db 0 ; view range
dw wd7d3 ; flag's byte dwEventFlagAddress EVENT_BEAT_POWER_PLANT_TRAINER_7, 1
dw VoltorbBattleText ; TextBeforeBattle dw VoltorbBattleText ; TextBeforeBattle
dw VoltorbBattleText ; TextAfterBattle dw VoltorbBattleText ; TextAfterBattle
dw VoltorbBattleText ; TextEndBattle dw VoltorbBattleText ; TextEndBattle
dw VoltorbBattleText ; TextEndBattle dw VoltorbBattleText ; TextEndBattle
PowerPlantTrainerHeader8: ; 1e35b (7:635b) PowerPlantTrainerHeader8: ; 1e35b (7:635b)
db 9 ; flag's bit dbEventFlagBit EVENT_BEAT_POWER_PLANT_TRAINER_8, 1
db 0 ; view range db 0 ; view range
dw wd7d3 ; flag's byte dwEventFlagAddress EVENT_BEAT_POWER_PLANT_TRAINER_8, 1
dw ZapdosBattleText ; TextBeforeBattle dw ZapdosBattleText ; TextBeforeBattle
dw ZapdosBattleText ; TextAfterBattle dw ZapdosBattleText ; TextAfterBattle
dw ZapdosBattleText ; TextEndBattle dw ZapdosBattleText ; TextEndBattle

View file

@ -13,18 +13,16 @@ RocketHideout1Script_44be0: ; 44be0 (11:4be0)
bit 5, [hl] bit 5, [hl]
res 5, [hl] res 5, [hl]
ret z ret z
ld a, [wd815] CheckEvent EVENT_677
bit 7, a
jr nz, .asm_44c01 jr nz, .asm_44c01
bit 5, a CheckEventReuseA EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_5
jr nz, .asm_44bf7 jr nz, .asm_44bf7
ld a, $54 ld a, $54
jr .asm_44c03 jr .asm_44c03
.asm_44bf7 .asm_44bf7
ld a, SFX_GO_INSIDE ld a, SFX_GO_INSIDE
call PlaySound call PlaySound
ld hl, wd815 CheckEventHL EVENT_677
bit 7, [hl]
.asm_44c01 .asm_44c01
ld a, $e ld a, $e
.asm_44c03 .asm_44c03
@ -48,45 +46,45 @@ RocketHideout1TextPointers: ; 44c14 (11:4c14)
RocketHideout1TrainerHeaders: ; 44c22 (11:4c22) RocketHideout1TrainerHeaders: ; 44c22 (11:4c22)
RocketHideout1TrainerHeader0: ; 44c22 (11:4c22) RocketHideout1TrainerHeader0: ; 44c22 (11:4c22)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_0
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd815 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_0
dw RocketHideout1BattleText2 ; TextBeforeBattle dw RocketHideout1BattleText2 ; TextBeforeBattle
dw RocketHideout1AfterBattleTxt2 ; TextAfterBattle dw RocketHideout1AfterBattleTxt2 ; TextAfterBattle
dw RocketHideout1EndBattleText2 ; TextEndBattle dw RocketHideout1EndBattleText2 ; TextEndBattle
dw RocketHideout1EndBattleText2 ; TextEndBattle dw RocketHideout1EndBattleText2 ; TextEndBattle
RocketHideout1TrainerHeader2: ; 44c2e (11:4c2e) RocketHideout1TrainerHeader2: ; 44c2e (11:4c2e)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_2
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd815 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_2
dw RocketHideout1BattleText3 ; TextBeforeBattle dw RocketHideout1BattleText3 ; TextBeforeBattle
dw RocketHideout1AfterBattleTxt3 ; TextAfterBattle dw RocketHideout1AfterBattleTxt3 ; TextAfterBattle
dw RocketHideout1EndBattleText3 ; TextEndBattle dw RocketHideout1EndBattleText3 ; TextEndBattle
dw RocketHideout1EndBattleText3 ; TextEndBattle dw RocketHideout1EndBattleText3 ; TextEndBattle
RocketHideout1TrainerHeader3: ; 44c3a (11:4c3a) RocketHideout1TrainerHeader3: ; 44c3a (11:4c3a)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_3
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd815 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_3
dw RocketHideout1BattleText4 ; TextBeforeBattle dw RocketHideout1BattleText4 ; TextBeforeBattle
dw RocketHideout1AfterBattleTxt4 ; TextAfterBattle dw RocketHideout1AfterBattleTxt4 ; TextAfterBattle
dw RocketHideout1EndBattleText4 ; TextEndBattle dw RocketHideout1EndBattleText4 ; TextEndBattle
dw RocketHideout1EndBattleText4 ; TextEndBattle dw RocketHideout1EndBattleText4 ; TextEndBattle
RocketHideout1TrainerHeader4: ; 44c46 (11:4c46) RocketHideout1TrainerHeader4: ; 44c46 (11:4c46)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd815 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4
dw RocketHideout1BattleText5 ; TextBeforeBattle dw RocketHideout1BattleText5 ; TextBeforeBattle
dw RocketHideout1AfterBattleTxt5 ; TextAfterBattle dw RocketHideout1AfterBattleTxt5 ; TextAfterBattle
dw RocketHideout1EndBattleText5 ; TextEndBattle dw RocketHideout1EndBattleText5 ; TextEndBattle
dw RocketHideout1EndBattleText5 ; TextEndBattle dw RocketHideout1EndBattleText5 ; TextEndBattle
RocketHideout1TrainerHeader5: ; 44c52 (11:4c52) RocketHideout1TrainerHeader5: ; 44c52 (11:4c52)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_5
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd815 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_5
dw RocketHideout1BattleText6 ; TextBeforeBattle dw RocketHideout1BattleText6 ; TextBeforeBattle
dw RocketHideout1AfterBattleTxt6 ; TextAfterBattle dw RocketHideout1AfterBattleTxt6 ; TextAfterBattle
dw RocketHideout1EndBattleText6 ; TextEndBattle dw RocketHideout1EndBattleText6 ; TextEndBattle
@ -127,8 +125,7 @@ RocketHideout1Text5: ; 44c87 (11:4c87)
RocketHideout1EndBattleText6: ; 44c91 (11:4c91) RocketHideout1EndBattleText6: ; 44c91 (11:4c91)
TX_FAR _RocketHideout1EndBattleText6 TX_FAR _RocketHideout1EndBattleText6
TX_ASM TX_ASM
ld hl, wd815 SetEvent EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_5
set 5, [hl]
ld hl, RocketHideout1Text_44c9f ld hl, RocketHideout1Text_44c9f
ret ret

View file

@ -422,9 +422,9 @@ RocketHideout2TextPointers: ; 450c7 (11:50c7)
RocketHideout2TrainerHeaders: ; 450d1 (11:50d1) RocketHideout2TrainerHeaders: ; 450d1 (11:50d1)
RocketHideout2TrainerHeader0: ; 450d1 (11:50d1) RocketHideout2TrainerHeader0: ; 450d1 (11:50d1)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_2_TRAINER_0
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd817 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_2_TRAINER_0
dw RocketHideout2BattleText2 ; TextBeforeBattle dw RocketHideout2BattleText2 ; TextBeforeBattle
dw RocketHideout2AfterBattleTxt2 ; TextAfterBattle dw RocketHideout2AfterBattleTxt2 ; TextAfterBattle
dw RocketHideout2EndBattleText2 ; TextEndBattle dw RocketHideout2EndBattleText2 ; TextEndBattle

View file

@ -151,18 +151,18 @@ RocketHideout3TextPointers: ; 452fa (11:52fa)
RocketHideout3TrainerHeaders: ; 45302 (11:5302) RocketHideout3TrainerHeaders: ; 45302 (11:5302)
RocketHideout3TrainerHeader0: ; 45302 (11:5302) RocketHideout3TrainerHeader0: ; 45302 (11:5302)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_0
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd819 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_0
dw RocketHideout3BattleText2 ; TextBeforeBattle dw RocketHideout3BattleText2 ; TextBeforeBattle
dw RocketHideout3AfterBattleTxt2 ; TextAfterBattle dw RocketHideout3AfterBattleTxt2 ; TextAfterBattle
dw RocketHideout3EndBattleText2 ; TextEndBattle dw RocketHideout3EndBattleText2 ; TextEndBattle
dw RocketHideout3EndBattleText2 ; TextEndBattle dw RocketHideout3EndBattleText2 ; TextEndBattle
RocketHideout3TrainerHeader2: ; 4530e (11:530e) RocketHideout3TrainerHeader2: ; 4530e (11:530e)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_2
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd819 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_2
dw RocketHideout3BattleTxt ; TextBeforeBattle dw RocketHideout3BattleTxt ; TextBeforeBattle
dw RocketHideout3AfterBattleText3 ; TextAfterBattle dw RocketHideout3AfterBattleText3 ; TextAfterBattle
dw RocketHideout3EndBattleText3 ; TextEndBattle dw RocketHideout3EndBattleText3 ; TextEndBattle

View file

@ -13,8 +13,7 @@ RocketHideout4Script_45473: ; 45473 (11:5473)
bit 5, [hl] bit 5, [hl]
res 5, [hl] res 5, [hl]
ret z ret z
ld a, [wd81b] CheckEvent EVENT_6A5
bit 5, a
jr nz, .asm_45496 jr nz, .asm_45496
and $c and $c
cp $c cp $c
@ -24,8 +23,7 @@ RocketHideout4Script_45473: ; 45473 (11:5473)
.asm_4548c .asm_4548c
ld a, SFX_GO_INSIDE ld a, SFX_GO_INSIDE
call PlaySound call PlaySound
ld hl, wd81b SetEvent EVENT_6A5
set 5, [hl]
.asm_45496 .asm_45496
ld a, $e ld a, $e
.asm_45498 .asm_45498
@ -53,8 +51,7 @@ RocketHideout4Script3: ; 454b6 (11:54b6)
call UpdateSprites call UpdateSprites
ld a, $f0 ld a, $f0
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld hl, wd81b SetEvent EVENT_6A7
set 7, [hl]
ld a, $a ld a, $a
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
@ -90,27 +87,27 @@ RocketHideout4TextPointers: ; 45501 (11:5501)
RocketHideout4TrainerHeaders: ; 45515 (11:5515) RocketHideout4TrainerHeaders: ; 45515 (11:5515)
RocketHideout4TrainerHeader0: ; 45515 (11:5515) RocketHideout4TrainerHeader0: ; 45515 (11:5515)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_0
db ($0 << 4) ; trainer's view range db ($0 << 4) ; trainer's view range
dw wd81b ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_0
dw RocketHideout4BattleText2 ; TextBeforeBattle dw RocketHideout4BattleText2 ; TextBeforeBattle
dw RocketHideout4AfterBattleText2 ; TextAfterBattle dw RocketHideout4AfterBattleText2 ; TextAfterBattle
dw RocketHideout4EndBattleText2 ; TextEndBattle dw RocketHideout4EndBattleText2 ; TextEndBattle
dw RocketHideout4EndBattleText2 ; TextEndBattle dw RocketHideout4EndBattleText2 ; TextEndBattle
RocketHideout4TrainerHeader2: ; 45521 (11:5521) RocketHideout4TrainerHeader2: ; 45521 (11:5521)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2
db ($0 << 4) ; trainer's view range db ($0 << 4) ; trainer's view range
dw wd81b ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2
dw RocketHideout4BattleText3 ; TextBeforeBattle dw RocketHideout4BattleText3 ; TextBeforeBattle
dw RocketHideout4AfterBattleText3 ; TextAfterBattle dw RocketHideout4AfterBattleText3 ; TextAfterBattle
dw RocketHideout4EndBattleText3 ; TextEndBattle dw RocketHideout4EndBattleText3 ; TextEndBattle
dw RocketHideout4EndBattleText3 ; TextEndBattle dw RocketHideout4EndBattleText3 ; TextEndBattle
RocketHideout4TrainerHeader3: ; 4552d (11:552d) RocketHideout4TrainerHeader3: ; 4552d (11:552d)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_3
db ($1 << 4) ; trainer's view range db ($1 << 4) ; trainer's view range
dw wd81b ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_3
dw RocketHideout4BattleText4 ; TextBeforeBattle dw RocketHideout4BattleText4 ; TextBeforeBattle
dw RocketHideout4AfterBattleText4 ; TextAfterBattle dw RocketHideout4AfterBattleText4 ; TextAfterBattle
dw RocketHideout4EndBattleText4 ; TextEndBattle dw RocketHideout4EndBattleText4 ; TextEndBattle
@ -120,8 +117,7 @@ RocketHideout4TrainerHeader3: ; 4552d (11:552d)
RocketHideout4Text1: ; 4553a (11:553a) RocketHideout4Text1: ; 4553a (11:553a)
TX_ASM TX_ASM
ld a, [wd81b] CheckEvent EVENT_6A7
bit 7, a
jp nz, .asm_545571 jp nz, .asm_545571
ld hl, RocketHideout4Text_4557a ld hl, RocketHideout4Text_4557a
call PrintText call PrintText
@ -213,9 +209,7 @@ RocketHideout4AfterBattleText4: ; 455cf (11:55cf)
TX_ASM TX_ASM
ld hl, RocketHideout4Text_455ec ld hl, RocketHideout4Text_455ec
call PrintText call PrintText
ld hl, wd81b CheckAndSetEvent EVENT_6A6
bit 6, [hl]
set 6, [hl]
jr nz, .asm_455e9 jr nz, .asm_455e9
ld a, HS_ROCKET_HIDEOUT_4_ITEM_5 ld a, HS_ROCKET_HIDEOUT_4_ITEM_5
ld [wcc4d], a ld [wcc4d], a

View file

@ -24,63 +24,63 @@ RockTunnel1TextPointers: ; 444f5 (11:44f5)
RockTunnel1TrainerHeaders: ; 44505 (11:4505) RockTunnel1TrainerHeaders: ; 44505 (11:4505)
RockTunnel1TrainerHeader1: ; 44505 (11:4505) RockTunnel1TrainerHeader1: ; 44505 (11:4505)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_1
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7d2 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_1
dw RockTunnel1BattleText1 ; TextBeforeBattle dw RockTunnel1BattleText1 ; TextBeforeBattle
dw RockTunnel1AfterBattleText1 ; TextAfterBattle dw RockTunnel1AfterBattleText1 ; TextAfterBattle
dw RockTunnel1EndBattleText1 ; TextEndBattle dw RockTunnel1EndBattleText1 ; TextEndBattle
dw RockTunnel1EndBattleText1 ; TextEndBattle dw RockTunnel1EndBattleText1 ; TextEndBattle
RockTunnel1TrainerHeader2: ; 44511 (11:4511) RockTunnel1TrainerHeader2: ; 44511 (11:4511)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_2
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7d2 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_2
dw RockTunnel1BattleText2 ; TextBeforeBattle dw RockTunnel1BattleText2 ; TextBeforeBattle
dw RockTunnel1AfterBattleText2 ; TextAfterBattle dw RockTunnel1AfterBattleText2 ; TextAfterBattle
dw RockTunnel1EndBattleText2 ; TextEndBattle dw RockTunnel1EndBattleText2 ; TextEndBattle
dw RockTunnel1EndBattleText2 ; TextEndBattle dw RockTunnel1EndBattleText2 ; TextEndBattle
RockTunnel1TrainerHeader3: ; 4451d (11:451d) RockTunnel1TrainerHeader3: ; 4451d (11:451d)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_3
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7d2 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_3
dw RockTunnel1BattleText3 ; TextBeforeBattle dw RockTunnel1BattleText3 ; TextBeforeBattle
dw RockTunnel1AfterBattleText3 ; TextAfterBattle dw RockTunnel1AfterBattleText3 ; TextAfterBattle
dw RockTunnel1EndBattleText3 ; TextEndBattle dw RockTunnel1EndBattleText3 ; TextEndBattle
dw RockTunnel1EndBattleText3 ; TextEndBattle dw RockTunnel1EndBattleText3 ; TextEndBattle
RockTunnel1TrainerHeader4: ; 44529 (11:4529) RockTunnel1TrainerHeader4: ; 44529 (11:4529)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_4
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7d2 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_4
dw RockTunnel1BattleText4 ; TextBeforeBattle dw RockTunnel1BattleText4 ; TextBeforeBattle
dw RockTunnel1AfterBattleText4 ; TextAfterBattle dw RockTunnel1AfterBattleText4 ; TextAfterBattle
dw RockTunnel1EndBattleText4 ; TextEndBattle dw RockTunnel1EndBattleText4 ; TextEndBattle
dw RockTunnel1EndBattleText4 ; TextEndBattle dw RockTunnel1EndBattleText4 ; TextEndBattle
RockTunnel1TrainerHeader5: ; 44535 (11:4535) RockTunnel1TrainerHeader5: ; 44535 (11:4535)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_5
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7d2 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_5
dw RockTunnel1BattleText5 ; TextBeforeBattle dw RockTunnel1BattleText5 ; TextBeforeBattle
dw RockTunnel1AfterBattleText5 ; TextAfterBattle dw RockTunnel1AfterBattleText5 ; TextAfterBattle
dw RockTunnel1EndBattleText5 ; TextEndBattle dw RockTunnel1EndBattleText5 ; TextEndBattle
dw RockTunnel1EndBattleText5 ; TextEndBattle dw RockTunnel1EndBattleText5 ; TextEndBattle
RockTunnel1TrainerHeader6: ; 44541 (11:4541) RockTunnel1TrainerHeader6: ; 44541 (11:4541)
db $6 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_6
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7d2 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_6
dw RockTunnel1BattleText6 ; TextBeforeBattle dw RockTunnel1BattleText6 ; TextBeforeBattle
dw RockTunnel1AfterBattleText6 ; TextAfterBattle dw RockTunnel1AfterBattleText6 ; TextAfterBattle
dw RockTunnel1EndBattleText6 ; TextEndBattle dw RockTunnel1EndBattleText6 ; TextEndBattle
dw RockTunnel1EndBattleText6 ; TextEndBattle dw RockTunnel1EndBattleText6 ; TextEndBattle
RockTunnel1TrainerHeader7: ; 4454d (11:454d) RockTunnel1TrainerHeader7: ; 4454d (11:454d)
db $7 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_7
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7d2 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_7
dw RockTunnel1BattleText7 ; TextBeforeBattle dw RockTunnel1BattleText7 ; TextBeforeBattle
dw RockTunnel1AfterBattleText7 ; TextAfterBattle dw RockTunnel1AfterBattleText7 ; TextAfterBattle
dw RockTunnel1EndBattleText7 ; TextEndBattle dw RockTunnel1EndBattleText7 ; TextEndBattle

View file

@ -24,72 +24,72 @@ RockTunnel2TextPointers: ; 46004 (11:6004)
RockTunnel2TrainerHeaders: ; 46014 (11:6014) RockTunnel2TrainerHeaders: ; 46014 (11:6014)
RockTunnel2TrainerHeader0: ; 46014 (11:6014) RockTunnel2TrainerHeader0: ; 46014 (11:6014)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_0
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd87d ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_0
dw RockTunnel2BattleText2 ; TextBeforeBattle dw RockTunnel2BattleText2 ; TextBeforeBattle
dw RockTunnel2AfterBattleText2 ; TextAfterBattle dw RockTunnel2AfterBattleText2 ; TextAfterBattle
dw RockTunnel2EndBattleText2 ; TextEndBattle dw RockTunnel2EndBattleText2 ; TextEndBattle
dw RockTunnel2EndBattleText2 ; TextEndBattle dw RockTunnel2EndBattleText2 ; TextEndBattle
RockTunnel2TrainerHeader2: ; 46020 (11:6020) RockTunnel2TrainerHeader2: ; 46020 (11:6020)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_2
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd87d ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_2
dw RockTunnel2BattleText3 ; TextBeforeBattle dw RockTunnel2BattleText3 ; TextBeforeBattle
dw RockTunnel2AfterBattleText3 ; TextAfterBattle dw RockTunnel2AfterBattleText3 ; TextAfterBattle
dw RockTunnel2EndBattleText3 ; TextEndBattle dw RockTunnel2EndBattleText3 ; TextEndBattle
dw RockTunnel2EndBattleText3 ; TextEndBattle dw RockTunnel2EndBattleText3 ; TextEndBattle
RockTunnel2TrainerHeader3: ; 4602c (11:602c) RockTunnel2TrainerHeader3: ; 4602c (11:602c)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_3
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd87d ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_3
dw RockTunnel2BattleText4 ; TextBeforeBattle dw RockTunnel2BattleText4 ; TextBeforeBattle
dw RockTunnel2AfterBattleText4 ; TextAfterBattle dw RockTunnel2AfterBattleText4 ; TextAfterBattle
dw RockTunnel2EndBattleText4 ; TextEndBattle dw RockTunnel2EndBattleText4 ; TextEndBattle
dw RockTunnel2EndBattleText4 ; TextEndBattle dw RockTunnel2EndBattleText4 ; TextEndBattle
RockTunnel2TrainerHeader4: ; 46038 (11:6038) RockTunnel2TrainerHeader4: ; 46038 (11:6038)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_4
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd87d ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_4
dw RockTunnel2BattleText5 ; TextBeforeBattle dw RockTunnel2BattleText5 ; TextBeforeBattle
dw RockTunnel2AfterBattleText5 ; TextAfterBattle dw RockTunnel2AfterBattleText5 ; TextAfterBattle
dw RockTunnel2EndBattleText5 ; TextEndBattle dw RockTunnel2EndBattleText5 ; TextEndBattle
dw RockTunnel2EndBattleText5 ; TextEndBattle dw RockTunnel2EndBattleText5 ; TextEndBattle
RockTunnel2TrainerHeader5: ; 46044 (11:6044) RockTunnel2TrainerHeader5: ; 46044 (11:6044)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_5
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd87d ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_5
dw RockTunnel2BattleText6 ; TextBeforeBattle dw RockTunnel2BattleText6 ; TextBeforeBattle
dw RockTunnel2AfterBattleText6 ; TextAfterBattle dw RockTunnel2AfterBattleText6 ; TextAfterBattle
dw RockTunnel2EndBattleText6 ; TextEndBattle dw RockTunnel2EndBattleText6 ; TextEndBattle
dw RockTunnel2EndBattleText6 ; TextEndBattle dw RockTunnel2EndBattleText6 ; TextEndBattle
RockTunnel2TrainerHeader6: ; 46050 (11:6050) RockTunnel2TrainerHeader6: ; 46050 (11:6050)
db $6 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_6
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd87d ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_6
dw RockTunnel2BattleText7 ; TextBeforeBattle dw RockTunnel2BattleText7 ; TextBeforeBattle
dw RockTunnel2AfterBattleText7 ; TextAfterBattle dw RockTunnel2AfterBattleText7 ; TextAfterBattle
dw RockTunnel2EndBattleText7 ; TextEndBattle dw RockTunnel2EndBattleText7 ; TextEndBattle
dw RockTunnel2EndBattleText7 ; TextEndBattle dw RockTunnel2EndBattleText7 ; TextEndBattle
RockTunnel2TrainerHeader7: ; 4605c (11:605c) RockTunnel2TrainerHeader7: ; 4605c (11:605c)
db $7 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_7
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd87d ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_7
dw RockTunnel2BattleText8 ; TextBeforeBattle dw RockTunnel2BattleText8 ; TextBeforeBattle
dw RockTunnel2AfterBattleText8 ; TextAfterBattle dw RockTunnel2AfterBattleText8 ; TextAfterBattle
dw RockTunnel2EndBattleText8 ; TextEndBattle dw RockTunnel2EndBattleText8 ; TextEndBattle
dw RockTunnel2EndBattleText8 ; TextEndBattle dw RockTunnel2EndBattleText8 ; TextEndBattle
RockTunnel2TrainerHeader8: ; 46068 (11:6068) RockTunnel2TrainerHeader8: ; 46068 (11:6068)
db $8 ; flag's bit dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_8, 1
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd87d ; flag's byte dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_8, 1
dw RockTunnel2BattleText9 ; TextBeforeBattle dw RockTunnel2BattleText9 ; TextBeforeBattle
dw RockTunnel2AfterBattleText9 ; TextAfterBattle dw RockTunnel2AfterBattleText9 ; TextAfterBattle
dw RockTunnel2EndBattleText9 ; TextEndBattle dw RockTunnel2EndBattleText9 ; TextEndBattle

View file

@ -8,9 +8,7 @@ Route1TextPointers: ; 1cab2 (7:4ab2)
Route1Text1: ; 1cab8 (7:4ab8) Route1Text1: ; 1cab8 (7:4ab8)
TX_ASM TX_ASM
ld hl, wd7bf CheckAndSetEvent EVENT_3C0
bit 0, [hl]
set 0, [hl]
jr nz, .asm_1cada jr nz, .asm_1cada
ld hl, Route1ViridianMartSampleText ld hl, Route1ViridianMartSampleText
call PrintText call PrintText

View file

@ -26,54 +26,54 @@ Route10TextPointers: ; 5934f (16:534f)
Route10TrainerHeaders: ; 59363 (16:5363) Route10TrainerHeaders: ; 59363 (16:5363)
Route10TrainerHeader0: ; 59363 (16:5363) Route10TrainerHeader0: ; 59363 (16:5363)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_10_TRAINER_0
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7d1 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_10_TRAINER_0
dw Route10BattleText1 ; TextBeforeBattle dw Route10BattleText1 ; TextBeforeBattle
dw Route10AfterBattleText1 ; TextAfterBattle dw Route10AfterBattleText1 ; TextAfterBattle
dw Route10EndBattleText1 ; TextEndBattle dw Route10EndBattleText1 ; TextEndBattle
dw Route10EndBattleText1 ; TextEndBattle dw Route10EndBattleText1 ; TextEndBattle
Route10TrainerHeader1: ; 5936f (16:536f) Route10TrainerHeader1: ; 5936f (16:536f)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_10_TRAINER_1
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7d1 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_10_TRAINER_1
dw Route10BattleText2 ; TextBeforeBattle dw Route10BattleText2 ; TextBeforeBattle
dw Route10AfterBattleText2 ; TextAfterBattle dw Route10AfterBattleText2 ; TextAfterBattle
dw Route10EndBattleText2 ; TextEndBattle dw Route10EndBattleText2 ; TextEndBattle
dw Route10EndBattleText2 ; TextEndBattle dw Route10EndBattleText2 ; TextEndBattle
Route10TrainerHeader2: ; 5937b (16:537b) Route10TrainerHeader2: ; 5937b (16:537b)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_10_TRAINER_2
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7d1 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_10_TRAINER_2
dw Route10BattleText3 ; TextBeforeBattle dw Route10BattleText3 ; TextBeforeBattle
dw Route10AfterBattleText3 ; TextAfterBattle dw Route10AfterBattleText3 ; TextAfterBattle
dw Route10EndBattleText3 ; TextEndBattle dw Route10EndBattleText3 ; TextEndBattle
dw Route10EndBattleText3 ; TextEndBattle dw Route10EndBattleText3 ; TextEndBattle
Route10TrainerHeader3: ; 59387 (16:5387) Route10TrainerHeader3: ; 59387 (16:5387)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_10_TRAINER_3
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7d1 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_10_TRAINER_3
dw Route10BattleText4 ; TextBeforeBattle dw Route10BattleText4 ; TextBeforeBattle
dw Route10AfterBattleText4 ; TextAfterBattle dw Route10AfterBattleText4 ; TextAfterBattle
dw Route10EndBattleText4 ; TextEndBattle dw Route10EndBattleText4 ; TextEndBattle
dw Route10EndBattleText4 ; TextEndBattle dw Route10EndBattleText4 ; TextEndBattle
Route10TrainerHeader4: ; 59393 (16:5393) Route10TrainerHeader4: ; 59393 (16:5393)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_10_TRAINER_4
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7d1 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_10_TRAINER_4
dw Route10BattleText5 ; TextBeforeBattle dw Route10BattleText5 ; TextBeforeBattle
dw Route10AfterBattleText5 ; TextAfterBattle dw Route10AfterBattleText5 ; TextAfterBattle
dw Route10EndBattleText5 ; TextEndBattle dw Route10EndBattleText5 ; TextEndBattle
dw Route10EndBattleText5 ; TextEndBattle dw Route10EndBattleText5 ; TextEndBattle
Route10TrainerHeader5: ; 5939f (16:539f) Route10TrainerHeader5: ; 5939f (16:539f)
db $6 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_10_TRAINER_5
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7d1 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_10_TRAINER_5
dw Route10BattleText6 ; TextBeforeBattle dw Route10BattleText6 ; TextBeforeBattle
dw Route10AfterBattleText6 ; TextAfterBattle dw Route10AfterBattleText6 ; TextAfterBattle
dw Route10EndBattleText6 ; TextEndBattle dw Route10EndBattleText6 ; TextEndBattle

View file

@ -27,90 +27,90 @@ Route11TextPointers: ; 59465 (16:5465)
Route11TrainerHeaders: ; 5947b (16:547b) Route11TrainerHeaders: ; 5947b (16:547b)
Route11TrainerHeader0: ; 5947b (16:547b) Route11TrainerHeader0: ; 5947b (16:547b)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_0
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7d5 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_0
dw Route11BattleText1 ; TextBeforeBattle dw Route11BattleText1 ; TextBeforeBattle
dw Route11AfterBattleText1 ; TextAfterBattle dw Route11AfterBattleText1 ; TextAfterBattle
dw Route11EndBattleText1 ; TextEndBattle dw Route11EndBattleText1 ; TextEndBattle
dw Route11EndBattleText1 ; TextEndBattle dw Route11EndBattleText1 ; TextEndBattle
Route11TrainerHeader1: ; 59487 (16:5487) Route11TrainerHeader1: ; 59487 (16:5487)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_1
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7d5 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_1
dw Route11BattleText2 ; TextBeforeBattle dw Route11BattleText2 ; TextBeforeBattle
dw Route11AfterBattleText2 ; TextAfterBattle dw Route11AfterBattleText2 ; TextAfterBattle
dw Route11EndBattleText2 ; TextEndBattle dw Route11EndBattleText2 ; TextEndBattle
dw Route11EndBattleText2 ; TextEndBattle dw Route11EndBattleText2 ; TextEndBattle
Route11TrainerHeader2: ; 59493 (16:5493) Route11TrainerHeader2: ; 59493 (16:5493)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_2
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7d5 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_2
dw Route11BattleText3 ; TextBeforeBattle dw Route11BattleText3 ; TextBeforeBattle
dw Route11AfterBattleText3 ; TextAfterBattle dw Route11AfterBattleText3 ; TextAfterBattle
dw Route11EndBattleText3 ; TextEndBattle dw Route11EndBattleText3 ; TextEndBattle
dw Route11EndBattleText3 ; TextEndBattle dw Route11EndBattleText3 ; TextEndBattle
Route11TrainerHeader3: ; 5949f (16:549f) Route11TrainerHeader3: ; 5949f (16:549f)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_3
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7d5 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_3
dw Route11BattleText4 ; TextBeforeBattle dw Route11BattleText4 ; TextBeforeBattle
dw Route11AfterBattleText4 ; TextAfterBattle dw Route11AfterBattleText4 ; TextAfterBattle
dw Route11EndBattleText4 ; TextEndBattle dw Route11EndBattleText4 ; TextEndBattle
dw Route11EndBattleText4 ; TextEndBattle dw Route11EndBattleText4 ; TextEndBattle
Route11TrainerHeader4: ; 594ab (16:54ab) Route11TrainerHeader4: ; 594ab (16:54ab)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_4
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7d5 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_4
dw Route11BattleText5 ; TextBeforeBattle dw Route11BattleText5 ; TextBeforeBattle
dw Route11AfterBattleText5 ; TextAfterBattle dw Route11AfterBattleText5 ; TextAfterBattle
dw Route11EndBattleText5 ; TextEndBattle dw Route11EndBattleText5 ; TextEndBattle
dw Route11EndBattleText5 ; TextEndBattle dw Route11EndBattleText5 ; TextEndBattle
Route11TrainerHeader5: ; 594b7 (16:54b7) Route11TrainerHeader5: ; 594b7 (16:54b7)
db $6 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_5
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7d5 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_5
dw Route11BattleText6 ; TextBeforeBattle dw Route11BattleText6 ; TextBeforeBattle
dw Route11AfterBattleText6 ; TextAfterBattle dw Route11AfterBattleText6 ; TextAfterBattle
dw Route11EndBattleText6 ; TextEndBattle dw Route11EndBattleText6 ; TextEndBattle
dw Route11EndBattleText6 ; TextEndBattle dw Route11EndBattleText6 ; TextEndBattle
Route11TrainerHeader6: ; 594c3 (16:54c3) Route11TrainerHeader6: ; 594c3 (16:54c3)
db $7 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_6
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7d5 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_6
dw Route11BattleText7 ; TextBeforeBattle dw Route11BattleText7 ; TextBeforeBattle
dw Route11AfterBattleText7 ; TextAfterBattle dw Route11AfterBattleText7 ; TextAfterBattle
dw Route11EndBattleText7 ; TextEndBattle dw Route11EndBattleText7 ; TextEndBattle
dw Route11EndBattleText7 ; TextEndBattle dw Route11EndBattleText7 ; TextEndBattle
Route11TrainerHeader7: ; 594cf (16:54cf) Route11TrainerHeader7: ; 594cf (16:54cf)
db $8 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_7, 1
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7d5 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_7, 1
dw Route11BattleText8 ; TextBeforeBattle dw Route11BattleText8 ; TextBeforeBattle
dw Route11AfterBattleText8 ; TextAfterBattle dw Route11AfterBattleText8 ; TextAfterBattle
dw Route11EndBattleText8 ; TextEndBattle dw Route11EndBattleText8 ; TextEndBattle
dw Route11EndBattleText8 ; TextEndBattle dw Route11EndBattleText8 ; TextEndBattle
Route11TrainerHeader8: ; 594db (16:54db) Route11TrainerHeader8: ; 594db (16:54db)
db $9 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_8, 1
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7d5 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_8, 1
dw Route11BattleText9 ; TextBeforeBattle dw Route11BattleText9 ; TextBeforeBattle
dw Route11AfterBattleText9 ; TextAfterBattle dw Route11AfterBattleText9 ; TextAfterBattle
dw Route11EndBattleText9 ; TextEndBattle dw Route11EndBattleText9 ; TextEndBattle
dw Route11EndBattleText9 ; TextEndBattle dw Route11EndBattleText9 ; TextEndBattle
Route11TrainerHeader9: ; 594e7 (16:54e7) Route11TrainerHeader9: ; 594e7 (16:54e7)
db $a ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_9, 1
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7d5 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_9, 1
dw Route11BattleText10 ; TextBeforeBattle dw Route11BattleText10 ; TextBeforeBattle
dw Route11AfterBattleText10 ; TextAfterBattle dw Route11AfterBattleText10 ; TextAfterBattle
dw Route11EndBattleText10 ; TextEndBattle dw Route11EndBattleText10 ; TextEndBattle

View file

@ -17,8 +17,7 @@ Route11GateUpstairsScriptEnd: ; 49469 (12:5469)
Route11GateUpstairsText2: ; 4946c (12:546c) Route11GateUpstairsText2: ; 4946c (12:546c)
TX_ASM TX_ASM
ld a, [wd7d6] CheckEvent EVENT_47F, 1
add a
jr c, .asm_4949b jr c, .asm_4949b
ld a, 30 ; pokemon needed ld a, 30 ; pokemon needed
ld [$ffdb], a ld [$ffdb], a
@ -35,8 +34,7 @@ Route11GateUpstairsText2: ; 4946c (12:546c)
ld a, [$ffdb] ld a, [$ffdb]
dec a dec a
jr nz, .asm_494a1 jr nz, .asm_494a1
ld hl, wd7d6 SetEvent EVENT_47F
set 7, [hl]
.asm_4949b .asm_4949b
ld hl, Route11GateUpstairsText_494a3 ld hl, Route11GateUpstairsText_494a3
call PrintText call PrintText
@ -52,8 +50,7 @@ Route11GateUpstairsText3: ; 494a8 (12:54a8)
ld a, [wSpriteStateData1 + 9] ld a, [wSpriteStateData1 + 9]
cp SPRITE_FACING_UP cp SPRITE_FACING_UP
jp nz, GateUpstairsScript_PrintIfFacingUp jp nz, GateUpstairsScript_PrintIfFacingUp
ld a, [wd7d8] CheckEvent EVENT_BEAT_ROUTE12_SNORLAX
bit 7, a ; fought snorlax?
ld hl, BinocularsSnorlaxText ld hl, BinocularsSnorlaxText
jr z, .print jr z, .print
ld hl, BinocularsNoSnorlaxText ld hl, BinocularsNoSnorlaxText

View file

@ -21,11 +21,10 @@ Route12ScriptPointers: ; 59611 (16:5611)
dw Route12Script3 dw Route12Script3
Route12Script0: ; 59619 (16:5619) Route12Script0: ; 59619 (16:5619)
ld hl, wd7d8 CheckEventHL EVENT_BEAT_ROUTE12_SNORLAX
bit 7, [hl]
jp nz, CheckFightingMapTrainers jp nz, CheckFightingMapTrainers
bit 6, [hl] CheckEventReuseHL EVENT_FIGHT_ROUTE12_SNORLAX
res 6, [hl] ResetEventReuseHL EVENT_FIGHT_ROUTE12_SNORLAX
jp z, CheckFightingMapTrainers jp z, CheckFightingMapTrainers
ld a, $d ld a, $d
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
@ -54,8 +53,7 @@ Route12Script3: ; 5964c (16:564c)
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
.asm_59664 .asm_59664
ld hl, wd7d8 SetEvent EVENT_BEAT_ROUTE12_SNORLAX
set 7, [hl]
call Delay3 call Delay3
ld a, $0 ld a, $0
ld [W_ROUTE12CURSCRIPT], a ld [W_ROUTE12CURSCRIPT], a
@ -80,63 +78,63 @@ Route12TextPointers: ; 59675 (16:5675)
Route12TrainerHeaders: ; 59691 (16:5691) Route12TrainerHeaders: ; 59691 (16:5691)
Route12TrainerHeader0: ; 59691 (16:5691) Route12TrainerHeader0: ; 59691 (16:5691)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_0
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7d7 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_0
dw Route12BattleText1 ; TextBeforeBattle dw Route12BattleText1 ; TextBeforeBattle
dw Route12AfterBattleText1 ; TextAfterBattle dw Route12AfterBattleText1 ; TextAfterBattle
dw Route12EndBattleText1 ; TextEndBattle dw Route12EndBattleText1 ; TextEndBattle
dw Route12EndBattleText1 ; TextEndBattle dw Route12EndBattleText1 ; TextEndBattle
Route12TrainerHeader1: ; 5969d (16:569d) Route12TrainerHeader1: ; 5969d (16:569d)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_1
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7d7 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_1
dw Route12BattleText2 ; TextBeforeBattle dw Route12BattleText2 ; TextBeforeBattle
dw Route12AfterBattleText2 ; TextAfterBattle dw Route12AfterBattleText2 ; TextAfterBattle
dw Route12EndBattleText2 ; TextEndBattle dw Route12EndBattleText2 ; TextEndBattle
dw Route12EndBattleText2 ; TextEndBattle dw Route12EndBattleText2 ; TextEndBattle
Route12TrainerHeader2: ; 596a9 (16:56a9) Route12TrainerHeader2: ; 596a9 (16:56a9)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_2
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7d7 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_2
dw Route12BattleText3 ; TextBeforeBattle dw Route12BattleText3 ; TextBeforeBattle
dw Route12AfterBattleText3 ; TextAfterBattle dw Route12AfterBattleText3 ; TextAfterBattle
dw Route12EndBattleText3 ; TextEndBattle dw Route12EndBattleText3 ; TextEndBattle
dw Route12EndBattleText3 ; TextEndBattle dw Route12EndBattleText3 ; TextEndBattle
Route12TrainerHeader3: ; 596b5 (16:56b5) Route12TrainerHeader3: ; 596b5 (16:56b5)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_3
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7d7 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_3
dw Route12BattleText4 ; TextBeforeBattle dw Route12BattleText4 ; TextBeforeBattle
dw Route12AfterBattleText4 ; TextAfterBattle dw Route12AfterBattleText4 ; TextAfterBattle
dw Route12EndBattleText4 ; TextEndBattle dw Route12EndBattleText4 ; TextEndBattle
dw Route12EndBattleText4 ; TextEndBattle dw Route12EndBattleText4 ; TextEndBattle
Route12TrainerHeader4: ; 596c1 (16:56c1) Route12TrainerHeader4: ; 596c1 (16:56c1)
db $6 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_4
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7d7 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_4
dw Route12BattleText5 ; TextBeforeBattle dw Route12BattleText5 ; TextBeforeBattle
dw Route12AfterBattleText5 ; TextAfterBattle dw Route12AfterBattleText5 ; TextAfterBattle
dw Route12EndBattleText5 ; TextEndBattle dw Route12EndBattleText5 ; TextEndBattle
dw Route12EndBattleText5 ; TextEndBattle dw Route12EndBattleText5 ; TextEndBattle
Route12TrainerHeader5: ; 596cd (16:56cd) Route12TrainerHeader5: ; 596cd (16:56cd)
db $7 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_5
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7d7 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_5
dw Route12BattleText6 ; TextBeforeBattle dw Route12BattleText6 ; TextBeforeBattle
dw Route12AfterBattleText6 ; TextAfterBattle dw Route12AfterBattleText6 ; TextAfterBattle
dw Route12EndBattleText6 ; TextEndBattle dw Route12EndBattleText6 ; TextEndBattle
dw Route12EndBattleText6 ; TextEndBattle dw Route12EndBattleText6 ; TextEndBattle
Route12TrainerHeader6: ; 596d9 (16:56d9) Route12TrainerHeader6: ; 596d9 (16:56d9)
db $8 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_6, 1
db ($1 << 4) ; trainer's view range db ($1 << 4) ; trainer's view range
dw wd7d7 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_6, 1
dw Route12BattleText7 ; TextBeforeBattle dw Route12BattleText7 ; TextBeforeBattle
dw Route12AfterBattleText7 ; TextAfterBattle dw Route12AfterBattleText7 ; TextAfterBattle
dw Route12EndBattleText7 ; TextEndBattle dw Route12EndBattleText7 ; TextEndBattle

View file

@ -8,8 +8,7 @@ Route12GateUpstairsTextPointers: ; 49563 (12:5563)
Route12GateUpstairsText1: ; 49569 (12:5569) Route12GateUpstairsText1: ; 49569 (12:5569)
TX_ASM TX_ASM
ld a, [wd7d7] CheckEvent EVENT_480, 1
rrca
jr c, .asm_0ad3c jr c, .asm_0ad3c
ld hl, TM39PreReceiveText ld hl, TM39PreReceiveText
call PrintText call PrintText
@ -18,8 +17,7 @@ Route12GateUpstairsText1: ; 49569 (12:5569)
jr nc, .BagFull jr nc, .BagFull
ld hl, ReceivedTM39Text ld hl, ReceivedTM39Text
call PrintText call PrintText
ld hl, wd7d7 SetEvent EVENT_480
set 0, [hl]
jr .asm_4ba56 jr .asm_4ba56
.BagFull .BagFull
ld hl, TM39NoRoomText ld hl, TM39NoRoomText

View file

@ -29,90 +29,90 @@ Route13TextPointers: ; 55837 (15:5837)
Route13TrainerHeaders: ; 55851 (15:5851) Route13TrainerHeaders: ; 55851 (15:5851)
Route13TrainerHeader0: ; 55851 (15:5851) Route13TrainerHeader0: ; 55851 (15:5851)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_0
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7d9 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_0
dw Route13BattleText2 ; TextBeforeBattle dw Route13BattleText2 ; TextBeforeBattle
dw Route13AfterBattleText2 ; TextAfterBattle dw Route13AfterBattleText2 ; TextAfterBattle
dw Route13EndBattleText2 ; TextEndBattle dw Route13EndBattleText2 ; TextEndBattle
dw Route13EndBattleText2 ; TextEndBattle dw Route13EndBattleText2 ; TextEndBattle
Route13TrainerHeader2: ; 5585d (15:585d) Route13TrainerHeader2: ; 5585d (15:585d)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_2
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7d9 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_2
dw Route13BattleText3 ; TextBeforeBattle dw Route13BattleText3 ; TextBeforeBattle
dw Route13AfterBattleText3 ; TextAfterBattle dw Route13AfterBattleText3 ; TextAfterBattle
dw Route13EndBattleText3 ; TextEndBattle dw Route13EndBattleText3 ; TextEndBattle
dw Route13EndBattleText3 ; TextEndBattle dw Route13EndBattleText3 ; TextEndBattle
Route13TrainerHeader3: ; 55869 (15:5869) Route13TrainerHeader3: ; 55869 (15:5869)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_3
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7d9 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_3
dw Route13BattleText4 ; TextBeforeBattle dw Route13BattleText4 ; TextBeforeBattle
dw Route13AfterBattleText4 ; TextAfterBattle dw Route13AfterBattleText4 ; TextAfterBattle
dw Route13EndBattleText4 ; TextEndBattle dw Route13EndBattleText4 ; TextEndBattle
dw Route13EndBattleText4 ; TextEndBattle dw Route13EndBattleText4 ; TextEndBattle
Route13TrainerHeader4: ; 55875 (15:5875) Route13TrainerHeader4: ; 55875 (15:5875)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_4
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7d9 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_4
dw Route13BattleText5 ; TextBeforeBattle dw Route13BattleText5 ; TextBeforeBattle
dw Route13AfterBattleText5 ; TextAfterBattle dw Route13AfterBattleText5 ; TextAfterBattle
dw Route13EndBattleText5 ; TextEndBattle dw Route13EndBattleText5 ; TextEndBattle
dw Route13EndBattleText5 ; TextEndBattle dw Route13EndBattleText5 ; TextEndBattle
Route13TrainerHeader5: ; 55881 (15:5881) Route13TrainerHeader5: ; 55881 (15:5881)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_5
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7d9 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_5
dw Route13BattleText6 ; TextBeforeBattle dw Route13BattleText6 ; TextBeforeBattle
dw Route13AfterBattleText6 ; TextAfterBattle dw Route13AfterBattleText6 ; TextAfterBattle
dw Route13EndBattleText6 ; TextEndBattle dw Route13EndBattleText6 ; TextEndBattle
dw Route13EndBattleText6 ; TextEndBattle dw Route13EndBattleText6 ; TextEndBattle
Route13TrainerHeader6: ; 5588d (15:588d) Route13TrainerHeader6: ; 5588d (15:588d)
db $6 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_6
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7d9 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_6
dw Route13BattleText7 ; TextBeforeBattle dw Route13BattleText7 ; TextBeforeBattle
dw Route13AfterBattleText7 ; TextAfterBattle dw Route13AfterBattleText7 ; TextAfterBattle
dw Route13EndBattleText7 ; TextEndBattle dw Route13EndBattleText7 ; TextEndBattle
dw Route13EndBattleText7 ; TextEndBattle dw Route13EndBattleText7 ; TextEndBattle
Route13TrainerHeader7: ; 55899 (15:5899) Route13TrainerHeader7: ; 55899 (15:5899)
db $7 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_7
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7d9 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_7
dw Route13BattleText8 ; TextBeforeBattle dw Route13BattleText8 ; TextBeforeBattle
dw Route13AfterBattleText8 ; TextAfterBattle dw Route13AfterBattleText8 ; TextAfterBattle
dw Route13EndBattleText8 ; TextEndBattle dw Route13EndBattleText8 ; TextEndBattle
dw Route13EndBattleText8 ; TextEndBattle dw Route13EndBattleText8 ; TextEndBattle
Route13TrainerHeader8: ; 558a5 (15:58a5) Route13TrainerHeader8: ; 558a5 (15:58a5)
db $8 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_8, 1
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7d9 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_8, 1
dw Route13BattleText9 ; TextBeforeBattle dw Route13BattleText9 ; TextBeforeBattle
dw Route13AfterBattleText9 ; TextAfterBattle dw Route13AfterBattleText9 ; TextAfterBattle
dw Route13EndBattleText9 ; TextEndBattle dw Route13EndBattleText9 ; TextEndBattle
dw Route13EndBattleText9 ; TextEndBattle dw Route13EndBattleText9 ; TextEndBattle
Route13TrainerHeader9: ; 558b1 (15:58b1) Route13TrainerHeader9: ; 558b1 (15:58b1)
db $9 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_9, 1
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7d9 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_9, 1
dw Route13BattleText10 ; TextBeforeBattle dw Route13BattleText10 ; TextBeforeBattle
dw Route13AfterBattleText10 ; TextAfterBattle dw Route13AfterBattleText10 ; TextAfterBattle
dw Route13EndBattleText10 ; TextEndBattle dw Route13EndBattleText10 ; TextEndBattle
dw Route13EndBattleText10 ; TextEndBattle dw Route13EndBattleText10 ; TextEndBattle
Route13TrainerHeader10: ; 558bd (15:58bd) Route13TrainerHeader10: ; 558bd (15:58bd)
db $a ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_10, 1
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7d9 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_10, 1
dw Route13BattleText11 ; TextBeforeBattle dw Route13BattleText11 ; TextBeforeBattle
dw Route13AfterBattleText11 ; TextAfterBattle dw Route13AfterBattleText11 ; TextAfterBattle
dw Route13EndBattleText11 ; TextEndBattle dw Route13EndBattleText11 ; TextEndBattle

View file

@ -27,90 +27,90 @@ Route14TextPointers: ; 559ec (15:59ec)
Route14TrainerHeaders: ; 55a02 (15:5a02) Route14TrainerHeaders: ; 55a02 (15:5a02)
Route14TrainerHeader0: ; 55a02 (15:5a02) Route14TrainerHeader0: ; 55a02 (15:5a02)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_0
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7db ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_0
dw Route14BattleText1 ; TextBeforeBattle dw Route14BattleText1 ; TextBeforeBattle
dw Route14AfterBattleText1 ; TextAfterBattle dw Route14AfterBattleText1 ; TextAfterBattle
dw Route14EndBattleText1 ; TextEndBattle dw Route14EndBattleText1 ; TextEndBattle
dw Route14EndBattleText1 ; TextEndBattle dw Route14EndBattleText1 ; TextEndBattle
Route14TrainerHeader1: ; 55a0e (15:5a0e) Route14TrainerHeader1: ; 55a0e (15:5a0e)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_1
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7db ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_1
dw Route14BattleText2 ; TextBeforeBattle dw Route14BattleText2 ; TextBeforeBattle
dw Route14AfterBattleText2 ; TextAfterBattle dw Route14AfterBattleText2 ; TextAfterBattle
dw Route14EndBattleText2 ; TextEndBattle dw Route14EndBattleText2 ; TextEndBattle
dw Route14EndBattleText2 ; TextEndBattle dw Route14EndBattleText2 ; TextEndBattle
Route14TrainerHeader2: ; 55a1a (15:5a1a) Route14TrainerHeader2: ; 55a1a (15:5a1a)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_2
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7db ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_2
dw Route14BattleText3 ; TextBeforeBattle dw Route14BattleText3 ; TextBeforeBattle
dw Route14AfterBattleText3 ; TextAfterBattle dw Route14AfterBattleText3 ; TextAfterBattle
dw Route14EndBattleText3 ; TextEndBattle dw Route14EndBattleText3 ; TextEndBattle
dw Route14EndBattleText3 ; TextEndBattle dw Route14EndBattleText3 ; TextEndBattle
Route14TrainerHeader3: ; 55a26 (15:5a26) Route14TrainerHeader3: ; 55a26 (15:5a26)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_3
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7db ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_3
dw Route14BattleText4 ; TextBeforeBattle dw Route14BattleText4 ; TextBeforeBattle
dw Route14AfterBattleText4 ; TextAfterBattle dw Route14AfterBattleText4 ; TextAfterBattle
dw Route14EndBattleText4 ; TextEndBattle dw Route14EndBattleText4 ; TextEndBattle
dw Route14EndBattleText4 ; TextEndBattle dw Route14EndBattleText4 ; TextEndBattle
Route14TrainerHeader4: ; 55a32 (15:5a32) Route14TrainerHeader4: ; 55a32 (15:5a32)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_4
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7db ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_4
dw Route14BattleText5 ; TextBeforeBattle dw Route14BattleText5 ; TextBeforeBattle
dw Route14AfterBattleText5 ; TextAfterBattle dw Route14AfterBattleText5 ; TextAfterBattle
dw Route14EndBattleText5 ; TextEndBattle dw Route14EndBattleText5 ; TextEndBattle
dw Route14EndBattleText5 ; TextEndBattle dw Route14EndBattleText5 ; TextEndBattle
Route14TrainerHeader5: ; 55a3e (15:5a3e) Route14TrainerHeader5: ; 55a3e (15:5a3e)
db $6 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_5
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7db ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_5
dw Route14BattleText6 ; TextBeforeBattle dw Route14BattleText6 ; TextBeforeBattle
dw Route14AfterBattleText6 ; TextAfterBattle dw Route14AfterBattleText6 ; TextAfterBattle
dw Route14EndBattleText6 ; TextEndBattle dw Route14EndBattleText6 ; TextEndBattle
dw Route14EndBattleText6 ; TextEndBattle dw Route14EndBattleText6 ; TextEndBattle
Route14TrainerHeader6: ; 55a4a (15:5a4a) Route14TrainerHeader6: ; 55a4a (15:5a4a)
db $7 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_6
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7db ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_6
dw Route14BattleText7 ; TextBeforeBattle dw Route14BattleText7 ; TextBeforeBattle
dw Route14AfterBattleText7 ; TextAfterBattle dw Route14AfterBattleText7 ; TextAfterBattle
dw Route14EndBattleText7 ; TextEndBattle dw Route14EndBattleText7 ; TextEndBattle
dw Route14EndBattleText7 ; TextEndBattle dw Route14EndBattleText7 ; TextEndBattle
Route14TrainerHeader7: ; 55a56 (15:5a56) Route14TrainerHeader7: ; 55a56 (15:5a56)
db $8 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_7, 1
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7db ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_7, 1
dw Route14BattleText8 ; TextBeforeBattle dw Route14BattleText8 ; TextBeforeBattle
dw Route14AfterBattleText8 ; TextAfterBattle dw Route14AfterBattleText8 ; TextAfterBattle
dw Route14EndBattleText8 ; TextEndBattle dw Route14EndBattleText8 ; TextEndBattle
dw Route14EndBattleText8 ; TextEndBattle dw Route14EndBattleText8 ; TextEndBattle
Route14TrainerHeader8: ; 55a62 (15:5a62) Route14TrainerHeader8: ; 55a62 (15:5a62)
db $9 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_8, 1
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7db ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_8, 1
dw Route14BattleText9 ; TextBeforeBattle dw Route14BattleText9 ; TextBeforeBattle
dw Route14AfterBattleText9 ; TextAfterBattle dw Route14AfterBattleText9 ; TextAfterBattle
dw Route14EndBattleText9 ; TextEndBattle dw Route14EndBattleText9 ; TextEndBattle
dw Route14EndBattleText9 ; TextEndBattle dw Route14EndBattleText9 ; TextEndBattle
Route14TrainerHeader9: ; 55a6e (15:5a6e) Route14TrainerHeader9: ; 55a6e (15:5a6e)
db $a ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_9, 1
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7db ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_9, 1
dw Route14BattleText10 ; TextBeforeBattle dw Route14BattleText10 ; TextBeforeBattle
dw Route14AfterBattleText10 ; TextAfterBattle dw Route14AfterBattleText10 ; TextAfterBattle
dw Route14EndBattleText10 ; TextEndBattle dw Route14EndBattleText10 ; TextEndBattle

View file

@ -28,90 +28,90 @@ Route15TextPointers: ; 597c7 (16:57c7)
Route15TrainerHeaders: ; 597df (16:57df) Route15TrainerHeaders: ; 597df (16:57df)
Route15TrainerHeader0: ; 597df (16:57df) Route15TrainerHeader0: ; 597df (16:57df)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_0
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7dd ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_0
dw Route15BattleText1 ; TextBeforeBattle dw Route15BattleText1 ; TextBeforeBattle
dw Route15AfterBattleText1 ; TextAfterBattle dw Route15AfterBattleText1 ; TextAfterBattle
dw Route15EndBattleText1 ; TextEndBattle dw Route15EndBattleText1 ; TextEndBattle
dw Route15EndBattleText1 ; TextEndBattle dw Route15EndBattleText1 ; TextEndBattle
Route15TrainerHeader1: ; 597eb (16:57eb) Route15TrainerHeader1: ; 597eb (16:57eb)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_1
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7dd ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_1
dw Route15BattleText2 ; TextBeforeBattle dw Route15BattleText2 ; TextBeforeBattle
dw Route15AfterBattleText2 ; TextAfterBattle dw Route15AfterBattleText2 ; TextAfterBattle
dw Route15EndBattleText2 ; TextEndBattle dw Route15EndBattleText2 ; TextEndBattle
dw Route15EndBattleText2 ; TextEndBattle dw Route15EndBattleText2 ; TextEndBattle
Route15TrainerHeader2: ; 597f7 (16:57f7) Route15TrainerHeader2: ; 597f7 (16:57f7)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_2
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7dd ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_2
dw Route15BattleText3 ; TextBeforeBattle dw Route15BattleText3 ; TextBeforeBattle
dw Route15AfterBattleText3 ; TextAfterBattle dw Route15AfterBattleText3 ; TextAfterBattle
dw Route15EndBattleText3 ; TextEndBattle dw Route15EndBattleText3 ; TextEndBattle
dw Route15EndBattleText3 ; TextEndBattle dw Route15EndBattleText3 ; TextEndBattle
Route15TrainerHeader3: ; 59803 (16:5803) Route15TrainerHeader3: ; 59803 (16:5803)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_3
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7dd ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_3
dw Route15BattleText4 ; TextBeforeBattle dw Route15BattleText4 ; TextBeforeBattle
dw Route15AfterBattleText4 ; TextAfterBattle dw Route15AfterBattleText4 ; TextAfterBattle
dw Route15EndBattleText4 ; TextEndBattle dw Route15EndBattleText4 ; TextEndBattle
dw Route15EndBattleText4 ; TextEndBattle dw Route15EndBattleText4 ; TextEndBattle
Route15TrainerHeader4: ; 5980f (16:580f) Route15TrainerHeader4: ; 5980f (16:580f)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_4
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7dd ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_4
dw Route15BattleText5 ; TextBeforeBattle dw Route15BattleText5 ; TextBeforeBattle
dw Route15AfterBattleText5 ; TextAfterBattle dw Route15AfterBattleText5 ; TextAfterBattle
dw Route15EndBattleText5 ; TextEndBattle dw Route15EndBattleText5 ; TextEndBattle
dw Route15EndBattleText5 ; TextEndBattle dw Route15EndBattleText5 ; TextEndBattle
Route15TrainerHeader5: ; 5981b (16:581b) Route15TrainerHeader5: ; 5981b (16:581b)
db $6 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_5
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7dd ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_5
dw Route15BattleText6 ; TextBeforeBattle dw Route15BattleText6 ; TextBeforeBattle
dw Route15AfterBattleText6 ; TextAfterBattle dw Route15AfterBattleText6 ; TextAfterBattle
dw Route15EndBattleText6 ; TextEndBattle dw Route15EndBattleText6 ; TextEndBattle
dw Route15EndBattleText6 ; TextEndBattle dw Route15EndBattleText6 ; TextEndBattle
Route15TrainerHeader6: ; 59827 (16:5827) Route15TrainerHeader6: ; 59827 (16:5827)
db $7 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_6
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7dd ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_6
dw Route15BattleText7 ; TextBeforeBattle dw Route15BattleText7 ; TextBeforeBattle
dw Route15AfterBattleText7 ; TextAfterBattle dw Route15AfterBattleText7 ; TextAfterBattle
dw Route15EndBattleText7 ; TextEndBattle dw Route15EndBattleText7 ; TextEndBattle
dw Route15EndBattleText7 ; TextEndBattle dw Route15EndBattleText7 ; TextEndBattle
Route15TrainerHeader7: ; 59833 (16:5833) Route15TrainerHeader7: ; 59833 (16:5833)
db $8 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_7, 1
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7dd ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_7, 1
dw Route15BattleText8 ; TextBeforeBattle dw Route15BattleText8 ; TextBeforeBattle
dw Route15AfterBattleText8 ; TextAfterBattle dw Route15AfterBattleText8 ; TextAfterBattle
dw Route15EndBattleText8 ; TextEndBattle dw Route15EndBattleText8 ; TextEndBattle
dw Route15EndBattleText8 ; TextEndBattle dw Route15EndBattleText8 ; TextEndBattle
Route15TrainerHeader8: ; 5983f (16:583f) Route15TrainerHeader8: ; 5983f (16:583f)
db $9 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_8, 1
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7dd ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_8, 1
dw Route15BattleText9 ; TextBeforeBattle dw Route15BattleText9 ; TextBeforeBattle
dw Route15AfterBattleText9 ; TextAfterBattle dw Route15AfterBattleText9 ; TextAfterBattle
dw Route15EndBattleText9 ; TextEndBattle dw Route15EndBattleText9 ; TextEndBattle
dw Route15EndBattleText9 ; TextEndBattle dw Route15EndBattleText9 ; TextEndBattle
Route15TrainerHeader9: ; 5984b (16:584b) Route15TrainerHeader9: ; 5984b (16:584b)
db $a ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_9, 1
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7dd ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_9, 1
dw Route15BattleText10 ; TextBeforeBattle dw Route15BattleText10 ; TextBeforeBattle
dw Route15AfterBattleText10 ; TextAfterBattle dw Route15AfterBattleText10 ; TextAfterBattle
dw Route15EndBattleText10 ; TextEndBattle dw Route15EndBattleText10 ; TextEndBattle

View file

@ -7,8 +7,7 @@ Route15GateUpstairsTextPointers: ; 4964d (12:564d)
Route15GateUpstairsText1: ; 49651 (12:5651) Route15GateUpstairsText1: ; 49651 (12:5651)
TX_ASM TX_ASM
ld a, [wd7dd] CheckEvent EVENT_4B0
bit 0, a
jr nz, .asm_49683 jr nz, .asm_49683
ld a, 50 ; pokemon needed ld a, 50 ; pokemon needed
ld [$ffdb], a ld [$ffdb], a
@ -24,8 +23,7 @@ Route15GateUpstairsText1: ; 49651 (12:5651)
ld a, [$ffdb] ld a, [$ffdb]
cp $1 cp $1
jr nz, .asm_49689 jr nz, .asm_49689
ld hl, wd7dd SetEvent EVENT_4B0
set 0, [hl]
.asm_49683 .asm_49683
ld hl, Route15GateUpstairsText_4968c ld hl, Route15GateUpstairsText_4968c
call PrintText call PrintText

View file

@ -21,11 +21,10 @@ Route16ScriptPointers: ; 59951 (16:5951)
dw Route16Script3 dw Route16Script3
Route16Script0: ; 59959 (16:5959) Route16Script0: ; 59959 (16:5959)
ld hl, wd7e0 CheckEventHL EVENT_BEAT_ROUTE16_SNORLAX
bit 1, [hl]
jp nz, CheckFightingMapTrainers jp nz, CheckFightingMapTrainers
bit 0, [hl] CheckEventReuseHL EVENT_FIGHT_ROUTE16_SNORLAX
res 0, [hl] ResetEventReuseHL EVENT_FIGHT_ROUTE16_SNORLAX
jp z, CheckFightingMapTrainers jp z, CheckFightingMapTrainers
ld a, $a ld a, $a
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
@ -55,8 +54,7 @@ Route16Script3: ; 5998f (16:598f)
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
.asm_599a8 .asm_599a8
ld hl, wd7e0 SetEvent EVENT_BEAT_ROUTE16_SNORLAX
set 1, [hl]
call Delay3 call Delay3
ld a, $0 ld a, $0
ld [W_ROUTE16CURSCRIPT], a ld [W_ROUTE16CURSCRIPT], a
@ -78,54 +76,54 @@ Route16TextPointers: ; 599b9 (16:59b9)
Route16TrainerHeaders: ; 599cf (16:59cf) Route16TrainerHeaders: ; 599cf (16:59cf)
Route16TrainerHeader0: ; 599cf (16:59cf) Route16TrainerHeader0: ; 599cf (16:59cf)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_0
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7df ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_0
dw Route16BattleText1 ; TextBeforeBattle dw Route16BattleText1 ; TextBeforeBattle
dw Route16AfterBattleText1 ; TextAfterBattle dw Route16AfterBattleText1 ; TextAfterBattle
dw Route16EndBattleText1 ; TextEndBattle dw Route16EndBattleText1 ; TextEndBattle
dw Route16EndBattleText1 ; TextEndBattle dw Route16EndBattleText1 ; TextEndBattle
Route16TrainerHeader1: ; 599db (16:59db) Route16TrainerHeader1: ; 599db (16:59db)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_1
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7df ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_1
dw Route16BattleText2 ; TextBeforeBattle dw Route16BattleText2 ; TextBeforeBattle
dw Route16AfterBattleText2 ; TextAfterBattle dw Route16AfterBattleText2 ; TextAfterBattle
dw Route16EndBattleText2 ; TextEndBattle dw Route16EndBattleText2 ; TextEndBattle
dw Route16EndBattleText2 ; TextEndBattle dw Route16EndBattleText2 ; TextEndBattle
Route16TrainerHeader2: ; 599e7 (16:59e7) Route16TrainerHeader2: ; 599e7 (16:59e7)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_2
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7df ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_2
dw Route16BattleText3 ; TextBeforeBattle dw Route16BattleText3 ; TextBeforeBattle
dw Route16AfterBattleText3 ; TextAfterBattle dw Route16AfterBattleText3 ; TextAfterBattle
dw Route16EndBattleText3 ; TextEndBattle dw Route16EndBattleText3 ; TextEndBattle
dw Route16EndBattleText3 ; TextEndBattle dw Route16EndBattleText3 ; TextEndBattle
Route16TrainerHeader3: ; 599f3 (16:59f3) Route16TrainerHeader3: ; 599f3 (16:59f3)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_3
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7df ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_3
dw Route16BattleText4 ; TextBeforeBattle dw Route16BattleText4 ; TextBeforeBattle
dw Route16AfterBattleText4 ; TextAfterBattle dw Route16AfterBattleText4 ; TextAfterBattle
dw Route16EndBattleText4 ; TextEndBattle dw Route16EndBattleText4 ; TextEndBattle
dw Route16EndBattleText4 ; TextEndBattle dw Route16EndBattleText4 ; TextEndBattle
Route16TrainerHeader4: ; 599ff (16:59ff) Route16TrainerHeader4: ; 599ff (16:59ff)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_4
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7df ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_4
dw Route16BattleText5 ; TextBeforeBattle dw Route16BattleText5 ; TextBeforeBattle
dw Route16AfterBattleText5 ; TextAfterBattle dw Route16AfterBattleText5 ; TextAfterBattle
dw Route16EndBattleText5 ; TextEndBattle dw Route16EndBattleText5 ; TextEndBattle
dw Route16EndBattleText5 ; TextEndBattle dw Route16EndBattleText5 ; TextEndBattle
Route16TrainerHeader5: ; 59a0b (16:5a0b) Route16TrainerHeader5: ; 59a0b (16:5a0b)
db $6 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_5
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7df ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_5
dw Route16BattleText6 ; TextBeforeBattle dw Route16BattleText6 ; TextBeforeBattle
dw Route16AfterBattleText6 ; TextAfterBattle dw Route16AfterBattleText6 ; TextAfterBattle
dw Route16EndBattleText6 ; TextEndBattle dw Route16EndBattleText6 ; TextEndBattle

View file

@ -7,8 +7,7 @@ Route16HouseTextPointers: ; 1e5fb (7:65fb)
Route16HouseText1: ; 1e5ff (7:65ff) Route16HouseText1: ; 1e5ff (7:65ff)
TX_ASM TX_ASM
ld a, [wd7e0] CheckEvent EVENT_4CE
bit 6, a
ld hl, HM02ExplanationText ld hl, HM02ExplanationText
jr nz, .asm_13616 jr nz, .asm_13616
ld hl, Route16HouseText3 ld hl, Route16HouseText3
@ -16,8 +15,7 @@ Route16HouseText1: ; 1e5ff (7:65ff)
ld bc, (HM_02 << 8) | 1 ld bc, (HM_02 << 8) | 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld hl, wd7e0 SetEvent EVENT_4CE
set 6, [hl]
ld hl, ReceivedHM02Text ld hl, ReceivedHM02Text
jr .asm_13616 jr .asm_13616
.BagFull .BagFull

View file

@ -32,90 +32,90 @@ Route17TextPointers: ; 55b93 (15:5b93)
Route17TrainerHeaders: ; 55bb3 (15:5bb3) Route17TrainerHeaders: ; 55bb3 (15:5bb3)
Route17TrainerHeader0: ; 55bb3 (15:5bb3) Route17TrainerHeader0: ; 55bb3 (15:5bb3)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_0
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7e1 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_0
dw Route17BattleText1 ; TextBeforeBattle dw Route17BattleText1 ; TextBeforeBattle
dw Route17AfterBattleText1 ; TextAfterBattle dw Route17AfterBattleText1 ; TextAfterBattle
dw Route17EndBattleText1 ; TextEndBattle dw Route17EndBattleText1 ; TextEndBattle
dw Route17EndBattleText1 ; TextEndBattle dw Route17EndBattleText1 ; TextEndBattle
Route17TrainerHeader1: ; 55bbf (15:5bbf) Route17TrainerHeader1: ; 55bbf (15:5bbf)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_1
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7e1 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_1
dw Route17BattleText2 ; TextBeforeBattle dw Route17BattleText2 ; TextBeforeBattle
dw Route17AfterBattleText2 ; TextAfterBattle dw Route17AfterBattleText2 ; TextAfterBattle
dw Route17EndBattleText2 ; TextEndBattle dw Route17EndBattleText2 ; TextEndBattle
dw Route17EndBattleText2 ; TextEndBattle dw Route17EndBattleText2 ; TextEndBattle
Route17TrainerHeader2: ; 55bcb (15:5bcb) Route17TrainerHeader2: ; 55bcb (15:5bcb)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_2
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7e1 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_2
dw Route17BattleText3 ; TextBeforeBattle dw Route17BattleText3 ; TextBeforeBattle
dw Route17AfterBattleText3 ; TextAfterBattle dw Route17AfterBattleText3 ; TextAfterBattle
dw Route17EndBattleText3 ; TextEndBattle dw Route17EndBattleText3 ; TextEndBattle
dw Route17EndBattleText3 ; TextEndBattle dw Route17EndBattleText3 ; TextEndBattle
Route17TrainerHeader3: ; 55bd7 (15:5bd7) Route17TrainerHeader3: ; 55bd7 (15:5bd7)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_3
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7e1 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_3
dw Route17BattleText4 ; TextBeforeBattle dw Route17BattleText4 ; TextBeforeBattle
dw Route17AfterBattleText4 ; TextAfterBattle dw Route17AfterBattleText4 ; TextAfterBattle
dw Route17EndBattleText4 ; TextEndBattle dw Route17EndBattleText4 ; TextEndBattle
dw Route17EndBattleText4 ; TextEndBattle dw Route17EndBattleText4 ; TextEndBattle
Route17TrainerHeader4: ; 55be3 (15:5be3) Route17TrainerHeader4: ; 55be3 (15:5be3)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_4
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7e1 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_4
dw Route17BattleText5 ; TextBeforeBattle dw Route17BattleText5 ; TextBeforeBattle
dw Route17AfterBattleText5 ; TextAfterBattle dw Route17AfterBattleText5 ; TextAfterBattle
dw Route17EndBattleText5 ; TextEndBattle dw Route17EndBattleText5 ; TextEndBattle
dw Route17EndBattleText5 ; TextEndBattle dw Route17EndBattleText5 ; TextEndBattle
Route17TrainerHeader5: ; 55bef (15:5bef) Route17TrainerHeader5: ; 55bef (15:5bef)
db $6 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_5
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7e1 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_5
dw Route17BattleText6 ; TextBeforeBattle dw Route17BattleText6 ; TextBeforeBattle
dw Route17AfterBattleText6 ; TextAfterBattle dw Route17AfterBattleText6 ; TextAfterBattle
dw Route17EndBattleText6 ; TextEndBattle dw Route17EndBattleText6 ; TextEndBattle
dw Route17EndBattleText6 ; TextEndBattle dw Route17EndBattleText6 ; TextEndBattle
Route17TrainerHeader6: ; 55bfb (15:5bfb) Route17TrainerHeader6: ; 55bfb (15:5bfb)
db $7 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_6
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7e1 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_6
dw Route17BattleText7 ; TextBeforeBattle dw Route17BattleText7 ; TextBeforeBattle
dw Route17AfterBattleText7 ; TextAfterBattle dw Route17AfterBattleText7 ; TextAfterBattle
dw Route17EndBattleText7 ; TextEndBattle dw Route17EndBattleText7 ; TextEndBattle
dw Route17EndBattleText7 ; TextEndBattle dw Route17EndBattleText7 ; TextEndBattle
Route17TrainerHeader7: ; 55c07 (15:5c07) Route17TrainerHeader7: ; 55c07 (15:5c07)
db $8 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_7, 1
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7e1 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_7, 1
dw Route17BattleText8 ; TextBeforeBattle dw Route17BattleText8 ; TextBeforeBattle
dw Route17AfterBattleText8 ; TextAfterBattle dw Route17AfterBattleText8 ; TextAfterBattle
dw Route17EndBattleText8 ; TextEndBattle dw Route17EndBattleText8 ; TextEndBattle
dw Route17EndBattleText8 ; TextEndBattle dw Route17EndBattleText8 ; TextEndBattle
Route17TrainerHeader8: ; 55c13 (15:5c13) Route17TrainerHeader8: ; 55c13 (15:5c13)
db $9 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_8, 1
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7e1 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_8, 1
dw Route17BattleText9 ; TextBeforeBattle dw Route17BattleText9 ; TextBeforeBattle
dw Route17AfterBattleText9 ; TextAfterBattle dw Route17AfterBattleText9 ; TextAfterBattle
dw Route17EndBattleText9 ; TextEndBattle dw Route17EndBattleText9 ; TextEndBattle
dw Route17EndBattleText9 ; TextEndBattle dw Route17EndBattleText9 ; TextEndBattle
Route17TrainerHeader9: ; 55c1f (15:5c1f) Route17TrainerHeader9: ; 55c1f (15:5c1f)
db $a ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_9, 1
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7e1 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_9, 1
dw Route17BattleText10 ; TextBeforeBattle dw Route17BattleText10 ; TextBeforeBattle
dw Route17AfterBattleText10 ; TextAfterBattle dw Route17AfterBattleText10 ; TextAfterBattle
dw Route17EndBattleText10 ; TextEndBattle dw Route17EndBattleText10 ; TextEndBattle

View file

@ -21,27 +21,27 @@ Route18TextPointers: ; 59ae0 (16:5ae0)
Route18TrainerHeaders: ; 59aea (16:5aea) Route18TrainerHeaders: ; 59aea (16:5aea)
Route18TrainerHeader0: ; 59aea (16:5aea) Route18TrainerHeader0: ; 59aea (16:5aea)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_18_TRAINER_0
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7e3 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_18_TRAINER_0
dw Route18BattleText1 ; TextBeforeBattle dw Route18BattleText1 ; TextBeforeBattle
dw Route18AfterBattleText1 ; TextAfterBattle dw Route18AfterBattleText1 ; TextAfterBattle
dw Route18EndBattleText1 ; TextEndBattle dw Route18EndBattleText1 ; TextEndBattle
dw Route18EndBattleText1 ; TextEndBattle dw Route18EndBattleText1 ; TextEndBattle
Route18TrainerHeader1: ; 59af6 (16:5af6) Route18TrainerHeader1: ; 59af6 (16:5af6)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_18_TRAINER_1
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7e3 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_18_TRAINER_1
dw Route18BattleText2 ; TextBeforeBattle dw Route18BattleText2 ; TextBeforeBattle
dw Route18AfterBattleText2 ; TextAfterBattle dw Route18AfterBattleText2 ; TextAfterBattle
dw Route18EndBattleText2 ; TextEndBattle dw Route18EndBattleText2 ; TextEndBattle
dw Route18EndBattleText2 ; TextEndBattle dw Route18EndBattleText2 ; TextEndBattle
Route18TrainerHeader2: ; 59b02 (16:5b02) Route18TrainerHeader2: ; 59b02 (16:5b02)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_18_TRAINER_2
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7e3 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_18_TRAINER_2
dw Route18BattleText3 ; TextBeforeBattle dw Route18BattleText3 ; TextBeforeBattle
dw Route18AfterBattleText3 ; TextAfterBattle dw Route18AfterBattleText3 ; TextAfterBattle
dw Route18EndBattleText3 ; TextEndBattle dw Route18EndBattleText3 ; TextEndBattle

View file

@ -27,90 +27,90 @@ Route19TextPointers: ; 55d5d (15:5d5d)
Route19TrainerHeaders: ; 55d73 (15:5d73) Route19TrainerHeaders: ; 55d73 (15:5d73)
Route19TrainerHeader0: ; 55d73 (15:5d73) Route19TrainerHeader0: ; 55d73 (15:5d73)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_0
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7e5 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_0
dw Route19BattleText1 ; TextBeforeBattle dw Route19BattleText1 ; TextBeforeBattle
dw Route19AfterBattleText1 ; TextAfterBattle dw Route19AfterBattleText1 ; TextAfterBattle
dw Route19EndBattleText1 ; TextEndBattle dw Route19EndBattleText1 ; TextEndBattle
dw Route19EndBattleText1 ; TextEndBattle dw Route19EndBattleText1 ; TextEndBattle
Route19TrainerHeader1: ; 55d7f (15:5d7f) Route19TrainerHeader1: ; 55d7f (15:5d7f)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_1
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7e5 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_1
dw Route19BattleText2 ; TextBeforeBattle dw Route19BattleText2 ; TextBeforeBattle
dw Route19AfterBattleText2 ; TextAfterBattle dw Route19AfterBattleText2 ; TextAfterBattle
dw Route19EndBattleText2 ; TextEndBattle dw Route19EndBattleText2 ; TextEndBattle
dw Route19EndBattleText2 ; TextEndBattle dw Route19EndBattleText2 ; TextEndBattle
Route19TrainerHeader2: ; 55d8b (15:5d8b) Route19TrainerHeader2: ; 55d8b (15:5d8b)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_2
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7e5 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_2
dw Route19BattleText3 ; TextBeforeBattle dw Route19BattleText3 ; TextBeforeBattle
dw Route19AfterBattleText3 ; TextAfterBattle dw Route19AfterBattleText3 ; TextAfterBattle
dw Route19EndBattleText3 ; TextEndBattle dw Route19EndBattleText3 ; TextEndBattle
dw Route19EndBattleText3 ; TextEndBattle dw Route19EndBattleText3 ; TextEndBattle
Route19TrainerHeader3: ; 55d97 (15:5d97) Route19TrainerHeader3: ; 55d97 (15:5d97)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_3
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7e5 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_3
dw Route19BattleText4 ; TextBeforeBattle dw Route19BattleText4 ; TextBeforeBattle
dw Route19AfterBattleText4 ; TextAfterBattle dw Route19AfterBattleText4 ; TextAfterBattle
dw Route19EndBattleText4 ; TextEndBattle dw Route19EndBattleText4 ; TextEndBattle
dw Route19EndBattleText4 ; TextEndBattle dw Route19EndBattleText4 ; TextEndBattle
Route19TrainerHeader4: ; 55da3 (15:5da3) Route19TrainerHeader4: ; 55da3 (15:5da3)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_4
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7e5 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_4
dw Route19BattleText5 ; TextBeforeBattle dw Route19BattleText5 ; TextBeforeBattle
dw Route19AfterBattleText5 ; TextAfterBattle dw Route19AfterBattleText5 ; TextAfterBattle
dw Route19EndBattleText5 ; TextEndBattle dw Route19EndBattleText5 ; TextEndBattle
dw Route19EndBattleText5 ; TextEndBattle dw Route19EndBattleText5 ; TextEndBattle
Route19TrainerHeader5: ; 55daf (15:5daf) Route19TrainerHeader5: ; 55daf (15:5daf)
db $6 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_5
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7e5 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_5
dw Route19BattleText6 ; TextBeforeBattle dw Route19BattleText6 ; TextBeforeBattle
dw Route19AfterBattleText6 ; TextAfterBattle dw Route19AfterBattleText6 ; TextAfterBattle
dw Route19EndBattleText6 ; TextEndBattle dw Route19EndBattleText6 ; TextEndBattle
dw Route19EndBattleText6 ; TextEndBattle dw Route19EndBattleText6 ; TextEndBattle
Route19TrainerHeader6: ; 55dbb (15:5dbb) Route19TrainerHeader6: ; 55dbb (15:5dbb)
db $7 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_6
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7e5 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_6
dw Route19BattleText7 ; TextBeforeBattle dw Route19BattleText7 ; TextBeforeBattle
dw Route19AfterBattleText7 ; TextAfterBattle dw Route19AfterBattleText7 ; TextAfterBattle
dw Route19EndBattleText7 ; TextEndBattle dw Route19EndBattleText7 ; TextEndBattle
dw Route19EndBattleText7 ; TextEndBattle dw Route19EndBattleText7 ; TextEndBattle
Route19TrainerHeader7: ; 55dc7 (15:5dc7) Route19TrainerHeader7: ; 55dc7 (15:5dc7)
db $8 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_7, 1
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7e5 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_7, 1
dw Route19BattleText8 ; TextBeforeBattle dw Route19BattleText8 ; TextBeforeBattle
dw Route19AfterBattleText8 ; TextAfterBattle dw Route19AfterBattleText8 ; TextAfterBattle
dw Route19EndBattleText8 ; TextEndBattle dw Route19EndBattleText8 ; TextEndBattle
dw Route19EndBattleText8 ; TextEndBattle dw Route19EndBattleText8 ; TextEndBattle
Route19TrainerHeader8: ; 55dd3 (15:5dd3) Route19TrainerHeader8: ; 55dd3 (15:5dd3)
db $9 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_8, 1
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7e5 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_8, 1
dw Route19BattleText9 ; TextBeforeBattle dw Route19BattleText9 ; TextBeforeBattle
dw Route19AfterBattleText9 ; TextAfterBattle dw Route19AfterBattleText9 ; TextAfterBattle
dw Route19EndBattleText9 ; TextEndBattle dw Route19EndBattleText9 ; TextEndBattle
dw Route19EndBattleText9 ; TextEndBattle dw Route19EndBattleText9 ; TextEndBattle
Route19TrainerHeader9: ; 55ddf (15:5ddf) Route19TrainerHeader9: ; 55ddf (15:5ddf)
db $a ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_9, 1
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7e5 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_9, 1
dw Route19BattleText10 ; TextBeforeBattle dw Route19BattleText10 ; TextBeforeBattle
dw Route19AfterBattleText10 ; TextAfterBattle dw Route19AfterBattleText10 ; TextAfterBattle
dw Route19EndBattleText10 ; TextEndBattle dw Route19EndBattleText10 ; TextEndBattle

View file

@ -1,7 +1,5 @@
Route20Script: ; 50ca9 (14:4ca9) Route20Script: ; 50ca9 (14:4ca9)
ld hl, wd7e7 CheckAndResetEvent EVENT_500
bit 0, [hl]
res 0, [hl]
call nz, Route20Script_50cc6 call nz, Route20Script_50cc6
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld hl, Route20TrainerHeader0 ld hl, Route20TrainerHeader0
@ -12,9 +10,7 @@ Route20Script: ; 50ca9 (14:4ca9)
ret ret
Route20Script_50cc6: ; 50cc6 (14:4cc6) Route20Script_50cc6: ; 50cc6 (14:4cc6)
ld a, [wd880] CheckBothEventsSet EVENT_9C8, EVENT_9C9
and $3
cp $3
jr z, .asm_50cef jr z, .asm_50cef
ld a, HS_SEAFOAM_ISLANDS_1_BOULDER_1 ld a, HS_SEAFOAM_ISLANDS_1_BOULDER_1
call Route20Script_50d0c call Route20Script_50d0c
@ -40,9 +36,7 @@ Route20Script_50cc6: ; 50cc6 (14:4cc6)
db $FF db $FF
.asm_50cef .asm_50cef
ld a, [wd881] CheckBothEventsSet EVENT_9D0, EVENT_9D1
and $3
cp $3
ret z ret z
ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_1 ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_1
call Route20Script_50d0c call Route20Script_50d0c
@ -83,90 +77,90 @@ Route20TextPointers: ; 50d22 (14:4d22)
Route20TrainerHeaders: ; 50d3a (14:4d3a) Route20TrainerHeaders: ; 50d3a (14:4d3a)
Route20TrainerHeader0: ; 50d3a (14:4d3a) Route20TrainerHeader0: ; 50d3a (14:4d3a)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_0
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7e7 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_0
dw Route20BattleText1 ; TextBeforeBattle dw Route20BattleText1 ; TextBeforeBattle
dw Route20AfterBattleText1 ; TextAfterBattle dw Route20AfterBattleText1 ; TextAfterBattle
dw Route20EndBattleText1 ; TextEndBattle dw Route20EndBattleText1 ; TextEndBattle
dw Route20EndBattleText1 ; TextEndBattle dw Route20EndBattleText1 ; TextEndBattle
Route20TrainerHeader2: ; 50d46 (14:4d46) Route20TrainerHeader2: ; 50d46 (14:4d46)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_2
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7e7 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_2
dw Route20BattleText2 ; TextBeforeBattle dw Route20BattleText2 ; TextBeforeBattle
dw Route20AfterBattleText2 ; TextAfterBattle dw Route20AfterBattleText2 ; TextAfterBattle
dw Route20EndBattleText2 ; TextEndBattle dw Route20EndBattleText2 ; TextEndBattle
dw Route20EndBattleText2 ; TextEndBattle dw Route20EndBattleText2 ; TextEndBattle
Route20TrainerHeader3: ; 50d52 (14:4d52) Route20TrainerHeader3: ; 50d52 (14:4d52)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_3
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7e7 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_3
dw Route20BattleText3 ; TextBeforeBattle dw Route20BattleText3 ; TextBeforeBattle
dw Route20AfterBattleText3 ; TextAfterBattle dw Route20AfterBattleText3 ; TextAfterBattle
dw Route20EndBattleText3 ; TextEndBattle dw Route20EndBattleText3 ; TextEndBattle
dw Route20EndBattleText3 ; TextEndBattle dw Route20EndBattleText3 ; TextEndBattle
Route20TrainerHeader4: ; 50d5e (14:4d5e) Route20TrainerHeader4: ; 50d5e (14:4d5e)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_4
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7e7 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_4
dw Route20BattleText4 ; TextBeforeBattle dw Route20BattleText4 ; TextBeforeBattle
dw Route20AfterBattleText4 ; TextAfterBattle dw Route20AfterBattleText4 ; TextAfterBattle
dw Route20EndBattleText4 ; TextEndBattle dw Route20EndBattleText4 ; TextEndBattle
dw Route20EndBattleText4 ; TextEndBattle dw Route20EndBattleText4 ; TextEndBattle
Route20TrainerHeader5: ; 50d6a (14:4d6a) Route20TrainerHeader5: ; 50d6a (14:4d6a)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_5
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7e7 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_5
dw Route20BattleText5 ; TextBeforeBattle dw Route20BattleText5 ; TextBeforeBattle
dw Route20AfterBattleText5 ; TextAfterBattle dw Route20AfterBattleText5 ; TextAfterBattle
dw Route20EndBattleText5 ; TextEndBattle dw Route20EndBattleText5 ; TextEndBattle
dw Route20EndBattleText5 ; TextEndBattle dw Route20EndBattleText5 ; TextEndBattle
Route20TrainerHeader6: ; 50d76 (14:4d76) Route20TrainerHeader6: ; 50d76 (14:4d76)
db $6 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_6
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7e7 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_6
dw Route20BattleText6 ; TextBeforeBattle dw Route20BattleText6 ; TextBeforeBattle
dw Route20AfterBattleText6 ; TextAfterBattle dw Route20AfterBattleText6 ; TextAfterBattle
dw Route20EndBattleText6 ; TextEndBattle dw Route20EndBattleText6 ; TextEndBattle
dw Route20EndBattleText6 ; TextEndBattle dw Route20EndBattleText6 ; TextEndBattle
Route20TrainerHeader7: ; 50d82 (14:4d82) Route20TrainerHeader7: ; 50d82 (14:4d82)
db $7 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_7
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7e7 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_7
dw Route20BattleText7 ; TextBeforeBattle dw Route20BattleText7 ; TextBeforeBattle
dw Route20AfterBattleText7 ; TextAfterBattle dw Route20AfterBattleText7 ; TextAfterBattle
dw Route20EndBattleText7 ; TextEndBattle dw Route20EndBattleText7 ; TextEndBattle
dw Route20EndBattleText7 ; TextEndBattle dw Route20EndBattleText7 ; TextEndBattle
Route20TrainerHeader8: ; 50d8e (14:4d8e) Route20TrainerHeader8: ; 50d8e (14:4d8e)
db $8 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_8, 1
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7e7 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_8, 1
dw Route20BattleText8 ; TextBeforeBattle dw Route20BattleText8 ; TextBeforeBattle
dw Route20AfterBattleText8 ; TextAfterBattle dw Route20AfterBattleText8 ; TextAfterBattle
dw Route20EndBattleText8 ; TextEndBattle dw Route20EndBattleText8 ; TextEndBattle
dw Route20EndBattleText8 ; TextEndBattle dw Route20EndBattleText8 ; TextEndBattle
Route20TrainerHeader9: ; 50d9a (14:4d9a) Route20TrainerHeader9: ; 50d9a (14:4d9a)
db $9 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_9, 1
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7e7 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_9, 1
dw Route20BattleText9 ; TextBeforeBattle dw Route20BattleText9 ; TextBeforeBattle
dw Route20AfterBattleText9 ; TextAfterBattle dw Route20AfterBattleText9 ; TextAfterBattle
dw Route20EndBattleText9 ; TextEndBattle dw Route20EndBattleText9 ; TextEndBattle
dw Route20EndBattleText9 ; TextEndBattle dw Route20EndBattleText9 ; TextEndBattle
Route20TrainerHeader10: ; 50da6 (14:4da6) Route20TrainerHeader10: ; 50da6 (14:4da6)
db $a ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_10, 1
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7e7 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_10, 1
dw Route20BattleText10 ; TextBeforeBattle dw Route20BattleText10 ; TextBeforeBattle
dw Route20AfterBattleText10 ; TextAfterBattle dw Route20AfterBattleText10 ; TextAfterBattle
dw Route20EndBattleText10 ; TextEndBattle dw Route20EndBattleText10 ; TextEndBattle

View file

@ -25,81 +25,81 @@ Route21TextPointers: ; 55f04 (15:5f04)
Route21TrainerHeaders: ; 55f16 (15:5f16) Route21TrainerHeaders: ; 55f16 (15:5f16)
Route21TrainerHeader0: ; 55f16 (15:5f16) Route21TrainerHeader0: ; 55f16 (15:5f16)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_0
db ($0 << 4) ; trainer's view range db ($0 << 4) ; trainer's view range
dw wd7e9 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_0
dw Route21BattleText1 ; TextBeforeBattle dw Route21BattleText1 ; TextBeforeBattle
dw Route21AfterBattleText1 ; TextAfterBattle dw Route21AfterBattleText1 ; TextAfterBattle
dw Route21EndBattleText1 ; TextEndBattle dw Route21EndBattleText1 ; TextEndBattle
dw Route21EndBattleText1 ; TextEndBattle dw Route21EndBattleText1 ; TextEndBattle
Route21TrainerHeader1: ; 55f22 (15:5f22) Route21TrainerHeader1: ; 55f22 (15:5f22)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_1
db ($0 << 4) ; trainer's view range db ($0 << 4) ; trainer's view range
dw wd7e9 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_1
dw Route21BattleText2 ; TextBeforeBattle dw Route21BattleText2 ; TextBeforeBattle
dw Route21AfterBattleText2 ; TextAfterBattle dw Route21AfterBattleText2 ; TextAfterBattle
dw Route21EndBattleText2 ; TextEndBattle dw Route21EndBattleText2 ; TextEndBattle
dw Route21EndBattleText2 ; TextEndBattle dw Route21EndBattleText2 ; TextEndBattle
Route21TrainerHeader2: ; 55f2e (15:5f2e) Route21TrainerHeader2: ; 55f2e (15:5f2e)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_2
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7e9 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_2
dw Route21BattleText3 ; TextBeforeBattle dw Route21BattleText3 ; TextBeforeBattle
dw Route21AfterBattleText3 ; TextAfterBattle dw Route21AfterBattleText3 ; TextAfterBattle
dw Route21EndBattleText3 ; TextEndBattle dw Route21EndBattleText3 ; TextEndBattle
dw Route21EndBattleText3 ; TextEndBattle dw Route21EndBattleText3 ; TextEndBattle
Route21TrainerHeader3: ; 55f3a (15:5f3a) Route21TrainerHeader3: ; 55f3a (15:5f3a)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_3
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7e9 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_3
dw Route21BattleText4 ; TextBeforeBattle dw Route21BattleText4 ; TextBeforeBattle
dw Route21AfterBattleText4 ; TextAfterBattle dw Route21AfterBattleText4 ; TextAfterBattle
dw Route21EndBattleText4 ; TextEndBattle dw Route21EndBattleText4 ; TextEndBattle
dw Route21EndBattleText4 ; TextEndBattle dw Route21EndBattleText4 ; TextEndBattle
Route21TrainerHeader4: ; 55f46 (15:5f46) Route21TrainerHeader4: ; 55f46 (15:5f46)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_4
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7e9 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_4
dw Route21BattleText5 ; TextBeforeBattle dw Route21BattleText5 ; TextBeforeBattle
dw Route21AfterBattleText5 ; TextAfterBattle dw Route21AfterBattleText5 ; TextAfterBattle
dw Route21EndBattleText5 ; TextEndBattle dw Route21EndBattleText5 ; TextEndBattle
dw Route21EndBattleText5 ; TextEndBattle dw Route21EndBattleText5 ; TextEndBattle
Route21TrainerHeader5: ; 55f52 (15:5f52) Route21TrainerHeader5: ; 55f52 (15:5f52)
db $6 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_5
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7e9 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_5
dw Route21BattleText6 ; TextBeforeBattle dw Route21BattleText6 ; TextBeforeBattle
dw Route21AfterBattleText6 ; TextAfterBattle dw Route21AfterBattleText6 ; TextAfterBattle
dw Route21EndBattleText6 ; TextEndBattle dw Route21EndBattleText6 ; TextEndBattle
dw Route21EndBattleText6 ; TextEndBattle dw Route21EndBattleText6 ; TextEndBattle
Route21TrainerHeader6: ; 55f5e (15:5f5e) Route21TrainerHeader6: ; 55f5e (15:5f5e)
db $7 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_6
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7e9 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_6
dw Route21BattleText7 ; TextBeforeBattle dw Route21BattleText7 ; TextBeforeBattle
dw Route21AfterBattleText7 ; TextAfterBattle dw Route21AfterBattleText7 ; TextAfterBattle
dw Route21EndBattleText7 ; TextEndBattle dw Route21EndBattleText7 ; TextEndBattle
dw Route21EndBattleText7 ; TextEndBattle dw Route21EndBattleText7 ; TextEndBattle
Route21TrainerHeader7: ; 55f6a (15:5f6a) Route21TrainerHeader7: ; 55f6a (15:5f6a)
db $8 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_7, 1
db ($0 << 4) ; trainer's view range db ($0 << 4) ; trainer's view range
dw wd7e9 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_7, 1
dw Route21BattleText8 ; TextBeforeBattle dw Route21BattleText8 ; TextBeforeBattle
dw Route21AfterBattleText8 ; TextAfterBattle dw Route21AfterBattleText8 ; TextAfterBattle
dw Route21EndBattleText8 ; TextEndBattle dw Route21EndBattleText8 ; TextEndBattle
dw Route21EndBattleText8 ; TextEndBattle dw Route21EndBattleText8 ; TextEndBattle
Route21TrainerHeader8: ; 55f76 (15:5f76) Route21TrainerHeader8: ; 55f76 (15:5f76)
db $9 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_8, 1
db ($0 << 4) ; trainer's view range db ($0 << 4) ; trainer's view range
dw wd7e9 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_8, 1
dw Route21BattleText9 ; TextBeforeBattle dw Route21BattleText9 ; TextBeforeBattle
dw Route21AfterBattleText9 ; TextAfterBattle dw Route21AfterBattleText9 ; TextAfterBattle
dw Route21EndBattleText9 ; TextEndBattle dw Route21EndBattleText9 ; TextEndBattle

View file

@ -55,8 +55,7 @@ Route22RivalMovementData: ; 50efb (14:4efb)
db $FF db $FF
Route22Script0: ; 50f00 (14:4f00) Route22Script0: ; 50f00 (14:4f00)
ld a, [wd7eb] CheckEvent EVENT_527
bit 7, a
ret z ret z
ld hl, .Route22RivalBattleCoords ld hl, .Route22RivalBattleCoords
call ArePlayerCoordsInArray call ArePlayerCoordsInArray
@ -69,10 +68,9 @@ Route22Script0: ; 50f00 (14:4f00)
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld a, PLAYER_DIR_LEFT ld a, PLAYER_DIR_LEFT
ld [wPlayerMovingDirection], a ld [wPlayerMovingDirection], a
ld a, [wd7eb] CheckEvent EVENT_520
bit 0, a ; is this the rival battle at the beginning of the game?
jr nz, .firstRivalBattle jr nz, .firstRivalBattle
bit 1, a ; is this the rival at the end of the game? CheckEventReuseA EVENT_521 ; is this the rival at the end of the game?
jp nz, Route22Script_5104e jp nz, Route22Script_5104e
ret ret
@ -165,8 +163,7 @@ Route22Script2: ; 50fb5 (14:4fb5)
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
ld a, $f0 ld a, $f0
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld hl, wd7eb SetEvent EVENT_525
set 5, [hl]
ld a, $1 ld a, $1
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
@ -230,9 +227,7 @@ Route22Script3: ; 5102a (14:502a)
ld [wcc4d], a ld [wcc4d], a
predef HideObject predef HideObject
call PlayDefaultMusic call PlayDefaultMusic
ld hl, wd7eb ResetEvents EVENT_520, EVENT_527
res 0, [hl]
res 7, [hl]
ld a, $0 ld a, $0
ld [W_ROUTE22CURSCRIPT], a ld [W_ROUTE22CURSCRIPT], a
ret ret
@ -327,8 +322,7 @@ Route22Script5: ; 510df (14:50df)
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
ld a, $f0 ld a, $f0
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld hl, wd7eb SetEvent EVENT_526
set 6, [hl]
ld a, $2 ld a, $2
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
@ -378,9 +372,7 @@ Route22Script6: ; 51151 (14:5151)
ld [wcc4d], a ld [wcc4d], a
predef HideObject predef HideObject
call PlayDefaultMusic call PlayDefaultMusic
ld hl, wd7eb ResetEvents EVENT_521, EVENT_527
res 1, [hl]
res 7, [hl]
ld a, $7 ld a, $7
ld [W_ROUTE22CURSCRIPT], a ld [W_ROUTE22CURSCRIPT], a
ret ret
@ -392,8 +384,7 @@ Route22TextPointers: ; 51175 (14:5175)
Route22Text1: ; 5117b (14:517b) Route22Text1: ; 5117b (14:517b)
TX_ASM TX_ASM
ld a, [wd7eb] CheckEvent EVENT_525
bit 5, a
jr z, .asm_5118b jr z, .asm_5118b
ld hl, Route22RivalAfterBattleText1 ld hl, Route22RivalAfterBattleText1
call PrintText call PrintText
@ -406,8 +397,7 @@ Route22Text1: ; 5117b (14:517b)
Route22Text2: ; 51194 (14:5194) Route22Text2: ; 51194 (14:5194)
TX_ASM TX_ASM
ld a, [wd7eb] CheckEvent EVENT_526
bit 6, a
jr z, .asm_511a4 jr z, .asm_511a4
ld hl, Route22RivalAfterBattleText2 ld hl, Route22RivalAfterBattleText2
call PrintText call PrintText

View file

@ -10,12 +10,8 @@ Route23Script_511e9: ; 511e9 (14:51e9)
bit 6, [hl] bit 6, [hl]
res 6, [hl] res 6, [hl]
ret z ret z
ld hl, wd7ee ResetEvents EVENT_538, EVENT_53F
res 0, [hl] ResetEvents EVENT_660, EVENT_666
res 7, [hl]
ld hl, wd813
res 0, [hl]
res 6, [hl]
ld a, HS_VICTORY_ROAD_3_BOULDER ld a, HS_VICTORY_ROAD_3_BOULDER
ld [wcc4d], a ld [wcc4d], a
predef ShowObject predef ShowObject
@ -33,7 +29,7 @@ Route23Script0: ; 51219 (14:5219)
ld a, [W_YCOORD] ld a, [W_YCOORD]
ld b, a ld b, a
ld e, $0 ld e, $0
ld c, $7 EventFlagBit c, EVENT_536 + 1, EVENT_530
.asm_51224 .asm_51224
ld a, [hli] ld a, [hli]
cp $ff cp $ff
@ -53,7 +49,7 @@ Route23Script0: ; 51219 (14:5219)
ld a, c ld a, c
ld [wWhichBadge], a ld [wWhichBadge], a
ld b, FLAG_TEST ld b, FLAG_TEST
ld hl, wd7ed EventFlagAddress hl, EVENT_530
predef FlagActionPredef predef FlagActionPredef
ld a, c ld a, c
and a and a
@ -147,43 +143,43 @@ Route23TextPointers: ; 512f7 (14:52f7)
Route23Text1: ; 51307 (14:5307) Route23Text1: ; 51307 (14:5307)
TX_ASM TX_ASM
ld a, $6 EventFlagBit a, EVENT_536, EVENT_530
call Route23Script_51346 call Route23Script_51346
jp TextScriptEnd jp TextScriptEnd
Route23Text2: ; 51310 (14:5310) Route23Text2: ; 51310 (14:5310)
TX_ASM TX_ASM
ld a, $5 EventFlagBit a, EVENT_535, EVENT_530
call Route23Script_51346 call Route23Script_51346
jp TextScriptEnd jp TextScriptEnd
Route23Text3: ; 51319 (14:5319) Route23Text3: ; 51319 (14:5319)
TX_ASM TX_ASM
ld a, $4 EventFlagBit a, EVENT_534, EVENT_530
call Route23Script_51346 call Route23Script_51346
jp TextScriptEnd jp TextScriptEnd
Route23Text4: ; 51322 (14:5322) Route23Text4: ; 51322 (14:5322)
TX_ASM TX_ASM
ld a, $3 EventFlagBit a, EVENT_533, EVENT_530
call Route23Script_51346 call Route23Script_51346
jp TextScriptEnd jp TextScriptEnd
Route23Text5: ; 5132b (14:532b) Route23Text5: ; 5132b (14:532b)
TX_ASM TX_ASM
ld a, $2 EventFlagBit a, EVENT_532, EVENT_530
call Route23Script_51346 call Route23Script_51346
jp TextScriptEnd jp TextScriptEnd
Route23Text6: ; 51334 (14:5334) Route23Text6: ; 51334 (14:5334)
TX_ASM TX_ASM
ld a, $1 EventFlagBit a, EVENT_531, EVENT_530
call Route23Script_51346 call Route23Script_51346
jp TextScriptEnd jp TextScriptEnd
Route23Text7: ; 5133d (14:533d) Route23Text7: ; 5133d (14:533d)
TX_ASM TX_ASM
ld a, $0 EventFlagBit a, EVENT_530
call Route23Script_51346 call Route23Script_51346
jp TextScriptEnd jp TextScriptEnd
@ -211,7 +207,7 @@ Route23Script_51346: ; 51346 (14:5346)
ld a, [wWhichBadge] ld a, [wWhichBadge]
ld c, a ld c, a
ld b, FLAG_SET ld b, FLAG_SET
ld hl, wd7ed EventFlagAddress hl, EVENT_530
predef FlagActionPredef predef FlagActionPredef
ld a, $2 ld a, $2
ld [W_ROUTE23CURSCRIPT], a ld [W_ROUTE23CURSCRIPT], a

View file

@ -22,8 +22,7 @@ Route24ScriptPointers: ; 513cb (14:53cb)
dw Route24Script4 dw Route24Script4
Route24Script0: ; 513d5 (14:53d5) Route24Script0: ; 513d5 (14:53d5)
ld a, [wd7ef] CheckEvent EVENT_540
bit 0, a
jp nz, CheckFightingMapTrainers jp nz, CheckFightingMapTrainers
ld hl, CoordsData_5140e ld hl, CoordsData_5140e
call ArePlayerCoordsInArray call ArePlayerCoordsInArray
@ -33,9 +32,7 @@ Route24Script0: ; 513d5 (14:53d5)
ld a, $1 ld a, $1
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd7f0 CheckAndResetEvent EVENT_549
bit 1, [hl]
res 1, [hl]
ret z ret z
ld a, D_DOWN ld a, D_DOWN
ld [wSimulatedJoypadStatesEnd], a ld [wSimulatedJoypadStatesEnd], a
@ -67,8 +64,7 @@ Route24Script3: ; 51422 (14:5422)
call UpdateSprites call UpdateSprites
ld a, $f0 ld a, $f0
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld hl, wd7ef SetEvent EVENT_541
set 1, [hl]
ld a, $1 ld a, $1
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
@ -91,54 +87,54 @@ Route24TextPointers: ; 5144b (14:544b)
Route24TrainerHeaders: ; 5145b (14:545b) Route24TrainerHeaders: ; 5145b (14:545b)
Route24TrainerHeader0: ; 5145b (14:545b) Route24TrainerHeader0: ; 5145b (14:545b)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_24_TRAINER_0
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7ef ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_24_TRAINER_0
dw Route24BattleText1 ; TextBeforeBattle dw Route24BattleText1 ; TextBeforeBattle
dw Route24AfterBattleText1 ; TextAfterBattle dw Route24AfterBattleText1 ; TextAfterBattle
dw Route24EndBattleText1 ; TextEndBattle dw Route24EndBattleText1 ; TextEndBattle
dw Route24EndBattleText1 ; TextEndBattle dw Route24EndBattleText1 ; TextEndBattle
Route24TrainerHeader2: ; 51467 (14:5467) Route24TrainerHeader2: ; 51467 (14:5467)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_24_TRAINER_2
db ($1 << 4) ; trainer's view range db ($1 << 4) ; trainer's view range
dw wd7ef ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_24_TRAINER_2
dw Route24BattleText2 ; TextBeforeBattle dw Route24BattleText2 ; TextBeforeBattle
dw Route24AfterBattleText2 ; TextAfterBattle dw Route24AfterBattleText2 ; TextAfterBattle
dw Route24EndBattleText2 ; TextEndBattle dw Route24EndBattleText2 ; TextEndBattle
dw Route24EndBattleText2 ; TextEndBattle dw Route24EndBattleText2 ; TextEndBattle
Route24TrainerHeader3: ; 51473 (14:5473) Route24TrainerHeader3: ; 51473 (14:5473)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_24_TRAINER_3
db ($1 << 4) ; trainer's view range db ($1 << 4) ; trainer's view range
dw wd7ef ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_24_TRAINER_3
dw Route24BattleText3 ; TextBeforeBattle dw Route24BattleText3 ; TextBeforeBattle
dw Route24AfterBattleText3 ; TextAfterBattle dw Route24AfterBattleText3 ; TextAfterBattle
dw Route24EndBattleText3 ; TextEndBattle dw Route24EndBattleText3 ; TextEndBattle
dw Route24EndBattleText3 ; TextEndBattle dw Route24EndBattleText3 ; TextEndBattle
Route24TrainerHeader4: ; 5147f (14:547f) Route24TrainerHeader4: ; 5147f (14:547f)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_24_TRAINER_4
db ($1 << 4) ; trainer's view range db ($1 << 4) ; trainer's view range
dw wd7ef ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_24_TRAINER_4
dw Route24BattleText4 ; TextBeforeBattle dw Route24BattleText4 ; TextBeforeBattle
dw Route24AfterBattleText4 ; TextAfterBattle dw Route24AfterBattleText4 ; TextAfterBattle
dw Route24EndBattleText4 ; TextEndBattle dw Route24EndBattleText4 ; TextEndBattle
dw Route24EndBattleText4 ; TextEndBattle dw Route24EndBattleText4 ; TextEndBattle
Route24TrainerHeader5: ; 5148b (14:548b) Route24TrainerHeader5: ; 5148b (14:548b)
db $6 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_24_TRAINER_5
db ($1 << 4) ; trainer's view range db ($1 << 4) ; trainer's view range
dw wd7ef ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_24_TRAINER_5
dw Route24BattleText5 ; TextBeforeBattle dw Route24BattleText5 ; TextBeforeBattle
dw Route24AfterBattleText5 ; TextAfterBattle dw Route24AfterBattleText5 ; TextAfterBattle
dw Route24EndBattleText5 ; TextEndBattle dw Route24EndBattleText5 ; TextEndBattle
dw Route24EndBattleText5 ; TextEndBattle dw Route24EndBattleText5 ; TextEndBattle
Route24TrainerHeader6: ; 51497 (14:5497) Route24TrainerHeader6: ; 51497 (14:5497)
db $7 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_24_TRAINER_6
db ($1 << 4) ; trainer's view range db ($1 << 4) ; trainer's view range
dw wd7ef ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_24_TRAINER_6
dw Route24BattleText6 ; TextBeforeBattle dw Route24BattleText6 ; TextBeforeBattle
dw Route24AfterBattleText6 ; TextAfterBattle dw Route24AfterBattleText6 ; TextAfterBattle
dw Route24EndBattleText6 ; TextEndBattle dw Route24EndBattleText6 ; TextEndBattle
@ -148,18 +144,15 @@ Route24TrainerHeader6: ; 51497 (14:5497)
Route24Text1: ; 514a4 (14:54a4) Route24Text1: ; 514a4 (14:54a4)
TX_ASM TX_ASM
ld hl, wd7f0 ResetEvent EVENT_549
res 1, [hl] CheckEvent EVENT_540
ld a, [wd7ef]
bit 0, a
jr nz, .asm_514f9 jr nz, .asm_514f9
ld hl, Route24Text_51510 ld hl, Route24Text_51510
call PrintText call PrintText
ld bc, (NUGGET << 8) | 1 ld bc, (NUGGET << 8) | 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld hl, wd7ef SetEvent EVENT_540
set 0, [hl]
ld hl, Route24Text_5151a ld hl, Route24Text_5151a
call PrintText call PrintText
ld hl, Route24Text_51526 ld hl, Route24Text_51526
@ -187,8 +180,7 @@ Route24Text1: ; 514a4 (14:54a4)
.BagFull .BagFull
ld hl, Route24Text_51521 ld hl, Route24Text_51521
call PrintText call PrintText
ld hl, wd7f0 SetEvent EVENT_549
set 1, [hl]
jp TextScriptEnd jp TextScriptEnd
Route24Text_51510: ; 51510 (14:5510) Route24Text_51510: ; 51510 (14:5510)

View file

@ -13,19 +13,18 @@ Route25Script_515e1: ; 515e1 (14:55e1)
bit 6, [hl] bit 6, [hl]
res 6, [hl] res 6, [hl]
ret z ret z
ld hl, wd7f2 CheckEventHL EVENT_55F
bit 7, [hl]
ret nz ret nz
bit 5, [hl] CheckEventReuseHL EVENT_55D
jr nz, .asm_515ff jr nz, .asm_515ff
res 6, [hl] ResetEventReuseHL EVENT_55E
ld a, HS_BILL_POKEMON ld a, HS_BILL_POKEMON
ld [wcc4d], a ld [wcc4d], a
predef_jump ShowObject predef_jump ShowObject
.asm_515ff .asm_515ff
bit 4, [hl] CheckEventAfterBranchReuseHL EVENT_55C, EVENT_55D
ret z ret z
set 7, [hl] SetEventReuseHL EVENT_55F
ld a, HS_NUGGET_BRIDGE_GUY ld a, HS_NUGGET_BRIDGE_GUY
ld [wcc4d], a ld [wcc4d], a
predef HideObject predef HideObject
@ -56,81 +55,81 @@ Route25TextPointers: ; 51628 (14:5628)
Route25TrainerHeaders: ; 5163e (14:563e) Route25TrainerHeaders: ; 5163e (14:563e)
Route25TrainerHeader0: ; 5163e (14:563e) Route25TrainerHeader0: ; 5163e (14:563e)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_0
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7f1 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_0
dw Route25BattleText1 ; TextBeforeBattle dw Route25BattleText1 ; TextBeforeBattle
dw Route25AfterBattleText1 ; TextAfterBattle dw Route25AfterBattleText1 ; TextAfterBattle
dw Route25EndBattleText1 ; TextEndBattle dw Route25EndBattleText1 ; TextEndBattle
dw Route25EndBattleText1 ; TextEndBattle dw Route25EndBattleText1 ; TextEndBattle
Route25TrainerHeader2: ; 5164a (14:564a) Route25TrainerHeader2: ; 5164a (14:564a)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_2
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7f1 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_2
dw Route25BattleText2 ; TextBeforeBattle dw Route25BattleText2 ; TextBeforeBattle
dw Route25AfterBattleText2 ; TextAfterBattle dw Route25AfterBattleText2 ; TextAfterBattle
dw Route25EndBattleText2 ; TextEndBattle dw Route25EndBattleText2 ; TextEndBattle
dw Route25EndBattleText2 ; TextEndBattle dw Route25EndBattleText2 ; TextEndBattle
Route25TrainerHeader3: ; 51656 (14:5656) Route25TrainerHeader3: ; 51656 (14:5656)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_3
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7f1 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_3
dw Route25BattleText3 ; TextBeforeBattle dw Route25BattleText3 ; TextBeforeBattle
dw Route25AfterBattleText3 ; TextAfterBattle dw Route25AfterBattleText3 ; TextAfterBattle
dw Route25EndBattleText3 ; TextEndBattle dw Route25EndBattleText3 ; TextEndBattle
dw Route25EndBattleText3 ; TextEndBattle dw Route25EndBattleText3 ; TextEndBattle
Route25TrainerHeader4: ; 51662 (14:5662) Route25TrainerHeader4: ; 51662 (14:5662)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_4
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7f1 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_4
dw Route25BattleText4 ; TextBeforeBattle dw Route25BattleText4 ; TextBeforeBattle
dw Route25AfterBattleText4 ; TextAfterBattle dw Route25AfterBattleText4 ; TextAfterBattle
dw Route25EndBattleText4 ; TextEndBattle dw Route25EndBattleText4 ; TextEndBattle
dw Route25EndBattleText4 ; TextEndBattle dw Route25EndBattleText4 ; TextEndBattle
Route25TrainerHeader5: ; 5166e (14:566e) Route25TrainerHeader5: ; 5166e (14:566e)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_5
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7f1 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_5
dw Route25BattleText5 ; TextBeforeBattle dw Route25BattleText5 ; TextBeforeBattle
dw Route25AfterBattleText5 ; TextAfterBattle dw Route25AfterBattleText5 ; TextAfterBattle
dw Route25EndBattleText5 ; TextEndBattle dw Route25EndBattleText5 ; TextEndBattle
dw Route25EndBattleText5 ; TextEndBattle dw Route25EndBattleText5 ; TextEndBattle
Route25TrainerHeader6: ; 5167a (14:567a) Route25TrainerHeader6: ; 5167a (14:567a)
db $6 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_6
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7f1 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_6
dw Route25BattleText6 ; TextBeforeBattle dw Route25BattleText6 ; TextBeforeBattle
dw Route25AfterBattleText6 ; TextAfterBattle dw Route25AfterBattleText6 ; TextAfterBattle
dw Route25EndBattleText6 ; TextEndBattle dw Route25EndBattleText6 ; TextEndBattle
dw Route25EndBattleText6 ; TextEndBattle dw Route25EndBattleText6 ; TextEndBattle
Route25TrainerHeader7: ; 51686 (14:5686) Route25TrainerHeader7: ; 51686 (14:5686)
db $7 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_7
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7f1 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_7
dw Route25BattleText7 ; TextBeforeBattle dw Route25BattleText7 ; TextBeforeBattle
dw Route25AfterBattleText7 ; TextAfterBattle dw Route25AfterBattleText7 ; TextAfterBattle
dw Route25EndBattleText7 ; TextEndBattle dw Route25EndBattleText7 ; TextEndBattle
dw Route25EndBattleText7 ; TextEndBattle dw Route25EndBattleText7 ; TextEndBattle
Route25TrainerHeader8: ; 51692 (14:5692) Route25TrainerHeader8: ; 51692 (14:5692)
db $8 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_8, 1
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7f1 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_8, 1
dw Route25BattleText8 ; TextBeforeBattle dw Route25BattleText8 ; TextBeforeBattle
dw Route25AfterBattleText8 ; TextAfterBattle dw Route25AfterBattleText8 ; TextAfterBattle
dw Route25EndBattleText8 ; TextEndBattle dw Route25EndBattleText8 ; TextEndBattle
dw Route25EndBattleText8 ; TextEndBattle dw Route25EndBattleText8 ; TextEndBattle
Route25TrainerHeader9: ; 5169e (14:569e) Route25TrainerHeader9: ; 5169e (14:569e)
db $9 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_9, 1
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7f1 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_9, 1
dw Route25BattleText9 ; TextBeforeBattle dw Route25BattleText9 ; TextBeforeBattle
dw Route25AfterBattleText9 ; TextAfterBattle dw Route25AfterBattleText9 ; TextAfterBattle
dw Route25EndBattleText9 ; TextEndBattle dw Route25EndBattleText9 ; TextEndBattle

View file

@ -7,8 +7,7 @@ Route2GateTextPointers: ; 5d5d7 (17:55d7)
Route2GateText1: ; 5d5db (17:55db) Route2GateText1: ; 5d5db (17:55db)
TX_ASM TX_ASM
ld a, [wd7c2] CheckEvent EVENT_3D8
bit 0, a
jr nz, .asm_5d60d jr nz, .asm_5d60d
ld a, 10 ; pokemon needed ld a, 10 ; pokemon needed
ld [$ffdb], a ld [$ffdb], a
@ -24,8 +23,7 @@ Route2GateText1: ; 5d5db (17:55db)
ld a, [$ffdb] ld a, [$ffdb]
cp $1 cp $1
jr nz, .asm_5d613 jr nz, .asm_5d613
ld hl, wd7c2 SetEvent EVENT_3D8
set 0, [hl]
.asm_5d60d .asm_5d60d
ld hl, Route2GateText_5d616 ld hl, Route2GateText_5d616
call PrintText call PrintText

View file

@ -26,72 +26,72 @@ Route3TextPointers: ; 55511 (15:5511)
Route3TrainerHeaders: ; 55525 (15:5525) Route3TrainerHeaders: ; 55525 (15:5525)
Route3TrainerHeader0: ; 55525 (15:5525) Route3TrainerHeader0: ; 55525 (15:5525)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_0
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7c3 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_0
dw Route3BattleText1 ; TextBeforeBattle dw Route3BattleText1 ; TextBeforeBattle
dw Route3AfterBattleText1 ; TextAfterBattle dw Route3AfterBattleText1 ; TextAfterBattle
dw Route3EndBattleText1 ; TextEndBattle dw Route3EndBattleText1 ; TextEndBattle
dw Route3EndBattleText1 ; TextEndBattle dw Route3EndBattleText1 ; TextEndBattle
Route3TrainerHeader2: ; 55531 (15:5531) Route3TrainerHeader2: ; 55531 (15:5531)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_2
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7c3 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_2
dw Route3BattleText2 ; TextBeforeBattle dw Route3BattleText2 ; TextBeforeBattle
dw Route3AfterBattleText2 ; TextAfterBattle dw Route3AfterBattleText2 ; TextAfterBattle
dw Route3EndBattleText2 ; TextEndBattle dw Route3EndBattleText2 ; TextEndBattle
dw Route3EndBattleText2 ; TextEndBattle dw Route3EndBattleText2 ; TextEndBattle
Route3TrainerHeader3: ; 5553d (15:553d) Route3TrainerHeader3: ; 5553d (15:553d)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_3
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7c3 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_3
dw Route3BattleText3 ; TextBeforeBattle dw Route3BattleText3 ; TextBeforeBattle
dw Route3AfterBattleText3 ; TextAfterBattle dw Route3AfterBattleText3 ; TextAfterBattle
dw Route3EndBattleText3 ; TextEndBattle dw Route3EndBattleText3 ; TextEndBattle
dw Route3EndBattleText3 ; TextEndBattle dw Route3EndBattleText3 ; TextEndBattle
Route3TrainerHeader4: ; 55549 (15:5549) Route3TrainerHeader4: ; 55549 (15:5549)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_4
db ($1 << 4) ; trainer's view range db ($1 << 4) ; trainer's view range
dw wd7c3 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_4
dw Route3BattleText4 ; TextBeforeBattle dw Route3BattleText4 ; TextBeforeBattle
dw Route3AfterBattleText4 ; TextAfterBattle dw Route3AfterBattleText4 ; TextAfterBattle
dw Route3EndBattleText4 ; TextEndBattle dw Route3EndBattleText4 ; TextEndBattle
dw Route3EndBattleText4 ; TextEndBattle dw Route3EndBattleText4 ; TextEndBattle
Route3TrainerHeader5: ; 55555 (15:5555) Route3TrainerHeader5: ; 55555 (15:5555)
db $6 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_5
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7c3 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_5
dw Route3BattleText5 ; TextBeforeBattle dw Route3BattleText5 ; TextBeforeBattle
dw Route3AfterBattleText5 ; TextAfterBattle dw Route3AfterBattleText5 ; TextAfterBattle
dw Route3EndBattleText5 ; TextEndBattle dw Route3EndBattleText5 ; TextEndBattle
dw Route3EndBattleText5 ; TextEndBattle dw Route3EndBattleText5 ; TextEndBattle
Route3TrainerHeader6: ; 55561 (15:5561) Route3TrainerHeader6: ; 55561 (15:5561)
db $7 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_6
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7c3 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_6
dw Route3BattleText6 ; TextBeforeBattle dw Route3BattleText6 ; TextBeforeBattle
dw Route3AfterBattleText6 ; TextAfterBattle dw Route3AfterBattleText6 ; TextAfterBattle
dw Route3EndBattleText6 ; TextEndBattle dw Route3EndBattleText6 ; TextEndBattle
dw Route3EndBattleText6 ; TextEndBattle dw Route3EndBattleText6 ; TextEndBattle
Route3TrainerHeader7: ; 5556d (15:556d) Route3TrainerHeader7: ; 5556d (15:556d)
db $8 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_7, 1
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7c3 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_7, 1
dw Route3BattleText7 ; TextBeforeBattle dw Route3BattleText7 ; TextBeforeBattle
dw Route3AfterBattleText7 ; TextAfterBattle dw Route3AfterBattleText7 ; TextAfterBattle
dw Route3EndBattleText7 ; TextEndBattle dw Route3EndBattleText7 ; TextEndBattle
dw Route3EndBattleText7 ; TextEndBattle dw Route3EndBattleText7 ; TextEndBattle
Route3TrainerHeader8: ; 55579 (15:5579) Route3TrainerHeader8: ; 55579 (15:5579)
db $9 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_8, 1
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7c3 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_8, 1
dw Route3BattleText8 ; TextBeforeBattle dw Route3BattleText8 ; TextBeforeBattle
dw Route3AfterBattleText8 ; TextAfterBattle dw Route3AfterBattleText8 ; TextAfterBattle
dw Route3EndBattleText8 ; TextEndBattle dw Route3EndBattleText8 ; TextEndBattle

View file

@ -22,9 +22,9 @@ Route4TextPointers: ; 55671 (15:5671)
Route4TrainerHeaders: ; 5567d (15:567d) Route4TrainerHeaders: ; 5567d (15:567d)
Route4TrainerHeader0: ; 5567d (15:567d) Route4TrainerHeader0: ; 5567d (15:567d)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_4_TRAINER_0
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7c5 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_4_TRAINER_0
dw Route4BattleText1 ; TextBeforeBattle dw Route4BattleText1 ; TextBeforeBattle
dw Route4AfterBattleText1 ; TextAfterBattle dw Route4AfterBattleText1 ; TextAfterBattle
dw Route4EndBattleText1 ; TextEndBattle dw Route4EndBattleText1 ; TextEndBattle

View file

@ -23,54 +23,54 @@ Route6TextPointers: ; 590c9 (16:50c9)
Route6TrainerHeaders: ; 590d7 (16:50d7) Route6TrainerHeaders: ; 590d7 (16:50d7)
Route6TrainerHeader0: ; 590d7 (16:50d7) Route6TrainerHeader0: ; 590d7 (16:50d7)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_6_TRAINER_0
db ($0 << 4) ; trainer's view range db ($0 << 4) ; trainer's view range
dw wd7c9 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_6_TRAINER_0
dw Route6BattleText1 ; TextBeforeBattle dw Route6BattleText1 ; TextBeforeBattle
dw Route6AfterBattleText1 ; TextAfterBattle dw Route6AfterBattleText1 ; TextAfterBattle
dw Route6EndBattleText1 ; TextEndBattle dw Route6EndBattleText1 ; TextEndBattle
dw Route6EndBattleText1 ; TextEndBattle dw Route6EndBattleText1 ; TextEndBattle
Route6TrainerHeader1: ; 590e3 (16:50e3) Route6TrainerHeader1: ; 590e3 (16:50e3)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_6_TRAINER_1
db ($0 << 4) ; trainer's view range db ($0 << 4) ; trainer's view range
dw wd7c9 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_6_TRAINER_1
dw Route6BattleText2 ; TextBeforeBattle dw Route6BattleText2 ; TextBeforeBattle
dw Route6AfterBattleText1 ; TextAfterBattle dw Route6AfterBattleText1 ; TextAfterBattle
dw Route6EndBattleText2 ; TextEndBattle dw Route6EndBattleText2 ; TextEndBattle
dw Route6EndBattleText2 ; TextEndBattle dw Route6EndBattleText2 ; TextEndBattle
Route6TrainerHeader2: ; 590ef (16:50ef) Route6TrainerHeader2: ; 590ef (16:50ef)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_6_TRAINER_2
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7c9 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_6_TRAINER_2
dw Route6BattleText3 ; TextBeforeBattle dw Route6BattleText3 ; TextBeforeBattle
dw Route6AfterBattleText3 ; TextAfterBattle dw Route6AfterBattleText3 ; TextAfterBattle
dw Route6EndBattleText3 ; TextEndBattle dw Route6EndBattleText3 ; TextEndBattle
dw Route6EndBattleText3 ; TextEndBattle dw Route6EndBattleText3 ; TextEndBattle
Route6TrainerHeader3: ; 590fb (16:50fb) Route6TrainerHeader3: ; 590fb (16:50fb)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_6_TRAINER_3
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7c9 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_6_TRAINER_3
dw Route6BattleText4 ; TextBeforeBattle dw Route6BattleText4 ; TextBeforeBattle
dw Route6AfterBattleText4 ; TextAfterBattle dw Route6AfterBattleText4 ; TextAfterBattle
dw Route6EndBattleText4 ; TextEndBattle dw Route6EndBattleText4 ; TextEndBattle
dw Route6EndBattleText4 ; TextEndBattle dw Route6EndBattleText4 ; TextEndBattle
Route6TrainerHeader4: ; 59107 (16:5107) Route6TrainerHeader4: ; 59107 (16:5107)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_6_TRAINER_4
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7c9 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_6_TRAINER_4
dw Route6BattleText5 ; TextBeforeBattle dw Route6BattleText5 ; TextBeforeBattle
dw Route6AfterBattleText5 ; TextAfterBattle dw Route6AfterBattleText5 ; TextAfterBattle
dw Route6EndBattleText5 ; TextEndBattle dw Route6EndBattleText5 ; TextEndBattle
dw Route6EndBattleText5 ; TextEndBattle dw Route6EndBattleText5 ; TextEndBattle
Route6TrainerHeader5: ; 59113 (16:5113) Route6TrainerHeader5: ; 59113 (16:5113)
db $6 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_6_TRAINER_5
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7c9 ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_6_TRAINER_5
dw Route6BattleText6 ; TextBeforeBattle dw Route6BattleText6 ; TextBeforeBattle
dw Route6AfterBattleText6 ; TextAfterBattle dw Route6AfterBattleText6 ; TextAfterBattle
dw Route6EndBattleText6 ; TextEndBattle dw Route6EndBattleText6 ; TextEndBattle

View file

@ -26,81 +26,81 @@ Route8TextPointers: ; 591cf (16:51cf)
Route8TrainerHeaders: ; 591e3 (16:51e3) Route8TrainerHeaders: ; 591e3 (16:51e3)
Route8TrainerHeader0: ; 591e3 (16:51e3) Route8TrainerHeader0: ; 591e3 (16:51e3)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_0
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7cd ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_0
dw Route8BattleText1 ; TextBeforeBattle dw Route8BattleText1 ; TextBeforeBattle
dw Route8AfterBattleText1 ; TextAfterBattle dw Route8AfterBattleText1 ; TextAfterBattle
dw Route8EndBattleText1 ; TextEndBattle dw Route8EndBattleText1 ; TextEndBattle
dw Route8EndBattleText1 ; TextEndBattle dw Route8EndBattleText1 ; TextEndBattle
Route8TrainerHeader1: ; 591ef (16:51ef) Route8TrainerHeader1: ; 591ef (16:51ef)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_1
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7cd ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_1
dw Route8BattleText2 ; TextBeforeBattle dw Route8BattleText2 ; TextBeforeBattle
dw Route8AfterBattleText2 ; TextAfterBattle dw Route8AfterBattleText2 ; TextAfterBattle
dw Route8EndBattleText2 ; TextEndBattle dw Route8EndBattleText2 ; TextEndBattle
dw Route8EndBattleText2 ; TextEndBattle dw Route8EndBattleText2 ; TextEndBattle
Route8TrainerHeader2: ; 591fb (16:51fb) Route8TrainerHeader2: ; 591fb (16:51fb)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_2
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7cd ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_2
dw Route8BattleText3 ; TextBeforeBattle dw Route8BattleText3 ; TextBeforeBattle
dw Route8AfterBattleText3 ; TextAfterBattle dw Route8AfterBattleText3 ; TextAfterBattle
dw Route8EndBattleText3 ; TextEndBattle dw Route8EndBattleText3 ; TextEndBattle
dw Route8EndBattleText3 ; TextEndBattle dw Route8EndBattleText3 ; TextEndBattle
Route8TrainerHeader3: ; 59207 (16:5207) Route8TrainerHeader3: ; 59207 (16:5207)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_3
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7cd ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_3
dw Route8BattleText4 ; TextBeforeBattle dw Route8BattleText4 ; TextBeforeBattle
dw Route8AfterBattleText4 ; TextAfterBattle dw Route8AfterBattleText4 ; TextAfterBattle
dw Route8EndBattleText4 ; TextEndBattle dw Route8EndBattleText4 ; TextEndBattle
dw Route8EndBattleText4 ; TextEndBattle dw Route8EndBattleText4 ; TextEndBattle
Route8TrainerHeader4: ; 59213 (16:5213) Route8TrainerHeader4: ; 59213 (16:5213)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_4
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7cd ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_4
dw Route8BattleText5 ; TextBeforeBattle dw Route8BattleText5 ; TextBeforeBattle
dw Route8AfterBattleText5 ; TextAfterBattle dw Route8AfterBattleText5 ; TextAfterBattle
dw Route8EndBattleText5 ; TextEndBattle dw Route8EndBattleText5 ; TextEndBattle
dw Route8EndBattleText5 ; TextEndBattle dw Route8EndBattleText5 ; TextEndBattle
Route8TrainerHeader5: ; 5921f (16:521f) Route8TrainerHeader5: ; 5921f (16:521f)
db $6 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_5
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7cd ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_5
dw Route8BattleText6 ; TextBeforeBattle dw Route8BattleText6 ; TextBeforeBattle
dw Route8AfterBattleText6 ; TextAfterBattle dw Route8AfterBattleText6 ; TextAfterBattle
dw Route8EndBattleText6 ; TextEndBattle dw Route8EndBattleText6 ; TextEndBattle
dw Route8EndBattleText6 ; TextEndBattle dw Route8EndBattleText6 ; TextEndBattle
Route8TrainerHeader6: ; 5922b (16:522b) Route8TrainerHeader6: ; 5922b (16:522b)
db $7 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_6
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7cd ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_6
dw Route8BattleText7 ; TextBeforeBattle dw Route8BattleText7 ; TextBeforeBattle
dw Route8AfterBattleText7 ; TextAfterBattle dw Route8AfterBattleText7 ; TextAfterBattle
dw Route8EndBattleText7 ; TextEndBattle dw Route8EndBattleText7 ; TextEndBattle
dw Route8EndBattleText7 ; TextEndBattle dw Route8EndBattleText7 ; TextEndBattle
Route8TrainerHeader7: ; 59237 (16:5237) Route8TrainerHeader7: ; 59237 (16:5237)
db $8 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_7, 1
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7cd ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_7, 1
dw Route8BattleText8 ; TextBeforeBattle dw Route8BattleText8 ; TextBeforeBattle
dw Route8AfterBattleText8 ; TextAfterBattle dw Route8AfterBattleText8 ; TextAfterBattle
dw Route8EndBattleText8 ; TextEndBattle dw Route8EndBattleText8 ; TextEndBattle
dw Route8EndBattleText8 ; TextEndBattle dw Route8EndBattleText8 ; TextEndBattle
Route8TrainerHeader8: ; 59243 (16:5243) Route8TrainerHeader8: ; 59243 (16:5243)
db $9 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_8, 1
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7cd ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_8, 1
dw Route8BattleText9 ; TextBeforeBattle dw Route8BattleText9 ; TextBeforeBattle
dw Route8AfterBattleText9 ; TextAfterBattle dw Route8AfterBattleText9 ; TextAfterBattle
dw Route8EndBattleText9 ; TextEndBattle dw Route8EndBattleText9 ; TextEndBattle

View file

@ -27,81 +27,81 @@ Route9TextPointers: ; 556d5 (15:56d5)
Route9TrainerHeaders: ; 556eb (15:56eb) Route9TrainerHeaders: ; 556eb (15:56eb)
Route9TrainerHeader0: ; 556eb (15:56eb) Route9TrainerHeader0: ; 556eb (15:56eb)
db $1 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_0
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7cf ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_0
dw Route9BattleText1 ; TextBeforeBattle dw Route9BattleText1 ; TextBeforeBattle
dw Route9AfterBattleText1 ; TextAfterBattle dw Route9AfterBattleText1 ; TextAfterBattle
dw Route9EndBattleText1 ; TextEndBattle dw Route9EndBattleText1 ; TextEndBattle
dw Route9EndBattleText1 ; TextEndBattle dw Route9EndBattleText1 ; TextEndBattle
Route9TrainerHeader2: ; 556f7 (15:56f7) Route9TrainerHeader2: ; 556f7 (15:56f7)
db $2 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_2
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7cf ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_2
dw Route9BattleText2 ; TextBeforeBattle dw Route9BattleText2 ; TextBeforeBattle
dw Route9AfterBattleText2 ; TextAfterBattle dw Route9AfterBattleText2 ; TextAfterBattle
dw Route9EndBattleText2 ; TextEndBattle dw Route9EndBattleText2 ; TextEndBattle
dw Route9EndBattleText2 ; TextEndBattle dw Route9EndBattleText2 ; TextEndBattle
Route9TrainerHeader3: ; 55703 (15:5703) Route9TrainerHeader3: ; 55703 (15:5703)
db $3 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_3
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7cf ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_3
dw Route9BattleText3 ; TextBeforeBattle dw Route9BattleText3 ; TextBeforeBattle
dw Route9AfterBattleText3 ; TextAfterBattle dw Route9AfterBattleText3 ; TextAfterBattle
dw Route9EndBattleText3 ; TextEndBattle dw Route9EndBattleText3 ; TextEndBattle
dw Route9EndBattleText3 ; TextEndBattle dw Route9EndBattleText3 ; TextEndBattle
Route9TrainerHeader4: ; 5570f (15:570f) Route9TrainerHeader4: ; 5570f (15:570f)
db $4 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_4
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7cf ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_4
dw Route9BattleText4 ; TextBeforeBattle dw Route9BattleText4 ; TextBeforeBattle
dw Route9AfterBattleText4 ; TextAfterBattle dw Route9AfterBattleText4 ; TextAfterBattle
dw Route9EndBattleText4 ; TextEndBattle dw Route9EndBattleText4 ; TextEndBattle
dw Route9EndBattleText4 ; TextEndBattle dw Route9EndBattleText4 ; TextEndBattle
Route9TrainerHeader5: ; 5571b (15:571b) Route9TrainerHeader5: ; 5571b (15:571b)
db $5 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_5
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7cf ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_5
dw Route9BattleText5 ; TextBeforeBattle dw Route9BattleText5 ; TextBeforeBattle
dw Route9AfterBattleText5 ; TextAfterBattle dw Route9AfterBattleText5 ; TextAfterBattle
dw Route9EndBattleText5 ; TextEndBattle dw Route9EndBattleText5 ; TextEndBattle
dw Route9EndBattleText5 ; TextEndBattle dw Route9EndBattleText5 ; TextEndBattle
Route9TrainerHeader6: ; 55727 (15:5727) Route9TrainerHeader6: ; 55727 (15:5727)
db $6 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_6
db ($3 << 4) ; trainer's view range db ($3 << 4) ; trainer's view range
dw wd7cf ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_6
dw Route9BattleText6 ; TextBeforeBattle dw Route9BattleText6 ; TextBeforeBattle
dw Route9AfterBattleText6 ; TextAfterBattle dw Route9AfterBattleText6 ; TextAfterBattle
dw Route9EndBattleText6 ; TextEndBattle dw Route9EndBattleText6 ; TextEndBattle
dw Route9EndBattleText6 ; TextEndBattle dw Route9EndBattleText6 ; TextEndBattle
Route9TrainerHeader7: ; 55733 (15:5733) Route9TrainerHeader7: ; 55733 (15:5733)
db $7 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_7
db ($4 << 4) ; trainer's view range db ($4 << 4) ; trainer's view range
dw wd7cf ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_7
dw Route9BattleText7 ; TextBeforeBattle dw Route9BattleText7 ; TextBeforeBattle
dw Route9AfterBattleText7 ; TextAfterBattle dw Route9AfterBattleText7 ; TextAfterBattle
dw Route9EndBattleText7 ; TextEndBattle dw Route9EndBattleText7 ; TextEndBattle
dw Route9EndBattleText7 ; TextEndBattle dw Route9EndBattleText7 ; TextEndBattle
Route9TrainerHeader8: ; 5573f (15:573f) Route9TrainerHeader8: ; 5573f (15:573f)
db $8 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_8, 1
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7cf ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_8, 1
dw Route9BattleText8 ; TextBeforeBattle dw Route9BattleText8 ; TextBeforeBattle
dw Route9AfterBattleText8 ; TextAfterBattle dw Route9AfterBattleText8 ; TextAfterBattle
dw Route9EndBattleText8 ; TextEndBattle dw Route9EndBattleText8 ; TextEndBattle
dw Route9EndBattleText8 ; TextEndBattle dw Route9EndBattleText8 ; TextEndBattle
Route9TrainerHeader9: ; 5574b (15:574b) Route9TrainerHeader9: ; 5574b (15:574b)
db $9 ; flag's bit dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_9, 1
db ($2 << 4) ; trainer's view range db ($2 << 4) ; trainer's view range
dw wd7cf ; flag's byte dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_9, 1
dw Route9BattleText9 ; TextBeforeBattle dw Route9BattleText9 ; TextBeforeBattle
dw Route9AfterBattleText9 ; TextAfterBattle dw Route9AfterBattleText9 ; TextAfterBattle
dw Route9EndBattleText9 ; TextEndBattle dw Route9EndBattleText9 ; TextEndBattle

View file

@ -64,9 +64,8 @@
ld a,D_UP ld a,D_UP
ld c,3 ld c,3
call SafariZoneEntranceAutoWalk call SafariZoneEntranceAutoWalk
ld hl,wd790 SetEvent EVENT_IN_SAFARI_ZONE
set 7,[hl] ResetEventReuseHL EVENT_SAFARI_GAME_OVER
res 6,[hl]
ld a,3 ld a,3
ld [W_SAFARIZONEENTRANCECURSCRIPT],a ld [W_SAFARIZONEENTRANCECURSCRIPT],a
jr .done jr .done

Some files were not shown because too many files have changed in this diff Show more