summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2020-01-22 11:38:44 -0500
committerGitHub <noreply@github.com>2020-01-22 11:38:44 -0500
commitfbf0c4616c397bf7d9d5a8d2dfda5c647fa18af7 (patch)
tree2b6aa4f2f870d0262f29dc5ff275b124eb70412e
parent84c198ac76902385170fd0df90117411b930abe1 (diff)
parentc75296640d9c42897eecf229bc7fc294f60a65eb (diff)
Merge branch 'master' into doc-cinnabar
-rw-r--r--asm/field_control_avatar.s12
-rw-r--r--data/event_scripts.s13
-rw-r--r--data/maps/DiglettsCave_NorthEntrance/map.json2
-rw-r--r--data/maps/DiglettsCave_NorthEntrance/scripts.inc4
-rw-r--r--data/maps/DiglettsCave_NorthEntrance/text.inc2
-rw-r--r--data/maps/DiglettsCave_SouthEntrance/map.json2
-rw-r--r--data/maps/DiglettsCave_SouthEntrance/scripts.inc4
-rw-r--r--data/maps/DiglettsCave_SouthEntrance/text.inc2
-rw-r--r--data/maps/FourIsland/map.json2
-rw-r--r--data/maps/FourIsland/scripts.inc50
-rw-r--r--data/maps/FourIsland_PokemonDayCare/map.json2
-rw-r--r--data/maps/FourIsland_PokemonDayCare/scripts.inc174
-rw-r--r--data/maps/Route22_NorthEntrance/map.json4
-rw-r--r--data/maps/Route22_NorthEntrance/scripts.inc12
-rw-r--r--data/maps/Route23/map.json100
-rw-r--r--data/maps/Route23/scripts.inc88
-rw-r--r--data/maps/Route23/text.inc2
-rw-r--r--data/maps/Route5_PokemonDayCare/map.json2
-rw-r--r--data/maps/Route5_PokemonDayCare/scripts.inc2
-rw-r--r--data/maps/Route5_PokemonDayCare/text.inc60
-rw-r--r--data/maps/Route5_SouthEntrance/text.inc61
-rw-r--r--data/maps/UndergroundPath_EastEntrance/map.json2
-rw-r--r--data/maps/UndergroundPath_EastEntrance/scripts.inc4
-rw-r--r--data/maps/UndergroundPath_EastEntrance/text.inc2
-rw-r--r--data/maps/UndergroundPath_NorthEntrance/map.json2
-rw-r--r--data/maps/UndergroundPath_NorthEntrance/scripts.inc16
-rw-r--r--data/maps/UndergroundPath_SouthEntrance/map.json2
-rw-r--r--data/maps/UndergroundPath_SouthEntrance/scripts.inc4
-rw-r--r--data/maps/UndergroundPath_SouthEntrance/text.inc2
-rw-r--r--data/maps/UndergroundPath_WestEntrance/map.json2
-rw-r--r--data/maps/UndergroundPath_WestEntrance/scripts.inc4
-rw-r--r--data/maps/UndergroundPath_WestEntrance/text.inc2
-rw-r--r--data/maps/UnionRoom/map.json34
-rw-r--r--data/maps/UnionRoom/scripts.inc36
-rw-r--r--data/scripts/day_care.inc233
-rw-r--r--data/scripts/obtain_item.inc16
-rw-r--r--data/scripts/route23.inc181
-rw-r--r--data/scripts/test.inc20
-rw-r--r--data/scripts/trainer_tower.inc2
-rw-r--r--data/specials.inc2
-rw-r--r--data/text/day_care.inc130
-rw-r--r--include/constants/daycare.h27
-rw-r--r--include/constants/flags.h16
-rw-r--r--include/constants/global.h1
-rw-r--r--include/constants/menu.h31
-rw-r--r--include/constants/pokemon.h2
-rw-r--r--include/constants/region_map.h4
-rw-r--r--include/daycare.h2
-rw-r--r--include/event_scripts.h2
-rw-r--r--src/battle_setup.c4
-rw-r--r--src/daycare.c235
-rw-r--r--src/script_menu.c59
-rw-r--r--src/trade_scene.c2
53 files changed, 871 insertions, 810 deletions
diff --git a/asm/field_control_avatar.s b/asm/field_control_avatar.s
index 673c8bfc3..83f9a5700 100644
--- a/asm/field_control_avatar.s
+++ b/asm/field_control_avatar.s
@@ -1100,11 +1100,11 @@ sub_806D0E4: @ 806D0E4
ldr r0, [r5, 0x8]
cmp r0, 0
bne _0806D120
- ldr r0, _0806D11C @ =EventScript_1C555B
+ ldr r0, _0806D11C @ =Test_EventScript_Sign
b _0806D1E6
.align 2, 0
_0806D118: .4byte gMapHeader
-_0806D11C: .4byte EventScript_1C555B
+_0806D11C: .4byte Test_EventScript_Sign
_0806D120:
adds r0, r7, 0
adds r1, r6, 0
@@ -1834,11 +1834,11 @@ _0806D704:
beq _0806D720
movs r0, 0xD
bl IncrementGameStat
- ldr r0, _0806D71C @ =EventScript_81BF546
+ ldr r0, _0806D71C @ =EventScript_EggHatch
bl ScriptContext1_SetupScript
b _0806D730
.align 2, 0
-_0806D71C: .4byte EventScript_81BF546
+_0806D71C: .4byte EventScript_EggHatch
_0806D720:
bl SafariZoneTakeStep
lsls r0, 24
@@ -2150,13 +2150,13 @@ _0806D950:
ldr r0, [r0, 0x8]
cmp r0, 0
bne _0806D958
- ldr r0, _0806D960 @ =EventScript_1C555B
+ ldr r0, _0806D960 @ =Test_EventScript_Sign
_0806D958:
pop {r4}
pop {r1}
bx r1
.align 2, 0
-_0806D960: .4byte EventScript_1C555B
+_0806D960: .4byte Test_EventScript_Sign
thumb_func_end sub_806D928
thumb_func_start mapheader_run_first_tag2_script_list_match_conditionally
diff --git a/data/event_scripts.s b/data/event_scripts.s
index b10fe70fa..4dbbeb32b 100644
--- a/data/event_scripts.s
+++ b/data/event_scripts.s
@@ -29,6 +29,7 @@
#include "constants/union_room.h"
#include "constants/trade.h"
#include "constants/quest_log.h"
+#include "constants/daycare.h"
.include "asm/macros.inc"
.include "asm/macros/event.inc"
.set FALSE, 0
@@ -740,6 +741,7 @@ gStdScriptsEnd::
.include "data/maps/Route2_EastBuilding/text.inc"
.include "data/maps/Route2_ViridianForest_NorthEntrance/text.inc"
.include "data/maps/Route4_PokemonCenter_1F/text.inc"
+ .include "data/maps/Route5_PokemonDayCare/text.inc"
.include "data/maps/Route5_SouthEntrance/text.inc"
.include "data/maps/Route6_NorthEntrance/text.inc"
.include "data/maps/Route7_EastEntrance/text.inc"
@@ -1766,23 +1768,23 @@ EventScript_1A8E6F:: @ 81A8E6F
end
EventScript_1A8EAC:: @ 81A8EAC
- getstdstring 2, 24
+ getstdstring 2, STDSTRING_ITEMS_POCKET
return
EventScript_1A8EB1:: @ 81A8EB1
- getstdstring 2, 25
+ getstdstring 2, STDSTRING_KEY_ITEMS_POCKET
return
EventScript_1A8EB6:: @ 81A8EB6
- getstdstring 2, 26
+ getstdstring 2, STDSTRING_POKEBALLS_POCKET
return
EventScript_1A8EBB:: @ 81A8EBB
- getstdstring 2, 27
+ getstdstring 2, STDSTRING_TM_CASE
return
EventScript_1A8EC0:: @ 81A8EC0
- getstdstring 2, 28
+ getstdstring 2, STDSTRING_BERRY_POUCH
return
.include "data/scripts/seagallop.inc"
@@ -2239,6 +2241,7 @@ EventScript_1B2DF6:: @ 81B2DF6
.include "data/scripts/item_ball_scripts.inc"
.include "data/scripts/mystery_event_club.inc"
.include "data/scripts/day_care.inc"
+ .include "data/text/day_care.inc"
.include "data/scripts/flash.inc"
.include "data/scripts/repel.inc"
diff --git a/data/maps/DiglettsCave_NorthEntrance/map.json b/data/maps/DiglettsCave_NorthEntrance/map.json
index b3571f8da..fa87e6f8a 100644
--- a/data/maps/DiglettsCave_NorthEntrance/map.json
+++ b/data/maps/DiglettsCave_NorthEntrance/map.json
@@ -23,7 +23,7 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "DiglettsCave_NorthEntrance_EventScript_160EE8",
+ "script": "DiglettsCave_NorthEntrance_EventScript_Hiker",
"flag": "0"
}
],
diff --git a/data/maps/DiglettsCave_NorthEntrance/scripts.inc b/data/maps/DiglettsCave_NorthEntrance/scripts.inc
index a11fa4c3a..3bd05f5fd 100644
--- a/data/maps/DiglettsCave_NorthEntrance/scripts.inc
+++ b/data/maps/DiglettsCave_NorthEntrance/scripts.inc
@@ -1,6 +1,6 @@
DiglettsCave_NorthEntrance_MapScripts:: @ 8160EE7
.byte 0
-DiglettsCave_NorthEntrance_EventScript_160EE8:: @ 8160EE8
- msgbox gUnknown_817462C, MSGBOX_NPC
+DiglettsCave_NorthEntrance_EventScript_Hiker:: @ 8160EE8
+ msgbox DiglettsCave_NorthEntrance_RockTunnelPitchBlack, MSGBOX_NPC
end
diff --git a/data/maps/DiglettsCave_NorthEntrance/text.inc b/data/maps/DiglettsCave_NorthEntrance/text.inc
index 89dcb5a38..ac9c80755 100644
--- a/data/maps/DiglettsCave_NorthEntrance/text.inc
+++ b/data/maps/DiglettsCave_NorthEntrance/text.inc
@@ -1,4 +1,4 @@
-gUnknown_817462C:: @ 817462C
+DiglettsCave_NorthEntrance_RockTunnelPitchBlack:: @ 817462C
.string "I went inside ROCK TUNNEL, but it's\n"
.string "pitch-black and scary in there.\p"
.string "If I could get a POKéMON to use\n"
diff --git a/data/maps/DiglettsCave_SouthEntrance/map.json b/data/maps/DiglettsCave_SouthEntrance/map.json
index d713ceb6c..64f78c4bc 100644
--- a/data/maps/DiglettsCave_SouthEntrance/map.json
+++ b/data/maps/DiglettsCave_SouthEntrance/map.json
@@ -23,7 +23,7 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "DiglettsCave_SouthEntrance_EventScript_160EFC",
+ "script": "DiglettsCave_SouthEntrance_EventScript_OldMan",
"flag": "0"
}
],
diff --git a/data/maps/DiglettsCave_SouthEntrance/scripts.inc b/data/maps/DiglettsCave_SouthEntrance/scripts.inc
index 2ee397c02..5851336cc 100644
--- a/data/maps/DiglettsCave_SouthEntrance/scripts.inc
+++ b/data/maps/DiglettsCave_SouthEntrance/scripts.inc
@@ -1,6 +1,6 @@
DiglettsCave_SouthEntrance_MapScripts:: @ 8160EFB
.byte 0
-DiglettsCave_SouthEntrance_EventScript_160EFC:: @ 8160EFC
- msgbox gUnknown_81746A7, MSGBOX_NPC
+DiglettsCave_SouthEntrance_EventScript_OldMan:: @ 8160EFC
+ msgbox DiglettsCave_SouthEntrance_Text_DiglettDugThisTunnel, MSGBOX_NPC
end
diff --git a/data/maps/DiglettsCave_SouthEntrance/text.inc b/data/maps/DiglettsCave_SouthEntrance/text.inc
index 4c97cdc0b..c0e8a86c0 100644
--- a/data/maps/DiglettsCave_SouthEntrance/text.inc
+++ b/data/maps/DiglettsCave_SouthEntrance/text.inc
@@ -1,4 +1,4 @@
-gUnknown_81746A7:: @ 81746A7
+DiglettsCave_SouthEntrance_Text_DiglettDugThisTunnel:: @ 81746A7
.string "Well, isn't this a surprise!\n"
.string "DIGLETT dug this long tunnel!\p"
.string "It goes right to VIRIDIAN CITY,\n"
diff --git a/data/maps/FourIsland/map.json b/data/maps/FourIsland/map.json
index f88bce64e..0a8842419 100644
--- a/data/maps/FourIsland/map.json
+++ b/data/maps/FourIsland/map.json
@@ -23,7 +23,7 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "FourIsland_EventScript_167D55",
+ "script": "FourIsland_EventScript_DaycareMan",
"flag": "0"
},
{
diff --git a/data/maps/FourIsland/scripts.inc b/data/maps/FourIsland/scripts.inc
index 576e16390..85e1db283 100644
--- a/data/maps/FourIsland/scripts.inc
+++ b/data/maps/FourIsland/scripts.inc
@@ -69,66 +69,66 @@ Movement_167D52:: @ 8167D52
walk_in_place_fastest_right
step_end
-FourIsland_EventScript_167D55:: @ 8167D55
+FourIsland_EventScript_DaycareMan:: @ 8167D55
goto_if_questlog EventScript_ReleaseEnd
special sub_8112364
lock
faceplayer
special GetDaycareMonNicknames
specialvar VAR_RESULT, GetDaycareState
- compare VAR_RESULT, 1
- goto_if_eq EventScript_167D9B
- compare VAR_RESULT, 2
- goto_if_eq EventScript_167E0C
- compare VAR_RESULT, 3
- goto_if_eq EventScript_167E19
- msgbox gUnknown_81BF555
+ compare VAR_RESULT, DAYCARE_EGG_WAITING
+ goto_if_eq FourIsland_EventScript_DaycareEggWaiting
+ compare VAR_RESULT, DAYCARE_ONE_MON
+ goto_if_eq FourIsland_EventScript_CheckOnOneMon
+ compare VAR_RESULT, DAYCARE_TWO_MONS
+ goto_if_eq FourIsland_EventScript_CheckOnTwoMons
+ msgbox DayCare_Text_ImDaycareManSpeakToMyWife
release
end
-EventScript_167D9B:: @ 8167D9B
- msgbox gUnknown_81BF5E3, MSGBOX_YESNO
+FourIsland_EventScript_DaycareEggWaiting:: @ 8167D9B
+ msgbox DayCare_Text_DoYouWantEgg, MSGBOX_YESNO
compare VAR_RESULT, YES
- goto_if_eq EventScript_167DD1
- msgbox gUnknown_81BF7B6, MSGBOX_YESNO
+ goto_if_eq FourIsland_EventScript_DaycareAcceptEgg
+ msgbox DayCare_Text_IWillKeepDoYouWantIt, MSGBOX_YESNO
compare VAR_RESULT, YES
- goto_if_eq EventScript_167DD1
- msgbox gUnknown_81BF6CF
+ goto_if_eq FourIsland_EventScript_DaycareAcceptEgg
+ msgbox DayCare_Text_IllKeepIt
clearflag FLAG_PENDING_DAYCARE_EGG
special RejectEggFromDayCare
release
end
-EventScript_167DD1:: @ 8167DD1
+FourIsland_EventScript_DaycareAcceptEgg:: @ 8167DD1
specialvar VAR_RESULT, CalculatePlayerPartyCount
- compare VAR_RESULT, 6
- goto_if_ne EventScript_167DEB
- msgbox gUnknown_81BF6F0
+ compare VAR_RESULT, PARTY_SIZE
+ goto_if_ne FourIsland_EventScript_DaycareReceivedEgg
+ msgbox DayCare_Text_YouHaveNoRoomForIt
release
end
-EventScript_167DEB:: @ 8167DEB
+FourIsland_EventScript_DaycareReceivedEgg:: @ 8167DEB
textcolor 3
- message Text_1BF72A
+ message DayCare_Text_ReceivedEgg
call EventScript_1A6675
playfanfare MUS_FANFA1
waitfanfare
waitbuttonpress
- msgbox gUnknown_81BF755
+ msgbox DayCare_Text_TakeGoodCareOfIt
special GiveEggFromDaycare
clearflag FLAG_PENDING_DAYCARE_EGG
release
end
-EventScript_167E0C:: @ 8167E0C
+FourIsland_EventScript_CheckOnOneMon:: @ 8167E0C
special GetDaycareMonNicknames
- msgbox gUnknown_81BF69A
+ msgbox DayCare_Text_YourMonIsDoingFine
release
end
-EventScript_167E19:: @ 8167E19
+FourIsland_EventScript_CheckOnTwoMons:: @ 8167E19
special GetDaycareMonNicknames
- msgbox gUnknown_81BF789
+ msgbox DayCare_Text_YourMonsAreDoingFine
special SetDaycareCompatibilityString
special Special_ShowStringVar4AsFieldMessage
waitmessage
diff --git a/data/maps/FourIsland_PokemonDayCare/map.json b/data/maps/FourIsland_PokemonDayCare/map.json
index d6fd3c4f3..38520cc63 100644
--- a/data/maps/FourIsland_PokemonDayCare/map.json
+++ b/data/maps/FourIsland_PokemonDayCare/map.json
@@ -23,7 +23,7 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "FourIsland_PokemonDayCare_EventScript_171940",
+ "script": "FourIsland_PokemonDayCare_EventScript_DaycareWoman",
"flag": "0"
}
],
diff --git a/data/maps/FourIsland_PokemonDayCare/scripts.inc b/data/maps/FourIsland_PokemonDayCare/scripts.inc
index d158be282..c6cf95b20 100644
--- a/data/maps/FourIsland_PokemonDayCare/scripts.inc
+++ b/data/maps/FourIsland_PokemonDayCare/scripts.inc
@@ -1,164 +1,164 @@
FourIsland_PokemonDayCare_MapScripts:: @ 817193F
.byte 0
-FourIsland_PokemonDayCare_EventScript_171940:: @ 8171940
+FourIsland_PokemonDayCare_EventScript_DaycareWoman:: @ 8171940
goto_if_questlog EventScript_ReleaseEnd
lock
faceplayer
specialvar VAR_RESULT, GetDaycareState
- compare VAR_RESULT, 1
- goto_if_eq EventScript_171A2E
- compare VAR_RESULT, 2
- goto_if_eq EventScript_171A52
- compare VAR_RESULT, 3
- goto_if_eq EventScript_171B86
- msgbox gUnknown_81BF7E4, MSGBOX_YESNO
+ compare VAR_RESULT, DAYCARE_EGG_WAITING
+ goto_if_eq FourIsland_PokemonDayCare_EggWaiting
+ compare VAR_RESULT, DAYCARE_ONE_MON
+ goto_if_eq FourIsland_PokemonDayCare_OneMonInDaycare
+ compare VAR_RESULT, DAYCARE_TWO_MONS
+ goto_if_eq FourIsland_PokemonDayCare_TwoMonsInDaycare
+ msgbox DayCare_Text_WouldYouLikeUsToRaiseMon, MSGBOX_YESNO
compare VAR_RESULT, YES
- goto_if_eq EventScript_171993
- msgbox gUnknown_81BF916
+ goto_if_eq FourIsland_PokemonDayCare_GiveMonToRaise
+ msgbox DayCare_Text_FineThenComeAgain
release
end
-EventScript_171993:: @ 8171993
+FourIsland_PokemonDayCare_GiveMonToRaise:: @ 8171993
specialvar VAR_RESULT, CountPartyNonEggMons
compare VAR_RESULT, 1
- goto_if_eq EventScript_171A1A
- msgbox gUnknown_81BF839
+ goto_if_eq FourIsland_PokemonDayCare_OnlyOneMonInParty
+ msgbox DayCare_Text_WhichMonShouldWeRaise
fadescreen FADE_TO_BLACK
special ChooseSendDaycareMon
waitstate
- compare VAR_0x8004, 6
- goto_if_ge EventScript_1719F7
+ compare VAR_0x8004, PARTY_SIZE
+ goto_if_ge FourIsland_PokemonDayCare_ComeAgain
specialvar VAR_RESULT, CountPartyAliveNonEggMons_IgnoreVar0x8004Slot
compare VAR_RESULT, 0
- goto_if_eq EventScript_171A24
- specialvar VAR_0x8005, GetSelectedMonNickAndSpecies
+ goto_if_eq FourIsland_PokemonDayCare_OnlyOneAliveMonInParty
+ specialvar VAR_0x8005, GetSelectedMonNicknameAndSpecies
waitse
playmoncry VAR_0x8005, 0
- msgbox gUnknown_81BF860
+ msgbox DayCare_Text_WellRaiseYourMon
waitmoncry
special StoreSelectedPokemonInDaycare
incrementgamestat GAME_STAT_USED_DAYCARE
specialvar VAR_RESULT, GetDaycareState
- compare VAR_RESULT, 2
- goto_if_eq EventScript_171A01
+ compare VAR_RESULT, DAYCARE_ONE_MON
+ goto_if_eq FourIsland_PokemonDayCare_CanRaiseOneMore
release
end
-EventScript_1719F7:: @ 81719F7
- msgbox gUnknown_81BF976
+FourIsland_PokemonDayCare_ComeAgain:: @ 81719F7
+ msgbox DayCare_Text_ComeAgain
release
end
-EventScript_171A01:: @ 8171A01
- msgbox gUnknown_81BF89F, MSGBOX_YESNO
+FourIsland_PokemonDayCare_CanRaiseOneMore:: @ 8171A01
+ msgbox DayCare_Text_WeCanRaiseOneMore, MSGBOX_YESNO
compare VAR_RESULT, YES
- goto_if_eq EventScript_171993
- goto EventScript_1719F7
+ goto_if_eq FourIsland_PokemonDayCare_GiveMonToRaise
+ goto FourIsland_PokemonDayCare_ComeAgain
end
-EventScript_171A1A:: @ 8171A1A
- msgbox gUnknown_81BFAAD
+FourIsland_PokemonDayCare_OnlyOneMonInParty:: @ 8171A1A
+ msgbox DayCare_Text_YouHaveJustOneMon
release
end
-EventScript_171A24:: @ 8171A24
- msgbox gUnknown_81BFB09
+FourIsland_PokemonDayCare_OnlyOneAliveMonInParty:: @ 8171A24
+ msgbox DayCare_Text_WhatWillYouBattleWith
release
end
-EventScript_171A2E:: @ 8171A2E
- msgbox gUnknown_81BF8F6
+FourIsland_PokemonDayCare_EggWaiting:: @ 8171A2E
+ msgbox DayCare_Text_HusbandWasLookingForYou
release
end
-EventScript_171A38:: @ 8171A38
- msgbox gUnknown_81BF9CC
+FourIsland_PokemonDayCare_MonHasGrownXLevels:: @ 8171A38
+ msgbox DayCare_Text_YourMonHasGrownXLevels
return
-EventScript_171A41:: @ 8171A41
+FourIsland_PokemonDayCare_DisplayLevelsGained:: @ 8171A41
specialvar VAR_RESULT, GetNumLevelsGainedFromDaycare
compare VAR_RESULT, 0
- call_if_ne EventScript_171A38
+ call_if_ne FourIsland_PokemonDayCare_MonHasGrownXLevels
return
-EventScript_171A52:: @ 8171A52
- msgbox gUnknown_81BF988
+FourIsland_PokemonDayCare_OneMonInDaycare:: @ 8171A52
+ msgbox DayCare_Text_GoodToSeeYou
setvar VAR_0x8004, 0
- call EventScript_171A41
- msgbox gUnknown_81BF89F, MSGBOX_YESNO
+ call FourIsland_PokemonDayCare_DisplayLevelsGained
+ msgbox DayCare_Text_WeCanRaiseOneMore, MSGBOX_YESNO
compare VAR_RESULT, YES
- goto_if_eq EventScript_171993
- msgbox gUnknown_81BFAE8, MSGBOX_YESNO
+ goto_if_eq FourIsland_PokemonDayCare_GiveMonToRaise
+ msgbox DayCare_Text_TakeYourMonBack, MSGBOX_YESNO
compare VAR_RESULT, YES
- goto_if_eq EventScript_171A90
- goto EventScript_1719F7
+ goto_if_eq FourIsland_PokemonDayCare_TryRetrieveMon
+ goto FourIsland_PokemonDayCare_ComeAgain
end
-EventScript_171A90:: @ 8171A90
+FourIsland_PokemonDayCare_TryRetrieveMon:: @ 8171A90
specialvar VAR_RESULT, CalculatePlayerPartyCount
- compare VAR_RESULT, 6
- goto_if_eq EventScript_171B67
+ compare VAR_RESULT, PARTY_SIZE
+ goto_if_eq FourIsland_PokemonDayCare_NoRoomInParty
specialvar VAR_RESULT, GetDaycareState
setvar VAR_0x8004, 0
- compare VAR_RESULT, 2
- goto_if_eq EventScript_171ACF
+ compare VAR_RESULT, DAYCARE_ONE_MON
+ goto_if_eq FourIsland_PokemonDayCare_CostPrompt
special ShowDaycareLevelMenu
waitstate
copyvar VAR_0x8004, VAR_RESULT
- compare VAR_RESULT, 2
- goto_if_eq EventScript_1719F7
- goto EventScript_171ACF
+ compare VAR_RESULT, DAYCARE_EXITED_LEVEL_MENU
+ goto_if_eq FourIsland_PokemonDayCare_ComeAgain
+ goto FourIsland_PokemonDayCare_CostPrompt
end
-EventScript_171ACF:: @ 8171ACF
+FourIsland_PokemonDayCare_CostPrompt:: @ 8171ACF
special GetDaycareCost
- msgbox gUnknown_81BFA3B, MSGBOX_YESNO
+ msgbox DayCare_Text_ItWillCostX, MSGBOX_YESNO
compare VAR_RESULT, YES
- goto_if_eq EventScript_171AEB
- goto EventScript_1719F7
+ goto_if_eq FourIsland_PokemonDayCare_CheckEnoughMoney
+ goto FourIsland_PokemonDayCare_ComeAgain
end
-EventScript_171AEB:: @ 8171AEB
+FourIsland_PokemonDayCare_CheckEnoughMoney:: @ 8171AEB
specialvar VAR_RESULT, IsEnoughForCostInVar0x8005
- compare VAR_RESULT, 1
- goto_if_eq EventScript_171B05
- msgbox gUnknown_81BF932
+ compare VAR_RESULT, TRUE
+ goto_if_eq FourIsland_PokemonDayCare_RetrieveMon
+ msgbox DayCare_Text_NotEnoughMoney
release
end
-EventScript_171B05:: @ 8171B05
- applymovement 1, Movement_171B71
+FourIsland_PokemonDayCare_RetrieveMon:: @ 8171B05
+ applymovement 1, FourIsland_PokemonDayCare_Movement_RetrieveMon
waitmovement 0
specialvar VAR_RESULT, TakePokemonFromDaycare
special SubtractMoneyFromVar0x8005
playse SE_REGI
- msgbox gUnknown_81BFA67
+ msgbox DayCare_Text_HeresYourMon
waitse
playmoncry VAR_RESULT, 0
textcolor 3
- msgbox gUnknown_81BFA85
+ msgbox DayCare_Text_TookBackMon
call EventScript_1A6675
waitmoncry
specialvar VAR_RESULT, GetDaycareState
- compare VAR_RESULT, 2
- goto_if_eq EventScript_171B4E
- goto EventScript_1719F7
+ compare VAR_RESULT, DAYCARE_ONE_MON
+ goto_if_eq FourIsland_PokemonDayCare_AskRetrieveOtherMon
+ goto FourIsland_PokemonDayCare_ComeAgain
end
-EventScript_171B4E:: @ 8171B4E
- msgbox gUnknown_81BF94F, MSGBOX_YESNO
+FourIsland_PokemonDayCare_AskRetrieveOtherMon:: @ 8171B4E
+ msgbox DayCare_Text_TakeOtherOneBackToo, MSGBOX_YESNO
compare VAR_RESULT, YES
- goto_if_eq EventScript_171A90
- goto EventScript_1719F7
+ goto_if_eq FourIsland_PokemonDayCare_TryRetrieveMon
+ goto FourIsland_PokemonDayCare_ComeAgain
end
-EventScript_171B67:: @ 8171B67
- msgbox gUnknown_81BF9EF
+FourIsland_PokemonDayCare_NoRoomInParty:: @ 8171B67
+ msgbox DayCare_Text_YourPartyIsFull
release
end
-Movement_171B71:: @ 8171B71
+FourIsland_PokemonDayCare_Movement_RetrieveMon:: @ 8171B71
delay_16
delay_16
face_right
@@ -180,30 +180,32 @@ Movement_171B71:: @ 8171B71
walk_slowest_down
step_end
-EventScript_171B85:: @ 8171B85
+@ Unused. Possibly a commented script, or a typo end added to the above Movement script
+FourIsland_PokemonDayCare_EventScript_UnusedEnd:: @ 8171B85
end
-EventScript_171B86:: @ 8171B86
- msgbox gUnknown_81BF988
+FourIsland_PokemonDayCare_TwoMonsInDaycare:: @ 8171B86
+ msgbox DayCare_Text_GoodToSeeYou
setvar VAR_0x8004, 0
- call EventScript_171A41
+ call FourIsland_PokemonDayCare_DisplayLevelsGained
setvar VAR_0x8004, 1
- call EventScript_171A41
- msgbox gUnknown_81BFAE8, MSGBOX_YESNO
+ call FourIsland_PokemonDayCare_DisplayLevelsGained
+ msgbox DayCare_Text_TakeYourMonBack, MSGBOX_YESNO
compare VAR_RESULT, YES
- goto_if_eq EventScript_171A90
- msgbox gUnknown_81BF976
+ goto_if_eq FourIsland_PokemonDayCare_TryRetrieveMon
+ msgbox DayCare_Text_ComeAgain
release
end
-EventScript_171BBF:: @ 8171BBF
+@ Unused
+FourIsland_PokemonDayCare_EventScript_UnusedRetrieveMon:: @ 8171BBF
special ShowDaycareLevelMenu
waitstate
compare VAR_RESULT, 2
- goto_if_eq EventScript_1719F7
+ goto_if_eq FourIsland_PokemonDayCare_ComeAgain
copyvar VAR_0x8004, VAR_RESULT
specialvar VAR_RESULT, TakePokemonFromDaycare
- msgbox gUnknown_81BFA67
- msgbox gUnknown_81BF976
+ msgbox DayCare_Text_HeresYourMon
+ msgbox DayCare_Text_ComeAgain
release
end
diff --git a/data/maps/Route22_NorthEntrance/map.json b/data/maps/Route22_NorthEntrance/map.json
index 665477288..f8f624106 100644
--- a/data/maps/Route22_NorthEntrance/map.json
+++ b/data/maps/Route22_NorthEntrance/map.json
@@ -23,7 +23,7 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "Route22_NorthEntrance_EventScript_1704FC",
+ "script": "Route22_NorthEntrance_EventScript_BoulderBadgeGuard",
"flag": "0"
}
],
@@ -65,7 +65,7 @@
"elevation": 3,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 0,
- "script": "Route22_NorthEntrance_EventScript_17050D"
+ "script": "Route22_NorthEntrance_EventScript_BoulderBadgeGuardTrigger"
}
],
"bg_events": []
diff --git a/data/maps/Route22_NorthEntrance/scripts.inc b/data/maps/Route22_NorthEntrance/scripts.inc
index afbfbb165..edd436b48 100644
--- a/data/maps/Route22_NorthEntrance/scripts.inc
+++ b/data/maps/Route22_NorthEntrance/scripts.inc
@@ -1,18 +1,18 @@
Route22_NorthEntrance_MapScripts:: @ 81704FB
.byte 0
-Route22_NorthEntrance_EventScript_1704FC:: @ 81704FC
+Route22_NorthEntrance_EventScript_BoulderBadgeGuard:: @ 81704FC
lock
faceplayer
setvar VAR_TEMP_1, 1
- getstdstring 0, 15
- goto EventScript_1A7803
+ getstdstring 0, STDSTRING_BOULDER_BADGE
+ goto Route22_NorthEntrance_EventScript_BadgeGuard
end
-Route22_NorthEntrance_EventScript_17050D:: @ 817050D
+Route22_NorthEntrance_EventScript_BoulderBadgeGuardTrigger:: @ 817050D
lockall
setvar VAR_TEMP_1, 1
setvar VAR_0x8009, 1
- getstdstring 0, 15
- goto EventScript_1A796E
+ getstdstring 0, STDSTRING_BOULDER_BADGE
+ goto Route23_EventScript_BadgeGuardTrigger
end
diff --git a/data/maps/Route23/map.json b/data/maps/Route23/map.json
index 073a4a17c..36bee2780 100644
--- a/data/maps/Route23/map.json
+++ b/data/maps/Route23/map.json
@@ -34,7 +34,7 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "Route23_EventScript_16850C",
+ "script": "Route23_EventScript_CascadeBadgeGuard",
"flag": "0"
},
{
@@ -47,7 +47,7 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "Route23_EventScript_16851D",
+ "script": "Route23_EventScript_ThunderBadgeGuard",
"flag": "0"
},
{
@@ -60,7 +60,7 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "Route23_EventScript_16852E",
+ "script": "Route23_EventScript_RainbowBadgeGuard",
"flag": "0"
},
{
@@ -73,7 +73,7 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "Route23_EventScript_16853F",
+ "script": "Route23_EventScript_SoulBadgeGuard",
"flag": "0"
},
{
@@ -86,7 +86,7 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "Route23_EventScript_168550",
+ "script": "Route23_EventScript_MarshBadgeGuard",
"flag": "0"
},
{
@@ -99,7 +99,7 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "Route23_EventScript_168561",
+ "script": "Route23_EventScript_VolcanoBadgeGuard",
"flag": "0"
},
{
@@ -112,7 +112,7 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "Route23_EventScript_168572",
+ "script": "Route23_EventScript_EarthBadgeGuard",
"flag": "0"
}
],
@@ -154,7 +154,7 @@
"elevation": 3,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 1,
- "script": "Route23_EventScript_168583"
+ "script": "Route23_EventScript_CascadeBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -163,7 +163,7 @@
"elevation": 3,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 2,
- "script": "Route23_EventScript_168598"
+ "script": "Route23_EventScript_ThunderBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -172,7 +172,7 @@
"elevation": 3,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 3,
- "script": "Route23_EventScript_1685AD"
+ "script": "Route23_EventScript_RainbowBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -181,7 +181,7 @@
"elevation": 0,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 4,
- "script": "Route23_EventScript_1685C2"
+ "script": "Route23_EventScript_SoulBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -190,7 +190,7 @@
"elevation": 1,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 5,
- "script": "Route23_EventScript_1685D7"
+ "script": "Route23_EventScript_MarshBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -199,7 +199,7 @@
"elevation": 3,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 6,
- "script": "Route23_EventScript_1685EC"
+ "script": "Route23_EventScript_VolcanoBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -208,7 +208,7 @@
"elevation": 0,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 7,
- "script": "Route23_EventScript_168601"
+ "script": "Route23_EventScript_EarthBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -217,7 +217,7 @@
"elevation": 0,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 7,
- "script": "Route23_EventScript_168601"
+ "script": "Route23_EventScript_EarthBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -226,7 +226,7 @@
"elevation": 3,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 7,
- "script": "Route23_EventScript_168601"
+ "script": "Route23_EventScript_EarthBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -235,7 +235,7 @@
"elevation": 0,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 7,
- "script": "Route23_EventScript_168601"
+ "script": "Route23_EventScript_EarthBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -244,7 +244,7 @@
"elevation": 0,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 7,
- "script": "Route23_EventScript_168601"
+ "script": "Route23_EventScript_EarthBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -253,7 +253,7 @@
"elevation": 0,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 7,
- "script": "Route23_EventScript_168601"
+ "script": "Route23_EventScript_EarthBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -262,7 +262,7 @@
"elevation": 3,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 7,
- "script": "Route23_EventScript_168601"
+ "script": "Route23_EventScript_EarthBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -271,7 +271,7 @@
"elevation": 3,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 7,
- "script": "Route23_EventScript_168601"
+ "script": "Route23_EventScript_EarthBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -280,7 +280,7 @@
"elevation": 0,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 6,
- "script": "Route23_EventScript_1685EC"
+ "script": "Route23_EventScript_VolcanoBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -289,7 +289,7 @@
"elevation": 3,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 6,
- "script": "Route23_EventScript_1685EC"
+ "script": "Route23_EventScript_VolcanoBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -298,7 +298,7 @@
"elevation": 0,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 6,
- "script": "Route23_EventScript_1685EC"
+ "script": "Route23_EventScript_VolcanoBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -307,7 +307,7 @@
"elevation": 1,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 5,
- "script": "Route23_EventScript_1685D7"
+ "script": "Route23_EventScript_MarshBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -316,7 +316,7 @@
"elevation": 1,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 5,
- "script": "Route23_EventScript_1685D7"
+ "script": "Route23_EventScript_MarshBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -325,7 +325,7 @@
"elevation": 1,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 5,
- "script": "Route23_EventScript_1685D7"
+ "script": "Route23_EventScript_MarshBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -334,7 +334,7 @@
"elevation": 1,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 5,
- "script": "Route23_EventScript_1685D7"
+ "script": "Route23_EventScript_MarshBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -343,7 +343,7 @@
"elevation": 1,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 5,
- "script": "Route23_EventScript_1685D7"
+ "script": "Route23_EventScript_MarshBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -352,7 +352,7 @@
"elevation": 1,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 5,
- "script": "Route23_EventScript_1685D7"
+ "script": "Route23_EventScript_MarshBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -361,7 +361,7 @@
"elevation": 0,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 2,
- "script": "Route23_EventScript_168598"
+ "script": "Route23_EventScript_ThunderBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -370,7 +370,7 @@
"elevation": 0,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 2,
- "script": "Route23_EventScript_168598"
+ "script": "Route23_EventScript_ThunderBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -379,7 +379,7 @@
"elevation": 3,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 2,
- "script": "Route23_EventScript_168598"
+ "script": "Route23_EventScript_ThunderBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -388,7 +388,7 @@
"elevation": 0,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 3,
- "script": "Route23_EventScript_1685AD"
+ "script": "Route23_EventScript_RainbowBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -397,7 +397,7 @@
"elevation": 0,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 3,
- "script": "Route23_EventScript_1685AD"
+ "script": "Route23_EventScript_RainbowBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -406,7 +406,7 @@
"elevation": 3,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 3,
- "script": "Route23_EventScript_1685AD"
+ "script": "Route23_EventScript_RainbowBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -415,7 +415,7 @@
"elevation": 1,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 4,
- "script": "Route23_EventScript_1685C2"
+ "script": "Route23_EventScript_SoulBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -424,7 +424,7 @@
"elevation": 1,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 4,
- "script": "Route23_EventScript_1685C2"
+ "script": "Route23_EventScript_SoulBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -433,7 +433,7 @@
"elevation": 1,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 4,
- "script": "Route23_EventScript_1685C2"
+ "script": "Route23_EventScript_SoulBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -442,7 +442,7 @@
"elevation": 1,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 4,
- "script": "Route23_EventScript_1685C2"
+ "script": "Route23_EventScript_SoulBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -451,7 +451,7 @@
"elevation": 1,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 4,
- "script": "Route23_EventScript_1685C2"
+ "script": "Route23_EventScript_SoulBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -460,7 +460,7 @@
"elevation": 0,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 4,
- "script": "Route23_EventScript_1685C2"
+ "script": "Route23_EventScript_SoulBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -469,7 +469,7 @@
"elevation": 1,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 4,
- "script": "Route23_EventScript_1685C2"
+ "script": "Route23_EventScript_SoulBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -478,7 +478,7 @@
"elevation": 1,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 4,
- "script": "Route23_EventScript_1685C2"
+ "script": "Route23_EventScript_SoulBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -487,7 +487,7 @@
"elevation": 1,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 4,
- "script": "Route23_EventScript_1685C2"
+ "script": "Route23_EventScript_SoulBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -496,7 +496,7 @@
"elevation": 0,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 1,
- "script": "Route23_EventScript_168583"
+ "script": "Route23_EventScript_CascadeBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -505,7 +505,7 @@
"elevation": 0,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 1,
- "script": "Route23_EventScript_168583"
+ "script": "Route23_EventScript_CascadeBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -514,7 +514,7 @@
"elevation": 3,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 1,
- "script": "Route23_EventScript_168583"
+ "script": "Route23_EventScript_CascadeBadgeGuardTrigger"
},
{
"type": "trigger",
@@ -523,7 +523,7 @@
"elevation": 0,
"var": "VAR_MAP_SCENE_ROUTE23",
"var_value": 1,
- "script": "Route23_EventScript_168583"
+ "script": "Route23_EventScript_CascadeBadgeGuardTrigger"
}
],
"bg_events": [
@@ -612,7 +612,7 @@
"x": 3,
"y": 31,
"elevation": 0,
- "script": "Route23_EventScript_168616"
+ "script": "Route23_EventScript_VictoryRoadGateSign"
}
]
}
diff --git a/data/maps/Route23/scripts.inc b/data/maps/Route23/scripts.inc
index b5c8da4f3..fd6c792f0 100644
--- a/data/maps/Route23/scripts.inc
+++ b/data/maps/Route23/scripts.inc
@@ -11,118 +11,118 @@ Route23_OnTransition:: @ 81684F1
setvar VAR_MAP_SCENE_VICTORY_ROAD_3F, 0
end
-Route23_EventScript_16850C:: @ 816850C
+Route23_EventScript_CascadeBadgeGuard:: @ 816850C
lock
faceplayer
setvar VAR_TEMP_1, 2
- getstdstring 0, 16
- goto EventScript_1A786C
+ getstdstring 0, STDSTRING_CASCADE_BADGE
+ goto Route23_EventScript_BadgeGuard
end
-Route23_EventScript_16851D:: @ 816851D
+Route23_EventScript_ThunderBadgeGuard:: @ 816851D
lock
faceplayer
setvar VAR_TEMP_1, 3
- getstdstring 0, 17
- goto EventScript_1A786C
+ getstdstring 0, STDSTRING_THUNDER_BADGE
+ goto Route23_EventScript_BadgeGuard
end
-Route23_EventScript_16852E:: @ 816852E
+Route23_EventScript_RainbowBadgeGuard:: @ 816852E
lock
faceplayer
setvar VAR_TEMP_1, 4
- getstdstring 0, 18
- goto EventScript_1A786C
+ getstdstring 0, STDSTRING_RAINBOW_BADGE
+ goto Route23_EventScript_BadgeGuard
end
-Route23_EventScript_16853F:: @ 816853F
+Route23_EventScript_SoulBadgeGuard:: @ 816853F
lock
faceplayer
setvar VAR_TEMP_1, 5
- getstdstring 0, 19
- goto EventScript_1A786C
+ getstdstring 0, STDSTRING_SOUL_BADGE
+ goto Route23_EventScript_BadgeGuard
end
-Route23_EventScript_168550:: @ 8168550
+Route23_EventScript_MarshBadgeGuard:: @ 8168550
lock
faceplayer
setvar VAR_TEMP_1, 6
- getstdstring 0, 20
- goto EventScript_1A786C
+ getstdstring 0, STDSTRING_MARSH_BADGE
+ goto Route23_EventScript_BadgeGuard
end
-Route23_EventScript_168561:: @ 8168561
+Route23_EventScript_VolcanoBadgeGuard:: @ 8168561
lock
faceplayer
setvar VAR_TEMP_1, 7
- getstdstring 0, 21
- goto EventScript_1A786C
+ getstdstring 0, STDSTRING_VOLCANO_BADGE
+ goto Route23_EventScript_BadgeGuard
end
-Route23_EventScript_168572:: @ 8168572
+Route23_EventScript_EarthBadgeGuard:: @ 8168572
lock
faceplayer
setvar VAR_TEMP_1, 8
- getstdstring 0, 22
- goto EventScript_1A786C
+ getstdstring 0, STDSTRING_EARTH_BADGE
+ goto Route23_EventScript_BadgeGuard
end
-Route23_EventScript_168583:: @ 8168583
+Route23_EventScript_CascadeBadgeGuardTrigger:: @ 8168583
lockall
setvar VAR_TEMP_1, 2
setvar VAR_0x8009, 1
- getstdstring 0, 16
- goto EventScript_1A796E
+ getstdstring 0, STDSTRING_CASCADE_BADGE
+ goto Route23_EventScript_BadgeGuardTrigger
end
-Route23_EventScript_168598:: @ 8168598
+Route23_EventScript_ThunderBadgeGuardTrigger:: @ 8168598
lockall
setvar VAR_TEMP_1, 3
setvar VAR_0x8009, 2
- getstdstring 0, 17
- goto EventScript_1A796E
+ getstdstring 0, STDSTRING_THUNDER_BADGE
+ goto Route23_EventScript_BadgeGuardTrigger
end
-Route23_EventScript_1685AD:: @ 81685AD
+Route23_EventScript_RainbowBadgeGuardTrigger:: @ 81685AD
lockall
setvar VAR_TEMP_1, 4
setvar VAR_0x8009, 3
- getstdstring 0, 18
- goto EventScript_1A796E
+ getstdstring 0, STDSTRING_RAINBOW_BADGE
+ goto Route23_EventScript_BadgeGuardTrigger
end
-Route23_EventScript_1685C2:: @ 81685C2
+Route23_EventScript_SoulBadgeGuardTrigger:: @ 81685C2
lockall
setvar VAR_TEMP_1, 5
setvar VAR_0x8009, 4
- getstdstring 0, 19
- goto EventScript_1A796E
+ getstdstring 0, STDSTRING_SOUL_BADGE
+ goto Route23_EventScript_BadgeGuardTrigger
end
-Route23_EventScript_1685D7:: @ 81685D7
+Route23_EventScript_MarshBadgeGuardTrigger:: @ 81685D7
lockall
setvar VAR_TEMP_1, 6
setvar VAR_0x8009, 5
- getstdstring 0, 20
- goto EventScript_1A796E
+ getstdstring 0, STDSTRING_MARSH_BADGE
+ goto Route23_EventScript_BadgeGuardTrigger
end
-Route23_EventScript_1685EC:: @ 81685EC
+Route23_EventScript_VolcanoBadgeGuardTrigger:: @ 81685EC
lockall
setvar VAR_TEMP_1, 7
setvar VAR_0x8009, 6
- getstdstring 0, 21
- goto EventScript_1A796E
+ getstdstring 0, STDSTRING_VOLCANO_BADGE
+ goto Route23_EventScript_BadgeGuardTrigger
end
-Route23_EventScript_168601:: @ 8168601
+Route23_EventScript_EarthBadgeGuardTrigger:: @ 8168601
lockall
setvar VAR_TEMP_1, 8
setvar VAR_0x8009, 7
- getstdstring 0, 22
- goto EventScript_1A796E
+ getstdstring 0, STDSTRING_EARTH_BADGE
+ goto Route23_EventScript_BadgeGuardTrigger
end
-Route23_EventScript_168616:: @ 8168616
- msgbox gUnknown_8188C19, MSGBOX_SIGN
+Route23_EventScript_VictoryRoadGateSign:: @ 8168616
+ msgbox Route23_Text_VictoryRoadGateSign, MSGBOX_SIGN
end
diff --git a/data/maps/Route23/text.inc b/data/maps/Route23/text.inc
index 6bdcaf47d..7429303cd 100644
--- a/data/maps/Route23/text.inc
+++ b/data/maps/Route23/text.inc
@@ -1,4 +1,4 @@
-gUnknown_8188C19:: @ 8188C19
+Route23_Text_VictoryRoadGateSign:: @ 8188C19
.string "VICTORY ROAD GATE -\n"
.string "POKéMON LEAGUE$"
diff --git a/data/maps/Route5_PokemonDayCare/map.json b/data/maps/Route5_PokemonDayCare/map.json
index 11c53b635..52cbb04ea 100644
--- a/data/maps/Route5_PokemonDayCare/map.json
+++ b/data/maps/Route5_PokemonDayCare/map.json
@@ -23,7 +23,7 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "Route5_PokemonDayCare_EventScript_1BF398",
+ "script": "Route5_PokemonDayCare_EventScript_DaycareMan",
"flag": "0"
}
],
diff --git a/data/maps/Route5_PokemonDayCare/scripts.inc b/data/maps/Route5_PokemonDayCare/scripts.inc
index ebe6a8386..0f2ceb484 100644
--- a/data/maps/Route5_PokemonDayCare/scripts.inc
+++ b/data/maps/Route5_PokemonDayCare/scripts.inc
@@ -1,2 +1,4 @@
+@ Handled by data/scripts/day_care.inc
+
Route5_PokemonDayCare_MapScripts:: @ 816F8FF
.byte 0
diff --git a/data/maps/Route5_PokemonDayCare/text.inc b/data/maps/Route5_PokemonDayCare/text.inc
new file mode 100644
index 000000000..cada12ea5
--- /dev/null
+++ b/data/maps/Route5_PokemonDayCare/text.inc
@@ -0,0 +1,60 @@
+Route5_PokemonDayCare_Text_WantMeToRaiseMon:: @ 819DD66
+ .string "I run the DAY-CARE service.\p"
+ .string "Would you like me to raise one of\n"
+ .string "your POKéMON?$"
+
+Route5_PokemonDayCare_Text_ComeAgain:: @ 819DDB2
+ .string "Come again.$"
+
+Route5_PokemonDayCare_Text_WhichMonShouldIRaise:: @ 819DDBE
+ .string "Which POKéMON should I raise?$"
+
+Route5_PokemonDayCare_Text_ComeAnytimeYouLike:: @ 819DDDC
+ .string "Fine.\n"
+ .string "Come anytime you like.$"
+
+Route5_PokemonDayCare_Text_LookAfterMonForAWhile:: @ 819DDF9
+ .string "Fine, I'll look after your\n"
+ .string "{STR_VAR_1} for a while.$"
+
+Route5_PokemonDayCare_Text_ComeSeeMeInAWhile:: @ 819DE24
+ .string "Come see me in a while.$"
+
+Route5_PokemonDayCare_Text_MonNeedsToSpendMoreTime:: @ 819DE3C
+ .string "You're back already?\p"
+ .string "Your {STR_VAR_1} needs to spend\n"
+ .string "some more time with me.$"
+
+Route5_PokemonDayCare_Text_OweMeXForMonsReturn:: @ 819DE80
+ .string "You owe me ¥{STR_VAR_2} for the return\n"
+ .string "of this POKéMON.$"
+
+Route5_PokemonDayCare_Text_ThankYouHeresMon:: @ 819DEAF
+ .string "Thank you!\n"
+ .string "Here's your POKéMON.$"
+
+Route5_PokemonDayCare_Text_PlayerGotMonBack:: @ 819DECF
+ .string "{PLAYER} got {STR_VAR_1} back\n"
+ .string "from the DAY-CARE MAN.$"
+
+Route5_PokemonDayCare_Text_OnlyHaveOneMonWithYou:: @ 819DEF5
+ .string "Oh? You only have one POKéMON\n"
+ .string "with you.$"
+
+Route5_PokemonDayCare_Text_WhatWillYouBattleWith:: @ 819DF1D
+ .string "If you leave me that POKéMON,\n"
+ .string "what will you battle with?$"
+
+Route5_PokemonDayCare_Text_MonHasGrownByXLevels:: @ 819DF56
+ .string "Your {STR_VAR_1} has grown a lot.\n"
+ .string "Yes, quite a lot, I'd say.\p"
+ .string "Let me see…\n"
+ .string "By level, it's grown by {STR_VAR_2}.\p"
+ .string "Aren't I great?$"
+
+Route5_PokemonDayCare_Text_YouveGotNoRoomForIt:: @ 819DFC2
+ .string "You can't take this POKéMON back\n"
+ .string "if you've got no room for it.$"
+
+Route5_PokemonDayCare_Text_DontHaveEnoughMoney:: @ 819E001
+ .string "You don't have enough money.$"
diff --git a/data/maps/Route5_SouthEntrance/text.inc b/data/maps/Route5_SouthEntrance/text.inc
index 079423f34..749bcabe5 100644
--- a/data/maps/Route5_SouthEntrance/text.inc
+++ b/data/maps/Route5_SouthEntrance/text.inc
@@ -1,64 +1,3 @@
-Text_19DD66:: @ 819DD66
- .string "I run the DAY-CARE service.\p"
- .string "Would you like me to raise one of\n"
- .string "your POKéMON?$"
-
-Text_19DDB2:: @ 819DDB2
- .string "Come again.$"
-
-Text_19DDBE:: @ 819DDBE
- .string "Which POKéMON should I raise?$"
-
-Text_19DDDC:: @ 819DDDC
- .string "Fine.\n"
- .string "Come anytime you like.$"
-
-Text_19DDF9:: @ 819DDF9
- .string "Fine, I'll look after your\n"
- .string "{STR_VAR_1} for a while.$"
-
-Text_19DE24:: @ 819DE24
- .string "Come see me in a while.$"
-
-Text_19DE3C:: @ 819DE3C
- .string "You're back already?\p"
- .string "Your {STR_VAR_1} needs to spend\n"
- .string "some more time with me.$"
-
-Text_19DE80:: @ 819DE80
- .string "You owe me ¥{STR_VAR_2} for the return\n"
- .string "of this POKéMON.$"
-
-Text_19DEAF:: @ 819DEAF
- .string "Thank you!\n"
- .string "Here's your POKéMON.$"
-
-Text_19DECF:: @ 819DECF
- .string "{PLAYER} got {STR_VAR_1} back\n"
- .string "from the DAY-CARE MAN.$"
-
-Text_19DEF5:: @ 819DEF5
- .string "Oh? You only have one POKéMON\n"
- .string "with you.$"
-
-Text_19DF1D:: @ 819DF1D
- .string "If you leave me that POKéMON,\n"
- .string "what will you battle with?$"
-
-Text_19DF56:: @ 819DF56
- .string "Your {STR_VAR_1} has grown a lot.\n"
- .string "Yes, quite a lot, I'd say.\p"
- .string "Let me see…\n"
- .string "By level, it's grown by {STR_VAR_2}.\p"
- .string "Aren't I great?$"
-
-Text_19DFC2:: @ 819DFC2
- .string "You can't take this POKéMON back\n"
- .string "if you've got no room for it.$"
-
-Text_19E001:: @ 819E001
- .string "You don't have enough money.$"
-
Text_19E01E:: @ 819E01E
.string "きみの\n"
.string "みてみるかね?$"
diff --git a/data/maps/UndergroundPath_EastEntrance/map.json b/data/maps/UndergroundPath_EastEntrance/map.json
index 3e600d6ad..8a82619c0 100644
--- a/data/maps/UndergroundPath_EastEntrance/map.json
+++ b/data/maps/UndergroundPath_EastEntrance/map.json
@@ -23,7 +23,7 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "UndergroundPath_EastEntrance_EventScript_160EDE",
+ "script": "UndergroundPath_EastEntrance_EventScript_Woman",
"flag": "0"
}
],
diff --git a/data/maps/UndergroundPath_EastEntrance/scripts.inc b/data/maps/UndergroundPath_EastEntrance/scripts.inc
index 28a211c6f..88bc29730 100644
--- a/data/maps/UndergroundPath_EastEntrance/scripts.inc
+++ b/data/maps/UndergroundPath_EastEntrance/scripts.inc
@@ -1,6 +1,6 @@
UndergroundPath_EastEntrance_MapScripts:: @ 8160EDD
.byte 0
-UndergroundPath_EastEntrance_EventScript_160EDE:: @ 8160EDE
- msgbox gUnknown_81745D9, MSGBOX_NPC
+UndergroundPath_EastEntrance_EventScript_Woman:: @ 8160EDE
+ msgbox UndergroundPath_EastEntrance_Text_DoYouGoToCeladonDeptStore, MSGBOX_NPC
end
diff --git a/data/maps/UndergroundPath_EastEntrance/text.inc b/data/maps/UndergroundPath_EastEntrance/text.inc
index f44fb5a21..7333a73cc 100644
--- a/data/maps/UndergroundPath_EastEntrance/text.inc
+++ b/data/maps/UndergroundPath_EastEntrance/text.inc
@@ -1,4 +1,4 @@
-gUnknown_81745D9:: @ 81745D9
+UndergroundPath_EastEntrance_Text_DoYouGoToCeladonDeptStore:: @ 81745D9
.string "The DEPARTMENT STORE in CELADON\n"
.string "has a great selection.\p"
.string "Do you go there very often?$"
diff --git a/data/maps/UndergroundPath_NorthEntrance/map.json b/data/maps/UndergroundPath_NorthEntrance/map.json
index 18939c721..d5fbc5df9 100644
--- a/data/maps/UndergroundPath_NorthEntrance/map.json
+++ b/data/maps/UndergroundPath_NorthEntrance/map.json
@@ -23,7 +23,7 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "UndergroundPath_NorthEntrance_EventScript_160E39",
+ "script": "UndergroundPath_NorthEntrance_EventScript_Saige",
"flag": "0"
}
],
diff --git a/data/maps/UndergroundPath_NorthEntrance/scripts.inc b/data/maps/UndergroundPath_NorthEntrance/scripts.inc
index a8a147470..b34ef1e59 100644
--- a/data/maps/UndergroundPath_NorthEntrance/scripts.inc
+++ b/data/maps/UndergroundPath_NorthEntrance/scripts.inc
@@ -1,39 +1,39 @@
UndergroundPath_NorthEntrance_MapScripts:: @ 8160E38
.byte 0
-UndergroundPath_NorthEntrance_EventScript_160E39:: @ 8160E39
+UndergroundPath_NorthEntrance_EventScript_Saige:: @ 8160E39
lock
faceplayer
setvar VAR_0x8008, INGAME_TRADE_NIDORAN
call EventScript_GetInGameTradeSpeciesInfo
- goto_if_set FLAG_DID_MS_NIDO_TRADE, EventScript_160EAB
+ goto_if_set FLAG_DID_MS_NIDO_TRADE, UndergroundPath_NorthEntrance_EventScript_AlreadyTraded
msgbox Trade_Text_DoYouHaveMonWantToTradeForMon, MSGBOX_YESNO
compare VAR_RESULT, NO
- goto_if_eq EventScript_160E93
+ goto_if_eq UndergroundPath_NorthEntrance_EventScript_DeclineTrade
call EventScript_ChooseMonForInGameTrade
compare VAR_0x8004, PARTY_SIZE
- goto_if_ge EventScript_160E93
+ goto_if_ge UndergroundPath_NorthEntrance_EventScript_DeclineTrade
call EventScript_GetInGameTradeSpecies
compare VAR_RESULT, VAR_0x8009
- goto_if_ne EventScript_160E9D
+ goto_if_ne UndergroundPath_NorthEntrance_EventScript_NotRequestedMon
call EventScript_DoInGameTrade
msgbox Trade_Text_ThanksYoureAPal
setflag FLAG_DID_MS_NIDO_TRADE
release
end
-EventScript_160E93:: @ 8160E93
+UndergroundPath_NorthEntrance_EventScript_DeclineTrade:: @ 8160E93
msgbox Trade_Text_ThatsTooBad
release
end
-EventScript_160E9D:: @ 8160E9D
+UndergroundPath_NorthEntrance_EventScript_NotRequestedMon:: @ 8160E9D
getspeciesname 0, VAR_0x8009
msgbox Trade_Text_ThisIsNoMon
release
end
-EventScript_160EAB:: @ 8160EAB
+UndergroundPath_NorthEntrance_EventScript_AlreadyTraded:: @ 8160EAB
msgbox Trade_Text_HowIsMyOldMon
release
end
diff --git a/data/maps/UndergroundPath_SouthEntrance/map.json b/data/maps/UndergroundPath_SouthEntrance/map.json
index e58624d4e..604e544cd 100644
--- a/data/maps/UndergroundPath_SouthEntrance/map.json
+++ b/data/maps/UndergroundPath_SouthEntrance/map.json
@@ -23,7 +23,7 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "UndergroundPath_SouthEntrance_EventScript_160EC0",
+ "script": "UndergroundPath_SouthEntrance_EventScript_Woman",
"flag": "0"
}
],
diff --git a/data/maps/UndergroundPath_SouthEntrance/scripts.inc b/data/maps/UndergroundPath_SouthEntrance/scripts.inc
index 1623d16d7..1bc0b2a31 100644
--- a/data/maps/UndergroundPath_SouthEntrance/scripts.inc
+++ b/data/maps/UndergroundPath_SouthEntrance/scripts.inc
@@ -1,6 +1,6 @@
UndergroundPath_SouthEntrance_MapScripts:: @ 8160EBF
.byte 0
-UndergroundPath_SouthEntrance_EventScript_160EC0:: @ 8160EC0
- msgbox gUnknown_8174559, MSGBOX_NPC
+UndergroundPath_SouthEntrance_EventScript_Woman:: @ 8160EC0
+ msgbox UndergroundPath_SouthEntrance_Text_PeopleLoseThingsInTheDarkness, MSGBOX_NPC
end
diff --git a/data/maps/UndergroundPath_SouthEntrance/text.inc b/data/maps/UndergroundPath_SouthEntrance/text.inc
index 07e9c0368..5e35c333d 100644
--- a/data/maps/UndergroundPath_SouthEntrance/text.inc
+++ b/data/maps/UndergroundPath_SouthEntrance/text.inc
@@ -1,4 +1,4 @@
-gUnknown_8174559:: @ 8174559
+UndergroundPath_SouthEntrance_Text_PeopleLoseThingsInTheDarkness:: @ 8174559
.string "People often lose things in the\n"
.string "darkness of the UNDERGROUND PATH.$"
diff --git a/data/maps/UndergroundPath_WestEntrance/map.json b/data/maps/UndergroundPath_WestEntrance/map.json
index ab685cca5..8e8d2f662 100644
--- a/data/maps/UndergroundPath_WestEntrance/map.json
+++ b/data/maps/UndergroundPath_WestEntrance/map.json
@@ -23,7 +23,7 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "UndergroundPath_WestEntrance_EventScript_160ECA",
+ "script": "UndergroundPath_WestEntrance_EventScript_BaldingMan",
"flag": "0"
}
],
diff --git a/data/maps/UndergroundPath_WestEntrance/scripts.inc b/data/maps/UndergroundPath_WestEntrance/scripts.inc
index 6b1c60710..35fab8e7a 100644
--- a/data/maps/UndergroundPath_WestEntrance/scripts.inc
+++ b/data/maps/UndergroundPath_WestEntrance/scripts.inc
@@ -1,6 +1,6 @@
UndergroundPath_WestEntrance_MapScripts:: @ 8160EC9
.byte 0
-UndergroundPath_WestEntrance_EventScript_160ECA:: @ 8160ECA
- msgbox gUnknown_817459B, MSGBOX_NPC
+UndergroundPath_WestEntrance_EventScript_BaldingMan:: @ 8160ECA
+ msgbox UndergroundPath_WestEntrance_Text_SleepyMonNearCeladon, MSGBOX_NPC
end
diff --git a/data/maps/UndergroundPath_WestEntrance/text.inc b/data/maps/UndergroundPath_WestEntrance/text.inc
index 5447a5206..6130a5244 100644
--- a/data/maps/UndergroundPath_WestEntrance/text.inc
+++ b/data/maps/UndergroundPath_WestEntrance/text.inc
@@ -1,4 +1,4 @@
-gUnknown_817459B:: @ 817459B
+UndergroundPath_WestEntrance_Text_SleepyMonNearCeladon:: @ 817459B
.string "I heard a sleepy POKéMON appeared\n"
.string "out near CELADON CITY, too.$"
diff --git a/data/maps/UnionRoom/map.json b/data/maps/UnionRoom/map.json
index 91cf2cb49..7427f28c3 100644
--- a/data/maps/UnionRoom/map.json
+++ b/data/maps/UnionRoom/map.json
@@ -23,7 +23,7 @@
"movement_range_y": 0,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "UnionRoom_EventScript_16050C",
+ "script": "UnionRoom_EventScript_Attendant",
"flag": "0"
},
{
@@ -36,8 +36,8 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "UnionRoom_EventScript_1604DA",
- "flag": "FLAG_HIDE_UNION_ROOM_4"
+ "script": "UnionRoom_EventScript_Player4",
+ "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_4"
},
{
"graphics_id": "OBJECT_EVENT_GFX_VAR_7",
@@ -49,8 +49,8 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "UnionRoom_EventScript_160502",
- "flag": "FLAG_HIDE_UNION_ROOM_8"
+ "script": "UnionRoom_EventScript_Player8",
+ "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_8"
},
{
"graphics_id": "OBJECT_EVENT_GFX_VAR_6",
@@ -62,8 +62,8 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "UnionRoom_EventScript_1604F8",
- "flag": "FLAG_HIDE_UNION_ROOM_7"
+ "script": "UnionRoom_EventScript_Player7",
+ "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_7"
},
{
"graphics_id": "OBJECT_EVENT_GFX_VAR_5",
@@ -75,8 +75,8 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "UnionRoom_EventScript_1604EE",
- "flag": "FLAG_HIDE_UNION_ROOM_6"
+ "script": "UnionRoom_EventScript_Player6",
+ "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_6"
},
{
"graphics_id": "OBJECT_EVENT_GFX_VAR_4",
@@ -88,8 +88,8 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "UnionRoom_EventScript_1604E4",
- "flag": "FLAG_HIDE_UNION_ROOM_5"
+ "script": "UnionRoom_EventScript_Player5",
+ "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_5"
},
{
"graphics_id": "OBJECT_EVENT_GFX_VAR_2",
@@ -101,8 +101,8 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "UnionRoom_EventScript_1604D0",
- "flag": "FLAG_HIDE_UNION_ROOM_3"
+ "script": "UnionRoom_EventScript_Player3",
+ "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_3"
},
{
"graphics_id": "OBJECT_EVENT_GFX_VAR_1",
@@ -114,8 +114,8 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "UnionRoom_EventScript_1604C6",
- "flag": "FLAG_HIDE_UNION_ROOM_2"
+ "script": "UnionRoom_EventScript_Player2",
+ "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_2"
},
{
"graphics_id": "OBJECT_EVENT_GFX_VAR_0",
@@ -127,8 +127,8 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "UnionRoom_EventScript_1604BC",
- "flag": "FLAG_HIDE_UNION_ROOM_1"
+ "script": "UnionRoom_EventScript_Player1",
+ "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_1"
}
],
"warp_events": [
diff --git a/data/maps/UnionRoom/scripts.inc b/data/maps/UnionRoom/scripts.inc
index c948682ce..35222ba8b 100644
--- a/data/maps/UnionRoom/scripts.inc
+++ b/data/maps/UnionRoom/scripts.inc
@@ -4,14 +4,14 @@ UnionRoom_MapScripts:: @ 816047C
.byte 0
UnionRoom_OnResume:: @ 8160487
- setflag FLAG_HIDE_UNION_ROOM_1
- setflag FLAG_HIDE_UNION_ROOM_2
- setflag FLAG_HIDE_UNION_ROOM_3
- setflag FLAG_HIDE_UNION_ROOM_4
- setflag FLAG_HIDE_UNION_ROOM_5
- setflag FLAG_HIDE_UNION_ROOM_6
- setflag FLAG_HIDE_UNION_ROOM_7
- setflag FLAG_HIDE_UNION_ROOM_8
+ setflag FLAG_HIDE_UNION_ROOM_PLAYER_1
+ setflag FLAG_HIDE_UNION_ROOM_PLAYER_2
+ setflag FLAG_HIDE_UNION_ROOM_PLAYER_3
+ setflag FLAG_HIDE_UNION_ROOM_PLAYER_4
+ setflag FLAG_HIDE_UNION_ROOM_PLAYER_5
+ setflag FLAG_HIDE_UNION_ROOM_PLAYER_6
+ setflag FLAG_HIDE_UNION_ROOM_PLAYER_7
+ setflag FLAG_HIDE_UNION_ROOM_PLAYER_8
removeobject 9
removeobject 8
removeobject 7
@@ -26,7 +26,7 @@ UnionRoom_OnResume:: @ 8160487
UnionRoom_OnTransition:: @ 81604BB
end
-UnionRoom_EventScript_1604BC:: @ 81604BC
+UnionRoom_EventScript_Player1:: @ 81604BC
lock
faceplayer
setvar VAR_RESULT, 1
@@ -34,7 +34,7 @@ UnionRoom_EventScript_1604BC:: @ 81604BC
release
end
-UnionRoom_EventScript_1604C6:: @ 81604C6
+UnionRoom_EventScript_Player2:: @ 81604C6
lock
faceplayer
setvar VAR_RESULT, 2
@@ -42,7 +42,7 @@ UnionRoom_EventScript_1604C6:: @ 81604C6
release
end
-UnionRoom_EventScript_1604D0:: @ 81604D0
+UnionRoom_EventScript_Player3:: @ 81604D0
lock
faceplayer
setvar VAR_RESULT, 3
@@ -50,7 +50,7 @@ UnionRoom_EventScript_1604D0:: @ 81604D0
release
end
-UnionRoom_EventScript_1604DA:: @ 81604DA
+UnionRoom_EventScript_Player4:: @ 81604DA
lock
faceplayer
setvar VAR_RESULT, 4
@@ -58,7 +58,7 @@ UnionRoom_EventScript_1604DA:: @ 81604DA
release
end
-UnionRoom_EventScript_1604E4:: @ 81604E4
+UnionRoom_EventScript_Player5:: @ 81604E4
lock
faceplayer
setvar VAR_RESULT, 5
@@ -66,7 +66,7 @@ UnionRoom_EventScript_1604E4:: @ 81604E4
release
end
-UnionRoom_EventScript_1604EE:: @ 81604EE
+UnionRoom_EventScript_Player6:: @ 81604EE
lock
faceplayer
setvar VAR_RESULT, 6
@@ -74,7 +74,7 @@ UnionRoom_EventScript_1604EE:: @ 81604EE
release
end
-UnionRoom_EventScript_1604F8:: @ 81604F8
+UnionRoom_EventScript_Player7:: @ 81604F8
lock
faceplayer
setvar VAR_RESULT, 7
@@ -82,7 +82,7 @@ UnionRoom_EventScript_1604F8:: @ 81604F8
release
end
-UnionRoom_EventScript_160502:: @ 8160502
+UnionRoom_EventScript_Player8:: @ 8160502
lock
faceplayer
setvar VAR_RESULT, 8
@@ -90,7 +90,7 @@ UnionRoom_EventScript_160502:: @ 8160502
release
end
-UnionRoom_EventScript_16050C:: @ 816050C
+UnionRoom_EventScript_Attendant:: @ 816050C
lock
faceplayer
setvar VAR_RESULT, 9
@@ -98,7 +98,7 @@ UnionRoom_EventScript_16050C:: @ 816050C
release
end
-UnionRoom_EventScript_160516:: @ 8160516
+UnionRoom_EventScript_Unused:: @ 8160516
lockall
setvar VAR_RESULT, 10
waitstate
diff --git a/data/scripts/day_care.inc b/data/scripts/day_care.inc
index 9937bf704..8e3318c35 100644
--- a/data/scripts/day_care.inc
+++ b/data/scripts/day_care.inc
@@ -1,93 +1,93 @@
-Route5_PokemonDayCare_EventScript_1BF398:: @ 81BF398
+Route5_PokemonDayCare_EventScript_DaycareMan:: @ 81BF398
goto_if_questlog EventScript_ReleaseEnd
lock
faceplayer
showmoneybox 0, 0, 0
specialvar VAR_RESULT, IsThereMonInRoute5Daycare
- compare VAR_RESULT, 1
- goto_if_eq EventScript_1BF46E
- msgbox Text_19DD66, MSGBOX_YESNO
+ compare VAR_RESULT, TRUE
+ goto_if_eq Route5_PokemonDayCare_EventScript_CheckOnMon
+ msgbox Route5_PokemonDayCare_Text_WantMeToRaiseMon, MSGBOX_YESNO
compare VAR_RESULT, YES
- goto_if_eq EventScript_1BF3DD
- msgbox Text_19DDB2
- goto EventScript_1BF541
+ goto_if_eq Route5_PokemonDayCare_EventScript_TryGiveMon
+ msgbox Route5_PokemonDayCare_Text_ComeAgain
+ goto Route5_PokemonDayCare_EventScript_CloseMoneyBox
end
-EventScript_1BF3DD:: @ 81BF3DD
+Route5_PokemonDayCare_EventScript_TryGiveMon:: @ 81BF3DD
specialvar VAR_RESULT, CountPartyNonEggMons
compare VAR_RESULT, 1
- goto_if_eq EventScript_1BF452
- msgbox Text_19DDBE
+ goto_if_eq Route5_PokemonDayCare_EventScript_OnlyOneMonInParty
+ msgbox Route5_PokemonDayCare_Text_WhichMonShouldIRaise
fadescreen FADE_TO_BLACK
hidemoneybox 0, 0
special ChooseSendDaycareMon
waitstate
showmoneybox 0, 0, 0
- compare VAR_0x8004, 6
- goto_if_ge EventScript_1BF444
+ compare VAR_0x8004, PARTY_SIZE
+ goto_if_ge Route5_PokemonDayCare_EventScript_ComeAgain
specialvar VAR_RESULT, CountPartyAliveNonEggMons_IgnoreVar0x8004Slot
compare VAR_RESULT, 0
- goto_if_eq EventScript_1BF460
- specialvar VAR_0x8005, GetSelectedMonNickAndSpecies
- msgbox Text_19DDF9
+ goto_if_eq Route5_PokemonDayCare_EventScript_OnlyOneAliveMonInParty
+ specialvar VAR_0x8005, GetSelectedMonNicknameAndSpecies
+ msgbox Route5_PokemonDayCare_Text_LookAfterMonForAWhile
waitse
playmoncry VAR_0x8005, 0
- msgbox Text_19DE24
+ msgbox Route5_PokemonDayCare_Text_ComeSeeMeInAWhile
waitmoncry
special PutMonInRoute5Daycare
incrementgamestat GAME_STAT_USED_DAYCARE
- goto EventScript_1BF541
+ goto Route5_PokemonDayCare_EventScript_CloseMoneyBox
end
-EventScript_1BF444:: @ 81BF444
- msgbox Text_19DDDC
- goto EventScript_1BF541
+Route5_PokemonDayCare_EventScript_ComeAgain:: @ 81BF444
+ msgbox Route5_PokemonDayCare_Text_ComeAnytimeYouLike
+ goto Route5_PokemonDayCare_EventScript_CloseMoneyBox
end
-EventScript_1BF452:: @ 81BF452
- msgbox Text_19DEF5
- goto EventScript_1BF541
+Route5_PokemonDayCare_EventScript_OnlyOneMonInParty:: @ 81BF452
+ msgbox Route5_PokemonDayCare_Text_OnlyHaveOneMonWithYou
+ goto Route5_PokemonDayCare_EventScript_CloseMoneyBox
end
-EventScript_1BF460:: @ 81BF460
- msgbox Text_19DF1D
- goto EventScript_1BF541
+Route5_PokemonDayCare_EventScript_OnlyOneAliveMonInParty:: @ 81BF460
+ msgbox Route5_PokemonDayCare_Text_WhatWillYouBattleWith
+ goto Route5_PokemonDayCare_EventScript_CloseMoneyBox
end
-EventScript_1BF46E:: @ 81BF46E
+Route5_PokemonDayCare_EventScript_CheckOnMon:: @ 81BF46E
setvar VAR_0x8004, 0
specialvar VAR_RESULT, GetNumLevelsGainedForRoute5DaycareMon
compare VAR_RESULT, 0
- call_if_ne EventScript_1BF4AA
+ call_if_ne Route5_PokemonDayCare_EventScript_MonHasGrownByXLevels
compare VAR_RESULT, 0
- call_if_eq EventScript_1BF4B3
+ call_if_eq Route5_PokemonDayCare_EventScript_NotEnoughTime
special GetCostToWithdrawRoute5DaycareMon
- msgbox Text_19DE80, MSGBOX_YESNO
+ msgbox Route5_PokemonDayCare_Text_OweMeXForMonsReturn, MSGBOX_YESNO
compare VAR_RESULT, YES
- goto_if_eq EventScript_1BF4BC
- goto EventScript_1BF444
+ goto_if_eq Route5_PokemonDayCare_EventScript_TryRetrieveMon
+ goto Route5_PokemonDayCare_EventScript_ComeAgain
end
-EventScript_1BF4AA:: @ 81BF4AA
- msgbox Text_19DF56
+Route5_PokemonDayCare_EventScript_MonHasGrownByXLevels:: @ 81BF4AA
+ msgbox Route5_PokemonDayCare_Text_MonHasGrownByXLevels
return
-EventScript_1BF4B3:: @ 81BF4B3
- msgbox Text_19DE3C
+Route5_PokemonDayCare_EventScript_NotEnoughTime:: @ 81BF4B3
+ msgbox Route5_PokemonDayCare_Text_MonNeedsToSpendMoreTime
return
-EventScript_1BF4BC:: @ 81BF4BC
+Route5_PokemonDayCare_EventScript_TryRetrieveMon:: @ 81BF4BC
specialvar VAR_RESULT, CalculatePlayerPartyCount
compare VAR_RESULT, PARTY_SIZE
- goto_if_eq EventScript_1BF533
+ goto_if_eq Route5_PokemonDayCare_EventScript_NoRoomInParty
specialvar VAR_RESULT, IsEnoughForCostInVar0x8005
- compare VAR_RESULT, 1
- goto_if_eq EventScript_1BF4EA
- msgbox Text_19E001
- goto EventScript_1BF541
+ compare VAR_RESULT, TRUE
+ goto_if_eq Route5_PokemonDayCare_EventScript_RetrieveMon
+ msgbox Route5_PokemonDayCare_Text_DontHaveEnoughMoney
+ goto Route5_PokemonDayCare_EventScript_CloseMoneyBox
end
-EventScript_1BF4EA:: @ 81BF4EA
+Route5_PokemonDayCare_EventScript_RetrieveMon:: @ 81BF4EA
setvar VAR_0x8004, 0
specialvar VAR_RESULT, TakePokemonFromRoute5Daycare
special SubtractMoneyFromVar0x8005
@@ -97,159 +97,30 @@ EventScript_1BF4EA:: @ 81BF4EA
subvar VAR_RESULT, 1
getpartymonname 0, VAR_RESULT
copyvar VAR_RESULT, VAR_0x8008
- msgbox Text_19DEAF
+ msgbox Route5_PokemonDayCare_Text_ThankYouHeresMon
textcolor 3
waitse
playmoncry VAR_RESULT, 0
- msgbox Text_19DECF
+ msgbox Route5_PokemonDayCare_Text_PlayerGotMonBack
call EventScript_1A6675
waitmoncry
- goto EventScript_1BF541
+ goto Route5_PokemonDayCare_EventScript_CloseMoneyBox
end
-EventScript_1BF533:: @ 81BF533
- msgbox Text_19DFC2
- goto EventScript_1BF541
+Route5_PokemonDayCare_EventScript_NoRoomInParty:: @ 81BF533
+ msgbox Route5_PokemonDayCare_Text_YouveGotNoRoomForIt
+ goto Route5_PokemonDayCare_EventScript_CloseMoneyBox
end
-EventScript_1BF541:: @ 81BF541
+Route5_PokemonDayCare_EventScript_CloseMoneyBox:: @ 81BF541
hidemoneybox 0, 0
release
end
-EventScript_81BF546:: @ 81BF546
+EventScript_EggHatch:: @ 81BF546
lockall
- msgbox Text_1BFB5A
+ msgbox DayCare_Text_Huh
special EggHatch
waitstate
releaseall
end
-
-gUnknown_81BF555:: @ 81BF555
- .string "I'm the DAY-CARE MAN.\p"
- .string "I help take care of the precious\n"
- .string "POKéMON of TRAINERS.\p"
- .string "If you'd like me to raise your\n"
- .string "POKéMON, have a word with my wife.$"
-
-gUnknown_81BF5E3:: @ 81BF5E3
- .string "Ah, it's you!\p"
- .string "We were raising your POKéMON, and\n"
- .string "my goodness, were we surprised!\p"
- .string "Your POKéMON had an EGG!\p"
- .string "We don't know how it got there,\n"
- .string "but your POKéMON had it.\p"
- .string "You do want it, yes?$"
-
-gUnknown_81BF69A:: @ 81BF69A
- .string "Ah, it's you! Good to see you.\n"
- .string "Your {STR_VAR_1}'s doing fine.$"
-
-gUnknown_81BF6CF:: @ 81BF6CF
- .string "Well then, I'll keep it.\n"
- .string "Thanks!$"
-
-gUnknown_81BF6F0:: @ 81BF6F0
- .string "You have no room for it…\n"
- .string "Come back when you've made room.$"
-
-Text_1BF72A:: @ 81BF72A
- .string "{PLAYER} received the EGG from\n"
- .string "the DAY-CARE MAN.$"
-
-gUnknown_81BF755:: @ 81BF755
- .string "Take good care of it.$"
-
-Text_1BF76B:: @ 81BF76B
- .string "ポケモンを ひきとりたい ときは\n"
- .string "ばさんに いって おくれ$"
-
-gUnknown_81BF789:: @ 81BF789
- .string "Ah, it's you! Your {STR_VAR_1} and\n"
- .string "{STR_VAR_2} are doing fine.$"
-
-gUnknown_81BF7B6:: @ 81BF7B6
- .string "I really will keep it.\n"
- .string "You do want this, yes?$"
-
-gUnknown_81BF7E4:: @ 81BF7E4
- .string "I'm the DAY-CARE LADY.\p"
- .string "We can raise POKéMON for you.\p"
- .string "Would you like us to raise one?$"
-
-gUnknown_81BF839:: @ 81BF839
- .string "Which POKéMON should we raise for\n"
- .string "you?$"
-
-gUnknown_81BF860:: @ 81BF860
- .string "Fine, we'll raise your {STR_VAR_1}\n"
- .string "for a while.\p"
- .string "Come back for it later.$"
-
-gUnknown_81BF89F:: @ 81BF89F
- .string "We can raise two of your POKéMON.\p"
- .string "Would you like us to raise one\n"
- .string "more POKéMON for you?$"
-
-gUnknown_81BF8F6:: @ 81BF8F6
- .string "My husband was looking for you.$"
-
-gUnknown_81BF916:: @ 81BF916
- .string "Oh, fine, then.\n"
- .string "Come again.$"
-
-gUnknown_81BF932:: @ 81BF932
- .string "You don't have enough money…$"
-
-gUnknown_81BF94F:: @ 81BF94F
- .string "Will you take back the other one,\n"
- .string "too?$"
-
-gUnknown_81BF976:: @ 81BF976
- .string "Fine.\n"
- .string "Come again.$"
-
-gUnknown_81BF988:: @ 81BF988
- .string "Ah, it's you!\n"
- .string "Good to see you.\p"
- .string "Your POKéMON can only be doing\n"
- .string "good!$"
-
-gUnknown_81BF9CC:: @ 81BF9CC
- .string "By level, your {STR_VAR_1} has\n"
- .string "grown by {STR_VAR_2}.$"
-
-gUnknown_81BF9EF:: @ 81BF9EF
- .string "Your POKéMON party is full.\n"
- .string "Make room, then come see me.$"
-
-Text_1BFA28:: @ 81BFA28
- .string "どっちの ポケモンを ひきとるかい?$"
-
-gUnknown_81BFA3B:: @ 81BFA3B
- .string "If you want your {STR_VAR_1} back,\n"
- .string "it will cost ¥{STR_VAR_2}.$"
-
-gUnknown_81BFA67:: @ 81BFA67
- .string "Perfect!\n"
- .string "Here's your POKéMON.$"
-
-gUnknown_81BFA85:: @ 81BFA85
- .string "{PLAYER} took back {STR_VAR_1} from\n"
- .string "the DAY-CARE LADY.$"
-
-gUnknown_81BFAAD:: @ 81BFAAD
- .string "Oh? But you have just one\n"
- .string "POKéMON.\p"
- .string "Come back another time.$"
-
-gUnknown_81BFAE8:: @ 81BFAE8
- .string "Will you take your POKéMON back?$"
-
-gUnknown_81BFB09:: @ 81BFB09
- .string "If you leave me that POKéMON,\n"
- .string "what will you battle with?\p"
- .string "Come back another time.$"
-
-Text_1BFB5A:: @ 81BFB5A
- .string "Huh?$"
diff --git a/data/scripts/obtain_item.inc b/data/scripts/obtain_item.inc
index 2452c5c5c..3ada6109c 100644
--- a/data/scripts/obtain_item.inc
+++ b/data/scripts/obtain_item.inc
@@ -35,31 +35,31 @@ EventScript_BufferPocketNameTryFanfare:: @ 81A66BC
end
EventScript_BufferItemsPocket:: @ 81A66F9
- getstdstring 2, 24
+ getstdstring 2, STDSTRING_ITEMS_POCKET
compare VAR_0x8007, TRUE
call_if_eq EventScript_PlayFanfareObtainedItem
return
EventScript_BufferKeyItemsPocket:: @ 81A6709
- getstdstring 2, 25
+ getstdstring 2, STDSTRING_KEY_ITEMS_POCKET
compare VAR_0x8007, TRUE
call_if_eq EventScript_PlayFanfareObtainedItem
return
EventScript_BufferPokeBallsPocket:: @ 81A6719
- getstdstring 2, 26
+ getstdstring 2, STDSTRING_POKEBALLS_POCKET
compare VAR_0x8007, TRUE
call_if_eq EventScript_PlayFanfareObtainedItem
return
EventScript_BufferTMCase:: @ 81A6729
- getstdstring 2, 27
+ getstdstring 2, STDSTRING_TM_CASE
compare VAR_0x8007, TRUE
call_if_eq EventScript_PlayFanfareObtainedTMHM
return
EventScript_BufferBerryPouch:: @ 81A6739
- getstdstring 2, 28
+ getstdstring 2, STDSTRING_BERRY_POUCH
compare VAR_0x8007, TRUE
call_if_eq EventScript_PlayFanfareObtainedItem
return
@@ -218,7 +218,7 @@ EventScript_TryPickUpHiddenCoins::
compare VAR_RESULT, FALSE
goto_if_eq EventScript_HiddenCoinsButCaseIsFull
addcoins VAR_0x8006
- getstdstring 1, 0x17
+ getstdstring 1, STDSTRING_COINS
call EventScript_PlayFanfareObtainedItem
call EventScript_FoundCoins
waitfanfare
@@ -230,7 +230,7 @@ EventScript_TryPickUpHiddenCoins::
EventScript_HiddenCoinsButCaseIsFull::
getnumberstring 0, VAR_0x8006
- getstdstring 1, 0x17
+ getstdstring 1, STDSTRING_COINS
msgbox Text_FoundXCoins
msgbox Text_CoinCaseIsFull
setvar VAR_RESULT, 0
@@ -239,7 +239,7 @@ EventScript_HiddenCoinsButCaseIsFull::
EventScript_NoCaseForHiddenCoins::
getnumberstring 0, VAR_0x8006
- getstdstring 1, 0x17
+ getstdstring 1, STDSTRING_COINS
msgbox Text_FoundXCoins
msgbox Text_NothingToPutThemIn
setvar VAR_RESULT, 0
diff --git a/data/scripts/route23.inc b/data/scripts/route23.inc
index 682fa7b1d..cfdfe53a7 100644
--- a/data/scripts/route23.inc
+++ b/data/scripts/route23.inc
@@ -1,11 +1,11 @@
-EventScript_1A77C9:: @ 81A77C9
+Route23_EventScript_MissingBoulderBadge:: @ 81A77C9
msgbox Text_OnlySkilledTrainersAllowedThrough
playse SE_BOO
msgbox Text_CantLetYouPass
release
end
-EventScript_1A77DE:: @ 81A77DE
+Route23_EventScript_MissingBadge:: @ 81A77DE
message Text_OnlyPassWithBadgeDontHaveYet
waitmessage
playse SE_BOO
@@ -15,7 +15,7 @@ EventScript_1A77DE:: @ 81A77DE
release
end
-EventScript_1A77EC:: @ 81A77EC
+Route23_EventScript_AlreadyRecognizedBoulderBadge:: @ 81A77EC
message Text_OhThatsBadgeGoRightAhead
waitmessage
playfanfare MUS_FANFA1
@@ -24,80 +24,81 @@ EventScript_1A77EC:: @ 81A77EC
release
end
-EventScript_1A77F9:: @ 81A77F9
+Route23_EventScript_AlreadyRecognizedBadge:: @ 81A77F9
msgbox Text_OnlyPassWithBadgeOhGoAhead
release
end
-EventScript_1A7803:: @ 81A7803
+@ Duplicate of the below, only used for Boulder Badge
+Route22_NorthEntrance_EventScript_BadgeGuard:: @ 81A7803
compare VAR_MAP_SCENE_ROUTE23, VAR_TEMP_1
- goto_if_ge EventScript_1A77EC
+ goto_if_ge Route23_EventScript_AlreadyRecognizedBoulderBadge
switch VAR_TEMP_1
- case 1, EventScript_1A78D5
- case 2, EventScript_1A78E4
- case 3, EventScript_1A78F3
- case 4, EventScript_1A7902
- case 5, EventScript_1A7911
- case 6, EventScript_1A7920
- case 7, EventScript_1A792F
- case 8, EventScript_1A793E
+ case 1, Route23_EventScript_CheckBoulderBadge
+ case 2, Route23_EventScript_CheckCascadeBadge
+ case 3, Route23_EventScript_CheckThunderBadge
+ case 4, Route23_EventScript_CheckRainbowBadge
+ case 5, Route23_EventScript_CheckSoulBadge
+ case 6, Route23_EventScript_CheckMarshBadge
+ case 7, Route23_EventScript_CheckVolcanoBadge
+ case 8, Route23_EventScript_CheckEarthBadge
end
-EventScript_1A786C:: @ 81A786C
+Route23_EventScript_BadgeGuard:: @ 81A786C
compare VAR_MAP_SCENE_ROUTE23, VAR_TEMP_1
- goto_if_ge EventScript_1A77F9
+ goto_if_ge Route23_EventScript_AlreadyRecognizedBadge
switch VAR_TEMP_1
- case 1, EventScript_1A78D5
- case 2, EventScript_1A78E4
- case 3, EventScript_1A78F3
- case 4, EventScript_1A7902
- case 5, EventScript_1A7911
- case 6, EventScript_1A7920
- case 7, EventScript_1A792F
- case 8, EventScript_1A793E
+ case 1, Route23_EventScript_CheckBoulderBadge
+ case 2, Route23_EventScript_CheckCascadeBadge
+ case 3, Route23_EventScript_CheckThunderBadge
+ case 4, Route23_EventScript_CheckRainbowBadge
+ case 5, Route23_EventScript_CheckSoulBadge
+ case 6, Route23_EventScript_CheckMarshBadge
+ case 7, Route23_EventScript_CheckVolcanoBadge
+ case 8, Route23_EventScript_CheckEarthBadge
end
-EventScript_1A78D5:: @ 81A78D5
- goto_if_set FLAG_BADGE01_GET, EventScript_1A794D
- goto EventScript_1A77C9
+Route23_EventScript_CheckBoulderBadge:: @ 81A78D5
+ goto_if_set FLAG_BADGE01_GET, Route23_EventScript_RecognizeBoulderBadge
+ goto Route23_EventScript_MissingBoulderBadge
end
-EventScript_1A78E4:: @ 81A78E4
- goto_if_set FLAG_BADGE02_GET, EventScript_1A795F
- goto EventScript_1A77DE
+Route23_EventScript_CheckCascadeBadge:: @ 81A78E4
+ goto_if_set FLAG_BADGE02_GET, Route23_EventScript_RecognizeBadge
+ goto Route23_EventScript_MissingBadge
end
-EventScript_1A78F3:: @ 81A78F3
- goto_if_set FLAG_BADGE03_GET, EventScript_1A795F
- goto EventScript_1A77DE
+Route23_EventScript_CheckThunderBadge:: @ 81A78F3
+ goto_if_set FLAG_BADGE03_GET, Route23_EventScript_RecognizeBadge
+ goto Route23_EventScript_MissingBadge
end
-EventScript_1A7902:: @ 81A7902
- goto_if_set FLAG_BADGE04_GET, EventScript_1A795F
- goto EventScript_1A77DE
+Route23_EventScript_CheckRainbowBadge:: @ 81A7902
+ goto_if_set FLAG_BADGE04_GET, Route23_EventScript_RecognizeBadge
+ goto Route23_EventScript_MissingBadge
end
-EventScript_1A7911:: @ 81A7911
- goto_if_set FLAG_BADGE05_GET, EventScript_1A795F
- goto EventScript_1A77DE
+Route23_EventScript_CheckSoulBadge:: @ 81A7911
+ goto_if_set FLAG_BADGE05_GET, Route23_EventScript_RecognizeBadge
+ goto Route23_EventScript_MissingBadge
end
-EventScript_1A7920:: @ 81A7920
- goto_if_set FLAG_BADGE06_GET, EventScript_1A795F
- goto EventScript_1A77DE
+Route23_EventScript_CheckMarshBadge:: @ 81A7920
+ goto_if_set FLAG_BADGE06_GET, Route23_EventScript_RecognizeBadge
+ goto Route23_EventScript_MissingBadge
end
-EventScript_1A792F:: @ 81A792F
- goto_if_set FLAG_BADGE07_GET, EventScript_1A795F
- goto EventScript_1A77DE
+Route23_EventScript_CheckVolcanoBadge:: @ 81A792F
+ goto_if_set FLAG_BADGE07_GET, Route23_EventScript_RecognizeBadge
+ goto Route23_EventScript_MissingBadge
end
-EventScript_1A793E:: @ 81A793E
- goto_if_set FLAG_BADGE08_GET, EventScript_1A795F
- goto EventScript_1A77DE
+Route23_EventScript_CheckEarthBadge:: @ 81A793E
+ goto_if_set FLAG_BADGE08_GET, Route23_EventScript_RecognizeBadge
+ goto Route23_EventScript_MissingBadge
end
-EventScript_1A794D:: @ 81A794D
+Route23_EventScript_RecognizeBoulderBadge:: @ 81A794D
message Text_OhThatsBadgeGoRightAhead
waitmessage
playfanfare MUS_FANFA1
@@ -107,92 +108,92 @@ EventScript_1A794D:: @ 81A794D
release
end
-EventScript_1A795F:: @ 81A795F
+Route23_EventScript_RecognizeBadge:: @ 81A795F
msgbox Text_OnlyPassWithBadgeOhGoAhead
copyvar VAR_MAP_SCENE_ROUTE23, VAR_TEMP_1
release
end
-EventScript_1A796E:: @ 81A796E
+Route23_EventScript_BadgeGuardTrigger:: @ 81A796E
textcolor 0
applymovement VAR_0x8009, Movement_WalkInPlaceFastestLeft
waitmovement 0
switch VAR_TEMP_1
- case 1, EventScript_1A79D8
- case 2, EventScript_1A79E7
- case 3, EventScript_1A79F6
- case 4, EventScript_1A7A05
- case 5, EventScript_1A7A14
- case 6, EventScript_1A7A23
- case 7, EventScript_1A7A32
- case 8, EventScript_1A7A41
+ case 1, Route23_EventScript_CheckBoulderBadgeTrigger
+ case 2, Route23_EventScript_CheckCascadeBadgeTrigger
+ case 3, Route23_EventScript_CheckThunderBadgeTrigger
+ case 4, Route23_EventScript_CheckRainbowBadgeTrigger
+ case 5, Route23_EventScript_CheckSoulBadgeTrigger
+ case 6, Route23_EventScript_CheckMarshBadgeTrigger
+ case 7, Route23_EventScript_CheckVolcanoBadgeTrigger
+ case 8, Route23_EventScript_CheckEarthBadgeTrigger
end
-EventScript_1A79D8:: @ 81A79D8
- goto_if_set FLAG_BADGE01_GET, EventScript_1A7A96
- goto EventScript_1A7A50
+Route23_EventScript_CheckBoulderBadgeTrigger:: @ 81A79D8
+ goto_if_set FLAG_BADGE01_GET, Route23_EventScript_RecognizeBoulderBadgeTrigger
+ goto Route23_EventScript_MissingBoulderBadgeTrigger
end
-EventScript_1A79E7:: @ 81A79E7
- goto_if_set FLAG_BADGE02_GET, EventScript_1A7AA8
- goto EventScript_1A7A77
+Route23_EventScript_CheckCascadeBadgeTrigger:: @ 81A79E7
+ goto_if_set FLAG_BADGE02_GET, Route23_EventScript_RecognizeBadgeTrigger
+ goto Route23_EventScript_MissingBadgeTrigger
end
-EventScript_1A79F6:: @ 81A79F6
- goto_if_set FLAG_BADGE03_GET, EventScript_1A7AA8
- goto EventScript_1A7A77
+Route23_EventScript_CheckThunderBadgeTrigger:: @ 81A79F6
+ goto_if_set FLAG_BADGE03_GET, Route23_EventScript_RecognizeBadgeTrigger
+ goto Route23_EventScript_MissingBadgeTrigger
end
-EventScript_1A7A05:: @ 81A7A05
- goto_if_set FLAG_BADGE04_GET, EventScript_1A7AA8
- goto EventScript_1A7A77
+Route23_EventScript_CheckRainbowBadgeTrigger:: @ 81A7A05
+ goto_if_set FLAG_BADGE04_GET, Route23_EventScript_RecognizeBadgeTrigger
+ goto Route23_EventScript_MissingBadgeTrigger
end
-EventScript_1A7A14:: @ 81A7A14
- goto_if_set FLAG_BADGE05_GET, EventScript_1A7AA8
- goto EventScript_1A7A77
+Route23_EventScript_CheckSoulBadgeTrigger:: @ 81A7A14
+ goto_if_set FLAG_BADGE05_GET, Route23_EventScript_RecognizeBadgeTrigger
+ goto Route23_EventScript_MissingBadgeTrigger
end
-EventScript_1A7A23:: @ 81A7A23
- goto_if_set FLAG_BADGE06_GET, EventScript_1A7AA8
- goto EventScript_1A7A77
+Route23_EventScript_CheckMarshBadgeTrigger:: @ 81A7A23
+ goto_if_set FLAG_BADGE06_GET, Route23_EventScript_RecognizeBadgeTrigger
+ goto Route23_EventScript_MissingBadgeTrigger
end
-EventScript_1A7A32:: @ 81A7A32
- goto_if_set FLAG_BADGE07_GET, EventScript_1A7AA8
- goto EventScript_1A7A77
+Route23_EventScript_CheckVolcanoBadgeTrigger:: @ 81A7A32
+ goto_if_set FLAG_BADGE07_GET, Route23_EventScript_RecognizeBadgeTrigger
+ goto Route23_EventScript_MissingBadgeTrigger
end
-EventScript_1A7A41:: @ 81A7A41
- goto_if_set FLAG_BADGE08_GET, EventScript_1A7AA8
- goto EventScript_1A7A77
+Route23_EventScript_CheckEarthBadgeTrigger:: @ 81A7A41
+ goto_if_set FLAG_BADGE08_GET, Route23_EventScript_RecognizeBadgeTrigger
+ goto Route23_EventScript_MissingBadgeTrigger
end
-EventScript_1A7A50:: @ 81A7A50
+Route23_EventScript_MissingBoulderBadgeTrigger:: @ 81A7A50
msgbox Text_OnlySkilledTrainersAllowedThrough
playse SE_BOO
msgbox Text_CantLetYouPass
closemessage
- applymovement OBJ_EVENT_ID_PLAYER, Movement_1A7AB7
+ applymovement OBJ_EVENT_ID_PLAYER, Route23_Movement_WalkDown
applymovement VAR_0x8009, Movement_WalkInPlaceFastestDown
waitmovement 0
releaseall
end
-EventScript_1A7A77:: @ 81A7A77
+Route23_EventScript_MissingBadgeTrigger:: @ 81A7A77
message Text_OnlyPassWithBadgeDontHaveYet
waitmessage
playse SE_BOO
waitbuttonpress
closemessage
waitse
- applymovement OBJ_EVENT_ID_PLAYER, Movement_1A7AB7
+ applymovement OBJ_EVENT_ID_PLAYER, Route23_Movement_WalkDown
applymovement VAR_0x8009, Movement_WalkInPlaceFastestDown
waitmovement 0
releaseall
end
-EventScript_1A7A96:: @ 81A7A96
+Route23_EventScript_RecognizeBoulderBadgeTrigger:: @ 81A7A96
message Text_OhThatsBadgeGoRightAhead
waitmessage
playfanfare MUS_FANFA1
@@ -202,12 +203,12 @@ EventScript_1A7A96:: @ 81A7A96
releaseall
end
-EventScript_1A7AA8:: @ 81A7AA8
+Route23_EventScript_RecognizeBadgeTrigger:: @ 81A7AA8
msgbox Text_OnlyPassWithBadgeOhGoAhead
copyvar VAR_MAP_SCENE_ROUTE23, VAR_TEMP_1
releaseall
end
-Movement_1A7AB7:: @ 81A7AB7
+Route23_Movement_WalkDown:: @ 81A7AB7
walk_down
step_end
diff --git a/data/scripts/test.inc b/data/scripts/test.inc
index 55578f159..bd0497209 100644
--- a/data/scripts/test.inc
+++ b/data/scripts/test.inc
@@ -1,27 +1,27 @@
-EventScript_1C5550:: @ 81C5552
- msgbox Text_1C556D, MSGBOX_NPC
+Test_EventScript_NPC:: @ 81C5552
+ msgbox Test_Text_WelcomeToWorldOfPokemon, MSGBOX_NPC
end
-EventScript_1C555B:: @ 81C555B
- msgbox Text_1C558D, MSGBOX_SIGN
+Test_EventScript_Sign:: @ 81C555B
+ msgbox Test_Text_ThisIsASignpost, MSGBOX_SIGN
end
-EventScript_1C5564:: @ 81C5564
- msgbox Text_1C55A4, MSGBOX_SIGN
+Test_EventScript_CoordEvent:: @ 81C5564
+ msgbox Test_Text_ThisIsACoordEvent, MSGBOX_SIGN
end
-Text_1C556D:: @ 81C556D
+Test_Text_WelcomeToWorldOfPokemon:: @ 81C556D
.string "テストよう メッセージです!\n"
.string "ポケモンの せかいへ ようこそ!$"
-Text_1C558D:: @ 81C558D
+Test_Text_ThisIsASignpost:: @ 81C558D
.string "テストよう メッセージです!\n"
.string "かんばん です$"
-Text_1C55A4:: @ 81C55A4
+Test_Text_ThisIsACoordEvent:: @ 81C55A4
.string "テストよう メッセージです!\n"
.string "ざひょう チェックの イベントです$"
.align 2
-Text_1C55C8:: @ 81C55C8
+Test_Text_Empty:: @ 81C55C8
.string "$"
diff --git a/data/scripts/trainer_tower.inc b/data/scripts/trainer_tower.inc
index dd85dc53a..2a5a84f72 100644
--- a/data/scripts/trainer_tower.inc
+++ b/data/scripts/trainer_tower.inc
@@ -320,7 +320,7 @@ EventScript_1C5410:
message Text_ObtainedTheX
waitfanfare
waitmessage
- getstdstring 2, 24
+ getstdstring 2, STDSTRING_ITEMS_POCKET
msgbox Text_PutItemAway
call EventScript_1A6675
goto EventScript_1C544F
diff --git a/data/specials.inc b/data/specials.inc
index e76326401..92256dfab 100644
--- a/data/specials.inc
+++ b/data/specials.inc
@@ -194,7 +194,7 @@ gSpecials:: @ 815FD60
def_special RejectEggFromDayCare
def_special GiveEggFromDaycare
def_special SetDaycareCompatibilityString
- def_special GetSelectedMonNickAndSpecies
+ def_special GetSelectedMonNicknameAndSpecies
def_special StoreSelectedPokemonInDaycare
def_special ChooseSendDaycareMon
def_special ShowDaycareLevelMenu
diff --git a/data/text/day_care.inc b/data/text/day_care.inc
new file mode 100644
index 000000000..1e1d391be
--- /dev/null
+++ b/data/text/day_care.inc
@@ -0,0 +1,130 @@
+@ Same as Hoenn's day-care text, used by the Four Island Day-Care. Unused text translated in Emerald
+
+DayCare_Text_ImDaycareManSpeakToMyWife:: @ 81BF555
+ .string "I'm the DAY-CARE MAN.\p"
+ .string "I help take care of the precious\n"
+ .string "POKéMON of TRAINERS.\p"
+ .string "If you'd like me to raise your\n"
+ .string "POKéMON, have a word with my wife.$"
+
+DayCare_Text_DoYouWantEgg:: @ 81BF5E3
+ .string "Ah, it's you!\p"
+ .string "We were raising your POKéMON, and\n"
+ .string "my goodness, were we surprised!\p"
+ .string "Your POKéMON had an EGG!\p"
+ .string "We don't know how it got there,\n"
+ .string "but your POKéMON had it.\p"
+ .string "You do want it, yes?$"
+
+DayCare_Text_YourMonIsDoingFine:: @ 81BF69A
+ .string "Ah, it's you! Good to see you.\n"
+ .string "Your {STR_VAR_1}'s doing fine.$"
+
+DayCare_Text_IllKeepIt:: @ 81BF6CF
+ .string "Well then, I'll keep it.\n"
+ .string "Thanks!$"
+
+DayCare_Text_YouHaveNoRoomForIt:: @ 81BF6F0
+ .string "You have no room for it…\n"
+ .string "Come back when you've made room.$"
+
+DayCare_Text_ReceivedEgg:: @ 81BF72A
+ .string "{PLAYER} received the EGG from\n"
+ .string "the DAY-CARE MAN.$"
+
+DayCare_Text_TakeGoodCareOfIt:: @ 81BF755
+ .string "Take good care of it.$"
+
+DayCare_Text_SeeWifeIfYouWantToPickUpMon:: @ 81BF76B
+ .string "ポケモンを ひきとりたい ときは\n"
+ .string "ばさんに いって おくれ$"
+
+DayCare_Text_YourMonsAreDoingFine:: @ 81BF789
+ .string "Ah, it's you! Your {STR_VAR_1} and\n"
+ .string "{STR_VAR_2} are doing fine.$"
+
+DayCare_Text_IWillKeepDoYouWantIt:: @ 81BF7B6
+ .string "I really will keep it.\n"
+ .string "You do want this, yes?$"
+
+DayCare_Text_WouldYouLikeUsToRaiseMon:: @ 81BF7E4
+ .string "I'm the DAY-CARE LADY.\p"
+ .string "We can raise POKéMON for you.\p"
+ .string "Would you like us to raise one?$"
+
+DayCare_Text_WhichMonShouldWeRaise:: @ 81BF839
+ .string "Which POKéMON should we raise for\n"
+ .string "you?$"
+
+DayCare_Text_WellRaiseYourMon:: @ 81BF860
+ .string "Fine, we'll raise your {STR_VAR_1}\n"
+ .string "for a while.\p"
+ .string "Come back for it later.$"
+
+DayCare_Text_WeCanRaiseOneMore:: @ 81BF89F
+ .string "We can raise two of your POKéMON.\p"
+ .string "Would you like us to raise one\n"
+ .string "more POKéMON for you?$"
+
+DayCare_Text_HusbandWasLookingForYou:: @ 81BF8F6
+ .string "My husband was looking for you.$"
+
+DayCare_Text_FineThenComeAgain:: @ 81BF916
+ .string "Oh, fine, then.\n"
+ .string "Come again.$"
+
+DayCare_Text_NotEnoughMoney:: @ 81BF932
+ .string "You don't have enough money…$"
+
+DayCare_Text_TakeOtherOneBackToo:: @ 81BF94F
+ .string "Will you take back the other one,\n"
+ .string "too?$"
+
+DayCare_Text_ComeAgain:: @ 81BF976
+ .string "Fine.\n"
+ .string "Come again.$"
+
+DayCare_Text_GoodToSeeYou:: @ 81BF988
+ .string "Ah, it's you!\n"
+ .string "Good to see you.\p"
+ .string "Your POKéMON can only be doing\n"
+ .string "good!$"
+
+DayCare_Text_YourMonHasGrownXLevels:: @ 81BF9CC
+ .string "By level, your {STR_VAR_1} has\n"
+ .string "grown by {STR_VAR_2}.$"
+
+DayCare_Text_YourPartyIsFull:: @ 81BF9EF
+ .string "Your POKéMON party is full.\n"
+ .string "Make room, then come see me.$"
+
+DayCare_Text_TakeBackWhichMon:: @ 81BFA28
+ .string "どっちの ポケモンを ひきとるかい?$"
+
+DayCare_Text_ItWillCostX:: @ 81BFA3B
+ .string "If you want your {STR_VAR_1} back,\n"
+ .string "it will cost ¥{STR_VAR_2}.$"
+
+DayCare_Text_HeresYourMon:: @ 81BFA67
+ .string "Perfect!\n"
+ .string "Here's your POKéMON.$"
+
+DayCare_Text_TookBackMon:: @ 81BFA85
+ .string "{PLAYER} took back {STR_VAR_1} from\n"
+ .string "the DAY-CARE LADY.$"
+
+DayCare_Text_YouHaveJustOneMon:: @ 81BFAAD
+ .string "Oh? But you have just one\n"
+ .string "POKéMON.\p"
+ .string "Come back another time.$"
+
+DayCare_Text_TakeYourMonBack:: @ 81BFAE8
+ .string "Will you take your POKéMON back?$"
+
+DayCare_Text_WhatWillYouBattleWith:: @ 81BFB09
+ .string "If you leave me that POKéMON,\n"
+ .string "what will you battle with?\p"
+ .string "Come back another time.$"
+
+DayCare_Text_Huh:: @ 81BFB5A
+ .string "Huh?$"
diff --git a/include/constants/daycare.h b/include/constants/daycare.h
new file mode 100644
index 000000000..103f920f2
--- /dev/null
+++ b/include/constants/daycare.h
@@ -0,0 +1,27 @@
+#ifndef GUARD_DAYCARE_CONSTANTS_H
+#define GUARD_DAYCARE_CONSTANTS_H
+
+// Parent compatability scores
+#define PARENTS_INCOMPATIBLE 0
+#define PARENTS_LOW_COMPATIBILITY 20
+#define PARENTS_MED_COMPATABILITY 50
+#define PARENTS_MAX_COMPATABILITY 70
+
+// Daycare state
+#define DAYCARE_NO_MONS 0
+#define DAYCARE_EGG_WAITING 1
+#define DAYCARE_ONE_MON 2
+#define DAYCARE_TWO_MONS 3
+
+#define INHERITED_IV_COUNT 3
+#define EGG_HATCH_LEVEL 5
+#define EGG_GENDER_MALE 0x8000 // used to create a male egg from a female-only parent species (e.g. Nidoran)
+
+#define DAYCARE_LEVEL_MENU_EXIT 5
+#define DAYCARE_EXITED_LEVEL_MENU 2 // would be redundant with above if GF had used the same value
+
+// Array buffers
+#define EGG_MOVES_ARRAY_COUNT 10
+#define EGG_LVL_UP_MOVES_ARRAY_COUNT 50
+
+#endif //GUARD_DAYCARE_CONSTANTS_H
diff --git a/include/constants/flags.h b/include/constants/flags.h
index 982c90fcc..cc65cffa2 100644
--- a/include/constants/flags.h
+++ b/include/constants/flags.h
@@ -104,14 +104,14 @@
#define FLAG_HIDE_DOJO_HITMONLEE_BALL 0x060
#define FLAG_HIDE_DOJO_HITMONCHAN_BALL 0x061
#define FLAG_HIDE_CINNABAR_BILL 0x062
-#define FLAG_HIDE_UNION_ROOM_1 0x063
-#define FLAG_HIDE_UNION_ROOM_2 0x064
-#define FLAG_HIDE_UNION_ROOM_3 0x065
-#define FLAG_HIDE_UNION_ROOM_4 0x066
-#define FLAG_HIDE_UNION_ROOM_5 0x067
-#define FLAG_HIDE_UNION_ROOM_6 0x068
-#define FLAG_HIDE_UNION_ROOM_7 0x069
-#define FLAG_HIDE_UNION_ROOM_8 0x06A
+#define FLAG_HIDE_UNION_ROOM_PLAYER_1 0x063
+#define FLAG_HIDE_UNION_ROOM_PLAYER_2 0x064
+#define FLAG_HIDE_UNION_ROOM_PLAYER_3 0x065
+#define FLAG_HIDE_UNION_ROOM_PLAYER_4 0x066
+#define FLAG_HIDE_UNION_ROOM_PLAYER_5 0x067
+#define FLAG_HIDE_UNION_ROOM_PLAYER_6 0x068
+#define FLAG_HIDE_UNION_ROOM_PLAYER_7 0x069
+#define FLAG_HIDE_UNION_ROOM_PLAYER_8 0x06A
#define FLAG_HIDE_CINNABAR_SEAGALLOP 0x06B
#define FLAG_HIDE_SAFFRON_FAN_CLUB_BLACKBELT 0x06C
#define FLAG_HIDE_SAFFRON_FAN_CLUB_ROCKER 0x06D
diff --git a/include/constants/global.h b/include/constants/global.h
index 420a9da71..24a61a1e6 100644
--- a/include/constants/global.h
+++ b/include/constants/global.h
@@ -36,6 +36,7 @@
#define MALE 0
#define FEMALE 1
+#define GENDER_COUNT 2
#define OPTIONS_BUTTON_MODE_HELP 0
#define OPTIONS_BUTTON_MODE_LR 1
diff --git a/include/constants/menu.h b/include/constants/menu.h
index 6d72787dc..aed98dec4 100644
--- a/include/constants/menu.h
+++ b/include/constants/menu.h
@@ -78,4 +78,35 @@
#define LISTMENU_BERRY_POWDER 5
#define LISTMENU_TRAINER_TOWER_FLOORS 6
+// Std String Ids
+#define STDSTRING_COOL 0
+#define STDSTRING_BEAUTY 1
+#define STDSTRING_CUTE 2
+#define STDSTRING_SMART 3
+#define STDSTRING_TOUGH 4
+#define STDSTRING_COOL2 5
+#define STDSTRING_BEAUTY2 6
+#define STDSTRING_CUTE2 7
+#define STDSTRING_SMART2 8
+#define STDSTRING_TOUGH2 9
+#define STDSTRING_ITEMS 10
+#define STDSTRING_KEY_ITEMS 11
+#define STDSTRING_POKEBALLS 12
+#define STDSTRING_TMHMS 13
+#define STDSTRING_BERRIES 14
+#define STDSTRING_BOULDER_BADGE 15
+#define STDSTRING_CASCADE_BADGE 16
+#define STDSTRING_THUNDER_BADGE 17
+#define STDSTRING_RAINBOW_BADGE 18
+#define STDSTRING_SOUL_BADGE 19
+#define STDSTRING_MARSH_BADGE 20
+#define STDSTRING_VOLCANO_BADGE 21
+#define STDSTRING_EARTH_BADGE 22
+#define STDSTRING_COINS 23
+#define STDSTRING_ITEMS_POCKET 24
+#define STDSTRING_KEY_ITEMS_POCKET 25
+#define STDSTRING_POKEBALLS_POCKET 26
+#define STDSTRING_TM_CASE 27
+#define STDSTRING_BERRY_POUCH 28
+
#endif //GUARD_CONSTANTS_MENU_H
diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h
index c6fc55003..dfbba41d9 100644
--- a/include/constants/pokemon.h
+++ b/include/constants/pokemon.h
@@ -40,6 +40,8 @@
#define EGG_GROUP_DRAGON 14
#define EGG_GROUP_UNDISCOVERED 15
+#define EGG_GROUPS_PER_MON 2
+
// Pokemon natures
#define NATURE_HARDY 0
#define NATURE_LONELY 1
diff --git a/include/constants/region_map.h b/include/constants/region_map.h
index bd087bd60..78dab242c 100644
--- a/include/constants/region_map.h
+++ b/include/constants/region_map.h
@@ -206,6 +206,8 @@
#define MAPSEC_SPECIAL_AREA 0xC4
#define MAPSEC_NONE 0xC5
-#define MAPSEC_IN_GAME_TRADE 0xFE
+#define METLOC_SPECIAL_EGG 0xFD
+#define METLOC_IN_GAME_TRADE 0xFE
+#define METLOC_FATEFUL_ENCOUNTER 0xFF
#endif //GUARD_CONSTANTS_REGION_MAP_H
diff --git a/include/daycare.h b/include/daycare.h
index 08ca11187..71eada93e 100644
--- a/include/daycare.h
+++ b/include/daycare.h
@@ -3,8 +3,6 @@
#include "global.h"
-#define EGG_HATCH_LEVEL 5
-
u8 *GetMonNick(struct Pokemon *mon, u8 *dest);
u8 *GetBoxMonNick(struct BoxPokemon *mon, u8 *dest);
u8 CountPokemonInDaycare(struct DayCare *daycare);
diff --git a/include/event_scripts.h b/include/event_scripts.h
index 72345aaa9..189985e06 100644
--- a/include/event_scripts.h
+++ b/include/event_scripts.h
@@ -1162,7 +1162,7 @@ extern const u8 EventScript_TryDoNormalTrainerBattle[];
extern const u8 EventScript_TryDoDoubleRematchBattle[];
extern const u8 EventScript_TryDoRematchBattle[];
extern const u8 gUnknown_81A4EB4[];
-extern const u8 EventScript_1C555B[];
+extern const u8 Test_EventScript_Sign[];
// new_game
extern const u8 EventScript_ResetAllMapFlags[];
diff --git a/src/battle_setup.c b/src/battle_setup.c
index a46191509..06f65dae2 100644
--- a/src/battle_setup.c
+++ b/src/battle_setup.c
@@ -978,7 +978,7 @@ const u8 *BattleSetup_GetScriptAddrAfterBattle(void)
if (sTrainerBattleEndScript != NULL)
return sTrainerBattleEndScript;
else
- return EventScript_1C555B;
+ return Test_EventScript_Sign;
}
const u8 *BattleSetup_GetTrainerPostBattleScript(void)
@@ -986,7 +986,7 @@ const u8 *BattleSetup_GetTrainerPostBattleScript(void)
if (sTrainerABattleScriptRetAddr != NULL)
return sTrainerABattleScriptRetAddr;
else
- return EventScript_1C555B;
+ return Test_EventScript_Sign;
}
void ScrSpecial_ShowTrainerNonBattlingSpeech(void)
diff --git a/src/daycare.c b/src/daycare.c
index b3e76faba..a377e97f5 100644
--- a/src/daycare.c
+++ b/src/daycare.c
@@ -37,9 +37,11 @@
#include "naming_screen.h"
#include "help_system.h"
#include "field_fadetransition.h"
+#include "constants/daycare.h"
+#include "constants/pokemon.h"
+#include "constants/region_map.h"
-#define EGG_MOVES_ARRAY_COUNT 10
-#define EGG_LVL_UP_MOVES_ARRAY_COUNT 50
+// Combination of RSE's Day-Care (re-used on Four Island), FRLG's Day-Care, and egg_hatch.c
struct EggHatchData
{
@@ -119,7 +121,7 @@ static const struct ListMenuItem sLevelMenuItems[] =
{
{gExpandedPlaceholder_Empty, 0},
{gExpandedPlaceholder_Empty, 1},
- {gOtherText_Exit, 5}
+ {gOtherText_Exit, DAYCARE_LEVEL_MENU_EXIT}
};
static const struct ListMenuTemplate sDaycareListMenuLevelTemplate =
@@ -372,7 +374,7 @@ static const s16 sEggShardVelocities[][2] =
// code
-u8 *GetMonNick(struct Pokemon *mon, u8 *dest)
+static u8 *DayCare_GetMonNickname(struct Pokemon *mon, u8 *dest)
{
u8 nickname[POKEMON_NAME_LENGTH * 2];
@@ -380,7 +382,7 @@ u8 *GetMonNick(struct Pokemon *mon, u8 *dest)
return StringCopy10(dest, nickname);
}
-u8 *GetBoxMonNick(struct BoxPokemon *mon, u8 *dest)
+static u8 *DayCare_GetBoxMonNickname(struct BoxPokemon *mon, u8 *dest)
{
u8 nickname[POKEMON_NAME_LENGTH * 2];
@@ -450,7 +452,7 @@ static void StorePokemonInDaycare(struct Pokemon *mon, struct DaycareMon *daycar
u8 mailId;
StringCopy(daycareMon->mail.OT_name, gSaveBlock2Ptr->playerName);
- GetMonNick(mon, daycareMon->mail.monName);
+ DayCare_GetMonNickname(mon, daycareMon->mail.monName);
// StripExtCtrlCodes(daycareMon->mail.monName);
// daycareMon->mail.gameLanguage = LANGUAGE_ENGLISH;
// daycareMon->mail.monLanguage = GetMonData(mon, MON_DATA_LANGUAGE);
@@ -483,8 +485,8 @@ void StoreSelectedPokemonInDaycare(void)
static void ShiftDaycareSlots(struct DayCare *daycare)
{
// This condition is only satisfied when the player takes out the first pokemon from the daycare.
- if (GetBoxMonData(&daycare->mons[1].mon, MON_DATA_SPECIES) != 0
- && GetBoxMonData(&daycare->mons[0].mon, MON_DATA_SPECIES) == 0)
+ if (GetBoxMonData(&daycare->mons[1].mon, MON_DATA_SPECIES) != SPECIES_NONE
+ && GetBoxMonData(&daycare->mons[0].mon, MON_DATA_SPECIES) == SPECIES_NONE)
{
daycare->mons[0].mon = daycare->mons[1].mon;
ZeroBoxMonData(&daycare->mons[1].mon);
@@ -512,11 +514,8 @@ static void ApplyDaycareExperience(struct Pokemon *mon)
while ((learnedMove = MonTryLearningNewMove(mon, firstMove)) != 0)
{
firstMove = FALSE;
- if (learnedMove == 0xFFFF)
- {
- // Mon already knows 4 moves.
+ if (learnedMove == MON_HAS_MAX_MOVES)
DeleteFirstMoveAndGiveMoveToMon(mon, gMoveToLearn);
- }
}
}
else
@@ -535,7 +534,7 @@ static u16 TakeSelectedPokemonFromDaycare(struct DaycareMon *daycareMon)
u32 experience;
struct Pokemon pokemon;
- GetBoxMonNick(&daycareMon->mon, gStringVar1);
+ DayCare_GetBoxMonNickname(&daycareMon->mon, gStringVar1);
species = GetBoxMonData(&daycareMon->mon, MON_DATA_SPECIES);
BoxMonToMon(&daycareMon->mon, &pokemon);
@@ -595,7 +594,7 @@ static u8 GetNumLevelsGainedForDaycareMon(struct DaycareMon *daycareMon)
{
u8 numLevelsGained = GetNumLevelsGainedFromSteps(daycareMon);
ConvertIntToDecimalStringN(gStringVar2, numLevelsGained, STR_CONV_MODE_LEFT_ALIGN, 2);
- GetBoxMonNick(&daycareMon->mon, gStringVar1);
+ DayCare_GetBoxMonNickname(&daycareMon->mon, gStringVar1);
return numLevelsGained;
}
@@ -604,7 +603,7 @@ static u32 GetDaycareCostForSelectedMon(struct DaycareMon *daycareMon)
u32 cost;
u8 numLevelsGained = GetNumLevelsGainedFromSteps(daycareMon);
- GetBoxMonNick(&daycareMon->mon, gStringVar1);
+ DayCare_GetBoxMonNickname(&daycareMon->mon, gStringVar1);
cost = 100 + 100 * numLevelsGained;
ConvertIntToDecimalStringN(gStringVar2, cost, STR_CONV_MODE_LEFT_ALIGN, 5);
return cost;
@@ -639,7 +638,7 @@ static void ClearDaycareMonMail(struct DayCareMail *mail)
{
s32 i;
- for (i = 0; i < PLAYER_NAME_LENGTH; i++)
+ for (i = 0; i < PLAYER_NAME_LENGTH/* + 1*/; i++)
mail->OT_name[i] = 0;
for (i = 0; i < POKEMON_NAME_LENGTH + 1; i++)
mail->monName[i] = 0;
@@ -777,7 +776,7 @@ static void _TriggerPendingDaycareEgg(struct DayCare *daycare)
static void _TriggerPendingDaycareMaleEgg(struct DayCare *daycare)
{
- daycare->offspringPersonality = (Random()) | (0x8000);
+ daycare->offspringPersonality = (Random()) | (EGG_GENDER_MALE);
FlagSet(FLAG_PENDING_DAYCARE_EGG);
}
@@ -815,7 +814,7 @@ static void RemoveIVIndexFromList(u8 *ivs, u8 selectedIv)
static void InheritIVs(struct Pokemon *egg, struct DayCare *daycare)
{
u8 i;
- u8 selectedIvs[3];
+ u8 selectedIvs[INHERITED_IV_COUNT];
u8 availableIVs[NUM_STATS];
u8 whichParent[ARRAY_COUNT(selectedIvs)];
u8 iv;
@@ -829,17 +828,15 @@ static void InheritIVs(struct Pokemon *egg, struct DayCare *daycare)
// Select the 3 IVs that will be inherited.
for (i = 0; i < ARRAY_COUNT(selectedIvs); i++)
{
- // Randomly pick an IV from the available list.
+ // Randomly pick an IV from the available list and stop from being chosen again.
selectedIvs[i] = availableIVs[Random() % (NUM_STATS - i)];
-
- // Remove the selected IV index from the available IV indices.
RemoveIVIndexFromList(availableIVs, selectedIvs[i]);
}
// Determine which parent each of the selected IVs should inherit from.
for (i = 0; i < ARRAY_COUNT(selectedIvs); i++)
{
- whichParent[i] = Random() % 2;
+ whichParent[i] = Random() % DAYCARE_MON_COUNT;
}
// Set each of inherited IVs on the egg mon.
@@ -921,14 +918,14 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru
numSharedParentMoves = 0;
for (i = 0; i < MAX_MON_MOVES; i++)
{
- sHatchedEggMotherMoves[i] = 0;
- sHatchedEggFatherMoves[i] = 0;
- sHatchedEggFinalMoves[i] = 0;
+ sHatchedEggMotherMoves[i] = MOVE_NONE;
+ sHatchedEggFatherMoves[i] = MOVE_NONE;
+ sHatchedEggFinalMoves[i] = MOVE_NONE;
}
for (i = 0; i < EGG_MOVES_ARRAY_COUNT; i++)
- sHatchedEggEggMoves[i] = 0;
+ sHatchedEggEggMoves[i] = MOVE_NONE;
for (i = 0; i < EGG_LVL_UP_MOVES_ARRAY_COUNT; i++)
- sHatchedEggLevelUpMoves[i] = 0;
+ sHatchedEggLevelUpMoves[i] = MOVE_NONE;
numLevelUpMoves = GetLevelUpMovesBySpecies(GetMonData(egg, MON_DATA_SPECIES), sHatchedEggLevelUpMoves);
for (i = 0; i < MAX_MON_MOVES; i++)
@@ -947,7 +944,7 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru
{
if (sHatchedEggFatherMoves[i] == sHatchedEggEggMoves[j])
{
- if (GiveMoveToMon(egg, sHatchedEggFatherMoves[i]) == 0xFFFF)
+ if (GiveMoveToMon(egg, sHatchedEggFatherMoves[i]) == MON_HAS_MAX_MOVES)
DeleteFirstMoveAndGiveMoveToMon(egg, sHatchedEggFatherMoves[i]);
break;
}
@@ -966,7 +963,7 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru
{
if (sHatchedEggFatherMoves[i] == ItemIdToBattleMoveId(ITEM_TM01/*_FOCUS_PUNCH*/ + j) && CanMonLearnTMHM(egg, j))
{
- if (GiveMoveToMon(egg, sHatchedEggFatherMoves[i]) == 0xFFFF)
+ if (GiveMoveToMon(egg, sHatchedEggFatherMoves[i]) == MON_HAS_MAX_MOVES)
DeleteFirstMoveAndGiveMoveToMon(egg, sHatchedEggFatherMoves[i]);
}
}
@@ -991,7 +988,7 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru
{
if (sHatchedEggLevelUpMoves[j] != MOVE_NONE && sHatchedEggFinalMoves[i] == sHatchedEggLevelUpMoves[j])
{
- if (GiveMoveToMon(egg, sHatchedEggFinalMoves[i]) == 0xFFFF)
+ if (GiveMoveToMon(egg, sHatchedEggFinalMoves[i]) == MON_HAS_MAX_MOVES)
DeleteFirstMoveAndGiveMoveToMon(egg, sHatchedEggFinalMoves[i]);
break;
}
@@ -1036,7 +1033,7 @@ static void AlterEggSpeciesWithIncenseItem(u16 *species, struct DayCare *daycare
if (motherItem == ITEM_LIGHT_BALL || fatherItem == ITEM_LIGHT_BALL)
{
- if (GiveMoveToMon(mon, MOVE_VOLT_TACKLE) == 0xFFFF)
+ if (GiveMoveToMon(mon, MOVE_VOLT_TACKLE) == MON_HAS_MAX_MOVES)
DeleteFirstMoveAndGiveMoveToMon(mon, MOVE_VOLT_TACKLE);
}
}*/
@@ -1044,13 +1041,13 @@ static void AlterEggSpeciesWithIncenseItem(u16 *species, struct DayCare *daycare
static u16 DetermineEggSpeciesAndParentSlots(struct DayCare *daycare, u8 *parentSlots)
{
u16 i;
- u16 species[2];
+ u16 species[DAYCARE_MON_COUNT];
u16 eggSpecies;
// Determine which of the daycare mons is the mother and father of the egg.
// The 0th index of the parentSlots array is considered the mother slot, and the
// 1st index is the father slot.
- for (i = 0; i < 2; i++)
+ for (i = 0; i < DAYCARE_MON_COUNT; i++)
{
species[i] = GetBoxMonData(&daycare->mons[i].mon, MON_DATA_SPECIES);
if (species[i] == SPECIES_DITTO)
@@ -1066,11 +1063,11 @@ static u16 DetermineEggSpeciesAndParentSlots(struct DayCare *daycare, u8 *parent
}
eggSpecies = GetEggSpecies(species[parentSlots[0]]);
- if (eggSpecies == SPECIES_NIDORAN_F && daycare->offspringPersonality & 0x8000)
+ if (eggSpecies == SPECIES_NIDORAN_F && daycare->offspringPersonality & EGG_GENDER_MALE)
{
eggSpecies = SPECIES_NIDORAN_M;
}
- if (eggSpecies == SPECIES_ILLUMISE && daycare->offspringPersonality & 0x8000)
+ if (eggSpecies == SPECIES_ILLUMISE && daycare->offspringPersonality & EGG_GENDER_MALE)
{
eggSpecies = SPECIES_VOLBEAT;
}
@@ -1078,19 +1075,19 @@ static u16 DetermineEggSpeciesAndParentSlots(struct DayCare *daycare, u8 *parent
// Make Ditto the "mother" slot if the other daycare mon is male.
if (species[parentSlots[1]] == SPECIES_DITTO && GetBoxMonGender(&daycare->mons[parentSlots[0]].mon) != MON_FEMALE)
{
- u8 temp = parentSlots[1];
+ u8 ditto = parentSlots[1];
parentSlots[1] = parentSlots[0];
- parentSlots[0] = temp;
+ parentSlots[0] = ditto;
}
return eggSpecies;
}
-static void _GiveEggFromDaycare(struct DayCare *daycare) // give_egg
+static void _GiveEggFromDaycare(struct DayCare *daycare)
{
struct Pokemon egg;
u16 species;
- u8 parentSlots[2]; // 0th index is "mother" daycare slot, 1st is "father"
+ u8 parentSlots[DAYCARE_MON_COUNT];
bool8 isEgg;
species = DetermineEggSpeciesAndParentSlots(daycare, parentSlots);
@@ -1118,7 +1115,7 @@ void CreateEgg(struct Pokemon *mon, u16 species, bool8 setHotSpringsLocation)
u8 metLocation;
u8 isEgg;
- CreateMon(mon, species, EGG_HATCH_LEVEL, 0x20, FALSE, 0, FALSE, 0);
+ CreateMon(mon, species, EGG_HATCH_LEVEL, 32, FALSE, 0, OT_ID_PLAYER_ID, 0);
metLevel = 0;
ball = ITEM_POKE_BALL;
language = LANGUAGE_JAPANESE;
@@ -1129,7 +1126,7 @@ void CreateEgg(struct Pokemon *mon, u16 species, bool8 setHotSpringsLocation)
SetMonData(mon, MON_DATA_LANGUAGE, &language);
if (setHotSpringsLocation)
{
- metLocation = 253; // hot springs; see PokemonSummaryScreen_PrintEggTrainerMemo
+ metLocation = METLOC_SPECIAL_EGG;
SetMonData(mon, MON_DATA_MET_LOCATION, &metLocation);
}
@@ -1145,7 +1142,7 @@ static void SetInitialEggData(struct Pokemon *mon, u16 species, struct DayCare *
u8 language;
personality = daycare->offspringPersonality | (Random() << 16);
- CreateMon(mon, species, EGG_HATCH_LEVEL, 0x20, TRUE, personality, FALSE, 0);
+ CreateMon(mon, species, EGG_HATCH_LEVEL, 32, TRUE, personality, OT_ID_PLAYER_ID, 0);
metLevel = 0;
ball = ITEM_POKE_BALL;
language = LANGUAGE_JAPANESE;
@@ -1161,7 +1158,7 @@ void GiveEggFromDaycare(void)
_GiveEggFromDaycare(&gSaveBlock1Ptr->daycare);
}
-static bool8 _DoEggActions_CheckHatch(struct DayCare *daycare)
+static bool8 TryProduceOrHatchEgg(struct DayCare *daycare)
{
u32 i, validEggs = 0;
@@ -1171,15 +1168,16 @@ static bool8 _DoEggActions_CheckHatch(struct DayCare *daycare)
daycare->mons[i].steps++, validEggs++;
}
- // try to trigger poke sex
- if (daycare->offspringPersonality == 0 && validEggs == 2 && (daycare->mons[1].steps & 0xFF) == 0xFF)
+ // Check if an egg should be produced
+ if (daycare->offspringPersonality == 0 && validEggs == DAYCARE_MON_COUNT && (daycare->mons[1].steps & 0xFF) == 0xFF)
{
- u8 loveScore = GetDaycareCompatibilityScore(daycare);
- if (loveScore > (Random() * 100u) / USHRT_MAX)
+ u8 compatability = GetDaycareCompatibilityScore(daycare);
+ if (compatability > (Random() * 100u) / USHRT_MAX)
TriggerPendingDaycareEgg();
}
- if (++daycare->stepCounter == 255) // hatch an egg
+ // Hatch Egg
+ if (++daycare->stepCounter == 255)
{
u32 steps;
@@ -1191,10 +1189,9 @@ static bool8 _DoEggActions_CheckHatch(struct DayCare *daycare)
continue;
steps = GetMonData(&gPlayerParty[i], MON_DATA_FRIENDSHIP);
- if (steps != 0) // subtract needed steps
+ if (steps != 0)
{
steps -= 1;
-
SetMonData(&gPlayerParty[i], MON_DATA_FRIENDSHIP, &steps);
}
else // hatch the egg
@@ -1212,7 +1209,7 @@ bool8 ShouldEggHatch(void)
{
if (GetBoxMonData(&gSaveBlock1Ptr->route5DayCareMon.mon, MON_DATA_SANITY_HAS_SPECIES))
gSaveBlock1Ptr->route5DayCareMon.steps++;
- return _DoEggActions_CheckHatch(&gSaveBlock1Ptr->daycare);
+ return TryProduceOrHatchEgg(&gSaveBlock1Ptr->daycare);
}
static bool8 IsEggPending(struct DayCare *daycare)
@@ -1226,22 +1223,22 @@ static bool8 IsEggPending(struct DayCare *daycare)
static void _GetDaycareMonNicknames(struct DayCare *daycare)
{
u8 text[12];
- if (GetBoxMonData(&daycare->mons[0].mon, MON_DATA_SPECIES) != 0)
+ if (GetBoxMonData(&daycare->mons[0].mon, MON_DATA_SPECIES) != SPECIES_NONE)
{
- GetBoxMonNick(&daycare->mons[0].mon, gStringVar1);
+ DayCare_GetBoxMonNickname(&daycare->mons[0].mon, gStringVar1);
GetBoxMonData(&daycare->mons[0].mon, MON_DATA_OT_NAME, text);
StringCopy(gStringVar3, text);
}
- if (GetBoxMonData(&daycare->mons[1].mon, MON_DATA_SPECIES) != 0)
+ if (GetBoxMonData(&daycare->mons[1].mon, MON_DATA_SPECIES) != SPECIES_NONE)
{
- GetBoxMonNick(&daycare->mons[1].mon, gStringVar2);
+ DayCare_GetBoxMonNickname(&daycare->mons[1].mon, gStringVar2);
}
}
-u16 GetSelectedMonNickAndSpecies(void)
+u16 GetSelectedMonNicknameAndSpecies(void)
{
- GetBoxMonNick(&gPlayerParty[GetCursorSelectionMonId()].box, gStringVar1);
+ DayCare_GetBoxMonNickname(&gPlayerParty[GetCursorSelectionMonId()].box, gStringVar1);
return GetBoxMonData(&gPlayerParty[GetCursorSelectionMonId()].box, MON_DATA_SPECIES);
}
@@ -1252,26 +1249,19 @@ void GetDaycareMonNicknames(void)
u8 GetDaycareState(void)
{
- // The daycare can be in 4 possible states:
- // 0: default state--no deposited mons, no egg
- // 1: there is an egg waiting for the player to pick it up
- // 2: there is a single pokemon in the daycare
- // 3: there are two pokemon in the daycare, no egg
-
u8 numMons;
if (IsEggPending(&gSaveBlock1Ptr->daycare))
{
- // There is an Egg waiting for the player.
- return 1;
+ return DAYCARE_EGG_WAITING;
}
numMons = CountPokemonInDaycare(&gSaveBlock1Ptr->daycare);
if (numMons != 0)
{
- return numMons + 1;
+ return numMons + 1; // DAYCARE_ONE_MON or DAYCARE_TWO_MONS
}
- return 0;
+ return DAYCARE_NO_MONS;
}
u8 GetDaycarePokemonCount(void)
@@ -1283,15 +1273,15 @@ u8 GetDaycarePokemonCount(void)
return 0;
}
+// Determine if the two given egg group lists contain any of the
+// same egg groups.
static bool8 EggGroupsOverlap(u16 *eggGroups1, u16 *eggGroups2)
{
- // Determine if the two given egg group lists contain any of the
- // same egg groups.
s32 i, j;
- for (i = 0; i < 2; i++)
+ for (i = 0; i < EGG_GROUPS_PER_MON; i++)
{
- for (j = 0; j < 2; j++)
+ for (j = 0; j < EGG_GROUPS_PER_MON; j++)
{
if (eggGroups1[i] == eggGroups2[j])
return TRUE;
@@ -1304,12 +1294,12 @@ static bool8 EggGroupsOverlap(u16 *eggGroups1, u16 *eggGroups2)
static u8 GetDaycareCompatibilityScore(struct DayCare *daycare)
{
u32 i;
- u16 eggGroups[2][2];
- u16 species[2];
- u32 trainerIds[2];
- u32 genders[2];
+ u16 eggGroups[DAYCARE_MON_COUNT][EGG_GROUPS_PER_MON];
+ u16 species[DAYCARE_MON_COUNT];
+ u32 trainerIds[DAYCARE_MON_COUNT];
+ u32 genders[DAYCARE_MON_COUNT];
- for (i = 0; i < 2; i++)
+ for (i = 0; i < DAYCARE_MON_COUNT; i++)
{
u32 personality;
@@ -1323,41 +1313,42 @@ static u8 GetDaycareCompatibilityScore(struct DayCare *daycare)
// check unbreedable egg group
if (eggGroups[0][0] == EGG_GROUP_UNDISCOVERED || eggGroups[1][0] == EGG_GROUP_UNDISCOVERED)
- return 0;
+ return PARENTS_INCOMPATIBLE;
// two Ditto can't breed
if (eggGroups[0][0] == EGG_GROUP_DITTO && eggGroups[1][0] == EGG_GROUP_DITTO)
- return 0;
+ return PARENTS_INCOMPATIBLE;
- // now that we checked, one ditto can breed with any other mon
+ // one parent is Ditto
if (eggGroups[0][0] == EGG_GROUP_DITTO || eggGroups[1][0] == EGG_GROUP_DITTO)
{
- if (trainerIds[0] == trainerIds[1]) // same trainer
- return 20;
+ if (trainerIds[0] == trainerIds[1])
+ return PARENTS_LOW_COMPATIBILITY;
- return 50; // different trainers, more chance of poke sex
+ return PARENTS_MED_COMPATABILITY;
}
+ // neither parent is Ditto
else
{
- if (genders[0] == genders[1]) // no homo
- return 0;
+ if (genders[0] == genders[1])
+ return PARENTS_INCOMPATIBLE;
if (genders[0] == MON_GENDERLESS || genders[1] == MON_GENDERLESS)
- return 0;
- if (!EggGroupsOverlap(eggGroups[0], eggGroups[1])) // not compatible with each other
- return 0;
+ return PARENTS_INCOMPATIBLE;
+ if (!EggGroupsOverlap(eggGroups[0], eggGroups[1]))
+ return PARENTS_INCOMPATIBLE;
- if (species[0] == species[1]) // same species
+ if (species[0] == species[1])
{
- if (trainerIds[0] == trainerIds[1]) // same species and trainer
- return 50;
+ if (trainerIds[0] == trainerIds[1])
+ return PARENTS_MED_COMPATABILITY; // same species, same trainer
- return 70; // different trainers, same species
+ return PARENTS_MAX_COMPATABILITY; // same species, different trainers
}
else
{
- if (trainerIds[0] != trainerIds[1]) // different trainers, different species
- return 50;
+ if (trainerIds[0] != trainerIds[1])
+ return PARENTS_MED_COMPATABILITY; // different species, different trainers
- return 20; // different species, same trainer
+ return PARENTS_LOW_COMPATIBILITY; // different species, same trainer
}
}
}
@@ -1374,13 +1365,13 @@ void SetDaycareCompatibilityString(void)
relationshipScore = GetDaycareCompatibilityScoreFromSave();
whichString = 0;
- if (relationshipScore == 0)
+ if (relationshipScore == PARENTS_INCOMPATIBLE)
whichString = 3;
- if (relationshipScore == 20)
+ if (relationshipScore == PARENTS_LOW_COMPATIBILITY)
whichString = 2;
- if (relationshipScore == 50)
+ if (relationshipScore == PARENTS_MED_COMPATABILITY)
whichString = 1;
- if (relationshipScore == 70)
+ if (relationshipScore == PARENTS_MAX_COMPATABILITY)
whichString = 0;
StringCopy(gStringVar4, sCompatibilityMessages[whichString]);
@@ -1389,20 +1380,20 @@ void SetDaycareCompatibilityString(void)
bool8 NameHasGenderSymbol(const u8 *name, u8 genderRatio)
{
u8 i;
- u8 symbolsCount[2]; // male, female
- symbolsCount[0] = symbolsCount[1] = 0;
+ u8 symbolsCount[GENDER_COUNT];
+ symbolsCount[MALE] = symbolsCount[FEMALE] = 0;
for (i = 0; name[i] != EOS; i++)
{
if (name[i] == CHAR_MALE)
- symbolsCount[0]++;
+ symbolsCount[MALE]++;
if (name[i] == CHAR_FEMALE)
- symbolsCount[1]++;
+ symbolsCount[FEMALE]++;
}
- if (genderRatio == MON_MALE && symbolsCount[0] != 0 && symbolsCount[1] == 0)
+ if (genderRatio == MON_MALE && symbolsCount[MALE] != 0 && symbolsCount[FEMALE] == 0)
return TRUE;
- if (genderRatio == MON_FEMALE && symbolsCount[1] != 0 && symbolsCount[0] == 0)
+ if (genderRatio == MON_FEMALE && symbolsCount[FEMALE] != 0 && symbolsCount[MALE] == 0)
return TRUE;
return FALSE;
@@ -1431,13 +1422,13 @@ static u8 *AppendMonGenderSymbol(u8 *name, struct BoxPokemon *boxMon)
static void GetDaycareLevelMenuText(struct DayCare *daycare, u8 *dest)
{
- u8 monNames[2][20];
+ u8 monNames[DAYCARE_MON_COUNT][20];
u8 i;
*dest = EOS;
- for (i = 0; i < 2; i++)
+ for (i = 0; i < DAYCARE_MON_COUNT; i++)
{
- GetBoxMonNick(&daycare->mons[i].mon, monNames[i]);
+ DayCare_GetBoxMonNickname(&daycare->mons[i].mon, monNames[i]);
AppendMonGenderSymbol(monNames[i], &daycare->mons[i].mon);
}
@@ -1455,7 +1446,7 @@ static void GetDaycareLevelMenuLevelText(struct DayCare *daycare, u8 *dest)
u8 text[20];
*dest = EOS;
- for (i = 0; i < 2; i++)
+ for (i = 0; i < DAYCARE_MON_COUNT; i++)
{
StringAppend(dest, gText_Lv);
level = GetLevelAfterDaycareSteps(&daycare->mons[i].mon, daycare->mons[i].steps);
@@ -1487,13 +1478,13 @@ static void DaycareAddTextPrinter(u8 windowId, const u8 *text, u32 x, u32 y)
AddTextPrinter(&printer, 0xFF, NULL);
}
-static void DaycarePrintMonNick(struct DayCare *daycare, u8 windowId, u32 daycareSlotId, u32 y)
+static void DaycarePrintMonNickname(struct DayCare *daycare, u8 windowId, u32 daycareSlotId, u32 y)
{
- u8 nick[POKEMON_NAME_LENGTH * 2];
+ u8 nickname[POKEMON_NAME_LENGTH * 2];
- GetBoxMonNick(&daycare->mons[daycareSlotId].mon, nick);
- AppendMonGenderSymbol(nick, &daycare->mons[daycareSlotId].mon);
- DaycareAddTextPrinter(windowId, nick, 8, y);
+ DayCare_GetBoxMonNickname(&daycare->mons[daycareSlotId].mon, nickname);
+ AppendMonGenderSymbol(nickname, &daycare->mons[daycareSlotId].mon);
+ DaycareAddTextPrinter(windowId, nickname, 8, y);
}
static void DaycarePrintMonLvl(struct DayCare *daycare, u8 windowId, u32 daycareSlotId, u32 y)
@@ -1519,7 +1510,7 @@ static void DaycarePrintMonInfo(u8 windowId, s32 daycareSlotId, u8 y)
{
if (daycareSlotId < (unsigned) DAYCARE_MON_COUNT)
{
- DaycarePrintMonNick(&gSaveBlock1Ptr->daycare, windowId, daycareSlotId, y);
+ DaycarePrintMonNickname(&gSaveBlock1Ptr->daycare, windowId, daycareSlotId, y);
DaycarePrintMonLvl(&gSaveBlock1Ptr->daycare, windowId, daycareSlotId, y);
}
}
@@ -1539,8 +1530,8 @@ static void Task_HandleDaycareLevelMenuInput(u8 taskId)
case 1:
gSpecialVar_Result = input;
break;
- case 5:
- gSpecialVar_Result = 2;
+ case DAYCARE_LEVEL_MENU_EXIT:
+ gSpecialVar_Result = DAYCARE_EXITED_LEVEL_MENU;
break;
}
DestroyListMenuTask(gTasks[taskId].tMenuListTaskId, NULL, NULL);
@@ -1551,7 +1542,7 @@ static void Task_HandleDaycareLevelMenuInput(u8 taskId)
}
else if (gMain.newKeys & B_BUTTON)
{
- gSpecialVar_Result = 2;
+ gSpecialVar_Result = DAYCARE_EXITED_LEVEL_MENU;
DestroyListMenuTask(gTasks[taskId].tMenuListTaskId, NULL, NULL);
ClearStdWindowAndFrame(gTasks[taskId].tWindowId, TRUE);
RemoveWindow(gTasks[taskId].tWindowId);
@@ -1697,7 +1688,7 @@ static void AddHatchedMonToParty(u8 id)
GetSetPokedexFlag(pokeNum, FLAG_SET_SEEN);
GetSetPokedexFlag(pokeNum, FLAG_SET_CAUGHT);
- GetMonNick(mon, gStringVar1);
+ DayCare_GetMonNickname(mon, gStringVar1);
ball = ITEM_POKE_BALL;
SetMonData(mon, MON_DATA_POKEBALL, &ball);
@@ -1722,7 +1713,7 @@ static bool8 sub_8046E34(struct DayCare *daycare, u8 daycareId)
u8 nick[0x20];
struct DaycareMon *daycareMon = &daycare->mons[daycareId];
- GetBoxMonNick(&daycareMon->mon, nick);
+ DayCare_GetBoxMonNickname(&daycareMon->mon, nick);
if (daycareMon->mail.message.itemId != 0
&& (StringCompare(nick, daycareMon->mail.monName) != 0
|| StringCompare(gSaveBlock2Ptr->playerName, daycareMon->mail.OT_name) != 0))
@@ -1963,7 +1954,7 @@ static void CB2_EggHatch_1(void)
}
break;
case 5:
- GetMonNick(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar1);
+ DayCare_GetMonNickname(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar1);
StringExpandPlaceholders(gStringVar4, gText_HatchedFromEgg);
EggHatchPrintMessage(sEggHatchData->windowId, gStringVar4, 0, 3, 0xFF);
PlayFanfare(MUS_FANFA5);
@@ -1980,7 +1971,7 @@ static void CB2_EggHatch_1(void)
sEggHatchData->CB2_state++;
break;
case 8:
- GetMonNick(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar1);
+ DayCare_GetMonNickname(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar1);
StringExpandPlaceholders(gStringVar4, gText_NickHatchPrompt);
EggHatchPrintMessage(sEggHatchData->windowId, gStringVar4, 0, 2, 1);
sEggHatchData->CB2_state++;
@@ -1997,7 +1988,7 @@ static void CB2_EggHatch_1(void)
switch (Menu_ProcessInputNoWrapClearOnChoose())
{
case 0:
- GetMonNick(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar3);
+ DayCare_GetMonNickname(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar3);
species = GetMonData(&gPlayerParty[sEggHatchData->eggPartyID], MON_DATA_SPECIES);
gender = GetMonGender(&gPlayerParty[sEggHatchData->eggPartyID]);
personality = GetMonData(&gPlayerParty[sEggHatchData->eggPartyID], MON_DATA_PERSONALITY, 0);
diff --git a/src/script_menu.c b/src/script_menu.c
index 42be3b539..72ff1dc9e 100644
--- a/src/script_menu.c
+++ b/src/script_menu.c
@@ -565,36 +565,37 @@ const struct MultichoiceListStruct gScriptMultiChoiceMenus[] = {
{ sScriptMultiChoiceMenu_TrainerTowerMode, NELEMS(sScriptMultiChoiceMenu_TrainerTowerMode) }
};
+// From Cool to Berries goes unused
const u8 *const gStdStringPtrs[] = {
- gText_Cool,
- gText_Beauty,
- gText_Cute,
- gText_Smart,
- gText_Tough,
- gText_Cool_2,
- gText_Beauty_2,
- gText_Cute_2,
- gText_Smart_2,
- gText_Tough_2,
- gText_Items,
- gText_KeyItems,
- gText_PokeBalls,
- gText_TMsAndHMs,
- gText_Berries,
- gText_Boulderbadge,
- gText_Cascadebadge,
- gText_Thunderbadge,
- gText_Rainbowbadge,
- gText_Soulbadge,
- gText_Marshbadge,
- gText_Volcanobadge,
- gText_Earthbadge,
- gText_Coins_2,
- gText_ItemsPocket,
- gText_KeyItemsPocket,
- gText_PokeBallsPocket,
- gText_TmCase,
- gText_BerryPouch_2
+ [STDSTRING_COOL] = gText_Cool,
+ [STDSTRING_BEAUTY] = gText_Beauty,
+ [STDSTRING_CUTE] = gText_Cute,
+ [STDSTRING_SMART] = gText_Smart,
+ [STDSTRING_TOUGH] = gText_Tough,
+ [STDSTRING_COOL2] = gText_Cool_2,
+ [STDSTRING_BEAUTY2] = gText_Beauty_2,
+ [STDSTRING_CUTE2] = gText_Cute_2,
+ [STDSTRING_SMART2] = gText_Smart_2,
+ [STDSTRING_TOUGH2] = gText_Tough_2,
+ [STDSTRING_ITEMS] = gText_Items,
+ [STDSTRING_KEY_ITEMS] = gText_KeyItems,
+ [STDSTRING_POKEBALLS] = gText_PokeBalls,
+ [STDSTRING_TMHMS] = gText_TMsAndHMs,
+ [STDSTRING_BERRIES] = gText_Berries,
+ [STDSTRING_BOULDER_BADGE] = gText_Boulderbadge,
+ [STDSTRING_CASCADE_BADGE] = gText_Cascadebadge,
+ [STDSTRING_THUNDER_BADGE] = gText_Thunderbadge,
+ [STDSTRING_RAINBOW_BADGE] = gText_Rainbowbadge,
+ [STDSTRING_SOUL_BADGE] = gText_Soulbadge,
+ [STDSTRING_MARSH_BADGE] = gText_Marshbadge,
+ [STDSTRING_VOLCANO_BADGE] = gText_Volcanobadge,
+ [STDSTRING_EARTH_BADGE] = gText_Earthbadge,
+ [STDSTRING_COINS] = gText_Coins_2,
+ [STDSTRING_ITEMS_POCKET] = gText_ItemsPocket,
+ [STDSTRING_KEY_ITEMS_POCKET] = gText_KeyItemsPocket,
+ [STDSTRING_POKEBALLS_POCKET] = gText_PokeBallsPocket,
+ [STDSTRING_TM_CASE] = gText_TmCase,
+ [STDSTRING_BERRY_POUCH] = gText_BerryPouch_2
};
static const u8 *const sDescriptionPtrs_CableClub_TradeBattleCancel[] = {
diff --git a/src/trade_scene.c b/src/trade_scene.c
index 9e3c1d0ce..b420cb196 100644
--- a/src/trade_scene.c
+++ b/src/trade_scene.c
@@ -2443,7 +2443,7 @@ static void CreateInGameTradePokemonInternal(u8 playerSlot, u8 inGameTradeIdx)
const struct InGameTrade * inGameTrade = &sInGameTrades[inGameTradeIdx];
u8 level = GetMonData(&gPlayerParty[playerSlot], MON_DATA_LEVEL);
struct MailStruct mail;
- u8 metLocation = MAPSEC_IN_GAME_TRADE;
+ u8 metLocation = METLOC_IN_GAME_TRADE;
struct Pokemon * tradeMon = &gEnemyParty[0];
u8 mailNum;
CreateMon(tradeMon, inGameTrade->species, level, 32, TRUE, inGameTrade->personality, TRUE, inGameTrade->otId);