summaryrefslogtreecommitdiff
path: root/maps/Route32.asm
diff options
context:
space:
mode:
Diffstat (limited to 'maps/Route32.asm')
-rw-r--r--maps/Route32.asm356
1 files changed, 113 insertions, 243 deletions
diff --git a/maps/Route32.asm b/maps/Route32.asm
index a914d4e17..2a832897c 100644
--- a/maps/Route32.asm
+++ b/maps/Route32.asm
@@ -1,5 +1,5 @@
Route32_MapScriptHeader:
- ; trigger count
+.MapTriggers:
db 3
; triggers
@@ -7,7 +7,7 @@ Route32_MapScriptHeader:
dw UnknownScript_0x190461, $0000
dw UnknownScript_0x190462, $0000
- ; callback count
+.MapCallbacks:
db 1
; callbacks
@@ -24,7 +24,7 @@ UnknownScript_0x190462:
end
FriedaCallback:
- checkcode $b
+ checkcode VAR_WEEKDAY
if_equal FRIDAY, .FriedaAppears
disappear $e
return
@@ -39,7 +39,7 @@ UnknownScript_0x190470:
loadfont
checkevent EVENT_GOT_MIRACLE_SEED_IN_ROUTE_32
iftrue UnknownScript_0x1904a5
- checkflag $001b
+ checkflag ENGINE_ZEPHYRBADGE
iffalse UnknownScript_0x19049f
checkevent EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE
iftrue UnknownScript_0x19048f
@@ -98,7 +98,7 @@ FisherScript_0x1904ce:
iftrue UnknownScript_0x1904e3
writetext UnknownText_0x191133
keeptextopen
- verbosegiveitem TM_05, 1
+ verbosegiveitem TM_ROAR, 1
iffalse UnknownScript_0x1904e7
setevent EVENT_GOT_TM05_ROAR
UnknownScript_0x1904e3:
@@ -133,23 +133,7 @@ UnknownScript_0x190503:
end
TrainerCamperRoland:
- ; bit/flag number
- dw $41a
-
- ; trainer group && trainer id
- db CAMPER, ROLAND
-
- ; text when seen
- dw CamperRolandSeenText
-
- ; text when trainer beaten
- dw CamperRolandBeatenText
-
- ; script when lost
- dw $0000
-
- ; script when talk again
- dw CamperRolandScript
+ trainer EVENT_BEAT_CAMPER_ROLAND, CAMPER, ROLAND, CamperRolandSeenText, CamperRolandBeatenText, $0000, CamperRolandScript
CamperRolandScript:
talkaftercancel
@@ -160,23 +144,7 @@ CamperRolandScript:
end
TrainerFisherJustin:
- ; bit/flag number
- dw $44e
-
- ; trainer group && trainer id
- db FISHER, JUSTIN
-
- ; text when seen
- dw FisherJustinSeenText
-
- ; text when trainer beaten
- dw FisherJustinBeatenText
-
- ; script when lost
- dw $0000
-
- ; script when talk again
- dw FisherJustinScript
+ trainer EVENT_BEAT_FISHER_JUSTIN, FISHER, JUSTIN, FisherJustinSeenText, FisherJustinBeatenText, $0000, FisherJustinScript
FisherJustinScript:
talkaftercancel
@@ -187,46 +155,30 @@ FisherJustinScript:
end
TrainerFisherRalph1:
- ; bit/flag number
- dw $44f
-
- ; trainer group && trainer id
- db FISHER, RALPH1
-
- ; text when seen
- dw FisherRalph1SeenText
-
- ; text when trainer beaten
- dw FisherRalph1BeatenText
-
- ; script when lost
- dw $0000
-
- ; script when talk again
- dw FisherRalph1Script
+ trainer EVENT_BEAT_FISHER_RALPH, FISHER, RALPH1, FisherRalph1SeenText, FisherRalph1BeatenText, $0000, FisherRalph1Script
FisherRalph1Script:
- writecode $17, $11
+ writecode VAR_CALLERID, PHONE_FISHER_RALPH
talkaftercancel
loadfont
- checkflag $006d
+ checkflag ENGINE_RALPH
iftrue UnknownScript_0x19057d
- checkflag $0052
+ checkflag ENGINE_SPECIAL_WILDDATA
iftrue UnknownScript_0x1905f1
- checkcellnum $11
+ checkcellnum PHONE_FISHER_RALPH
iftrue UnknownScript_0x190603
- checkevent $0277
+ checkevent EVENT_RALPH_ASKED_FOR_PHONE_NUMBER
iftrue UnknownScript_0x190566
writetext UnknownText_0x190bf8
keeptextopen
- setevent $0277
+ setevent EVENT_RALPH_ASKED_FOR_PHONE_NUMBER
scall UnknownScript_0x1905f7
jump UnknownScript_0x190569
UnknownScript_0x190566:
scall UnknownScript_0x1905fb
UnknownScript_0x190569:
- askforphonenumber $11
+ askforphonenumber PHONE_FISHER_RALPH
if_equal $1, UnknownScript_0x19060b
if_equal $2, UnknownScript_0x190607
trainertotext FISHER, RALPH1, $0
@@ -236,61 +188,61 @@ UnknownScript_0x190569:
UnknownScript_0x19057d:
scall UnknownScript_0x19060f
winlosstext FisherRalph1BeatenText, $0000
- copybytetovar wd9fb
- if_equal $4, UnknownScript_0x19059c
- if_equal $3, UnknownScript_0x1905a2
- if_equal $2, UnknownScript_0x1905a8
- if_equal $1, UnknownScript_0x1905ae
- if_equal $0, UnknownScript_0x1905b4
-UnknownScript_0x19059c:
+ copybytetovar wRalphFightCount
+ if_equal 4, .Fight4
+ if_equal 3, .Fight3
+ if_equal 2, .Fight2
+ if_equal 1, .Fight1
+ if_equal 0, .LoadFight0
+.Fight4
checkevent EVENT_RESTORED_POWER_TO_KANTO
- iftrue UnknownScript_0x1905e8
-UnknownScript_0x1905a2:
+ iftrue .LoadFight4
+.Fight3
checkevent EVENT_BEAT_ELITE_FOUR
- iftrue UnknownScript_0x1905db
-UnknownScript_0x1905a8:
- checkflag $004a
- iftrue UnknownScript_0x1905ce
-UnknownScript_0x1905ae:
- checkflag $0048
- iftrue UnknownScript_0x1905c1
-UnknownScript_0x1905b4:
+ iftrue .LoadFight3
+.Fight2
+ checkflag ENGINE_FLYPOINT_LAKE_OF_RAGE
+ iftrue .LoadFight2
+.Fight1
+ checkflag ENGINE_FLYPOINT_ECRUTEAK
+ iftrue .LoadFight1
+.LoadFight0
loadtrainer FISHER, RALPH1
startbattle
returnafterbattle
- loadvar wd9fb, $1
- clearflag $006d
+ loadvar wRalphFightCount, 1
+ clearflag ENGINE_RALPH
end
-UnknownScript_0x1905c1:
+.LoadFight1
loadtrainer FISHER, RALPH2
startbattle
returnafterbattle
- loadvar wd9fb, $2
- clearflag $006d
+ loadvar wRalphFightCount, 2
+ clearflag ENGINE_RALPH
end
-UnknownScript_0x1905ce:
+.LoadFight2
loadtrainer FISHER, RALPH3
startbattle
returnafterbattle
- loadvar wd9fb, $3
- clearflag $006d
+ loadvar wRalphFightCount, 3
+ clearflag ENGINE_RALPH
end
-UnknownScript_0x1905db:
+.LoadFight3
loadtrainer FISHER, RALPH4
startbattle
returnafterbattle
- loadvar wd9fb, $4
- clearflag $006d
+ loadvar wRalphFightCount, 4
+ clearflag ENGINE_RALPH
end
-UnknownScript_0x1905e8:
+.LoadFight4
loadtrainer FISHER, RALPH5
startbattle
returnafterbattle
- clearflag $006d
+ clearflag ENGINE_RALPH
end
UnknownScript_0x1905f1:
@@ -328,23 +280,7 @@ UnknownScript_0x19060f:
end
TrainerFisherHenry:
- ; bit/flag number
- dw $452
-
- ; trainer group && trainer id
- db FISHER, HENRY
-
- ; text when seen
- dw FisherHenrySeenText
-
- ; text when trainer beaten
- dw FisherHenryBeatenText
-
- ; script when lost
- dw $0000
-
- ; script when talk again
- dw FisherHenryScript
+ trainer EVENT_BEAT_FISHER_HENRY, FISHER, HENRY, FisherHenrySeenText, FisherHenryBeatenText, $0000, FisherHenryScript
FisherHenryScript:
talkaftercancel
@@ -355,44 +291,28 @@ FisherHenryScript:
end
TrainerPicnickerLiz1:
- ; bit/flag number
- dw $47e
-
- ; trainer group && trainer id
- db PICNICKER, LIZ1
-
- ; text when seen
- dw PicnickerLiz1SeenText
-
- ; text when trainer beaten
- dw PicnickerLiz1BeatenText
-
- ; script when lost
- dw $0000
-
- ; script when talk again
- dw PicnickerLiz1Script
+ trainer EVENT_BEAT_PICNICKER_LIZ, PICNICKER, LIZ1, PicnickerLiz1SeenText, PicnickerLiz1BeatenText, $0000, PicnickerLiz1Script
PicnickerLiz1Script:
- writecode $17, $12
+ writecode VAR_CALLERID, PHONE_PICNICKER_LIZ
talkaftercancel
loadfont
- checkflag $006e
+ checkflag ENGINE_LIZ
iftrue UnknownScript_0x19066d
- checkcellnum $12
+ checkcellnum PHONE_PICNICKER_LIZ
iftrue UnknownScript_0x1906ed
- checkevent $0279
+ checkevent EVENT_LIZ_ASKED_FOR_PHONE_NUMBER
iftrue UnknownScript_0x190656
writetext UnknownText_0x191060
keeptextopen
- setevent $0279
+ setevent EVENT_LIZ_ASKED_FOR_PHONE_NUMBER
scall UnknownScript_0x1906e1
jump UnknownScript_0x190659
UnknownScript_0x190656:
scall UnknownScript_0x1906e5
UnknownScript_0x190659:
- askforphonenumber $12
+ askforphonenumber PHONE_PICNICKER_LIZ
if_equal $1, UnknownScript_0x1906f5
if_equal $2, UnknownScript_0x1906f1
trainertotext PICNICKER, LIZ1, $0
@@ -402,61 +322,61 @@ UnknownScript_0x190659:
UnknownScript_0x19066d:
scall UnknownScript_0x1906f9
winlosstext PicnickerLiz1BeatenText, $0000
- copybytetovar wd9fc
- if_equal $4, UnknownScript_0x19068c
- if_equal $3, UnknownScript_0x190692
- if_equal $2, UnknownScript_0x190698
- if_equal $1, UnknownScript_0x19069e
- if_equal $0, UnknownScript_0x1906a4
-UnknownScript_0x19068c:
+ copybytetovar wLizFightCount
+ if_equal 4, .Fight4
+ if_equal 3, .Fight3
+ if_equal 2, .Fight2
+ if_equal 1, .Fight1
+ if_equal 0, .LoadFight0
+.Fight4
checkevent EVENT_BEAT_ELITE_FOUR
- iftrue UnknownScript_0x1906d8
-UnknownScript_0x190692:
+ iftrue .LoadFight4
+.Fight3
checkevent EVENT_CLEARED_RADIO_TOWER
- iftrue UnknownScript_0x1906cb
-UnknownScript_0x190698:
+ iftrue .LoadFight3
+.Fight2
checkevent EVENT_CLEARED_ROCKET_HIDEOUT
- iftrue UnknownScript_0x1906be
-UnknownScript_0x19069e:
- checkflag $0048
- iftrue UnknownScript_0x1906b1
-UnknownScript_0x1906a4:
+ iftrue .LoadFight2
+.Fight1
+ checkflag ENGINE_FLYPOINT_ECRUTEAK
+ iftrue .LoadFight1
+.LoadFight0
loadtrainer PICNICKER, LIZ1
startbattle
returnafterbattle
- loadvar wd9fc, $1
- clearflag $006e
+ loadvar wLizFightCount, 1
+ clearflag ENGINE_LIZ
end
-UnknownScript_0x1906b1:
+.LoadFight1
loadtrainer PICNICKER, LIZ2
startbattle
returnafterbattle
- loadvar wd9fc, $2
- clearflag $006e
+ loadvar wLizFightCount, 2
+ clearflag ENGINE_LIZ
end
-UnknownScript_0x1906be:
+.LoadFight2
loadtrainer PICNICKER, LIZ3
startbattle
returnafterbattle
- loadvar wd9fc, $3
- clearflag $006e
+ loadvar wLizFightCount, 3
+ clearflag ENGINE_LIZ
end
-UnknownScript_0x1906cb:
+.LoadFight3
loadtrainer PICNICKER, LIZ4
startbattle
returnafterbattle
- loadvar wd9fc, $4
- clearflag $006e
+ loadvar wLizFightCount, 4
+ clearflag ENGINE_LIZ
end
-UnknownScript_0x1906d8:
+.LoadFight4
loadtrainer PICNICKER, LIZ5
startbattle
returnafterbattle
- clearflag $006e
+ clearflag ENGINE_LIZ
end
UnknownScript_0x1906e1:
@@ -488,23 +408,7 @@ UnknownScript_0x1906f9:
end
TrainerYoungsterAlbert:
- ; bit/flag number
- dw $5ab
-
- ; trainer group && trainer id
- db YOUNGSTER, ALBERT
-
- ; text when seen
- dw YoungsterAlbertSeenText
-
- ; text when trainer beaten
- dw YoungsterAlbertBeatenText
-
- ; script when lost
- dw $0000
-
- ; script when talk again
- dw YoungsterAlbertScript
+ trainer EVENT_BEAT_YOUNGSTER_ALBERT, YOUNGSTER, ALBERT, YoungsterAlbertSeenText, YoungsterAlbertBeatenText, $0000, YoungsterAlbertScript
YoungsterAlbertScript:
talkaftercancel
@@ -515,23 +419,7 @@ YoungsterAlbertScript:
end
TrainerYoungsterGordon:
- ; bit/flag number
- dw $5ac
-
- ; trainer group && trainer id
- db YOUNGSTER, GORDON
-
- ; text when seen
- dw YoungsterGordonSeenText
-
- ; text when trainer beaten
- dw YoungsterGordonBeatenText
-
- ; script when lost
- dw $0000
-
- ; script when talk again
- dw YoungsterGordonScript
+ trainer EVENT_BEAT_YOUNGSTER_GORDON, YOUNGSTER, GORDON, YoungsterGordonSeenText, YoungsterGordonBeatenText, $0000, YoungsterGordonScript
YoungsterGordonScript:
talkaftercancel
@@ -542,23 +430,7 @@ YoungsterGordonScript:
end
TrainerBird_keeperPeter:
- ; bit/flag number
- dw $407
-
- ; trainer group && trainer id
- db BIRD_KEEPER, PETER
-
- ; text when seen
- dw Bird_keeperPeterSeenText
-
- ; text when trainer beaten
- dw Bird_keeperPeterBeatenText
-
- ; script when lost
- dw $0000
-
- ; script when talk again
- dw Bird_keeperPeterScript
+ trainer EVENT_BEAT_BIRD_KEEPER_PETER, BIRD_KEEPER, PETER, Bird_keeperPeterSeenText, Bird_keeperPeterBeatenText, $0000, Bird_keeperPeterScript
Bird_keeperPeterScript:
talkaftercancel
@@ -573,7 +445,7 @@ FriedaScript:
loadfont
checkevent EVENT_GOT_POISON_BARB_FROM_FRIEDA
iftrue FriedaFridayScript
- checkcode $b
+ checkcode VAR_WEEKDAY
if_not_equal FRIDAY, FriedaNotFridayScript
checkevent EVENT_MET_FRIEDA_OF_FRIDAY
iftrue .MetFrieda
@@ -623,13 +495,11 @@ Route32PokeCenterSign:
jumpstd pokecentersign
MapRoute32SignpostItem4:
- dw $00a5
- db GREAT_BALL
+ dwb EVENT_ROUTE_32_HIDDEN_GREAT_BALL, GREAT_BALL
MapRoute32SignpostItem5:
- dw $00a6
- db SUPER_POTION
+ dwb EVENT_ROUTE_32_HIDDEN_SUPER_POTION, SUPER_POTION
MovementData_0x190789:
@@ -1053,40 +923,40 @@ Route32_MapEventHeader:
; filler
db 0, 0
- ; warps
+.Warps:
db 4
warp_def $49, $b, 1, GROUP_ROUTE_32_POKECENTER_1F, MAP_ROUTE_32_POKECENTER_1F
warp_def $2, $4, 3, GROUP_ROUTE_32_RUINS_OF_ALPH_GATE, MAP_ROUTE_32_RUINS_OF_ALPH_GATE
warp_def $3, $4, 4, GROUP_ROUTE_32_RUINS_OF_ALPH_GATE, MAP_ROUTE_32_RUINS_OF_ALPH_GATE
warp_def $4f, $6, 4, GROUP_UNION_CAVE_1F, MAP_UNION_CAVE_1F
- ; xy triggers
+.XYTriggers:
db 2
xy_trigger 0, $8, $12, $0, UnknownScript_0x1904ab, $0, $0
xy_trigger 1, $47, $7, $0, UnknownScript_0x1904e9, $0, $0
- ; signposts
+.Signposts:
db 6
- signpost 5, 13, $0, Route32Sign
- signpost 1, 9, $0, Route32RuinsSign
- signpost 84, 10, $0, Route32UnionCaveSign
- signpost 73, 12, $0, Route32PokeCenterSign
- signpost 67, 12, $7, MapRoute32SignpostItem4
- signpost 40, 11, $7, MapRoute32SignpostItem5
-
- ; people-events
+ signpost 5, 13, SIGNPOST_READ, Route32Sign
+ signpost 1, 9, SIGNPOST_READ, Route32RuinsSign
+ signpost 84, 10, SIGNPOST_READ, Route32UnionCaveSign
+ signpost 73, 12, SIGNPOST_READ, Route32PokeCenterSign
+ signpost 67, 12, SIGNPOST_ITEM, MapRoute32SignpostItem4
+ signpost 40, 11, SIGNPOST_ITEM, MapRoute32SignpostItem5
+
+.PersonEvents:
db 14
- person_event SPRITE_FISHER, 53, 12, $6, $0, 255, 255, $a2, 1, TrainerFisherJustin, $ffff
- person_event SPRITE_FISHER, 60, 16, $7, $0, 255, 255, $a2, 3, TrainerFisherRalph1, $ffff
- person_event SPRITE_FISHER, 52, 10, $8, $0, 255, 255, $a2, 1, TrainerFisherHenry, $ffff
- person_event SPRITE_YOUNGSTER, 26, 16, $9, $0, 255, 255, $92, 3, TrainerYoungsterAlbert, $ffff
- person_event SPRITE_YOUNGSTER, 67, 8, $a, $0, 255, 255, $92, 3, TrainerYoungsterGordon, $ffff
- person_event SPRITE_YOUNGSTER, 49, 7, $7, $0, 255, 255, $a2, 3, TrainerCamperRoland, $ffff
- person_event SPRITE_LASS, 34, 14, $8, $0, 255, 255, $a2, 1, TrainerPicnickerLiz1, $ffff
- person_event SPRITE_COOLTRAINER_M, 12, 23, $8, $0, 255, 255, $0, 0, CooltrainerMScript_0x19046f, $ffff
- person_event SPRITE_YOUNGSTER, 86, 15, $7, $0, 255, 255, $92, 3, TrainerBird_keeperPeter, $ffff
- person_event SPRITE_FISHER, 74, 11, $6, $0, 255, 255, $0, 0, FisherScript_0x1904f2, $06fc
- person_event SPRITE_POKE_BALL, 57, 10, $1, $0, 255, 255, $1, 0, ItemFragment_0x190773, $06b0
- person_event SPRITE_FISHER, 17, 19, $9, $0, 255, 255, $0, 0, FisherScript_0x1904ce, $ffff
- person_event SPRITE_LASS, 71, 16, $8, $0, 255, 255, $0, 0, FriedaScript, $0758
- person_event SPRITE_POKE_BALL, 34, 7, $1, $0, 255, 255, $1, 0, ItemFragment_0x190775, $06b1
+ person_event SPRITE_FISHER, 53, 12, OW_UP | $2, $0, -1, -1, (PAL_OW_GREEN << 4) | $82, 1, TrainerFisherJustin, -1
+ person_event SPRITE_FISHER, 60, 16, OW_UP | $3, $0, -1, -1, (PAL_OW_GREEN << 4) | $82, 3, TrainerFisherRalph1, -1
+ person_event SPRITE_FISHER, 52, 10, OW_LEFT | $0, $0, -1, -1, (PAL_OW_GREEN << 4) | $82, 1, TrainerFisherHenry, -1
+ person_event SPRITE_YOUNGSTER, 26, 16, OW_LEFT | $1, $0, -1, -1, (PAL_OW_BLUE << 4) | $82, 3, TrainerYoungsterAlbert, -1
+ person_event SPRITE_YOUNGSTER, 67, 8, OW_LEFT | $2, $0, -1, -1, (PAL_OW_BLUE << 4) | $82, 3, TrainerYoungsterGordon, -1
+ person_event SPRITE_YOUNGSTER, 49, 7, OW_UP | $3, $0, -1, -1, (PAL_OW_GREEN << 4) | $82, 3, TrainerCamperRoland, -1
+ person_event SPRITE_LASS, 34, 14, OW_LEFT | $0, $0, -1, -1, (PAL_OW_GREEN << 4) | $82, 1, TrainerPicnickerLiz1, -1
+ person_event SPRITE_COOLTRAINER_M, 12, 23, OW_LEFT | $0, $0, -1, -1, $0, 0, CooltrainerMScript_0x19046f, -1
+ person_event SPRITE_YOUNGSTER, 86, 15, OW_UP | $3, $0, -1, -1, (PAL_OW_BLUE << 4) | $82, 3, TrainerBird_keeperPeter, -1
+ person_event SPRITE_FISHER, 74, 11, OW_UP | $2, $0, -1, -1, $0, 0, FisherScript_0x1904f2, EVENT_SLOWPOKE_WELL_ROCKETS
+ person_event SPRITE_POKE_BALL, 57, 10, OW_DOWN | $1, $0, -1, -1, $1, 0, ItemFragment_0x190773, EVENT_ROUTE_32_GREAT_BALL
+ person_event SPRITE_FISHER, 17, 19, OW_LEFT | $1, $0, -1, -1, $0, 0, FisherScript_0x1904ce, -1
+ person_event SPRITE_LASS, 71, 16, OW_LEFT | $0, $0, -1, -1, $0, 0, FriedaScript, EVENT_ROUTE_32_FRIEDA_OF_FRIDAY
+ person_event SPRITE_POKE_BALL, 34, 7, OW_DOWN | $1, $0, -1, -1, $1, 0, ItemFragment_0x190775, EVENT_ROUTE_32_REPEL