summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data-de/event_scripts.s90
-rw-r--r--data-de/text/pokedex_rating.inc8
-rw-r--r--data/event_scripts.s90
-rw-r--r--data/maps/EverGrandeCity_ChampionsRoom/scripts.inc2
-rw-r--r--data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc4
-rw-r--r--data/maps/Route101/map.json2
-rw-r--r--data/maps/Route101/scripts.inc2
-rw-r--r--data/maps/Route103/map.json2
-rw-r--r--data/maps/Route103/scripts.inc2
-rw-r--r--data/scripts/prof_birch.inc84
-rw-r--r--data/text/pokedex_rating.inc8
11 files changed, 101 insertions, 193 deletions
diff --git a/data-de/event_scripts.s b/data-de/event_scripts.s
index f96aaa140..55922610d 100644
--- a/data-de/event_scripts.s
+++ b/data-de/event_scripts.s
@@ -899,95 +899,7 @@ Common_EventScript_StopBrineysBoatMusic:: @ 81A02EF
fadedefaultbgm
return
-LittlerootTown_ProfessorBirchsLab_EventScript_1A02F4:: @ 81A02F4
-Route101_EventScript_1A02F4:: @ 81A02F4
-Route103_EventScript_1A02F4:: @ 81A02F4
- compare VAR_PETALBURG_GYM_STATE, 0
- goto_if_eq Common_EventScript_Return
- compare VAR_BIRCH_STATE, 0
- call_if_eq Route101_EventScript_1A0358
- compare VAR_BIRCH_STATE, 1
- call_if_eq Route101_EventScript_1A0358
- compare VAR_BIRCH_STATE, 2
- call_if_eq Route101_EventScript_1A0365
- compare VAR_BIRCH_STATE, 3
- call_if_eq Route101_EventScript_1A0365
- compare VAR_BIRCH_STATE, 4
- call_if_eq Route101_EventScript_1A0372
- compare VAR_BIRCH_STATE, 5
- call_if_eq Route101_EventScript_1A0372
- compare VAR_BIRCH_STATE, 6
- call_if_eq Route101_EventScript_1A0358
- compare VAR_BIRCH_STATE, 7
- call_if_eq Route101_EventScript_1A0358
- return
-
-Route101_EventScript_1A0358:: @ 81A0358
- clearflag FLAG_HIDE_BIRCH_IN_LAB
- clearflag FLAG_UNKNOWN_BIRCH_380
- setflag FLAG_HIDE_BIRCH_ROUTE101
- setflag FLAG_HIDE_BIRCH_ROUTE103
- return
-
-Route101_EventScript_1A0365:: @ 81A0365
- clearflag FLAG_HIDE_BIRCH_ROUTE101
- setflag FLAG_HIDE_BIRCH_IN_LAB
- setflag FLAG_UNKNOWN_BIRCH_380
- setflag FLAG_HIDE_BIRCH_ROUTE103
- return
-
-Route101_EventScript_1A0372:: @ 81A0372
- clearflag FLAG_HIDE_BIRCH_ROUTE103
- setflag FLAG_HIDE_BIRCH_ROUTE101
- setflag FLAG_HIDE_BIRCH_IN_LAB
- setflag FLAG_UNKNOWN_BIRCH_380
- return
-
-LittlerootTown_ProfessorBirchsLab_EventScript_1A037F:: @ 81A037F
-Route101_EventScript_1A037F:: @ 81A037F
-Route103_EventScript_1A037F:: @ 81A037F
- lock
- faceplayer
- msgbox Route101_Text_1C4449, MSGBOX_YESNO
- compare VAR_RESULT, NO
- goto_if_eq Route101_EventScript_1A039B
- call Route101_EventScript_1A03B0
- release
- end
-
-Route101_EventScript_1A039B:: @ 81A039B
- msgbox Route101_Text_1C449B, MSGBOX_DEFAULT
- release
- end
-
-Route101_EventScript_1A03A5:: @ 81A03A5
- copyvar VAR_0x8004, VAR_0x8009
- special ShowPokedexRatingMessage
- waitmessage
- waitbuttonpress
- return
-
-EverGrandeCity_ChampionsRoom_EventScript_1A03B0:: @ 81A03B0
-Route101_EventScript_1A03B0:: @ 81A03B0
- setvar VAR_0x8004, 0
- specialvar VAR_RESULT, ScriptGetPokedexInfo
- copyvar VAR_0x8008, VAR_0x8005
- copyvar VAR_0x8009, VAR_0x8006
- copyvar VAR_0x800A, VAR_RESULT
- buffernumberstring 0, VAR_0x8008
- buffernumberstring 1, VAR_0x8009
- msgbox Route101_Text_1C44DC, MSGBOX_DEFAULT
- call Route101_EventScript_1A03A5
- compare VAR_0x800A, 0
- goto_if_eq Common_EventScript_Return
- setvar VAR_0x8004, 1
- specialvar VAR_RESULT, ScriptGetPokedexInfo
- copyvar VAR_0x8008, VAR_0x8005
- copyvar VAR_0x8009, VAR_0x8006
- buffernumberstring 0, VAR_0x8008
- buffernumberstring 1, VAR_0x8009
- msgbox Route101_Text_1C4B05, MSGBOX_DEFAULT
- return
+ .include "data/scripts/prof_birch.inc"
BattleTower_Outside_EventScript_1A040E:: @ 81A040E
LilycoveCity_Harbor_EventScript_1A040E:: @ 81A040E
diff --git a/data-de/text/pokedex_rating.inc b/data-de/text/pokedex_rating.inc
index fa3507866..c7ae2f5f3 100644
--- a/data-de/text/pokedex_rating.inc
+++ b/data-de/text/pokedex_rating.inc
@@ -1,14 +1,14 @@
-Route101_Text_1C4449:: @ 81C4449
+gBirchDexRatingText_ComeToShowMePokedex:: @ 81C4449
.string "PROF. BIRK: Ah, {PLAYER}{KUN}!\p"
.string "Möchtest du mir deine Fortschritte mit\n"
.string "dem POKéDEX zeigen?$"
-Route101_Text_1C449B:: @ 81C449B
+gBirchDexRatingText_Cancel:: @ 81C449B
.string "Ach? Du hast erst so wenige POKéMON\n"
.string "gefangen, dass es sich nicht lohnt,\l"
.string "ihn mir zu zeigen?$"
-Route101_Text_1C44DC:: @ 81C44DC
+gBirchDexRatingText_SoYouveSeenAndCaught:: @ 81C44DC
.string "Hmhm...\p"
.string "Oh, du hast {STR_VAR_1} POKéMON gesehen\n"
.string "und {STR_VAR_2} POKéMON gefangen...$"
@@ -103,7 +103,7 @@ gBirchDexRatingText_DexCompleted:: @ 81C4ADA
.string "Herzlichen Glückwunsch!\n"
.string "Dein POKéDEX ist vollständig!$"
-Route101_Text_1C4B05:: @ 81C4B05
+gBirchDexRatingText_OnANationwideBasis:: @ 81C4B05
.string "Hmhm...\n"
.string "Auf nationaler Ebene...\p"
.string "Hast du {STR_VAR_1} POKéMON gesehen\n"
diff --git a/data/event_scripts.s b/data/event_scripts.s
index 0a595ef4b..0a03581c7 100644
--- a/data/event_scripts.s
+++ b/data/event_scripts.s
@@ -898,95 +898,7 @@ Common_EventScript_StopBrineysBoatMusic:: @ 81A02EF
fadedefaultbgm
return
-LittlerootTown_ProfessorBirchsLab_EventScript_1A02F4:: @ 81A02F4
-Route101_EventScript_1A02F4:: @ 81A02F4
-Route103_EventScript_1A02F4:: @ 81A02F4
- compare VAR_PETALBURG_GYM_STATE, 0
- goto_if_eq Common_EventScript_Return
- compare VAR_BIRCH_STATE, 0
- call_if_eq Route101_EventScript_1A0358
- compare VAR_BIRCH_STATE, 1
- call_if_eq Route101_EventScript_1A0358
- compare VAR_BIRCH_STATE, 2
- call_if_eq Route101_EventScript_1A0365
- compare VAR_BIRCH_STATE, 3
- call_if_eq Route101_EventScript_1A0365
- compare VAR_BIRCH_STATE, 4
- call_if_eq Route101_EventScript_1A0372
- compare VAR_BIRCH_STATE, 5
- call_if_eq Route101_EventScript_1A0372
- compare VAR_BIRCH_STATE, 6
- call_if_eq Route101_EventScript_1A0358
- compare VAR_BIRCH_STATE, 7
- call_if_eq Route101_EventScript_1A0358
- return
-
-Route101_EventScript_1A0358:: @ 81A0358
- clearflag FLAG_HIDE_BIRCH_IN_LAB
- clearflag FLAG_UNKNOWN_BIRCH_380
- setflag FLAG_HIDE_BIRCH_ROUTE101
- setflag FLAG_HIDE_BIRCH_ROUTE103
- return
-
-Route101_EventScript_1A0365:: @ 81A0365
- clearflag FLAG_HIDE_BIRCH_ROUTE101
- setflag FLAG_HIDE_BIRCH_IN_LAB
- setflag FLAG_UNKNOWN_BIRCH_380
- setflag FLAG_HIDE_BIRCH_ROUTE103
- return
-
-Route101_EventScript_1A0372:: @ 81A0372
- clearflag FLAG_HIDE_BIRCH_ROUTE103
- setflag FLAG_HIDE_BIRCH_ROUTE101
- setflag FLAG_HIDE_BIRCH_IN_LAB
- setflag FLAG_UNKNOWN_BIRCH_380
- return
-
-LittlerootTown_ProfessorBirchsLab_EventScript_1A037F:: @ 81A037F
-Route101_EventScript_1A037F:: @ 81A037F
-Route103_EventScript_1A037F:: @ 81A037F
- lock
- faceplayer
- msgbox Route101_Text_1C4449, MSGBOX_YESNO
- compare VAR_RESULT, NO
- goto_if_eq Route101_EventScript_1A039B
- call Route101_EventScript_1A03B0
- release
- end
-
-Route101_EventScript_1A039B:: @ 81A039B
- msgbox Route101_Text_1C449B, MSGBOX_DEFAULT
- release
- end
-
-Route101_EventScript_1A03A5:: @ 81A03A5
- copyvar VAR_0x8004, VAR_0x8009
- special ShowPokedexRatingMessage
- waitmessage
- waitbuttonpress
- return
-
-EverGrandeCity_ChampionsRoom_EventScript_1A03B0:: @ 81A03B0
-Route101_EventScript_1A03B0:: @ 81A03B0
- setvar VAR_0x8004, 0
- specialvar VAR_RESULT, ScriptGetPokedexInfo
- copyvar VAR_0x8008, VAR_0x8005
- copyvar VAR_0x8009, VAR_0x8006
- copyvar VAR_0x800A, VAR_RESULT
- buffernumberstring 0, VAR_0x8008
- buffernumberstring 1, VAR_0x8009
- msgbox Route101_Text_1C44DC, MSGBOX_DEFAULT
- call Route101_EventScript_1A03A5
- compare VAR_0x800A, 0
- goto_if_eq Common_EventScript_Return
- setvar VAR_0x8004, 1
- specialvar VAR_RESULT, ScriptGetPokedexInfo
- copyvar VAR_0x8008, VAR_0x8005
- copyvar VAR_0x8009, VAR_0x8006
- buffernumberstring 0, VAR_0x8008
- buffernumberstring 1, VAR_0x8009
- msgbox Route101_Text_1C4B05, MSGBOX_DEFAULT
- return
+ .include "data/scripts/prof_birch.inc"
BattleTower_Outside_EventScript_1A040E:: @ 81A040E
LilycoveCity_Harbor_EventScript_1A040E:: @ 81A040E
diff --git a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc
index 92ba90cb8..5fdb9e18d 100644
--- a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc
+++ b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc
@@ -108,7 +108,7 @@ EverGrandeCity_ChampionsRoom_EventScript_15B8F0:: @ 815B8F0
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight
waitmovement 0
msgbox EverGrandeCity_ChampionsRoom_Text_19134D, MSGBOX_DEFAULT
- call EverGrandeCity_ChampionsRoom_EventScript_1A03B0
+ call ProfBirch_EventScript_RatePokedex
msgbox EverGrandeCity_ChampionsRoom_Text_1914C6, MSGBOX_DEFAULT
applymovement 1, Common_Movement_WalkInPlaceFastestUp
waitmovement 0
diff --git a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc
index 5465da371..945f5d35a 100644
--- a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc
+++ b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc
@@ -6,7 +6,7 @@ LittlerootTown_ProfessorBirchsLab_MapScripts:: @ 8152C82
LittlerootTown_ProfessorBirchsLab_MapScript1_152C92:: @ 8152C92
call Common_EventScript_SetupRivalGfxId
- call LittlerootTown_ProfessorBirchsLab_EventScript_1A02F4
+ call ProfBirch_EventScript_UpdateLocation
end
LittlerootTown_ProfessorBirchsLab_MapScript2_152C9D:: @ 8152C9D
@@ -106,7 +106,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_152D90:: @ 8152D90
LittlerootTown_ProfessorBirchsLab_EventScript_152D9A:: @ 8152D9A
lock
faceplayer
- goto_if_unset FLAG_UNKNOWN_BIRCH_380, LittlerootTown_ProfessorBirchsLab_EventScript_1A037F
+ goto_if_unset FLAG_UNKNOWN_BIRCH_380, ProfBirch_EventScript_AskRatePokedex
compare VAR_BIRCH_LAB_STATE, 5
goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152E7B
msgbox LittlerootTown_ProfessorBirchsLab_Text_1740B4, MSGBOX_DEFAULT
diff --git a/data/maps/Route101/map.json b/data/maps/Route101/map.json
index 58f046257..40f032962 100644
--- a/data/maps/Route101/map.json
+++ b/data/maps/Route101/map.json
@@ -84,7 +84,7 @@
"movement_range_y": 0,
"trainer_type": "0",
"trainer_sight_or_berry_tree_id": "0",
- "script": "Route101_EventScript_1A037F",
+ "script": "ProfBirch_EventScript_AskRatePokedex",
"flag": "FLAG_HIDE_BIRCH_ROUTE101"
},
{
diff --git a/data/maps/Route101/scripts.inc b/data/maps/Route101/scripts.inc
index 9c1f249a3..60e67565d 100644
--- a/data/maps/Route101/scripts.inc
+++ b/data/maps/Route101/scripts.inc
@@ -4,7 +4,7 @@ Route101_MapScripts:: @ 814E924
.byte 0
Route101_MapScript1_14E92F:: @ 814E92F
- call Route101_EventScript_1A02F4
+ call ProfBirch_EventScript_UpdateLocation
end
Route101_MapScript2_14E935:: @ 814E935
diff --git a/data/maps/Route103/map.json b/data/maps/Route103/map.json
index 02f9b30c3..940e6d7a4 100644
--- a/data/maps/Route103/map.json
+++ b/data/maps/Route103/map.json
@@ -162,7 +162,7 @@
"movement_range_y": 1,
"trainer_type": "0",
"trainer_sight_or_berry_tree_id": "0",
- "script": "Route103_EventScript_1A037F",
+ "script": "ProfBirch_EventScript_AskRatePokedex",
"flag": "FLAG_HIDE_BIRCH_ROUTE103"
},
{
diff --git a/data/maps/Route103/scripts.inc b/data/maps/Route103/scripts.inc
index 6747c140c..637a2a85a 100644
--- a/data/maps/Route103/scripts.inc
+++ b/data/maps/Route103/scripts.inc
@@ -4,7 +4,7 @@ Route103_MapScripts:: @ 814EB81
Route103_MapScript1_14EB87:: @ 814EB87
call Common_EventScript_SetupRivalGfxId
- call Route103_EventScript_1A02F4
+ call ProfBirch_EventScript_UpdateLocation
end
Route103_EventScript_14EB92:: @ 814EB92
diff --git a/data/scripts/prof_birch.inc b/data/scripts/prof_birch.inc
new file mode 100644
index 000000000..92c79a07a
--- /dev/null
+++ b/data/scripts/prof_birch.inc
@@ -0,0 +1,84 @@
+ProfBirch_EventScript_UpdateLocation:: @ 81A02F4
+ compare VAR_PETALBURG_GYM_STATE, 0
+ goto_if_eq Common_EventScript_Return
+ compare VAR_BIRCH_STATE, 0
+ call_if_eq ProfBirch_EventScript_MoveToLab
+ compare VAR_BIRCH_STATE, 1
+ call_if_eq ProfBirch_EventScript_MoveToLab
+ compare VAR_BIRCH_STATE, 2
+ call_if_eq ProfBirch_EventScript_MoveToRoute101
+ compare VAR_BIRCH_STATE, 3
+ call_if_eq ProfBirch_EventScript_MoveToRoute101
+ compare VAR_BIRCH_STATE, 4
+ call_if_eq ProfBirch_EventScript_MoveToRoute103
+ compare VAR_BIRCH_STATE, 5
+ call_if_eq ProfBirch_EventScript_MoveToRoute103
+ compare VAR_BIRCH_STATE, 6
+ call_if_eq ProfBirch_EventScript_MoveToLab
+ compare VAR_BIRCH_STATE, 7
+ call_if_eq ProfBirch_EventScript_MoveToLab
+ return
+
+ProfBirch_EventScript_MoveToLab:: @ 81A0358
+ clearflag FLAG_HIDE_BIRCH_IN_LAB
+ clearflag FLAG_UNKNOWN_BIRCH_380
+ setflag FLAG_HIDE_BIRCH_ROUTE101
+ setflag FLAG_HIDE_BIRCH_ROUTE103
+ return
+
+ProfBirch_EventScript_MoveToRoute101:: @ 81A0365
+ clearflag FLAG_HIDE_BIRCH_ROUTE101
+ setflag FLAG_HIDE_BIRCH_IN_LAB
+ setflag FLAG_UNKNOWN_BIRCH_380
+ setflag FLAG_HIDE_BIRCH_ROUTE103
+ return
+
+ProfBirch_EventScript_MoveToRoute103:: @ 81A0372
+ clearflag FLAG_HIDE_BIRCH_ROUTE103
+ setflag FLAG_HIDE_BIRCH_ROUTE101
+ setflag FLAG_HIDE_BIRCH_IN_LAB
+ setflag FLAG_UNKNOWN_BIRCH_380
+ return
+
+ProfBirch_EventScript_AskRatePokedex:: @ 81A037F
+ lock
+ faceplayer
+ msgbox gBirchDexRatingText_ComeToShowMePokedex, MSGBOX_YESNO
+ compare VAR_RESULT, NO
+ goto_if_eq ProfBirch_EventScript_DeclineRating
+ call ProfBirch_EventScript_RatePokedex
+ release
+ end
+
+ProfBirch_EventScript_DeclineRating:: @ 81A039B
+ msgbox gBirchDexRatingText_Cancel, MSGBOX_DEFAULT
+ release
+ end
+
+ProfBirch_EventScript_ShowRatingMessage:: @ 81A03A5
+ copyvar VAR_0x8004, VAR_0x8009
+ special ShowPokedexRatingMessage
+ waitmessage
+ waitbuttonpress
+ return
+
+ProfBirch_EventScript_RatePokedex:: @ 81A03B0
+ setvar VAR_0x8004, 0
+ specialvar VAR_RESULT, ScriptGetPokedexInfo
+ copyvar VAR_0x8008, VAR_0x8005
+ copyvar VAR_0x8009, VAR_0x8006
+ copyvar VAR_0x800A, VAR_RESULT
+ buffernumberstring 0, VAR_0x8008 @ Num Hoenn seen
+ buffernumberstring 1, VAR_0x8009 @ Num Hoenn caught
+ msgbox gBirchDexRatingText_SoYouveSeenAndCaught, MSGBOX_DEFAULT
+ call ProfBirch_EventScript_ShowRatingMessage
+ compare VAR_0x800A, 0
+ goto_if_eq Common_EventScript_Return @ National dex not enabled
+ setvar VAR_0x8004, 1
+ specialvar VAR_RESULT, ScriptGetPokedexInfo
+ copyvar VAR_0x8008, VAR_0x8005
+ copyvar VAR_0x8009, VAR_0x8006
+ buffernumberstring 0, VAR_0x8008 @ Num National seen
+ buffernumberstring 1, VAR_0x8009 @ Num National caught
+ msgbox gBirchDexRatingText_OnANationwideBasis, MSGBOX_DEFAULT
+ return
diff --git a/data/text/pokedex_rating.inc b/data/text/pokedex_rating.inc
index 07495b000..267130b26 100644
--- a/data/text/pokedex_rating.inc
+++ b/data/text/pokedex_rating.inc
@@ -1,13 +1,13 @@
-Route101_Text_1C4449:: @ 81C4449
+gBirchDexRatingText_ComeToShowMePokedex:: @ 81C4449
.string "PROF. BIRCH: Ah, {PLAYER}{KUN}!\p"
.string "Have you come to show me how your\n"
.string "POKéDEX is coming along?$"
-Route101_Text_1C449B:: @ 81C449B
+gBirchDexRatingText_Cancel:: @ 81C449B
.string "Hm? Oh, you haven't caught enough\n"
.string "POKéMON to make it worthwhile.$"
-Route101_Text_1C44DC:: @ 81C44DC
+gBirchDexRatingText_SoYouveSeenAndCaught:: @ 81C44DC
.string "Hmhm...\p"
.string "So, you've seen {STR_VAR_1} POKéMON,\n"
.string "and you've caught {STR_VAR_2} POKéMON...$"
@@ -99,7 +99,7 @@ gBirchDexRatingText_DexCompleted:: @ 81C4ADA
.string "Congratulations!\n"
.string "Your POKéDEX is complete!$"
-Route101_Text_1C4B05:: @ 81C4B05
+gBirchDexRatingText_OnANationwideBasis:: @ 81C4B05
.string "Hmhm...\n"
.string "On a nationwide basis...\p"
.string "You've seen {STR_VAR_1} POKéMON,\n"