ref: c2a7216d9b8689591ede817015bf96f263396bb8
parent: 0b8b6f9259bedacad55bb4667de5b2bbe6eafda7
parent: c6b12b07b302b82765181b2521e1e0f2ca5f7725
author: yenatch <yenatch@gmail.com>
date: Sun Dec 24 15:29:55 EST 2017
Merge pull request #424 from roukaour/master Rename a routine and some maps; remove all code from main.asm
--- a/FAQ.md
+++ b/FAQ.md
@@ -8,6 +8,7 @@
- [Can't build ROM; "Segmentation fault" from `rgbgfx`](#cant-build-rom-segmentation-fault-from-rgbgfx)
- [Can't build ROM; "Section is too big" or "Unable to place section in bank"](#cant-build-rom-section-is-too-big-or-unable-to-place-section-in-bank)
- [How do I edit maps?](#how-do-i-edit-maps)
+- [How do I write new features?](#how-do-i-write-new-features)
- [I need more help!](#i-need-more-help)
@@ -36,6 +37,11 @@
## How do I edit maps?
For `asm` scripts, read [docs/map_scripts.md](docs/map_scripts.md). For `blk` layouts, try [crowdmap](crowdmap) or [Polished Map](polished-map).
+
+
+## How do I write new features?
+
+There are a number of special-purpose scripting languages used for different purposes, as described in [docs](docs/). For more general features, you'll need to code directly in assembly language. See [docs/assembly_programming.md](docs/assembly_programming.md).
## I need more help!
--- a/audio/cries.asm
+++ b/audio/cries.asm
@@ -1166,7 +1166,7 @@
musicheader 1, 8, Cry_Weepinbell_Ch8
; f35d3
-Unknown_Cry_Ch5: ; f35d3
+Unused_Cry_Ch5: ; f35d3
sound_duty 0, 0, 3, 3
sound __, 16, $e0, $0780
sound __, 16, $f0, $0784
@@ -1177,7 +1177,7 @@
endchannel
; f35ee
-Unknown_Cry_Ch6: ; f35ee
+Unused_Cry_Ch6: ; f35ee
sound_duty 1, 1, 0, 0
sound __, 16, $a0, $0741
sound __, 16, $b0, $0743
@@ -1188,7 +1188,7 @@
endchannel
; f3609
-Unknown_Cry_Ch8: ; f3609
+Unused_Cry_Ch8: ; f3609
noise __, 3, $f2, $4c
noise __, 7, $e0, $3a
noise __, 16, $d0, $3a
--- a/audio/sfx.asm
+++ b/audio/sfx.asm
@@ -968,14 +968,14 @@
musicheader 1, 8, Sfx_Fanfare2_Ch8
; f0d5f
-UnknownSfx: ; f0d5f
- musicheader 4, 5, UnknownSfx_Ch5
- musicheader 1, 6, UnknownSfx_Ch6
- musicheader 1, 7, UnknownSfx_Ch7
- musicheader 1, 8, UnknownSfx_Ch8
+UnusedSfx: ; f0d5f
+ musicheader 4, 5, UnusedSfx_Ch5
+ musicheader 1, 6, UnusedSfx_Ch6
+ musicheader 1, 7, UnusedSfx_Ch7
+ musicheader 1, 8, UnusedSfx_Ch8
; f0d6b
-UnknownSfx_Ch5: ; f0d6b
+UnusedSfx_Ch5: ; f0d6b
togglesfx
tempo 124
volume $77
@@ -1000,7 +1000,7 @@
endchannel
; f0d8a
-UnknownSfx_Ch6: ; f0d8a
+UnusedSfx_Ch6: ; f0d8a
togglesfx
vibrato $8, $27
dutycycle $2
@@ -1025,7 +1025,7 @@
endchannel
; f0da6
-UnknownSfx_Ch7: ; f0da6
+UnusedSfx_Ch7: ; f0da6
togglesfx
notetype $c, $25
octave 4
@@ -1041,7 +1041,7 @@
endchannel
; f0db6
-UnknownSfx_Ch8: ; f0db6
+UnusedSfx_Ch8: ; f0db6
togglesfx
sfxtogglenoise $4
notetype $c
--- a/battle/core.asm
+++ b/battle/core.asm
@@ -2573,11 +2573,11 @@
.CheckMaxedOutMomMoney: ; 3d0b1
ld hl, wMomsMoney + 2
ld a, [hld]
- cp 999999 % $100
+ cp MAX_MONEY % $100
ld a, [hld]
- sbc 999999 / $100 % $100
+ sbc MAX_MONEY / $100 % $100
ld a, [hl]
- sbc 999999 / $10000 % $100
+ sbc MAX_MONEY / $10000 % $100
ret
; 3d0be
@@ -2602,17 +2602,17 @@
jr nz, .loop
pop hl
ld a, [hld]
- cp 999999 % $100
+ cp MAX_MONEY % $100
ld a, [hld]
- sbc 999999 / $100 % $100
+ sbc MAX_MONEY / $100 % $100
ld a, [hl]
- sbc 999999 / $10000 % $100
+ sbc MAX_MONEY / $10000 % $100
ret c
- ld [hl], 999999 / $10000 % $100
+ ld [hl], MAX_MONEY / $10000 % $100
inc hl
- ld [hl], 999999 / $100 % $100
+ ld [hl], MAX_MONEY / $100 % $100
inc hl
- ld [hl], 999999 % $100
+ ld [hl], MAX_MONEY % $100
ret
; 3d0ea
@@ -7009,14 +7009,14 @@
; Cap at 999.
ld a, [hQuotient + 2]
- sub 999 % $100
+ sub MAX_STAT_VALUE % $100
ld a, [hQuotient + 1]
- sbc 999 / $100
+ sbc MAX_STAT_VALUE / $100
jp c, .okay3
- ld a, 999 / $100
+ ld a, MAX_STAT_VALUE / $100
ld [hQuotient + 1], a
- ld a, 999 % $100
+ ld a, MAX_STAT_VALUE % $100
ld [hQuotient + 2], a
.okay3
@@ -7132,13 +7132,13 @@
; Cap at 999.
ld a, [hld]
- sub 999 % $100
+ sub MAX_STAT_VALUE % $100
ld a, [hl]
- sbc 999 / $100
+ sbc MAX_STAT_VALUE / $100
ret c
- ld a, 999 / $100
+ ld a, MAX_STAT_VALUE / $100
ld [hli], a
- ld a, 999 % $100
+ ld a, MAX_STAT_VALUE % $100
ld [hld], a
ret
; 3ed9f
@@ -9135,10 +9135,10 @@
dec hl
ld a, [hl]
inc hl
- cp 9999 / $100
+ cp MAX_LINK_RECORD / $100
ret c
ld a, [hl]
- cp 9999 % $100
+ cp MAX_LINK_RECORD % $100
ret
; 3fac8
--- a/battle/effect_commands.asm
+++ b/battle/effect_commands.asm
@@ -5651,10 +5651,10 @@
.no_carry
pop bc
ld a, [hld]
- sub 999 % $100
+ sub MAX_STAT_VALUE % $100
jr nz, .not_already_max
ld a, [hl]
- sbc 999 / $100
+ sbc MAX_STAT_VALUE / $100
jp z, .stats_already_max
.not_already_max
ld a, [hBattleTurn]
@@ -6417,14 +6417,14 @@
.check_maxed_out
ld a, [hQuotient + 2]
- cp 999 % $100
+ cp MAX_STAT_VALUE % $100
ld a, b
- sbc 999 / $100
+ sbc MAX_STAT_VALUE / $100
jr c, .not_maxed_out
- ld a, 999 % $100
+ ld a, MAX_STAT_VALUE % $100
ld [hQuotient + 2], a
- ld a, 999 / $100
+ ld a, MAX_STAT_VALUE / $100
ld [hQuotient + 1], a
.not_maxed_out
--- a/battle/moves/move_descriptions.asm
+++ b/battle/moves/move_descriptions.asm
@@ -263,7 +263,6 @@
MoveFEDescription:
MoveFFDescription:
Move00Description:
-UnknownMoveDescription:
db "?@"
PoundDescription:
--- a/constants/battle_constants.asm
+++ b/constants/battle_constants.asm
@@ -54,6 +54,8 @@
STAT_MIN_NORMAL EQU 5
STAT_MIN_HP EQU 10
+MAX_STAT_VALUE EQU 999
+
; shiny dvs
ATKDEFDV_SHINY EQU $EA
SPDSPCDV_SHINY EQU $AA
--- a/constants/event_flags.asm
+++ b/constants/event_flags.asm
@@ -145,11 +145,11 @@
const EVENT_ILEX_FOREST_HIDDEN_ETHER
const EVENT_ILEX_FOREST_HIDDEN_SUPER_POTION
const EVENT_ILEX_FOREST_HIDDEN_FULL_HEAL
- const EVENT_WAREHOUSE_ENTRANCE_HIDDEN_PARLYZ_HEAL
- const EVENT_WAREHOUSE_ENTRANCE_HIDDEN_SUPER_POTION
- const EVENT_WAREHOUSE_ENTRANCE_HIDDEN_ANTIDOTE
- const EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_HIDDEN_MAX_POTION
- const EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_HIDDEN_REVIVE
+ const EVENT_GOLDENROD_UNDERGROUND_HIDDEN_PARLYZ_HEAL
+ const EVENT_GOLDENROD_UNDERGROUND_HIDDEN_SUPER_POTION
+ const EVENT_GOLDENROD_UNDERGROUND_HIDDEN_ANTIDOTE
+ const EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_HIDDEN_MAX_POTION
+ const EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_HIDDEN_REVIVE
const EVENT_MOUNT_MORTAR_1F_OUTSIDE_HIDDEN_HYPER_POTION
const EVENT_MOUNT_MORTAR_1F_INSIDE_HIDDEN_MAX_REPEL
const EVENT_MOUNT_MORTAR_2F_INSIDE_HIDDEN_FULL_RESTORE
@@ -238,8 +238,8 @@
const EVENT_GOT_TM29_PSYCHIC
; Kanto hidden items
const EVENT_DIGLETTS_CAVE_HIDDEN_MAX_REVIVE
- const EVENT_UNDERGROUND_HIDDEN_FULL_RESTORE
- const EVENT_UNDERGROUND_HIDDEN_X_SPECIAL
+ const EVENT_UNDERGROUND_PATH_HIDDEN_FULL_RESTORE
+ const EVENT_UNDERGROUND_PATH_HIDDEN_X_SPECIAL
const EVENT_ROCK_TUNNEL_1F_HIDDEN_X_ACCURACY
const EVENT_ROCK_TUNNEL_1F_HIDDEN_X_DEFEND
const EVENT_ROCK_TUNNEL_B1F_HIDDEN_MAX_POTION
@@ -787,10 +787,10 @@
const EVENT_LEARNED_SLOWPOKETAIL
const EVENT_LEARNED_RATICATE_TAIL
const EVENT_OPENED_DOOR_TO_GIOVANNIS_OFFICE
- const EVENT_WAREHOUSE_LAYOUT_1
- const EVENT_WAREHOUSE_LAYOUT_2
- const EVENT_WAREHOUSE_LAYOUT_3
- const EVENT_WAREHOUSE_BLOCKED_OFF
+ const EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1
+ const EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2
+ const EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3
+ const EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_BLOCKED_OFF
const EVENT_LEFT_MONS_WITH_CONTEST_OFFICER
const EVENT_WILLS_ROOM_ENTRANCE_CLOSED
const EVENT_WILLS_ROOM_EXIT_OPEN
@@ -1691,7 +1691,7 @@
const EVENT_TIN_TOWER_8F_MAX_ELIXER
const EVENT_TIN_TOWER_8F_FULL_RESTORE
const EVENT_TEAM_ROCKET_BASE_B3F_ULTRA_BALL
- const EVENT_UNDERGROUND_WAREHOUSE_ULTRA_BALL
+ const EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_ULTRA_BALL
const EVENT_BURNED_TOWER_1F_HP_UP
const EVENT_BURNED_TOWER_B1F_TM_ENDURE
const EVENT_NATIONAL_PARK_PARLYZ_HEAL
@@ -1720,15 +1720,15 @@
const EVENT_TEAM_ROCKET_BASE_B3F_FULL_HEAL
const EVENT_TEAM_ROCKET_BASE_B3F_ICE_HEAL
const EVENT_ILEX_FOREST_REVIVE
- const EVENT_WAREHOUSE_ENTRANCE_COIN_CASE
- const EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_SMOKE_BALL
- const EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_FULL_HEAL
+ const EVENT_GOLDENROD_UNDERGROUND_COIN_CASE
+ const EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_SMOKE_BALL
+ const EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_FULL_HEAL
const EVENT_GOLDENROD_DEPT_STORE_B1F_ETHER
const EVENT_GOLDENROD_DEPT_STORE_B1F_AMULET_COIN
const EVENT_GOLDENROD_DEPT_STORE_B1F_BURN_HEAL
const EVENT_GOLDENROD_DEPT_STORE_B1F_ULTRA_BALL
- const EVENT_UNDERGROUND_WAREHOUSE_MAX_ETHER
- const EVENT_UNDERGROUND_WAREHOUSE_TM_SLEEP_TALK
+ const EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_MAX_ETHER
+ const EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_TM_SLEEP_TALK
const EVENT_MOUNT_MORTAR_1F_OUTSIDE_ETHER
const EVENT_MOUNT_MORTAR_1F_OUTSIDE_REVIVE
const EVENT_MOUNT_MORTAR_1F_INSIDE_ESCAPE_ROPE
@@ -1800,7 +1800,7 @@
const EVENT_RIVAL_CHERRYGROVE_CITY
const EVENT_RIVAL_AZALEA_TOWN
const EVENT_RIVAL_TEAM_ROCKET_BASE
- const EVENT_RIVAL_UNDERGROUND_PATH
+ const EVENT_RIVAL_GOLDENROD_UNDERGROUND
const EVENT_RIVAL_VICTORY_ROAD
const EVENT_RIVAL_OLIVINE_CITY
const EVENT_RIVAL_SPROUT_TOWER
@@ -1945,10 +1945,10 @@
const EVENT_OPENED_MT_SILVER
const EVENT_FOUGHT_SNORLAX ; 750
const EVENT_LAKE_OF_RAGE_RED_GYARADOS
- const EVENT_WAREHOUSE_ENTRANCE_GRANNY
- const EVENT_WAREHOUSE_ENTRANCE_GRAMPS
- const EVENT_WAREHOUSE_ENTRANCE_OLDER_HAIRCUT_BROTHER
- const EVENT_WAREHOUSE_ENTRANCE_YOUNGER_HAIRCUT_BROTHER
+ const EVENT_GOLDENROD_UNDERGROUND_GRANNY
+ const EVENT_GOLDENROD_UNDERGROUND_GRAMPS
+ const EVENT_GOLDENROD_UNDERGROUND_OLDER_HAIRCUT_BROTHER
+ const EVENT_GOLDENROD_UNDERGROUND_YOUNGER_HAIRCUT_BROTHER
const EVENT_MAHOGANY_TOWN_POKEFAN_M_BLOCKS_EAST
const EVENT_MAHOGANY_TOWN_POKEFAN_M_BLOCKS_GYM
const EVENT_ROUTE_32_FRIEDA_OF_FRIDAY
--- a/constants/landmark_constants.asm
+++ b/constants/landmark_constants.asm
@@ -63,7 +63,7 @@
const ROUTE_24 ; 38
const ROUTE_25 ; 39
const ROUTE_5 ; 3a
- const UNDERGROUND ; 3b
+ const UNDERGROUND_PATH ; 3b
const ROUTE_6 ; 3c
const VERMILION_CITY ; 3d
const DIGLETTS_CAVE ; 3e
--- a/constants/map_dimension_constants.asm
+++ b/constants/map_dimension_constants.asm
@@ -23,466 +23,466 @@
newgroup ; 1
- mapgroup OLIVINE_POKECENTER_1F, 4, 5 ; 1
- mapgroup OLIVINE_GYM, 8, 5 ; 2
- mapgroup OLIVINE_TIMS_HOUSE, 4, 4 ; 3
- mapgroup OLIVINE_HOUSE_BETA, 4, 4 ; 4
- mapgroup OLIVINE_PUNISHMENT_SPEECH_HOUSE, 4, 4 ; 5
- mapgroup OLIVINE_GOOD_ROD_HOUSE, 4, 4 ; 6
- mapgroup OLIVINE_CAFE, 4, 4 ; 7
- mapgroup OLIVINE_MART, 4, 6 ; 8
- mapgroup ROUTE_38_ECRUTEAK_GATE, 4, 5 ; 9
- mapgroup ROUTE_39_BARN, 4, 4 ; 10
- mapgroup ROUTE_39_FARMHOUSE, 4, 4 ; 11
- mapgroup ROUTE_38, 9, 20 ; 12
- mapgroup ROUTE_39, 18, 10 ; 13
- mapgroup OLIVINE_CITY, 18, 20 ; 14
+ mapgroup OLIVINE_POKECENTER_1F, 4, 5 ; 1
+ mapgroup OLIVINE_GYM, 8, 5 ; 2
+ mapgroup OLIVINE_TIMS_HOUSE, 4, 4 ; 3
+ mapgroup OLIVINE_HOUSE_BETA, 4, 4 ; 4
+ mapgroup OLIVINE_PUNISHMENT_SPEECH_HOUSE, 4, 4 ; 5
+ mapgroup OLIVINE_GOOD_ROD_HOUSE, 4, 4 ; 6
+ mapgroup OLIVINE_CAFE, 4, 4 ; 7
+ mapgroup OLIVINE_MART, 4, 6 ; 8
+ mapgroup ROUTE_38_ECRUTEAK_GATE, 4, 5 ; 9
+ mapgroup ROUTE_39_BARN, 4, 4 ; 10
+ mapgroup ROUTE_39_FARMHOUSE, 4, 4 ; 11
+ mapgroup ROUTE_38, 9, 20 ; 12
+ mapgroup ROUTE_39, 18, 10 ; 13
+ mapgroup OLIVINE_CITY, 18, 20 ; 14
newgroup ; 2
- mapgroup MAHOGANY_RED_GYARADOS_SPEECH_HOUSE, 4, 4 ; 1
- mapgroup MAHOGANY_GYM, 9, 5 ; 2
- mapgroup MAHOGANY_POKECENTER_1F, 4, 5 ; 3
- mapgroup ROUTE_42_ECRUTEAK_GATE, 4, 5 ; 4
- mapgroup ROUTE_42, 9, 30 ; 5
- mapgroup ROUTE_44, 9, 30 ; 6
- mapgroup MAHOGANY_TOWN, 9, 10 ; 7
+ mapgroup MAHOGANY_RED_GYARADOS_SPEECH_HOUSE, 4, 4 ; 1
+ mapgroup MAHOGANY_GYM, 9, 5 ; 2
+ mapgroup MAHOGANY_POKECENTER_1F, 4, 5 ; 3
+ mapgroup ROUTE_42_ECRUTEAK_GATE, 4, 5 ; 4
+ mapgroup ROUTE_42, 9, 30 ; 5
+ mapgroup ROUTE_44, 9, 30 ; 6
+ mapgroup MAHOGANY_TOWN, 9, 10 ; 7
newgroup ; 3
- mapgroup SPROUT_TOWER_1F, 8, 10 ; 1
- mapgroup SPROUT_TOWER_2F, 8, 10 ; 2
- mapgroup SPROUT_TOWER_3F, 8, 10 ; 3
- mapgroup TIN_TOWER_1F, 9, 10 ; 4
- mapgroup TIN_TOWER_2F, 9, 10 ; 5
- mapgroup TIN_TOWER_3F, 9, 10 ; 6
- mapgroup TIN_TOWER_4F, 9, 10 ; 7
- mapgroup TIN_TOWER_5F, 9, 10 ; 8
- mapgroup TIN_TOWER_6F, 9, 10 ; 9
- mapgroup TIN_TOWER_7F, 9, 10 ; 10
- mapgroup TIN_TOWER_8F, 9, 10 ; 11
- mapgroup TIN_TOWER_9F, 9, 10 ; 12
- mapgroup BURNED_TOWER_1F, 9, 10 ; 13
- mapgroup BURNED_TOWER_B1F, 9, 10 ; 14
- mapgroup NATIONAL_PARK, 27, 20 ; 15
- mapgroup NATIONAL_PARK_BUG_CONTEST, 27, 20 ; 16
- mapgroup RADIO_TOWER_1F, 4, 9 ; 17
- mapgroup RADIO_TOWER_2F, 4, 9 ; 18
- mapgroup RADIO_TOWER_3F, 4, 9 ; 19
- mapgroup RADIO_TOWER_4F, 4, 9 ; 20
- mapgroup RADIO_TOWER_5F, 4, 9 ; 21
- mapgroup RUINS_OF_ALPH_OUTSIDE, 18, 10 ; 22
- mapgroup RUINS_OF_ALPH_HO_OH_CHAMBER, 5, 4 ; 23
- mapgroup RUINS_OF_ALPH_KABUTO_CHAMBER, 5, 4 ; 24
- mapgroup RUINS_OF_ALPH_OMANYTE_CHAMBER, 5, 4 ; 25
- mapgroup RUINS_OF_ALPH_AERODACTYL_CHAMBER, 5, 4 ; 26
- mapgroup RUINS_OF_ALPH_INNER_CHAMBER, 14, 10 ; 27
- mapgroup RUINS_OF_ALPH_RESEARCH_CENTER, 4, 4 ; 28
- mapgroup RUINS_OF_ALPH_HO_OH_ITEM_ROOM, 5, 4 ; 29
- mapgroup RUINS_OF_ALPH_KABUTO_ITEM_ROOM, 5, 4 ; 30
- mapgroup RUINS_OF_ALPH_OMANYTE_ITEM_ROOM, 5, 4 ; 31
- mapgroup RUINS_OF_ALPH_AERODACTYL_ITEM_ROOM, 5, 4 ; 32
- mapgroup RUINS_OF_ALPH_HO_OH_WORD_ROOM, 12, 10 ; 33
- mapgroup RUINS_OF_ALPH_KABUTO_WORD_ROOM, 7, 10 ; 34
- mapgroup RUINS_OF_ALPH_OMANYTE_WORD_ROOM, 8, 10 ; 35
- mapgroup RUINS_OF_ALPH_AERODACTYL_WORD_ROOM, 7, 10 ; 36
- mapgroup UNION_CAVE_1F, 18, 10 ; 37
- mapgroup UNION_CAVE_B1F, 18, 10 ; 38
- mapgroup UNION_CAVE_B2F, 18, 10 ; 39
- mapgroup SLOWPOKE_WELL_B1F, 9, 10 ; 40
- mapgroup SLOWPOKE_WELL_B2F, 9, 10 ; 41
- mapgroup OLIVINE_LIGHTHOUSE_1F, 9, 10 ; 42
- mapgroup OLIVINE_LIGHTHOUSE_2F, 9, 10 ; 43
- mapgroup OLIVINE_LIGHTHOUSE_3F, 9, 10 ; 44
- mapgroup OLIVINE_LIGHTHOUSE_4F, 9, 10 ; 45
- mapgroup OLIVINE_LIGHTHOUSE_5F, 9, 10 ; 46
- mapgroup OLIVINE_LIGHTHOUSE_6F, 9, 10 ; 47
- mapgroup MAHOGANY_MART_1F, 4, 4 ; 48
- mapgroup TEAM_ROCKET_BASE_B1F, 9, 15 ; 49
- mapgroup TEAM_ROCKET_BASE_B2F, 9, 15 ; 50
- mapgroup TEAM_ROCKET_BASE_B3F, 9, 15 ; 51
- mapgroup ILEX_FOREST, 27, 15 ; 52
- mapgroup WAREHOUSE_ENTRANCE, 18, 15 ; 53
- mapgroup UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES, 18, 15 ; 54
- mapgroup GOLDENROD_DEPT_STORE_B1F, 9, 10 ; 55
- mapgroup UNDERGROUND_WAREHOUSE, 9, 10 ; 56
- mapgroup MOUNT_MORTAR_1F_OUTSIDE, 18, 20 ; 57
- mapgroup MOUNT_MORTAR_1F_INSIDE, 27, 20 ; 58
- mapgroup MOUNT_MORTAR_2F_INSIDE, 18, 20 ; 59
- mapgroup MOUNT_MORTAR_B1F, 18, 20 ; 60
- mapgroup ICE_PATH_1F, 18, 20 ; 61
- mapgroup ICE_PATH_B1F, 18, 10 ; 62
- mapgroup ICE_PATH_B2F_MAHOGANY_SIDE, 9, 10 ; 63
- mapgroup ICE_PATH_B2F_BLACKTHORN_SIDE, 9, 5 ; 64
- mapgroup ICE_PATH_B3F, 9, 10 ; 65
- mapgroup WHIRL_ISLAND_NW, 9, 5 ; 66
- mapgroup WHIRL_ISLAND_NE, 9, 10 ; 67
- mapgroup WHIRL_ISLAND_SW, 9, 10 ; 68
- mapgroup WHIRL_ISLAND_CAVE, 9, 5 ; 69
- mapgroup WHIRL_ISLAND_SE, 9, 5 ; 70
- mapgroup WHIRL_ISLAND_B1F, 18, 20 ; 71
- mapgroup WHIRL_ISLAND_B2F, 18, 10 ; 72
- mapgroup WHIRL_ISLAND_LUGIA_CHAMBER, 9, 10 ; 73
- mapgroup SILVER_CAVE_ROOM_1, 18, 10 ; 74
- mapgroup SILVER_CAVE_ROOM_2, 18, 15 ; 75
- mapgroup SILVER_CAVE_ROOM_3, 18, 10 ; 76
- mapgroup SILVER_CAVE_ITEM_ROOMS, 9, 10 ; 77
- mapgroup DARK_CAVE_VIOLET_ENTRANCE, 18, 20 ; 78
- mapgroup DARK_CAVE_BLACKTHORN_ENTRANCE, 18, 15 ; 79
- mapgroup DRAGONS_DEN_1F, 9, 5 ; 80
- mapgroup DRAGONS_DEN_B1F, 18, 20 ; 81
- mapgroup DRAGON_SHRINE, 5, 5 ; 82
- mapgroup TOHJO_FALLS, 9, 15 ; 83
- mapgroup DIGLETTS_CAVE, 18, 10 ; 84
- mapgroup MOUNT_MOON, 9, 15 ; 85
- mapgroup UNDERGROUND, 14, 3 ; 86
- mapgroup ROCK_TUNNEL_1F, 18, 15 ; 87
- mapgroup ROCK_TUNNEL_B1F, 18, 15 ; 88
- mapgroup SAFARI_ZONE_FUCHSIA_GATE_BETA, 4, 5 ; 89
- mapgroup SAFARI_ZONE_BETA, 18, 10 ; 90
- mapgroup VICTORY_ROAD, 36, 10 ; 91
+ mapgroup SPROUT_TOWER_1F, 8, 10 ; 1
+ mapgroup SPROUT_TOWER_2F, 8, 10 ; 2
+ mapgroup SPROUT_TOWER_3F, 8, 10 ; 3
+ mapgroup TIN_TOWER_1F, 9, 10 ; 4
+ mapgroup TIN_TOWER_2F, 9, 10 ; 5
+ mapgroup TIN_TOWER_3F, 9, 10 ; 6
+ mapgroup TIN_TOWER_4F, 9, 10 ; 7
+ mapgroup TIN_TOWER_5F, 9, 10 ; 8
+ mapgroup TIN_TOWER_6F, 9, 10 ; 9
+ mapgroup TIN_TOWER_7F, 9, 10 ; 10
+ mapgroup TIN_TOWER_8F, 9, 10 ; 11
+ mapgroup TIN_TOWER_9F, 9, 10 ; 12
+ mapgroup BURNED_TOWER_1F, 9, 10 ; 13
+ mapgroup BURNED_TOWER_B1F, 9, 10 ; 14
+ mapgroup NATIONAL_PARK, 27, 20 ; 15
+ mapgroup NATIONAL_PARK_BUG_CONTEST, 27, 20 ; 16
+ mapgroup RADIO_TOWER_1F, 4, 9 ; 17
+ mapgroup RADIO_TOWER_2F, 4, 9 ; 18
+ mapgroup RADIO_TOWER_3F, 4, 9 ; 19
+ mapgroup RADIO_TOWER_4F, 4, 9 ; 20
+ mapgroup RADIO_TOWER_5F, 4, 9 ; 21
+ mapgroup RUINS_OF_ALPH_OUTSIDE, 18, 10 ; 22
+ mapgroup RUINS_OF_ALPH_HO_OH_CHAMBER, 5, 4 ; 23
+ mapgroup RUINS_OF_ALPH_KABUTO_CHAMBER, 5, 4 ; 24
+ mapgroup RUINS_OF_ALPH_OMANYTE_CHAMBER, 5, 4 ; 25
+ mapgroup RUINS_OF_ALPH_AERODACTYL_CHAMBER, 5, 4 ; 26
+ mapgroup RUINS_OF_ALPH_INNER_CHAMBER, 14, 10 ; 27
+ mapgroup RUINS_OF_ALPH_RESEARCH_CENTER, 4, 4 ; 28
+ mapgroup RUINS_OF_ALPH_HO_OH_ITEM_ROOM, 5, 4 ; 29
+ mapgroup RUINS_OF_ALPH_KABUTO_ITEM_ROOM, 5, 4 ; 30
+ mapgroup RUINS_OF_ALPH_OMANYTE_ITEM_ROOM, 5, 4 ; 31
+ mapgroup RUINS_OF_ALPH_AERODACTYL_ITEM_ROOM, 5, 4 ; 32
+ mapgroup RUINS_OF_ALPH_HO_OH_WORD_ROOM, 12, 10 ; 33
+ mapgroup RUINS_OF_ALPH_KABUTO_WORD_ROOM, 7, 10 ; 34
+ mapgroup RUINS_OF_ALPH_OMANYTE_WORD_ROOM, 8, 10 ; 35
+ mapgroup RUINS_OF_ALPH_AERODACTYL_WORD_ROOM, 7, 10 ; 36
+ mapgroup UNION_CAVE_1F, 18, 10 ; 37
+ mapgroup UNION_CAVE_B1F, 18, 10 ; 38
+ mapgroup UNION_CAVE_B2F, 18, 10 ; 39
+ mapgroup SLOWPOKE_WELL_B1F, 9, 10 ; 40
+ mapgroup SLOWPOKE_WELL_B2F, 9, 10 ; 41
+ mapgroup OLIVINE_LIGHTHOUSE_1F, 9, 10 ; 42
+ mapgroup OLIVINE_LIGHTHOUSE_2F, 9, 10 ; 43
+ mapgroup OLIVINE_LIGHTHOUSE_3F, 9, 10 ; 44
+ mapgroup OLIVINE_LIGHTHOUSE_4F, 9, 10 ; 45
+ mapgroup OLIVINE_LIGHTHOUSE_5F, 9, 10 ; 46
+ mapgroup OLIVINE_LIGHTHOUSE_6F, 9, 10 ; 47
+ mapgroup MAHOGANY_MART_1F, 4, 4 ; 48
+ mapgroup TEAM_ROCKET_BASE_B1F, 9, 15 ; 49
+ mapgroup TEAM_ROCKET_BASE_B2F, 9, 15 ; 50
+ mapgroup TEAM_ROCKET_BASE_B3F, 9, 15 ; 51
+ mapgroup ILEX_FOREST, 27, 15 ; 52
+ mapgroup GOLDENROD_UNDERGROUND, 18, 15 ; 53
+ mapgroup GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES, 18, 15 ; 54
+ mapgroup GOLDENROD_DEPT_STORE_B1F, 9, 10 ; 55
+ mapgroup GOLDENROD_UNDERGROUND_WAREHOUSE, 9, 10 ; 56
+ mapgroup MOUNT_MORTAR_1F_OUTSIDE, 18, 20 ; 57
+ mapgroup MOUNT_MORTAR_1F_INSIDE, 27, 20 ; 58
+ mapgroup MOUNT_MORTAR_2F_INSIDE, 18, 20 ; 59
+ mapgroup MOUNT_MORTAR_B1F, 18, 20 ; 60
+ mapgroup ICE_PATH_1F, 18, 20 ; 61
+ mapgroup ICE_PATH_B1F, 18, 10 ; 62
+ mapgroup ICE_PATH_B2F_MAHOGANY_SIDE, 9, 10 ; 63
+ mapgroup ICE_PATH_B2F_BLACKTHORN_SIDE, 9, 5 ; 64
+ mapgroup ICE_PATH_B3F, 9, 10 ; 65
+ mapgroup WHIRL_ISLAND_NW, 9, 5 ; 66
+ mapgroup WHIRL_ISLAND_NE, 9, 10 ; 67
+ mapgroup WHIRL_ISLAND_SW, 9, 10 ; 68
+ mapgroup WHIRL_ISLAND_CAVE, 9, 5 ; 69
+ mapgroup WHIRL_ISLAND_SE, 9, 5 ; 70
+ mapgroup WHIRL_ISLAND_B1F, 18, 20 ; 71
+ mapgroup WHIRL_ISLAND_B2F, 18, 10 ; 72
+ mapgroup WHIRL_ISLAND_LUGIA_CHAMBER, 9, 10 ; 73
+ mapgroup SILVER_CAVE_ROOM_1, 18, 10 ; 74
+ mapgroup SILVER_CAVE_ROOM_2, 18, 15 ; 75
+ mapgroup SILVER_CAVE_ROOM_3, 18, 10 ; 76
+ mapgroup SILVER_CAVE_ITEM_ROOMS, 9, 10 ; 77
+ mapgroup DARK_CAVE_VIOLET_ENTRANCE, 18, 20 ; 78
+ mapgroup DARK_CAVE_BLACKTHORN_ENTRANCE, 18, 15 ; 79
+ mapgroup DRAGONS_DEN_1F, 9, 5 ; 80
+ mapgroup DRAGONS_DEN_B1F, 18, 20 ; 81
+ mapgroup DRAGON_SHRINE, 5, 5 ; 82
+ mapgroup TOHJO_FALLS, 9, 15 ; 83
+ mapgroup DIGLETTS_CAVE, 18, 10 ; 84
+ mapgroup MOUNT_MOON, 9, 15 ; 85
+ mapgroup UNDERGROUND_PATH, 14, 3 ; 86
+ mapgroup ROCK_TUNNEL_1F, 18, 15 ; 87
+ mapgroup ROCK_TUNNEL_B1F, 18, 15 ; 88
+ mapgroup SAFARI_ZONE_FUCHSIA_GATE_BETA, 4, 5 ; 89
+ mapgroup SAFARI_ZONE_BETA, 18, 10 ; 90
+ mapgroup VICTORY_ROAD, 36, 10 ; 91
newgroup ; 4
- mapgroup ECRUTEAK_HOUSE, 9, 10 ; 1
- mapgroup WISE_TRIOS_ROOM, 4, 4 ; 2
- mapgroup ECRUTEAK_POKECENTER_1F, 4, 5 ; 3
- mapgroup ECRUTEAK_LUGIA_SPEECH_HOUSE, 4, 4 ; 4
- mapgroup DANCE_THEATRE, 7, 6 ; 5
- mapgroup ECRUTEAK_MART, 4, 6 ; 6
- mapgroup ECRUTEAK_GYM, 9, 5 ; 7
- mapgroup ECRUTEAK_ITEMFINDER_HOUSE, 4, 4 ; 8
- mapgroup ECRUTEAK_CITY, 18, 20 ; 9
+ mapgroup ECRUTEAK_HOUSE, 9, 10 ; 1
+ mapgroup WISE_TRIOS_ROOM, 4, 4 ; 2
+ mapgroup ECRUTEAK_POKECENTER_1F, 4, 5 ; 3
+ mapgroup ECRUTEAK_LUGIA_SPEECH_HOUSE, 4, 4 ; 4
+ mapgroup DANCE_THEATRE, 7, 6 ; 5
+ mapgroup ECRUTEAK_MART, 4, 6 ; 6
+ mapgroup ECRUTEAK_GYM, 9, 5 ; 7
+ mapgroup ECRUTEAK_ITEMFINDER_HOUSE, 4, 4 ; 8
+ mapgroup ECRUTEAK_CITY, 18, 20 ; 9
newgroup ; 5
- mapgroup BLACKTHORN_GYM_1F, 9, 5 ; 1
- mapgroup BLACKTHORN_GYM_2F, 9, 5 ; 2
- mapgroup BLACKTHORN_DRAGON_SPEECH_HOUSE, 4, 4 ; 3
- mapgroup BLACKTHORN_EMYS_HOUSE, 4, 4 ; 4
- mapgroup BLACKTHORN_MART, 4, 6 ; 5
- mapgroup BLACKTHORN_POKECENTER_1F, 4, 5 ; 6
- mapgroup MOVE_DELETERS_HOUSE, 4, 4 ; 7
- mapgroup ROUTE_45, 45, 10 ; 8
- mapgroup ROUTE_46, 18, 10 ; 9
- mapgroup BLACKTHORN_CITY, 18, 20 ; 10
+ mapgroup BLACKTHORN_GYM_1F, 9, 5 ; 1
+ mapgroup BLACKTHORN_GYM_2F, 9, 5 ; 2
+ mapgroup BLACKTHORN_DRAGON_SPEECH_HOUSE, 4, 4 ; 3
+ mapgroup BLACKTHORN_EMYS_HOUSE, 4, 4 ; 4
+ mapgroup BLACKTHORN_MART, 4, 6 ; 5
+ mapgroup BLACKTHORN_POKECENTER_1F, 4, 5 ; 6
+ mapgroup MOVE_DELETERS_HOUSE, 4, 4 ; 7
+ mapgroup ROUTE_45, 45, 10 ; 8
+ mapgroup ROUTE_46, 18, 10 ; 9
+ mapgroup BLACKTHORN_CITY, 18, 20 ; 10
newgroup ; 6
- mapgroup CINNABAR_POKECENTER_1F, 4, 5 ; 1
- mapgroup CINNABAR_POKECENTER_2F_BETA, 4, 8 ; 2
- mapgroup ROUTE_19___FUCHSIA_GATE, 4, 5 ; 3
- mapgroup SEAFOAM_GYM, 4, 5 ; 4
- mapgroup ROUTE_19, 18, 10 ; 5
- mapgroup ROUTE_20, 9, 30 ; 6
- mapgroup ROUTE_21, 18, 10 ; 7
- mapgroup CINNABAR_ISLAND, 9, 10 ; 8
+ mapgroup CINNABAR_POKECENTER_1F, 4, 5 ; 1
+ mapgroup CINNABAR_POKECENTER_2F_BETA, 4, 8 ; 2
+ mapgroup ROUTE_19___FUCHSIA_GATE, 4, 5 ; 3
+ mapgroup SEAFOAM_GYM, 4, 5 ; 4
+ mapgroup ROUTE_19, 18, 10 ; 5
+ mapgroup ROUTE_20, 9, 30 ; 6
+ mapgroup ROUTE_21, 18, 10 ; 7
+ mapgroup CINNABAR_ISLAND, 9, 10 ; 8
newgroup ; 7
- mapgroup CERULEAN_GYM_BADGE_SPEECH_HOUSE, 4, 4 ; 1
- mapgroup CERULEAN_POLICE_STATION, 4, 4 ; 2
- mapgroup CERULEAN_TRADE_SPEECH_HOUSE, 4, 4 ; 3
- mapgroup CERULEAN_POKECENTER_1F, 4, 5 ; 4
- mapgroup CERULEAN_POKECENTER_2F_BETA, 4, 8 ; 5
- mapgroup CERULEAN_GYM, 8, 5 ; 6
- mapgroup CERULEAN_MART, 4, 6 ; 7
- mapgroup ROUTE_10_POKECENTER_1F, 4, 5 ; 8
- mapgroup ROUTE_10_POKECENTER_2F_BETA, 4, 8 ; 9
- mapgroup POWER_PLANT, 9, 10 ; 10
- mapgroup BILLS_HOUSE, 4, 4 ; 11
- mapgroup ROUTE_4, 9, 20 ; 12
- mapgroup ROUTE_9, 9, 30 ; 13
- mapgroup ROUTE_10_NORTH, 9, 10 ; 14
- mapgroup ROUTE_24, 9, 10 ; 15
- mapgroup ROUTE_25, 9, 30 ; 16
- mapgroup CERULEAN_CITY, 18, 20 ; 17
+ mapgroup CERULEAN_GYM_BADGE_SPEECH_HOUSE, 4, 4 ; 1
+ mapgroup CERULEAN_POLICE_STATION, 4, 4 ; 2
+ mapgroup CERULEAN_TRADE_SPEECH_HOUSE, 4, 4 ; 3
+ mapgroup CERULEAN_POKECENTER_1F, 4, 5 ; 4
+ mapgroup CERULEAN_POKECENTER_2F_BETA, 4, 8 ; 5
+ mapgroup CERULEAN_GYM, 8, 5 ; 6
+ mapgroup CERULEAN_MART, 4, 6 ; 7
+ mapgroup ROUTE_10_POKECENTER_1F, 4, 5 ; 8
+ mapgroup ROUTE_10_POKECENTER_2F_BETA, 4, 8 ; 9
+ mapgroup POWER_PLANT, 9, 10 ; 10
+ mapgroup BILLS_HOUSE, 4, 4 ; 11
+ mapgroup ROUTE_4, 9, 20 ; 12
+ mapgroup ROUTE_9, 9, 30 ; 13
+ mapgroup ROUTE_10_NORTH, 9, 10 ; 14
+ mapgroup ROUTE_24, 9, 10 ; 15
+ mapgroup ROUTE_25, 9, 30 ; 16
+ mapgroup CERULEAN_CITY, 18, 20 ; 17
newgroup ; 8
- mapgroup AZALEA_POKECENTER_1F, 4, 5 ; 1
- mapgroup CHARCOAL_KILN, 4, 4 ; 2
- mapgroup AZALEA_MART, 4, 6 ; 3
- mapgroup KURTS_HOUSE, 4, 8 ; 4
- mapgroup AZALEA_GYM, 8, 5 ; 5
- mapgroup ROUTE_33, 9, 10 ; 6
- mapgroup AZALEA_TOWN, 9, 20 ; 7
+ mapgroup AZALEA_POKECENTER_1F, 4, 5 ; 1
+ mapgroup CHARCOAL_KILN, 4, 4 ; 2
+ mapgroup AZALEA_MART, 4, 6 ; 3
+ mapgroup KURTS_HOUSE, 4, 8 ; 4
+ mapgroup AZALEA_GYM, 8, 5 ; 5
+ mapgroup ROUTE_33, 9, 10 ; 6
+ mapgroup AZALEA_TOWN, 9, 20 ; 7
newgroup ; 9
- mapgroup LAKE_OF_RAGE_HIDDEN_POWER_HOUSE, 4, 4 ; 1
- mapgroup LAKE_OF_RAGE_MAGIKARP_HOUSE, 4, 4 ; 2
- mapgroup ROUTE_43_MAHOGANY_GATE, 4, 5 ; 3
- mapgroup ROUTE_43_GATE, 4, 5 ; 4
- mapgroup ROUTE_43, 27, 10 ; 5
- mapgroup LAKE_OF_RAGE, 18, 20 ; 6
+ mapgroup LAKE_OF_RAGE_HIDDEN_POWER_HOUSE, 4, 4 ; 1
+ mapgroup LAKE_OF_RAGE_MAGIKARP_HOUSE, 4, 4 ; 2
+ mapgroup ROUTE_43_MAHOGANY_GATE, 4, 5 ; 3
+ mapgroup ROUTE_43_GATE, 4, 5 ; 4
+ mapgroup ROUTE_43, 27, 10 ; 5
+ mapgroup LAKE_OF_RAGE, 18, 20 ; 6
newgroup ; 10
- mapgroup ROUTE_32, 45, 10 ; 1
- mapgroup ROUTE_35, 18, 10 ; 2
- mapgroup ROUTE_36, 9, 30 ; 3
- mapgroup ROUTE_37, 9, 10 ; 4
- mapgroup VIOLET_CITY, 18, 20 ; 5
- mapgroup VIOLET_MART, 4, 6 ; 6
- mapgroup VIOLET_GYM, 8, 5 ; 7
- mapgroup EARLS_POKEMON_ACADEMY, 8, 4 ; 8
- mapgroup VIOLET_NICKNAME_SPEECH_HOUSE, 4, 4 ; 9
- mapgroup VIOLET_POKECENTER_1F, 4, 5 ; 10
- mapgroup VIOLET_KYLES_HOUSE, 4, 4 ; 11
- mapgroup ROUTE_32_RUINS_OF_ALPH_GATE, 4, 5 ; 12
- mapgroup ROUTE_32_POKECENTER_1F, 4, 5 ; 13
- mapgroup ROUTE_35_GOLDENROD_GATE, 4, 5 ; 14
- mapgroup ROUTE_35_NATIONAL_PARK_GATE, 4, 4 ; 15
- mapgroup ROUTE_36_RUINS_OF_ALPH_GATE, 4, 5 ; 16
- mapgroup ROUTE_36_NATIONAL_PARK_GATE, 4, 5 ; 17
+ mapgroup ROUTE_32, 45, 10 ; 1
+ mapgroup ROUTE_35, 18, 10 ; 2
+ mapgroup ROUTE_36, 9, 30 ; 3
+ mapgroup ROUTE_37, 9, 10 ; 4
+ mapgroup VIOLET_CITY, 18, 20 ; 5
+ mapgroup VIOLET_MART, 4, 6 ; 6
+ mapgroup VIOLET_GYM, 8, 5 ; 7
+ mapgroup EARLS_POKEMON_ACADEMY, 8, 4 ; 8
+ mapgroup VIOLET_NICKNAME_SPEECH_HOUSE, 4, 4 ; 9
+ mapgroup VIOLET_POKECENTER_1F, 4, 5 ; 10
+ mapgroup VIOLET_KYLES_HOUSE, 4, 4 ; 11
+ mapgroup ROUTE_32_RUINS_OF_ALPH_GATE, 4, 5 ; 12
+ mapgroup ROUTE_32_POKECENTER_1F, 4, 5 ; 13
+ mapgroup ROUTE_35_GOLDENROD_GATE, 4, 5 ; 14
+ mapgroup ROUTE_35_NATIONAL_PARK_GATE, 4, 4 ; 15
+ mapgroup ROUTE_36_RUINS_OF_ALPH_GATE, 4, 5 ; 16
+ mapgroup ROUTE_36_NATIONAL_PARK_GATE, 4, 5 ; 17
newgroup ; 11
- mapgroup ROUTE_34, 27, 10 ; 1
- mapgroup GOLDENROD_CITY, 18, 20 ; 2
- mapgroup GOLDENROD_GYM, 9, 10 ; 3
- mapgroup GOLDENROD_BIKE_SHOP, 4, 4 ; 4
- mapgroup GOLDENROD_HAPPINESS_RATER, 4, 4 ; 5
- mapgroup GOLDENROD_BILLS_HOUSE, 4, 4 ; 6
- mapgroup GOLDENROD_MAGNET_TRAIN_STATION, 9, 10 ; 7
- mapgroup GOLDENROD_FLOWER_SHOP, 4, 4 ; 8
- mapgroup GOLDENROD_PP_SPEECH_HOUSE, 4, 4 ; 9
- mapgroup GOLDENROD_NAME_RATER, 4, 4 ; 10
- mapgroup GOLDENROD_DEPT_STORE_1F, 4, 8 ; 11
- mapgroup GOLDENROD_DEPT_STORE_2F, 4, 8 ; 12
- mapgroup GOLDENROD_DEPT_STORE_3F, 4, 8 ; 13
- mapgroup GOLDENROD_DEPT_STORE_4F, 4, 8 ; 14
- mapgroup GOLDENROD_DEPT_STORE_5F, 4, 8 ; 15
- mapgroup GOLDENROD_DEPT_STORE_6F, 4, 8 ; 16
- mapgroup GOLDENROD_DEPT_STORE_ELEVATOR, 2, 2 ; 17
- mapgroup GOLDENROD_DEPT_STORE_ROOF, 4, 8 ; 18
- mapgroup GOLDENROD_GAME_CORNER, 7, 10 ; 19
- mapgroup GOLDENROD_POKECENTER_1F, 4, 5 ; 20
- mapgroup GOLDENROD_POKECOM_CENTER_2F_MOBILE, 16, 16 ; 21
- mapgroup ILEX_FOREST_AZALEA_GATE, 4, 5 ; 22
- mapgroup ROUTE_34_ILEX_FOREST_GATE, 4, 5 ; 23
- mapgroup DAY_CARE, 4, 5 ; 24
+ mapgroup ROUTE_34, 27, 10 ; 1
+ mapgroup GOLDENROD_CITY, 18, 20 ; 2
+ mapgroup GOLDENROD_GYM, 9, 10 ; 3
+ mapgroup GOLDENROD_BIKE_SHOP, 4, 4 ; 4
+ mapgroup GOLDENROD_HAPPINESS_RATER, 4, 4 ; 5
+ mapgroup GOLDENROD_BILLS_HOUSE, 4, 4 ; 6
+ mapgroup GOLDENROD_MAGNET_TRAIN_STATION, 9, 10 ; 7
+ mapgroup GOLDENROD_FLOWER_SHOP, 4, 4 ; 8
+ mapgroup GOLDENROD_PP_SPEECH_HOUSE, 4, 4 ; 9
+ mapgroup GOLDENROD_NAME_RATER, 4, 4 ; 10
+ mapgroup GOLDENROD_DEPT_STORE_1F, 4, 8 ; 11
+ mapgroup GOLDENROD_DEPT_STORE_2F, 4, 8 ; 12
+ mapgroup GOLDENROD_DEPT_STORE_3F, 4, 8 ; 13
+ mapgroup GOLDENROD_DEPT_STORE_4F, 4, 8 ; 14
+ mapgroup GOLDENROD_DEPT_STORE_5F, 4, 8 ; 15
+ mapgroup GOLDENROD_DEPT_STORE_6F, 4, 8 ; 16
+ mapgroup GOLDENROD_DEPT_STORE_ELEVATOR, 2, 2 ; 17
+ mapgroup GOLDENROD_DEPT_STORE_ROOF, 4, 8 ; 18
+ mapgroup GOLDENROD_GAME_CORNER, 7, 10 ; 19
+ mapgroup GOLDENROD_POKECENTER_1F, 4, 5 ; 20
+ mapgroup GOLDENROD_POKECOM_CENTER_2F_MOBILE, 16, 16 ; 21
+ mapgroup ILEX_FOREST_AZALEA_GATE, 4, 5 ; 22
+ mapgroup ROUTE_34_ILEX_FOREST_GATE, 4, 5 ; 23
+ mapgroup DAY_CARE, 4, 5 ; 24
newgroup ; 12
- mapgroup ROUTE_6, 9, 10 ; 1
- mapgroup ROUTE_11, 9, 20 ; 2
- mapgroup VERMILION_CITY, 18, 20 ; 3
- mapgroup VERMILION_HOUSE_FISHING_SPEECH_HOUSE, 4, 4 ; 4
- mapgroup VERMILION_POKECENTER_1F, 4, 5 ; 5
- mapgroup VERMILION_POKECENTER_2F_BETA, 4, 8 ; 6
- mapgroup POKEMON_FAN_CLUB, 4, 5 ; 7
- mapgroup VERMILION_MAGNET_TRAIN_SPEECH_HOUSE, 4, 4 ; 8
- mapgroup VERMILION_MART, 4, 6 ; 9
- mapgroup VERMILION_HOUSE_DIGLETTS_CAVE_SPEECH_HOUSE, 4, 4 ; 10
- mapgroup VERMILION_GYM, 9, 5 ; 11
- mapgroup ROUTE_6_SAFFRON_GATE, 4, 5 ; 12
- mapgroup ROUTE_6_UNDERGROUND_ENTRANCE, 4, 4 ; 13
+ mapgroup ROUTE_6, 9, 10 ; 1
+ mapgroup ROUTE_11, 9, 20 ; 2
+ mapgroup VERMILION_CITY, 18, 20 ; 3
+ mapgroup VERMILION_HOUSE_FISHING_SPEECH_HOUSE, 4, 4 ; 4
+ mapgroup VERMILION_POKECENTER_1F, 4, 5 ; 5
+ mapgroup VERMILION_POKECENTER_2F_BETA, 4, 8 ; 6
+ mapgroup POKEMON_FAN_CLUB, 4, 5 ; 7
+ mapgroup VERMILION_MAGNET_TRAIN_SPEECH_HOUSE, 4, 4 ; 8
+ mapgroup VERMILION_MART, 4, 6 ; 9
+ mapgroup VERMILION_HOUSE_DIGLETTS_CAVE_SPEECH_HOUSE, 4, 4 ; 10
+ mapgroup VERMILION_GYM, 9, 5 ; 11
+ mapgroup ROUTE_6_SAFFRON_GATE, 4, 5 ; 12
+ mapgroup ROUTE_6_UNDERGROUND_PATH_ENTRANCE, 4, 4 ; 13
newgroup ; 13
- mapgroup ROUTE_1, 18, 10 ; 1
- mapgroup PALLET_TOWN, 9, 10 ; 2
- mapgroup REDS_HOUSE_1F, 4, 4 ; 3
- mapgroup REDS_HOUSE_2F, 4, 4 ; 4
- mapgroup BLUES_HOUSE, 4, 4 ; 5
- mapgroup OAKS_LAB, 6, 5 ; 6
+ mapgroup ROUTE_1, 18, 10 ; 1
+ mapgroup PALLET_TOWN, 9, 10 ; 2
+ mapgroup REDS_HOUSE_1F, 4, 4 ; 3
+ mapgroup REDS_HOUSE_2F, 4, 4 ; 4
+ mapgroup BLUES_HOUSE, 4, 4 ; 5
+ mapgroup OAKS_LAB, 6, 5 ; 6
newgroup ; 14
- mapgroup ROUTE_3, 9, 30 ; 1
- mapgroup PEWTER_CITY, 18, 20 ; 2
- mapgroup PEWTER_NIDORAN_SPEECH_HOUSE, 4, 4 ; 3
- mapgroup PEWTER_GYM, 7, 5 ; 4
- mapgroup PEWTER_MART, 4, 6 ; 5
- mapgroup PEWTER_POKECENTER_1F, 4, 5 ; 6
- mapgroup PEWTER_POKECENTER_2F_BETA, 4, 8 ; 7
- mapgroup PEWTER_SNOOZE_SPEECH_HOUSE, 4, 4 ; 8
+ mapgroup ROUTE_3, 9, 30 ; 1
+ mapgroup PEWTER_CITY, 18, 20 ; 2
+ mapgroup PEWTER_NIDORAN_SPEECH_HOUSE, 4, 4 ; 3
+ mapgroup PEWTER_GYM, 7, 5 ; 4
+ mapgroup PEWTER_MART, 4, 6 ; 5
+ mapgroup PEWTER_POKECENTER_1F, 4, 5 ; 6
+ mapgroup PEWTER_POKECENTER_2F_BETA, 4, 8 ; 7
+ mapgroup PEWTER_SNOOZE_SPEECH_HOUSE, 4, 4 ; 8
newgroup ; 15
- mapgroup OLIVINE_PORT, 18, 10 ; 1
- mapgroup VERMILION_PORT, 18, 10 ; 2
- mapgroup FAST_SHIP_1F, 9, 16 ; 3
- mapgroup FAST_SHIP_CABINS_NNW_NNE_NE, 16, 4 ; 4
- mapgroup FAST_SHIP_CABINS_SW_SSW_NW, 16, 4 ; 5
- mapgroup FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN, 17, 5 ; 6
- mapgroup FAST_SHIP_B1F, 8, 16 ; 7
- mapgroup OLIVINE_PORT_PASSAGE, 9, 10 ; 8
- mapgroup VERMILION_PORT_PASSAGE, 9, 10 ; 9
- mapgroup MOUNT_MOON_SQUARE, 9, 15 ; 10
- mapgroup MOUNT_MOON_GIFT_SHOP, 4, 4 ; 11
- mapgroup TIN_TOWER_ROOF, 9, 10 ; 12
+ mapgroup OLIVINE_PORT, 18, 10 ; 1
+ mapgroup VERMILION_PORT, 18, 10 ; 2
+ mapgroup FAST_SHIP_1F, 9, 16 ; 3
+ mapgroup FAST_SHIP_CABINS_NNW_NNE_NE, 16, 4 ; 4
+ mapgroup FAST_SHIP_CABINS_SW_SSW_NW, 16, 4 ; 5
+ mapgroup FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN, 17, 5 ; 6
+ mapgroup FAST_SHIP_B1F, 8, 16 ; 7
+ mapgroup OLIVINE_PORT_PASSAGE, 9, 10 ; 8
+ mapgroup VERMILION_PORT_PASSAGE, 9, 10 ; 9
+ mapgroup MOUNT_MOON_SQUARE, 9, 15 ; 10
+ mapgroup MOUNT_MOON_GIFT_SHOP, 4, 4 ; 11
+ mapgroup TIN_TOWER_ROOF, 9, 10 ; 12
newgroup ; 16
- mapgroup ROUTE_23, 9, 10 ; 1
- mapgroup INDIGO_PLATEAU_POKECENTER_1F, 7, 9 ; 2
- mapgroup WILLS_ROOM, 9, 5 ; 3
- mapgroup KOGAS_ROOM, 9, 5 ; 4
- mapgroup BRUNOS_ROOM, 9, 5 ; 5
- mapgroup KARENS_ROOM, 9, 5 ; 6
- mapgroup LANCES_ROOM, 12, 5 ; 7
- mapgroup HALL_OF_FAME, 7, 5 ; 8
+ mapgroup ROUTE_23, 9, 10 ; 1
+ mapgroup INDIGO_PLATEAU_POKECENTER_1F, 7, 9 ; 2
+ mapgroup WILLS_ROOM, 9, 5 ; 3
+ mapgroup KOGAS_ROOM, 9, 5 ; 4
+ mapgroup BRUNOS_ROOM, 9, 5 ; 5
+ mapgroup KARENS_ROOM, 9, 5 ; 6
+ mapgroup LANCES_ROOM, 12, 5 ; 7
+ mapgroup HALL_OF_FAME, 7, 5 ; 8
newgroup ; 17
- mapgroup ROUTE_13, 9, 30 ; 1
- mapgroup ROUTE_14, 18, 10 ; 2
- mapgroup ROUTE_15, 9, 20 ; 3
- mapgroup ROUTE_18, 9, 10 ; 4
- mapgroup FUCHSIA_CITY, 18, 20 ; 5
- mapgroup FUCHSIA_MART, 4, 6 ; 6
- mapgroup SAFARI_ZONE_MAIN_OFFICE, 4, 4 ; 7
- mapgroup FUCHSIA_GYM, 9, 5 ; 8
- mapgroup FUCHSIA_BILL_SPEECH_HOUSE, 4, 4 ; 9
- mapgroup FUCHSIA_POKECENTER_1F, 4, 5 ; 10
- mapgroup FUCHSIA_POKECENTER_2F_BETA, 4, 8 ; 11
- mapgroup SAFARI_ZONE_WARDENS_HOME, 4, 5 ; 12
- mapgroup ROUTE_15_FUCHSIA_GATE, 4, 5 ; 13
+ mapgroup ROUTE_13, 9, 30 ; 1
+ mapgroup ROUTE_14, 18, 10 ; 2
+ mapgroup ROUTE_15, 9, 20 ; 3
+ mapgroup ROUTE_18, 9, 10 ; 4
+ mapgroup FUCHSIA_CITY, 18, 20 ; 5
+ mapgroup FUCHSIA_MART, 4, 6 ; 6
+ mapgroup SAFARI_ZONE_MAIN_OFFICE, 4, 4 ; 7
+ mapgroup FUCHSIA_GYM, 9, 5 ; 8
+ mapgroup FUCHSIA_BILL_SPEECH_HOUSE, 4, 4 ; 9
+ mapgroup FUCHSIA_POKECENTER_1F, 4, 5 ; 10
+ mapgroup FUCHSIA_POKECENTER_2F_BETA, 4, 8 ; 11
+ mapgroup SAFARI_ZONE_WARDENS_HOME, 4, 5 ; 12
+ mapgroup ROUTE_15_FUCHSIA_GATE, 4, 5 ; 13
newgroup ; 18
- mapgroup ROUTE_8, 9, 20 ; 1
- mapgroup ROUTE_12, 27, 10 ; 2
- mapgroup ROUTE_10_SOUTH, 9, 10 ; 3
- mapgroup LAVENDER_TOWN, 9, 10 ; 4
- mapgroup LAVENDER_POKECENTER_1F, 4, 5 ; 5
- mapgroup LAVENDER_POKECENTER_2F_BETA, 4, 8 ; 6
- mapgroup MR_FUJIS_HOUSE, 4, 5 ; 7
- mapgroup LAVENDER_TOWN_SPEECH_HOUSE, 4, 4 ; 8
- mapgroup LAVENDER_NAME_RATER, 4, 4 ; 9
- mapgroup LAVENDER_MART, 4, 6 ; 10
- mapgroup SOUL_HOUSE, 4, 5 ; 11
- mapgroup LAV_RADIO_TOWER_1F, 4, 10 ; 12
- mapgroup ROUTE_8_SAFFRON_GATE, 4, 5 ; 13
- mapgroup ROUTE_12_SUPER_ROD_HOUSE, 4, 4 ; 14
+ mapgroup ROUTE_8, 9, 20 ; 1
+ mapgroup ROUTE_12, 27, 10 ; 2
+ mapgroup ROUTE_10_SOUTH, 9, 10 ; 3
+ mapgroup LAVENDER_TOWN, 9, 10 ; 4
+ mapgroup LAVENDER_POKECENTER_1F, 4, 5 ; 5
+ mapgroup LAVENDER_POKECENTER_2F_BETA, 4, 8 ; 6
+ mapgroup MR_FUJIS_HOUSE, 4, 5 ; 7
+ mapgroup LAVENDER_TOWN_SPEECH_HOUSE, 4, 4 ; 8
+ mapgroup LAVENDER_NAME_RATER, 4, 4 ; 9
+ mapgroup LAVENDER_MART, 4, 6 ; 10
+ mapgroup SOUL_HOUSE, 4, 5 ; 11
+ mapgroup LAV_RADIO_TOWER_1F, 4, 10 ; 12
+ mapgroup ROUTE_8_SAFFRON_GATE, 4, 5 ; 13
+ mapgroup ROUTE_12_SUPER_ROD_HOUSE, 4, 4 ; 14
newgroup ; 19
- mapgroup ROUTE_28, 9, 20 ; 1
- mapgroup SILVER_CAVE_OUTSIDE, 18, 20 ; 2
- mapgroup SILVER_CAVE_POKECENTER_1F, 4, 5 ; 3
- mapgroup ROUTE_28_FAMOUS_SPEECH_HOUSE, 4, 4 ; 4
+ mapgroup ROUTE_28, 9, 20 ; 1
+ mapgroup SILVER_CAVE_OUTSIDE, 18, 20 ; 2
+ mapgroup SILVER_CAVE_POKECENTER_1F, 4, 5 ; 3
+ mapgroup ROUTE_28_FAMOUS_SPEECH_HOUSE, 4, 4 ; 4
newgroup ; 20
- mapgroup POKECENTER_2F, 4, 8 ; 1
- mapgroup TRADE_CENTER, 4, 5 ; 2
- mapgroup COLOSSEUM, 4, 5 ; 3
- mapgroup TIME_CAPSULE, 4, 5 ; 4
- mapgroup MOBILE_TRADE_ROOM_MOBILE, 4, 5 ; 5
- mapgroup MOBILE_BATTLE_ROOM, 4, 5 ; 6
+ mapgroup POKECENTER_2F, 4, 8 ; 1
+ mapgroup TRADE_CENTER, 4, 5 ; 2
+ mapgroup COLOSSEUM, 4, 5 ; 3
+ mapgroup TIME_CAPSULE, 4, 5 ; 4
+ mapgroup MOBILE_TRADE_ROOM_MOBILE, 4, 5 ; 5
+ mapgroup MOBILE_BATTLE_ROOM, 4, 5 ; 6
newgroup ; 21
- mapgroup ROUTE_7, 9, 10 ; 1
- mapgroup ROUTE_16, 9, 10 ; 2
- mapgroup ROUTE_17, 45, 10 ; 3
- mapgroup CELADON_CITY, 18, 20 ; 4
- mapgroup CELADON_DEPT_STORE_1F, 4, 8 ; 5
- mapgroup CELADON_DEPT_STORE_2F, 4, 8 ; 6
- mapgroup CELADON_DEPT_STORE_3F, 4, 8 ; 7
- mapgroup CELADON_DEPT_STORE_4F, 4, 8 ; 8
- mapgroup CELADON_DEPT_STORE_5F, 4, 8 ; 9
- mapgroup CELADON_DEPT_STORE_6F, 4, 8 ; 10
- mapgroup CELADON_DEPT_STORE_ELEVATOR, 2, 2 ; 11
- mapgroup CELADON_MANSION_1F, 5, 4 ; 12
- mapgroup CELADON_MANSION_2F, 5, 4 ; 13
- mapgroup CELADON_MANSION_3F, 5, 4 ; 14
- mapgroup CELADON_MANSION_ROOF, 5, 4 ; 15
- mapgroup CELADON_MANSION_ROOF_HOUSE, 4, 4 ; 16
- mapgroup CELADON_POKECENTER_1F, 4, 5 ; 17
- mapgroup CELADON_POKECENTER_2F_BETA, 4, 8 ; 18
- mapgroup CELADON_GAME_CORNER, 7, 10 ; 19
- mapgroup CELADON_GAME_CORNER_PRIZE_ROOM, 3, 3 ; 20
- mapgroup CELADON_GYM, 9, 5 ; 21
- mapgroup CELADON_CAFE, 4, 6 ; 22
- mapgroup ROUTE_16_FUCHSIA_SPEECH_HOUSE, 4, 4 ; 23
- mapgroup ROUTE_16_GATE, 4, 5 ; 24
- mapgroup ROUTE_7_SAFFRON_GATE, 4, 5 ; 25
- mapgroup ROUTE_17_18_GATE, 4, 5 ; 26
+ mapgroup ROUTE_7, 9, 10 ; 1
+ mapgroup ROUTE_16, 9, 10 ; 2
+ mapgroup ROUTE_17, 45, 10 ; 3
+ mapgroup CELADON_CITY, 18, 20 ; 4
+ mapgroup CELADON_DEPT_STORE_1F, 4, 8 ; 5
+ mapgroup CELADON_DEPT_STORE_2F, 4, 8 ; 6
+ mapgroup CELADON_DEPT_STORE_3F, 4, 8 ; 7
+ mapgroup CELADON_DEPT_STORE_4F, 4, 8 ; 8
+ mapgroup CELADON_DEPT_STORE_5F, 4, 8 ; 9
+ mapgroup CELADON_DEPT_STORE_6F, 4, 8 ; 10
+ mapgroup CELADON_DEPT_STORE_ELEVATOR, 2, 2 ; 11
+ mapgroup CELADON_MANSION_1F, 5, 4 ; 12
+ mapgroup CELADON_MANSION_2F, 5, 4 ; 13
+ mapgroup CELADON_MANSION_3F, 5, 4 ; 14
+ mapgroup CELADON_MANSION_ROOF, 5, 4 ; 15
+ mapgroup CELADON_MANSION_ROOF_HOUSE, 4, 4 ; 16
+ mapgroup CELADON_POKECENTER_1F, 4, 5 ; 17
+ mapgroup CELADON_POKECENTER_2F_BETA, 4, 8 ; 18
+ mapgroup CELADON_GAME_CORNER, 7, 10 ; 19
+ mapgroup CELADON_GAME_CORNER_PRIZE_ROOM, 3, 3 ; 20
+ mapgroup CELADON_GYM, 9, 5 ; 21
+ mapgroup CELADON_CAFE, 4, 6 ; 22
+ mapgroup ROUTE_16_FUCHSIA_SPEECH_HOUSE, 4, 4 ; 23
+ mapgroup ROUTE_16_GATE, 4, 5 ; 24
+ mapgroup ROUTE_7_SAFFRON_GATE, 4, 5 ; 25
+ mapgroup ROUTE_17_18_GATE, 4, 5 ; 26
newgroup ; 22
- mapgroup ROUTE_40, 18, 10 ; 1
- mapgroup ROUTE_41, 27, 25 ; 2
- mapgroup CIANWOOD_CITY, 27, 15 ; 3
- mapgroup MANIAS_HOUSE, 4, 4 ; 4
- mapgroup CIANWOOD_GYM, 9, 5 ; 5
- mapgroup CIANWOOD_POKECENTER_1F, 4, 5 ; 6
- mapgroup CIANWOOD_PHARMACY, 4, 4 ; 7
- mapgroup CIANWOOD_CITY_PHOTO_STUDIO, 4, 4 ; 8
- mapgroup CIANWOOD_LUGIA_SPEECH_HOUSE, 4, 4 ; 9
- mapgroup POKE_SEERS_HOUSE, 4, 4 ; 10
- mapgroup BATTLE_TOWER_1F, 5, 8 ; 11
- mapgroup BATTLE_TOWER_BATTLE_ROOM, 4, 4 ; 12
- mapgroup BATTLE_TOWER_ELEVATOR, 2, 2 ; 13
- mapgroup BATTLE_TOWER_HALLWAY, 2, 11 ; 14
- mapgroup ROUTE_40_BATTLE_TOWER_GATE, 4, 5 ; 15
- mapgroup BATTLE_TOWER_OUTSIDE, 14, 10 ; 16
+ mapgroup ROUTE_40, 18, 10 ; 1
+ mapgroup ROUTE_41, 27, 25 ; 2
+ mapgroup CIANWOOD_CITY, 27, 15 ; 3
+ mapgroup MANIAS_HOUSE, 4, 4 ; 4
+ mapgroup CIANWOOD_GYM, 9, 5 ; 5
+ mapgroup CIANWOOD_POKECENTER_1F, 4, 5 ; 6
+ mapgroup CIANWOOD_PHARMACY, 4, 4 ; 7
+ mapgroup CIANWOOD_CITY_PHOTO_STUDIO, 4, 4 ; 8
+ mapgroup CIANWOOD_LUGIA_SPEECH_HOUSE, 4, 4 ; 9
+ mapgroup POKE_SEERS_HOUSE, 4, 4 ; 10
+ mapgroup BATTLE_TOWER_1F, 5, 8 ; 11
+ mapgroup BATTLE_TOWER_BATTLE_ROOM, 4, 4 ; 12
+ mapgroup BATTLE_TOWER_ELEVATOR, 2, 2 ; 13
+ mapgroup BATTLE_TOWER_HALLWAY, 2, 11 ; 14
+ mapgroup ROUTE_40_BATTLE_TOWER_GATE, 4, 5 ; 15
+ mapgroup BATTLE_TOWER_OUTSIDE, 14, 10 ; 16
newgroup ; 23
- mapgroup ROUTE_2, 27, 10 ; 1
- mapgroup ROUTE_22, 9, 20 ; 2
- mapgroup VIRIDIAN_CITY, 18, 20 ; 3
- mapgroup VIRIDIAN_GYM, 9, 5 ; 4
- mapgroup VIRIDIAN_NICKNAME_SPEECH_HOUSE, 4, 4 ; 5
- mapgroup TRAINER_HOUSE_1F, 7, 5 ; 6
- mapgroup TRAINER_HOUSE_B1F, 8, 5 ; 7
- mapgroup VIRIDIAN_MART, 4, 6 ; 8
- mapgroup VIRIDIAN_POKECENTER_1F, 4, 5 ; 9
- mapgroup VIRIDIAN_POKECENTER_2F_BETA, 4, 8 ; 10
- mapgroup ROUTE_2_NUGGET_SPEECH_HOUSE, 4, 4 ; 11
- mapgroup ROUTE_2_GATE, 4, 5 ; 12
- mapgroup VICTORY_ROAD_GATE, 9, 10 ; 13
+ mapgroup ROUTE_2, 27, 10 ; 1
+ mapgroup ROUTE_22, 9, 20 ; 2
+ mapgroup VIRIDIAN_CITY, 18, 20 ; 3
+ mapgroup VIRIDIAN_GYM, 9, 5 ; 4
+ mapgroup VIRIDIAN_NICKNAME_SPEECH_HOUSE, 4, 4 ; 5
+ mapgroup TRAINER_HOUSE_1F, 7, 5 ; 6
+ mapgroup TRAINER_HOUSE_B1F, 8, 5 ; 7
+ mapgroup VIRIDIAN_MART, 4, 6 ; 8
+ mapgroup VIRIDIAN_POKECENTER_1F, 4, 5 ; 9
+ mapgroup VIRIDIAN_POKECENTER_2F_BETA, 4, 8 ; 10
+ mapgroup ROUTE_2_NUGGET_SPEECH_HOUSE, 4, 4 ; 11
+ mapgroup ROUTE_2_GATE, 4, 5 ; 12
+ mapgroup VICTORY_ROAD_GATE, 9, 10 ; 13
newgroup ; 24
- mapgroup ROUTE_26, 54, 10 ; 1
- mapgroup ROUTE_27, 9, 40 ; 2
- mapgroup ROUTE_29, 9, 30 ; 3
- mapgroup NEW_BARK_TOWN, 9, 10 ; 4
- mapgroup ELMS_LAB, 6, 5 ; 5
- mapgroup KRISS_HOUSE_1F, 4, 5 ; 6
- mapgroup KRISS_HOUSE_2F, 3, 4 ; 7
- mapgroup KRISS_NEIGHBORS_HOUSE, 4, 4 ; 8
- mapgroup ELMS_HOUSE, 4, 4 ; 9
- mapgroup ROUTE_26_HEAL_SPEECH_HOUSE, 4, 4 ; 10
- mapgroup ROUTE_26_DAY_OF_WEEK_SIBLINGS_HOUSE, 4, 4 ; 11
- mapgroup ROUTE_27_SANDSTORM_HOUSE, 4, 4 ; 12
- mapgroup ROUTE_29_46_GATE, 4, 5 ; 13
+ mapgroup ROUTE_26, 54, 10 ; 1
+ mapgroup ROUTE_27, 9, 40 ; 2
+ mapgroup ROUTE_29, 9, 30 ; 3
+ mapgroup NEW_BARK_TOWN, 9, 10 ; 4
+ mapgroup ELMS_LAB, 6, 5 ; 5
+ mapgroup KRISS_HOUSE_1F, 4, 5 ; 6
+ mapgroup KRISS_HOUSE_2F, 3, 4 ; 7
+ mapgroup KRISS_NEIGHBORS_HOUSE, 4, 4 ; 8
+ mapgroup ELMS_HOUSE, 4, 4 ; 9
+ mapgroup ROUTE_26_HEAL_SPEECH_HOUSE, 4, 4 ; 10
+ mapgroup ROUTE_26_DAY_OF_WEEK_SIBLINGS_HOUSE, 4, 4 ; 11
+ mapgroup ROUTE_27_SANDSTORM_HOUSE, 4, 4 ; 12
+ mapgroup ROUTE_29_46_GATE, 4, 5 ; 13
newgroup ; 25
- mapgroup ROUTE_5, 9, 10 ; 1
- mapgroup SAFFRON_CITY, 18, 20 ; 2
- mapgroup FIGHTING_DOJO, 6, 5 ; 3
- mapgroup SAFFRON_GYM, 9, 10 ; 4
- mapgroup SAFFRON_MART, 4, 6 ; 5
- mapgroup SAFFRON_POKECENTER_1F, 4, 5 ; 6
- mapgroup SAFFRON_POKECENTER_2F_BETA, 4, 8 ; 7
- mapgroup MR_PSYCHICS_HOUSE, 4, 4 ; 8
- mapgroup SAFFRON_TRAIN_STATION, 9, 10 ; 9
- mapgroup SILPH_CO_1F, 4, 8 ; 10
- mapgroup COPYCATS_HOUSE_1F, 4, 4 ; 11
- mapgroup COPYCATS_HOUSE_2F, 3, 5 ; 12
- mapgroup ROUTE_5_UNDERGROUND_ENTRANCE, 4, 4 ; 13
- mapgroup ROUTE_5_SAFFRON_CITY_GATE, 4, 5 ; 14
- mapgroup ROUTE_5_CLEANSE_TAG_SPEECH_HOUSE, 4, 4 ; 15
+ mapgroup ROUTE_5, 9, 10 ; 1
+ mapgroup SAFFRON_CITY, 18, 20 ; 2
+ mapgroup FIGHTING_DOJO, 6, 5 ; 3
+ mapgroup SAFFRON_GYM, 9, 10 ; 4
+ mapgroup SAFFRON_MART, 4, 6 ; 5
+ mapgroup SAFFRON_POKECENTER_1F, 4, 5 ; 6
+ mapgroup SAFFRON_POKECENTER_2F_BETA, 4, 8 ; 7
+ mapgroup MR_PSYCHICS_HOUSE, 4, 4 ; 8
+ mapgroup SAFFRON_TRAIN_STATION, 9, 10 ; 9
+ mapgroup SILPH_CO_1F, 4, 8 ; 10
+ mapgroup COPYCATS_HOUSE_1F, 4, 4 ; 11
+ mapgroup COPYCATS_HOUSE_2F, 3, 5 ; 12
+ mapgroup ROUTE_5_UNDERGROUND_PATH_ENTRANCE, 4, 4 ; 13
+ mapgroup ROUTE_5_SAFFRON_CITY_GATE, 4, 5 ; 14
+ mapgroup ROUTE_5_CLEANSE_TAG_SPEECH_HOUSE, 4, 4 ; 15
newgroup ; 26
- mapgroup ROUTE_30, 27, 10 ; 1
- mapgroup ROUTE_31, 9, 20 ; 2
- mapgroup CHERRYGROVE_CITY, 9, 20 ; 3
- mapgroup CHERRYGROVE_MART, 4, 6 ; 4
- mapgroup CHERRYGROVE_POKECENTER_1F, 4, 5 ; 5
- mapgroup CHERRYGROVE_GYM_SPEECH_HOUSE, 4, 4 ; 6
- mapgroup GUIDE_GENTS_HOUSE, 4, 4 ; 7
- mapgroup CHERRYGROVE_EVOLUTION_SPEECH_HOUSE, 4, 4 ; 8
- mapgroup ROUTE_30_BERRY_SPEECH_HOUSE, 4, 4 ; 9
- mapgroup MR_POKEMONS_HOUSE, 4, 4 ; 10
- mapgroup ROUTE_31_VIOLET_GATE, 4, 5 ; 11
+ mapgroup ROUTE_30, 27, 10 ; 1
+ mapgroup ROUTE_31, 9, 20 ; 2
+ mapgroup CHERRYGROVE_CITY, 9, 20 ; 3
+ mapgroup CHERRYGROVE_MART, 4, 6 ; 4
+ mapgroup CHERRYGROVE_POKECENTER_1F, 4, 5 ; 5
+ mapgroup CHERRYGROVE_GYM_SPEECH_HOUSE, 4, 4 ; 6
+ mapgroup GUIDE_GENTS_HOUSE, 4, 4 ; 7
+ mapgroup CHERRYGROVE_EVOLUTION_SPEECH_HOUSE, 4, 4 ; 8
+ mapgroup ROUTE_30_BERRY_SPEECH_HOUSE, 4, 4 ; 9
+ mapgroup MR_POKEMONS_HOUSE, 4, 4 ; 10
+ mapgroup ROUTE_31_VIOLET_GATE, 4, 5 ; 11
--- a/constants/misc_constants.asm
+++ b/constants/misc_constants.asm
@@ -89,10 +89,14 @@
HOF_LENGTH = 1 + HOF_MON_LENGTH * PARTY_LENGTH + 1 ; win count, party, terminator
NUM_HOF_TEAMS = 30
+MAX_LINK_RECORD EQU 9999
+
; significant money values
START_MONEY EQU 3000
MOM_MONEY EQU 2300
+MAX_MONEY EQU 999999
+MAX_COINS EQU 9999
; ChangeHappiness arguments (see data/happiness_changes.asm)
--- a/data/maps/map_scenes.asm
+++ b/data/maps/map_scenes.asm
@@ -6,84 +6,84 @@
ENDM
MapScenes:: ; 4d01e
- scene_def POKECENTER_2F, wPokecenter2FSceneID
- scene_def TRADE_CENTER, wTradeCenterSceneID
- scene_def COLOSSEUM, wColosseumSceneID
- scene_def TIME_CAPSULE, wTimeCapsuleSceneID
- scene_def POWER_PLANT, wPowerPlantSceneID
- scene_def CERULEAN_GYM, wCeruleanGymSceneID
- scene_def ROUTE_25, wRoute25SceneID
- scene_def TRAINER_HOUSE_B1F, wTrainerHouseB1FSceneID
- scene_def VICTORY_ROAD_GATE, wVictoryRoadGateSceneID
- scene_def SAFFRON_TRAIN_STATION, wSaffronTrainStationSceneID
- scene_def ROUTE_16_GATE, wRoute16GateSceneID
- scene_def ROUTE_17_18_GATE, wRoute1718GateSceneID
- scene_def INDIGO_PLATEAU_POKECENTER_1F, wIndigoPlateauPokecenter1FSceneID
- scene_def WILLS_ROOM, wWillsRoomSceneID
- scene_def KOGAS_ROOM, wKogasRoomSceneID
- scene_def BRUNOS_ROOM, wBrunosRoomSceneID
- scene_def KARENS_ROOM, wKarensRoomSceneID
- scene_def LANCES_ROOM, wLancesRoomSceneID
- scene_def HALL_OF_FAME, wHallOfFameSceneID
- scene_def ROUTE_27, wRoute27SceneID
- scene_def NEW_BARK_TOWN, wNewBarkTownSceneID
- scene_def ELMS_LAB, wElmsLabSceneID
- scene_def KRISS_HOUSE_1F, wKrissHouse1FSceneID
- scene_def ROUTE_29, wRoute29SceneID
- scene_def CHERRYGROVE_CITY, wCherrygroveCitySceneID
- scene_def MR_POKEMONS_HOUSE, wMrPokemonsHouseSceneID
- scene_def ROUTE_32, wRoute32SceneID
- scene_def ROUTE_35_NATIONAL_PARK_GATE, wRoute35NationalParkGateSceneID
- scene_def ROUTE_36, wRoute36SceneID
- scene_def ROUTE_36_NATIONAL_PARK_GATE, wRoute36NationalParkGateSceneID
- scene_def AZALEA_TOWN, wAzaleaTownSceneID
- scene_def GOLDENROD_GYM, wGoldenrodGymSceneID
- scene_def GOLDENROD_MAGNET_TRAIN_STATION, wGoldenrodMagnetTrainStationSceneID
- scene_def GOLDENROD_POKECENTER_1F, wGoldenrodPokecenter1FSceneID
- scene_def OLIVINE_CITY, wOlivineCitySceneID
- scene_def ROUTE_34, wRoute34SceneID
- scene_def ROUTE_34_ILEX_FOREST_GATE, wRoute34IlexForestGateSceneID
- scene_def ECRUTEAK_HOUSE, wEcruteakHouseSceneID
- scene_def WISE_TRIOS_ROOM, wWiseTriosRoomSceneID
- scene_def ECRUTEAK_POKECENTER_1F, wEcruteakPokecenter1FSceneID
- scene_def ECRUTEAK_GYM, wEcruteakGymSceneID
- scene_def MAHOGANY_TOWN, wMahoganyTownSceneID
- scene_def ROUTE_42, wRoute42SceneID
- scene_def CIANWOOD_CITY, wCianwoodCitySceneID
- scene_def BATTLE_TOWER_1F, wBattleTower1FSceneID
- scene_def BATTLE_TOWER_BATTLE_ROOM, wBattleTowerBattleRoomSceneID
- scene_def BATTLE_TOWER_ELEVATOR, wBattleTowerElevatorSceneID
- scene_def BATTLE_TOWER_HALLWAY, wBattleTowerHallwaySceneID
- scene_def BATTLE_TOWER_OUTSIDE, wBattleTowerOutsideSceneID
- scene_def ROUTE_43_GATE, wRoute43GateSceneID
- scene_def MOUNT_MOON, wMountMoonSceneID
- scene_def SPROUT_TOWER_3F, wSproutTower3FSceneID
- scene_def TIN_TOWER_1F, wTinTower1FSceneID
- scene_def BURNED_TOWER_1F, wBurnedTower1FSceneID
- scene_def BURNED_TOWER_B1F, wBurnedTowerB1FSceneID
- scene_def RADIO_TOWER_5F, wRadioTower5FSceneID
- scene_def RUINS_OF_ALPH_OUTSIDE, wRuinsOfAlphOutsideSceneID
- scene_def RUINS_OF_ALPH_RESEARCH_CENTER, wRuinsOfAlphResearchCenterSceneID
- scene_def RUINS_OF_ALPH_HO_OH_CHAMBER, wRuinsOfAlphHoOhChamberSceneID
- scene_def RUINS_OF_ALPH_KABUTO_CHAMBER, wRuinsOfAlphKabutoChamberSceneID
- scene_def RUINS_OF_ALPH_OMANYTE_CHAMBER, wRuinsOfAlphOmanyteChamberSceneID
- scene_def RUINS_OF_ALPH_AERODACTYL_CHAMBER, wRuinsOfAlphAerodactylChamberSceneID
- scene_def RUINS_OF_ALPH_INNER_CHAMBER, wRuinsOfAlphInnerChamberSceneID
- scene_def MAHOGANY_MART_1F, wMahoganyMart1FSceneID
- scene_def TEAM_ROCKET_BASE_B1F, wTeamRocketBaseB1FSceneID
- scene_def TEAM_ROCKET_BASE_B2F, wTeamRocketBaseB2FSceneID
- scene_def TEAM_ROCKET_BASE_B3F, wTeamRocketBaseB3FSceneID
- scene_def UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES, wUndergroundPathSwitchRoomEntrancesSceneID
- scene_def SILVER_CAVE_ROOM_3, wSilverCaveRoom3SceneID
- scene_def VICTORY_ROAD, wVictoryRoadSceneID
- scene_def DRAGONS_DEN_B1F, wDragonsDenB1FSceneID
- scene_def DRAGON_SHRINE, wDragonShrineSceneID
- scene_def OLIVINE_PORT, wOlivinePortSceneID
- scene_def VERMILION_PORT, wVermilionPortSceneID
- scene_def FAST_SHIP_1F, wFastShip1FSceneID
- scene_def FAST_SHIP_B1F, wFastShipB1FSceneID
- scene_def MOUNT_MOON_SQUARE, wMountMoonSquareSceneID
- scene_def MOBILE_TRADE_ROOM_MOBILE, wMobileTradeRoomMobileSceneID
- scene_def MOBILE_BATTLE_ROOM, wMobileBattleRoomSceneID
+ scene_def POKECENTER_2F, wPokecenter2FSceneID
+ scene_def TRADE_CENTER, wTradeCenterSceneID
+ scene_def COLOSSEUM, wColosseumSceneID
+ scene_def TIME_CAPSULE, wTimeCapsuleSceneID
+ scene_def POWER_PLANT, wPowerPlantSceneID
+ scene_def CERULEAN_GYM, wCeruleanGymSceneID
+ scene_def ROUTE_25, wRoute25SceneID
+ scene_def TRAINER_HOUSE_B1F, wTrainerHouseB1FSceneID
+ scene_def VICTORY_ROAD_GATE, wVictoryRoadGateSceneID
+ scene_def SAFFRON_TRAIN_STATION, wSaffronTrainStationSceneID
+ scene_def ROUTE_16_GATE, wRoute16GateSceneID
+ scene_def ROUTE_17_18_GATE, wRoute1718GateSceneID
+ scene_def INDIGO_PLATEAU_POKECENTER_1F, wIndigoPlateauPokecenter1FSceneID
+ scene_def WILLS_ROOM, wWillsRoomSceneID
+ scene_def KOGAS_ROOM, wKogasRoomSceneID
+ scene_def BRUNOS_ROOM, wBrunosRoomSceneID
+ scene_def KARENS_ROOM, wKarensRoomSceneID
+ scene_def LANCES_ROOM, wLancesRoomSceneID
+ scene_def HALL_OF_FAME, wHallOfFameSceneID
+ scene_def ROUTE_27, wRoute27SceneID
+ scene_def NEW_BARK_TOWN, wNewBarkTownSceneID
+ scene_def ELMS_LAB, wElmsLabSceneID
+ scene_def KRISS_HOUSE_1F, wKrissHouse1FSceneID
+ scene_def ROUTE_29, wRoute29SceneID
+ scene_def CHERRYGROVE_CITY, wCherrygroveCitySceneID
+ scene_def MR_POKEMONS_HOUSE, wMrPokemonsHouseSceneID
+ scene_def ROUTE_32, wRoute32SceneID
+ scene_def ROUTE_35_NATIONAL_PARK_GATE, wRoute35NationalParkGateSceneID
+ scene_def ROUTE_36, wRoute36SceneID
+ scene_def ROUTE_36_NATIONAL_PARK_GATE, wRoute36NationalParkGateSceneID
+ scene_def AZALEA_TOWN, wAzaleaTownSceneID
+ scene_def GOLDENROD_GYM, wGoldenrodGymSceneID
+ scene_def GOLDENROD_MAGNET_TRAIN_STATION, wGoldenrodMagnetTrainStationSceneID
+ scene_def GOLDENROD_POKECENTER_1F, wGoldenrodPokecenter1FSceneID
+ scene_def OLIVINE_CITY, wOlivineCitySceneID
+ scene_def ROUTE_34, wRoute34SceneID
+ scene_def ROUTE_34_ILEX_FOREST_GATE, wRoute34IlexForestGateSceneID
+ scene_def ECRUTEAK_HOUSE, wEcruteakHouseSceneID
+ scene_def WISE_TRIOS_ROOM, wWiseTriosRoomSceneID
+ scene_def ECRUTEAK_POKECENTER_1F, wEcruteakPokecenter1FSceneID
+ scene_def ECRUTEAK_GYM, wEcruteakGymSceneID
+ scene_def MAHOGANY_TOWN, wMahoganyTownSceneID
+ scene_def ROUTE_42, wRoute42SceneID
+ scene_def CIANWOOD_CITY, wCianwoodCitySceneID
+ scene_def BATTLE_TOWER_1F, wBattleTower1FSceneID
+ scene_def BATTLE_TOWER_BATTLE_ROOM, wBattleTowerBattleRoomSceneID
+ scene_def BATTLE_TOWER_ELEVATOR, wBattleTowerElevatorSceneID
+ scene_def BATTLE_TOWER_HALLWAY, wBattleTowerHallwaySceneID
+ scene_def BATTLE_TOWER_OUTSIDE, wBattleTowerOutsideSceneID
+ scene_def ROUTE_43_GATE, wRoute43GateSceneID
+ scene_def MOUNT_MOON, wMountMoonSceneID
+ scene_def SPROUT_TOWER_3F, wSproutTower3FSceneID
+ scene_def TIN_TOWER_1F, wTinTower1FSceneID
+ scene_def BURNED_TOWER_1F, wBurnedTower1FSceneID
+ scene_def BURNED_TOWER_B1F, wBurnedTowerB1FSceneID
+ scene_def RADIO_TOWER_5F, wRadioTower5FSceneID
+ scene_def RUINS_OF_ALPH_OUTSIDE, wRuinsOfAlphOutsideSceneID
+ scene_def RUINS_OF_ALPH_RESEARCH_CENTER, wRuinsOfAlphResearchCenterSceneID
+ scene_def RUINS_OF_ALPH_HO_OH_CHAMBER, wRuinsOfAlphHoOhChamberSceneID
+ scene_def RUINS_OF_ALPH_KABUTO_CHAMBER, wRuinsOfAlphKabutoChamberSceneID
+ scene_def RUINS_OF_ALPH_OMANYTE_CHAMBER, wRuinsOfAlphOmanyteChamberSceneID
+ scene_def RUINS_OF_ALPH_AERODACTYL_CHAMBER, wRuinsOfAlphAerodactylChamberSceneID
+ scene_def RUINS_OF_ALPH_INNER_CHAMBER, wRuinsOfAlphInnerChamberSceneID
+ scene_def MAHOGANY_MART_1F, wMahoganyMart1FSceneID
+ scene_def TEAM_ROCKET_BASE_B1F, wTeamRocketBaseB1FSceneID
+ scene_def TEAM_ROCKET_BASE_B2F, wTeamRocketBaseB2FSceneID
+ scene_def TEAM_ROCKET_BASE_B3F, wTeamRocketBaseB3FSceneID
+ scene_def GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES, wGoldenrodUndergroundSwitchRoomEntrancesSceneID
+ scene_def SILVER_CAVE_ROOM_3, wSilverCaveRoom3SceneID
+ scene_def VICTORY_ROAD, wVictoryRoadSceneID
+ scene_def DRAGONS_DEN_B1F, wDragonsDenB1FSceneID
+ scene_def DRAGON_SHRINE, wDragonShrineSceneID
+ scene_def OLIVINE_PORT, wOlivinePortSceneID
+ scene_def VERMILION_PORT, wVermilionPortSceneID
+ scene_def FAST_SHIP_1F, wFastShip1FSceneID
+ scene_def FAST_SHIP_B1F, wFastShipB1FSceneID
+ scene_def MOUNT_MOON_SQUARE, wMountMoonSquareSceneID
+ scene_def MOBILE_TRADE_ROOM_MOBILE, wMobileTradeRoomMobileSceneID
+ scene_def MOBILE_BATTLE_ROOM, wMobileBattleRoomSceneID
db -1
; 4d15b
--- a/data/pokemon/egg_moves.asm
+++ b/data/pokemon/egg_moves.asm
@@ -4,7 +4,9 @@
SECTION "Egg Moves", ROMX
; All instances of Charm, Steel Wing, Sweet Scent, and Lovely Kiss were
-; removed from egg move lists in Crystal, because they are also TMs.
+; removed from egg move lists in Crystal.
+; Sweet Scent and Steel Wing were redundant since they're TMs, and
+; Charm and Lovely Kiss were unobtainable.
; Staryu's egg moves were removed in Crystal, because Staryu is genderless
; and can only breed with Ditto.
--- /dev/null
+++ b/docs/assembly_programming.md
@@ -1,0 +1,15 @@
+# Assembly Programming
+
+- [**RGBDS documentation**](rgbds-doc): Includes information on the RGBDS tools and the assembly language syntax.
+- [**Pan Docs**](pan-docs): Everything You Always Wanted To Know About GAMEBOY (but were afraid to ask).
+- [**GameBoy Programming Manual](gb-manual): The official GameBoy programming and hardware manual by Nintendo.
+- [**GameBoy Opcode Summary**](gb-opcodes): Describes the opcodes of GameBoy assembly language.
+- [**GameBoy Memory Map**](gb-memory-map): Describes the GameBoy Color address space.
+- [**awesome-gbdev**](awesome-gbdev): A curated list of Game Boy development resources such as tools, docs, emulators, related projects and open-source ROMs.
+
+[rgbds-doc]: https://rednex.github.io/
+[pan-docs]: http://bgb.bircd.org/pandocs.htm
+[gb-manual]: https://ia801906.us.archive.org/19/items/GameBoyProgManVer1.1/GameBoyProgManVer1.1.pdf
+[gb-opcodes]: http://www.devrs.com/gb/files/opcodes.html
+[gb-memory-map]: http://gameboy.mongenel.com/dmg/asmmemmap.html
+[awesome-gbdev]: https://github.com/avivace/awesome-gbdev
--- a/engine/battle_transition.asm
+++ b/engine/battle_transition.asm
@@ -60,7 +60,7 @@
call UpdateSprites
call DelayFrame
call .NonMobile_LoadPokeballTiles
- call BattleStart_LoadEDTile
+ call BattleStart_CopyTilemapAtOnce
jr .resume
.mobile
@@ -663,7 +663,7 @@
ld a, $1
ld [hCGBPalUpdate], a
call DelayFrame
- call BattleStart_LoadEDTile
+ call BattleStart_CopyTilemapAtOnce
.nextscene ; 8c673 (23:4673)
call StartTrainerBattle_NextScene
--- a/engine/card_flip.asm
+++ b/engine/card_flip.asm
@@ -1185,7 +1185,7 @@
.IsCoinCaseFull: ; e0833
ld a, [Coins]
- cp 9999 / $100
+ cp MAX_COINS / $100
jr c, .less
jr z, .check_low
jr .more
@@ -1192,7 +1192,7 @@
.check_low
ld a, [Coins + 1]
- cp 9999 % $100
+ cp MAX_COINS % $100
jr c, .less
.more
--- a/engine/check_battle_scene.asm
+++ /dev/null
@@ -1,47 +1,0 @@
-CheckBattleScene: ; 4ea44
-; Return carry if battle scene is turned off.
-
- ld a, 0
- ld hl, wLinkMode
- call GetFarWRAMByte
- cp LINK_MOBILE
- jr z, .mobile
-
- ld a, [Options]
- bit BATTLE_SCENE, a
- jr nz, .off
-
- and a
- ret
-
-.mobile
- ld a, [wcd2f]
- and a
- jr nz, .from_wram
-
- ld a, $4
- call GetSRAMBank
- ld a, [$a60c]
- ld c, a
- call CloseSRAM
-
- ld a, c
- bit 0, c
- jr z, .off
-
- and a
- ret
-
-.from_wram
- ld a, $5
- ld hl, w5_dc00
- call GetFarWRAMByte
- bit 0, a
- jr z, .off
-
- and a
- ret
-
-.off
- scf
- ret
--- a/engine/check_nick_errors.asm
+++ /dev/null
@@ -1,74 +1,0 @@
-CheckNickErrors:: ; 669f
-; error-check monster nick before use
-; must be a peace offering to gamesharkers
-
-; input: de = nick location
-
- push bc
- push de
- ld b, PKMN_NAME_LENGTH
-
-.checkchar
-; end of nick?
- ld a, [de]
- cp "@" ; terminator
- jr z, .end
-
-; check if this char is a text command
- ld hl, .textcommands
- dec hl
-.loop
-; next entry
- inc hl
-; reached end of commands table?
- ld a, [hl]
- cp -1
- jr z, .done
-
-; is the current char between this value (inclusive)...
- ld a, [de]
- cp [hl]
- inc hl
- jr c, .loop
-; ...and this one?
- cp [hl]
- jr nc, .loop
-
-; replace it with a "?"
- ld a, "?"
- ld [de], a
- jr .loop
-
-.done
-; next char
- inc de
-; reached end of nick without finding a terminator?
- dec b
- jr nz, .checkchar
-
-; change nick to "?@"
- pop de
- push de
- ld a, "?"
- ld [de], a
- inc de
- ld a, "@"
- ld [de], a
-.end
-; if the nick has any errors at this point it's out of our hands
- pop de
- pop bc
- ret
-
-.textcommands ; 66cf
-; table defining which characters are actually text commands
-; format:
- ; ≥ <
- db "<START>", TX_BOX + 1
- db "<PLAY_G>", $18 + 1
- db $1d, "%" + 1
- db $35, "<GREEN>" + 1
- db "<ENEMY>", "<ENEMY>" + 1
- db "<MOM>", "<TM>" + 1
- db "<ROCKET>", "┘" + 1
- db -1 ; end
--- a/engine/check_time.asm
+++ /dev/null
@@ -1,19 +1,0 @@
-CheckTime:: ; c000
- ld a, [TimeOfDay]
- ld hl, TimeOfDayTable
- ld de, 2
- call IsInArray
- inc hl
- ld c, [hl]
- ret c
-
- xor a
- ld c, a
- ret
-
-TimeOfDayTable: ; c012
- db MORN_F, MORN
- db DAY_F, DAY
- db NITE_F, NITE
- db NITE_F, NITE
- db -1
--- a/engine/color.asm
+++ b/engine/color.asm
@@ -307,7 +307,7 @@
ld a, [EnemySafeguardCount] ; value
and $3
call FillBoxCGB
- call LoadEDTile
+ call CopyTilemapAtOnce
ret
ApplyMonOrTrainerPals:
--- a/engine/consume_held_item.asm
+++ /dev/null
@@ -1,80 +1,0 @@
-ConsumeHeldItem: ; 27192
- push hl
- push de
- push bc
- ld a, [hBattleTurn]
- and a
- ld hl, OTPartyMon1Item
- ld de, EnemyMonItem
- ld a, [CurOTMon]
- jr z, .theirturn
- ld hl, PartyMon1Item
- ld de, BattleMonItem
- ld a, [CurBattleMon]
-
-.theirturn
- push hl
- push af
- ld a, [de]
- ld b, a
- farcall GetItemHeldEffect
- ld hl, .ConsumableEffects
-.loop
- ld a, [hli]
- cp b
- jr z, .ok
- inc a
- jr nz, .loop
- pop af
- pop hl
- pop bc
- pop de
- pop hl
- ret
-
-.ok
- xor a
- ld [de], a
- pop af
- pop hl
- call GetPartyLocation
- ld a, [hBattleTurn]
- and a
- jr nz, .ourturn
- ld a, [wBattleMode]
- dec a
- jr z, .done
-
-.ourturn
- ld [hl], $0
-
-.done
- pop bc
- pop de
- pop hl
- ret
-
-.ConsumableEffects: ; 271de
-; Consumable items?
- db HELD_BERRY
- db HELD_2
- db HELD_5
- db HELD_HEAL_POISON
- db HELD_HEAL_FREEZE
- db HELD_HEAL_BURN
- db HELD_HEAL_SLEEP
- db HELD_HEAL_PARALYZE
- db HELD_HEAL_STATUS
- db HELD_30
- db HELD_ATTACK_UP
- db HELD_DEFENSE_UP
- db HELD_SPEED_UP
- db HELD_SP_ATTACK_UP
- db HELD_SP_DEFENSE_UP
- db HELD_ACCURACY_UP
- db HELD_EVASION_UP
- db HELD_38
- db HELD_71
- db HELD_ESCAPE
- db HELD_CRITICAL_UP
- db -1
--- a/engine/diploma.asm
+++ b/engine/diploma.asm
@@ -1,4 +1,3 @@
-
_Diploma: ; 1dd702
call PlaceDiplomaOnScreen
call WaitPressAorB_BlinkCursor
--- a/engine/empty_sram.asm
+++ /dev/null
@@ -1,19 +1,0 @@
-EmptyAllSRAMBanks: ; 4cf1f
- ld a, $0
- call .EmptyBank
- ld a, $1
- call .EmptyBank
- ld a, $2
- call .EmptyBank
- ld a, $3
- call .EmptyBank
- ret
-
-.EmptyBank: ; 4cf34
- call GetSRAMBank
- ld hl, SRAM_Begin
- ld bc, SRAM_End - SRAM_Begin
- xor a
- call ByteFill
- call CloseSRAM
- ret
--- a/engine/events_3.asm
+++ b/engine/events_3.asm
@@ -78,7 +78,7 @@
ret z
cp LAV_RADIO_TOWER
ret z
- cp UNDERGROUND
+ cp UNDERGROUND_PATH
ret z
cp INDIGO_PLATEAU
ret z
--- a/engine/flag_predef.asm
+++ /dev/null
@@ -1,70 +1,0 @@
-FlagPredef: ; 4d7c1
-; Perform action b on flag c in flag array hl.
-; If checking a flag, check flag array d:hl unless d is 0.
-
-; For longer flag arrays, see FlagAction.
-
- push hl
- push bc
-
-; Divide by 8 to get the byte we want.
- push bc
- srl c
- srl c
- srl c
- ld b, 0
- add hl, bc
- pop bc
-
-; Which bit we want from the byte
- ld a, c
- and 7
- ld c, a
-
-; Shift left until we can mask the bit
- ld a, 1
- jr z, .shifted
-.shift
- add a
- dec c
- jr nz, .shift
-.shifted
- ld c, a
-
-; What are we doing to this flag?
- dec b
- jr z, .set ; 1
- dec b
- jr z, .check ; 2
-
-.reset
- ld a, c
- cpl
- and [hl]
- ld [hl], a
- jr .done
-
-.set
- ld a, [hl]
- or c
- ld [hl], a
- jr .done
-
-.check
- ld a, d
- cp 0
- jr nz, .farcheck
-
- ld a, [hl]
- and c
- jr .done
-
-.farcheck
- call GetFarByte
- and c
-
-.done
- pop bc
- pop hl
- ld c, a
- ret
--- a/engine/get_breedmon_growth.asm
+++ /dev/null
@@ -1,27 +1,0 @@
-GetBreedMon1LevelGrowth: ; e698
- ld hl, wBreedMon1Stats
- ld de, TempMon
- ld bc, BOXMON_STRUCT_LENGTH
- call CopyBytes
- callfar CalcLevel
- ld a, [wBreedMon1Level]
- ld b, a
- ld a, d
- ld e, a
- sub b
- ld d, a
- ret
-
-GetBreedMon2LevelGrowth: ; e6b3
- ld hl, wBreedMon2Stats
- ld de, TempMon
- ld bc, BOXMON_STRUCT_LENGTH
- call CopyBytes
- callfar CalcLevel
- ld a, [wBreedMon2Level]
- ld b, a
- ld a, d
- ld e, a
- sub b
- ld d, a
- ret
--- a/engine/init_list.asm
+++ /dev/null
@@ -1,54 +1,0 @@
-InitList: ; 50db9
- ld a, [wInitListType]
-
- cp INIT_ENEMYOT_LIST
- jr nz, .check_party_ot_name
- ld hl, OTPartyCount
- ld de, OTPartyMonOT
- ld a, ENEMY_OT_NAME
- jr .done
-
-.check_party_ot_name
- cp INIT_PLAYEROT_LIST
- jr nz, .check_mon_name
- ld hl, PartyCount
- ld de, PartyMonOT
- ld a, PARTY_OT_NAME
- jr .done
-
-.check_mon_name
- cp INIT_MON_LIST
- jr nz, .check_item_name
- ld hl, CurMart
- ld de, PokemonNames
- ld a, PKMN_NAME
- jr .done
-
-.check_item_name
- cp INIT_BAG_ITEM_LIST
- jr nz, .check_ob_item_name
- ld hl, NumItems
- ld de, ItemNames
- ld a, ITEM_NAME
- jr .done
-
-.check_ob_item_name
- ld hl, CurMart
- ld de, ItemNames
- ld a, ITEM_NAME
-.done
- ld [wNamedObjectTypeBuffer], a
- ld a, l
- ld [wListPointer], a
- ld a, h
- ld [wListPointer + 1], a
- ld a, e
- ld [wUnusedD102], a
- ld a, d
- ld [wUnusedD102 + 1], a
- ld bc, ItemAttributes
- ld a, c
- ld [wItemAttributesPtr], a
- ld a, b
- ld [wItemAttributesPtr + 1], a
- ret
--- a/engine/item_effects.asm
+++ b/engine/item_effects.asm
@@ -2147,8 +2147,8 @@
dbw HYPER_POTION, 200
dbw SUPER_POTION, 50
dbw POTION, 20
- dbw MAX_POTION, 999
- dbw FULL_RESTORE, 999
+ dbw MAX_POTION, MAX_STAT_VALUE
+ dbw FULL_RESTORE, MAX_STAT_VALUE
dbw MOOMOO_MILK, 100
dbw BERRY, 10
dbw GOLD_BERRY, 30
@@ -3314,5 +3314,3 @@
add hl, bc
ret
; f971
-
-INCLUDE "engine/pokeball_wobble.asm"
--- a/engine/knows_move.asm
+++ /dev/null
@@ -1,25 +1,0 @@
-KnowsMove: ; f9ea
- ld a, MON_MOVES
- call GetPartyParamLocation
- ld a, [wPutativeTMHMMove]
- ld b, a
- ld c, NUM_MOVES
-.loop
- ld a, [hli]
- cp b
- jr z, .knows_move
- dec c
- jr nz, .loop
- and a
- ret
-
-.knows_move
- ld hl, .Text_knows
- call PrintText
- scf
- ret
-
-.Text_knows: ; 0xfa06
- ; knows @ .
- text_jump UnknownText_0x1c5ea8
- db "@"
--- /dev/null
+++ b/engine/link_2.asm
@@ -1,0 +1,91 @@
+LinkMonStatsScreen: ; 4d319
+ ld a, [wMenuCursorY]
+ dec a
+ ld [CurPartyMon], a
+ call LowVolume
+ predef StatsScreenInit
+ ld a, [CurPartyMon]
+ inc a
+ ld [wMenuCursorY], a
+ call ClearScreen
+ call ClearBGPalettes
+ call MaxVolume
+ farcall LoadTradeScreenBorder
+ farcall Link_WaitBGMap
+ farcall InitTradeSpeciesList
+ farcall SetTradeRoomBGPals
+ call WaitBGMap2
+ ret
+
+Link_WaitBGMap: ; 4d354
+ call WaitBGMap
+ call WaitBGMap2
+ ret
+
+LinkTextbox2: ; 4d35b
+ ld h, d
+ ld l, e
+ push bc
+ push hl
+ call .PlaceBorder
+ pop hl
+ pop bc
+ ld de, AttrMap - TileMap
+ add hl, de
+ inc b
+ inc b
+ inc c
+ inc c
+ ld a, $7
+.row
+ push bc
+ push hl
+.col
+ ld [hli], a
+ dec c
+ jr nz, .col
+ pop hl
+ ld de, SCREEN_WIDTH
+ add hl, de
+ pop bc
+ dec b
+ jr nz, .row
+ ret
+
+.PlaceBorder: ; 4d37e
+ push hl
+ ld a, $76
+ ld [hli], a
+ inc a
+ call .PlaceRow
+ inc a
+ ld [hl], a
+ pop hl
+ ld de, SCREEN_WIDTH
+ add hl, de
+.loop
+ push hl
+ ld a, "┌"
+ ld [hli], a
+ ld a, " "
+ call .PlaceRow
+ ld [hl], "─"
+ pop hl
+ ld de, SCREEN_WIDTH
+ add hl, de
+ dec b
+ jr nz, .loop
+ ld a, "┐"
+ ld [hli], a
+ ld a, "│"
+ call .PlaceRow
+ ld [hl], "└"
+ ret
+
+.PlaceRow: ; 4d3ab
+ ld d, c
+.row_loop
+ ld [hli], a
+ dec d
+ jr nz, .row_loop
+ ret
--- a/engine/money.asm
+++ b/engine/money.asm
@@ -24,7 +24,7 @@
; 15ff7
MaxMoney: ; 15ff7
- dt 999999
+ dt MAX_MONEY
; 15ffa
@@ -192,7 +192,7 @@
; 1608d
.maxcoins ; 1608d
- bigdw 9999
+ bigdw MAX_COINS
; 1608f
--- a/engine/move_mon.asm
+++ b/engine/move_mon.asm
@@ -1579,9 +1579,9 @@
jr c, .stat_value_okay
.max_stat
- ld a, 999 / $100
+ ld a, MAX_STAT_VALUE / $100
ld [hMultiplicand + 1], a
- ld a, 999 % $100
+ ld a, MAX_STAT_VALUE % $100
ld [hMultiplicand + 2], a
.stat_value_okay
--- a/engine/new_pokedex_entry.asm
+++ /dev/null
@@ -1,52 +1,0 @@
-NewPokedexEntry: ; fb877
- ld a, [hMapAnims]
- push af
- xor a
- ld [hMapAnims], a
- call LowVolume
- call ClearBGPalettes
- call ClearTileMap
- call UpdateSprites
- call ClearSprites
- ld a, [wPokedexStatus]
- push af
- ld a, [hSCX]
- add $5
- ld [hSCX], a
- xor a
- ld [wPokedexStatus], a
- farcall _NewPokedexEntry
- call WaitPressAorB_BlinkCursor
- ld a, $1
- ld [wPokedexStatus], a
- farcall DisplayDexEntry
- call WaitPressAorB_BlinkCursor
- pop af
- ld [wPokedexStatus], a
- call MaxVolume
- call RotateThreePalettesRight
- ld a, [hSCX]
- add -5 ; 251 ; NUM_POKEMON
- ld [hSCX], a
- call .ReturnFromDexRegistration
- pop af
- ld [hMapAnims], a
- ret
-; fb8c8
-
-.ReturnFromDexRegistration: ; fb8c8
- call ClearTileMap
- call LoadFontsExtra
- call LoadStandardFont
- farcall Pokedex_PlaceFrontpicTopLeftCorner
- call WaitBGMap2
- farcall GetEnemyMonDVs
- ld a, [hli]
- ld [TempMonDVs], a
- ld a, [hl]
- ld [TempMonDVs + 1], a
- ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS
- call GetSGBLayout
- call SetPalettes
- ret
-; fb8f1
--- a/engine/pack_f.asm
+++ /dev/null
@@ -1,20 +1,0 @@
-DrawKrisPackGFX: ; 48e81
- ld hl, PackFGFXPointers
- add hl, de
- add hl, de
- ld a, [hli]
- ld e, a
- ld d, [hl]
- ld hl, VTiles2 tile $50
- lb bc, BANK(PackFGFX), 15
- call Request2bpp
- ret
-
-PackFGFXPointers: ; 48e93
- dw PackFGFX + (15 tiles) * 1
- dw PackFGFX + (15 tiles) * 3
- dw PackFGFX + (15 tiles) * 0
- dw PackFGFX + (15 tiles) * 2
-
-PackFGFX: ; 48e9b
-INCBIN "gfx/pack/pack_f.2bpp"
--- a/engine/phone/phone.asm
+++ b/engine/phone/phone.asm
@@ -599,7 +599,7 @@
call PlaySFX
call Phone_CallerTextbox
call UpdateSprites
- farcall PhoneRing_LoadEDTile
+ farcall PhoneRing_CopyTilemapAtOnce
ret
; 90355
@@ -609,7 +609,7 @@
Phone_Wait20Frames
ld c, 20
call DelayFrames
- farcall PhoneRing_LoadEDTile
+ farcall PhoneRing_CopyTilemapAtOnce
ret
; 90363
--- a/engine/place_graphics.asm
+++ /dev/null
@@ -1,56 +1,0 @@
-PlaceGraphic: ; 2ef6e
-; Fill wBoxAlignment-aligned box width b height c
-; with iterating tile starting from hGraphicStartTile at hl.
-; Predef $13
-
- ld de, SCREEN_WIDTH
-
- ld a, [wBoxAlignment]
- and a
- jr nz, .right
-
- ld a, [hGraphicStartTile]
-.x1
- push bc
- push hl
-
-.y1
- ld [hl], a
- add hl, de
- inc a
- dec c
- jr nz, .y1
-
- pop hl
- inc hl
- pop bc
- dec b
- jr nz, .x1
- ret
-
-.right
-; Right-aligned.
- push bc
- ld b, 0
- dec c
- add hl, bc
- pop bc
-
- ld a, [hGraphicStartTile]
-.x2
- push bc
- push hl
-
-.y2
- ld [hl], a
- add hl, de
- inc a
- dec c
- jr nz, .y2
-
- pop hl
- dec hl
- pop bc
- dec b
- jr nz, .x2
- ret
--- a/engine/play_slow_cry.asm
+++ /dev/null
@@ -1,31 +1,0 @@
-PlaySlowCry: ; fb841
- ld a, [ScriptVar]
- call LoadCryHeader
- jr c, .done
-
- ld hl, CryPitch
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld bc, -$140
- add hl, bc
- ld a, l
- ld [CryPitch], a
- ld a, h
- ld [CryPitch + 1], a
- ld hl, CryLength
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld bc, $60
- add hl, bc
- ld a, l
- ld [CryLength], a
- ld a, h
- ld [CryLength + 1], a
- farcall _PlayCryHeader
- call WaitSFX
-
-.done
- ret
-; fb877
--- a/engine/player_gfx_2.asm
+++ /dev/null
@@ -1,5 +1,0 @@
-ChrisBackpic: ; 2ba1a
-INCBIN "gfx/player/chris_back.2bpp.lz"
-
-DudeBackpic: ; 2bbaa
-INCBIN "gfx/battle/dude.2bpp.lz"
--- a/engine/pokeball_wobble.asm
+++ /dev/null
@@ -1,88 +1,0 @@
-GetPokeBallWobble: ; f971 (3:7971)
-; Returns whether a Poke Ball will wobble in the catch animation.
-; Whether a Pokemon is caught is determined beforehand.
-
- push de
-
- ld a, [rSVBK]
- ld d, a
- push de
-
- ld a, 1 ; BANK(Buffer2)
- ld [rSVBK], a
-
- ld a, [Buffer2]
- inc a
- ld [Buffer2], a
-
-; Wobble up to 3 times.
- cp 3 + 1
- jr z, .finished
-
- ld a, [wWildMon]
- and a
- ld c, 0 ; next
- jr nz, .done
-
- ld hl, .WobbleProbabilities
- ld a, [Buffer1]
- ld b, a
-.loop
- ld a, [hli]
- cp b
- jr nc, .checkwobble
- inc hl
- jr .loop
-
-.checkwobble
- ld b, [hl]
- call Random
- cp b
- ld c, 0 ; next
- jr c, .done
- ld c, 2 ; escaped
- jr .done
-
-.finished
- ld a, [wWildMon]
- and a
- ld c, 1 ; caught
- jr nz, .done
- ld c, 2 ; escaped
-
-.done
- pop de
- ld e, a
- ld a, d
- ld [rSVBK], a
- ld a, e
- pop de
- ret
-
-.WobbleProbabilities: ; f9ba
-; catch rate, chance of wobbling / 255
-; nLeft/255 = (nRight/255) ** 4
- db 1, 63
- db 2, 75
- db 3, 84
- db 4, 90
- db 5, 95
- db 7, 103
- db 10, 113
- db 15, 126
- db 20, 134
- db 30, 149
- db 40, 160
- db 50, 169
- db 60, 177
- db 80, 191
- db 100, 201
- db 120, 211
- db 140, 220
- db 160, 227
- db 180, 234
- db 200, 240
- db 220, 246
- db 240, 251
- db 254, 253
- db 255, 255
--- a/engine/pokegear.asm
+++ b/engine/pokegear.asm
@@ -1688,7 +1688,7 @@
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
- ld de, UnknownStationName
+ ld de, UnownStationName
ret
LoadStation_PlacesAndPeople: ; 917ea (24:57ea)
@@ -1747,7 +1747,7 @@
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
- ld de, UnknownStationName
+ ld de, UnownStationName
ret
; 91853 (24:5853)
@@ -1821,7 +1821,7 @@
PokedexShowName: db "#DEX Show@"
PokemonMusicName: db "#MON Music@"
LuckyChannelName: db "Lucky Channel@"
-UnknownStationName: db "?????@"
+UnownStationName: db "?????@"
PlacesAndPeopleName: db "Places & People@"
LetsAllSingName: db "Let's All Sing!@"
--- a/engine/pokegear_2.asm
+++ /dev/null
@@ -1,25 +1,0 @@
-TownMap_ConvertLineBreakCharacters: ; 1de2c5
- ld hl, StringBuffer1
-.loop
- ld a, [hl]
- cp "@"
- jr z, .end
- cp "%"
- jr z, .line_break
- cp "¯"
- jr z, .line_break
- inc hl
- jr .loop
-
-.line_break
- ld [hl], "<LNBRK>"
-
-.end
- ld de, StringBuffer1
- hlcoord 9, 0
- call PlaceString
- ret
-
-
-PokegearGFX: ; 1de2e4
-INCBIN "gfx/pokegear/pokegear.2bpp.lz"
--- a/engine/pokerus.asm
+++ /dev/null
@@ -1,160 +1,0 @@
-GivePokerusAndConvertBerries: ; 2ed44
- call ConvertBerriesToBerryJuice
- ld hl, PartyMon1PokerusStatus
- ld a, [PartyCount]
- ld b, a
- ld de, PARTYMON_STRUCT_LENGTH
-; Check to see if any of your Pokemon already has Pokerus.
-; If so, sample its spread through your party.
-; This means that you cannot get Pokerus de novo while
-; a party member has an active infection.
-.loopMons
- ld a, [hl]
- and $f
- jr nz, .TrySpreadPokerus
- add hl, de
- dec b
- jr nz, .loopMons
-
-; If we haven't been to Goldenrod City at least once,
-; prevent the contraction of Pokerus.
- ld hl, StatusFlags2
- bit 6, [hl]
- ret z
- call Random
- ld a, [hRandomAdd]
- and a
- ret nz
- ld a, [hRandomSub]
- cp $3
- ret nc ; 3/65536 chance (00 00, 00 01 or 00 02)
- ld a, [PartyCount]
- ld b, a
-.randomMonSelectLoop
- call Random
- and $7
- cp b
- jr nc, .randomMonSelectLoop
- ld hl, PartyMon1PokerusStatus
- call GetPartyLocation ; get pokerus byte of random mon
- ld a, [hl]
- and $f0
- ret nz ; if it already has pokerus, do nothing
-.randomPokerusLoop ; Simultaneously sample the strain and duration
- call Random
- and a
- jr z, .randomPokerusLoop
- ld b, a
- and $f0
- jr z, .load_pkrs
- ld a, b
- and $7
- inc a
-.load_pkrs
- ld b, a ; this should come before the label
- swap b
- and $3
- inc a
- add b
- ld [hl], a
- ret
-
-.TrySpreadPokerus:
- call Random
- cp 1 + 33 percent
- ret nc ; 1/3 chance
-
- ld a, [PartyCount]
- cp 1
- ret z ; only one mon, nothing to do
-
- ld c, [hl]
- ld a, b
- cp 2
- jr c, .checkPreviousMonsLoop ; no more mons after this one, go backwards
-
- call Random
- cp 1 + 50 percent
- jr c, .checkPreviousMonsLoop ; 1/2 chance, go backwards
-.checkFollowingMonsLoop
- add hl, de
- ld a, [hl]
- and a
- jr z, .infectMon
- ld c, a
- and $3
- ret z ; if mon has cured pokerus, stop searching
- dec b ; go on to next mon
- ld a, b
- cp 1
- jr nz, .checkFollowingMonsLoop ; no more mons left
- ret
-
-.checkPreviousMonsLoop
- ld a, [PartyCount]
- cp b
- ret z ; no more mons
- ld a, l
- sub e
- ld l, a
- ld a, h
- sbc d
- ld h, a
- ld a, [hl]
- and a
- jr z, .infectMon
- ld c, a
- and $3
- ret z ; if mon has cured pokerus, stop searching
- inc b ; go on to next mon
- jr .checkPreviousMonsLoop
-
-.infectMon
- ld a, c
- and $f0
- ld b, a
- ld a, c
- swap a
- and $3
- inc a
- add b
- ld [hl], a
- ret
-
-; any berry held by a Shuckle may be converted to berry juice
-ConvertBerriesToBerryJuice: ; 2ede6
- ld hl, StatusFlags2
- bit 6, [hl]
- ret z
- call Random
- cp $10
- ret nc ; 1/16 chance
- ld hl, PartyMons
- ld a, [PartyCount]
-.partyMonLoop
- push af
- push hl
- ld a, [hl]
- cp SHUCKLE
- jr nz, .loopMon
- ld bc, MON_ITEM
- add hl, bc
- ld a, [hl]
- cp BERRY
- jr z, .convertToJuice
-
-.loopMon
- pop hl
- ld bc, PARTYMON_STRUCT_LENGTH
- add hl, bc
- pop af
- dec a
- jr nz, .partyMonLoop
- ret
-
-.convertToJuice
- ld a, BERRY_JUICE
- ld [hl], a
- pop hl
- pop af
- ret
--- /dev/null
+++ b/engine/pokerus/apply_pokerus_tick.asm
@@ -1,0 +1,26 @@
+ApplyPokerusTick: ; 13988
+; decreases all pokemon's pokerus counter by b. if the lower nybble reaches zero, the pokerus is cured.
+ ld hl, PartyMon1PokerusStatus ; PartyMon1 + MON_PKRS
+ ld a, [PartyCount]
+ and a
+ ret z ; make sure it's not wasting time on an empty party
+ ld c, a
+.loop
+ ld a, [hl]
+ and $f ; lower nybble is the number of days remaining
+ jr z, .next ; if already 0, skip
+ sub b ; subtract the number of days
+ jr nc, .ok ; max(result, 0)
+ xor a
+.ok
+ ld d, a ; back up this value because we need to preserve the strain (upper nybble)
+ ld a, [hl]
+ and $f0
+ add d
+ ld [hl], a ; this prevents a cured pokemon from recontracting pokerus
+.next
+ ld de, PARTYMON_STRUCT_LENGTH
+ add hl, de
+ dec c
+ jr nz, .loop
+ ret
--- /dev/null
+++ b/engine/pokerus/check_pokerus.asm
@@ -1,0 +1,25 @@
+CheckPokerus: ; 4d860
+; Return carry if a monster in your party has Pokerus
+
+; Get number of monsters to iterate over
+ ld a, [PartyCount]
+ and a
+ jr z, .NoPokerus
+ ld b, a
+; Check each monster in the party for Pokerus
+ ld hl, PartyMon1PokerusStatus
+ ld de, PARTYMON_STRUCT_LENGTH
+.Check:
+ ld a, [hl]
+ and $0f ; only the bottom nybble is used
+ jr nz, .HasPokerus
+; Next PartyMon
+ add hl, de
+ dec b
+ jr nz, .Check
+.NoPokerus:
+ and a
+ ret
+.HasPokerus:
+ scf
+ ret
--- /dev/null
+++ b/engine/pokerus/pokerus.asm
@@ -1,0 +1,160 @@
+GivePokerusAndConvertBerries: ; 2ed44
+ call ConvertBerriesToBerryJuice
+ ld hl, PartyMon1PokerusStatus
+ ld a, [PartyCount]
+ ld b, a
+ ld de, PARTYMON_STRUCT_LENGTH
+; Check to see if any of your Pokemon already has Pokerus.
+; If so, sample its spread through your party.
+; This means that you cannot get Pokerus de novo while
+; a party member has an active infection.
+.loopMons
+ ld a, [hl]
+ and $f
+ jr nz, .TrySpreadPokerus
+ add hl, de
+ dec b
+ jr nz, .loopMons
+
+; If we haven't been to Goldenrod City at least once,
+; prevent the contraction of Pokerus.
+ ld hl, StatusFlags2
+ bit 6, [hl]
+ ret z
+ call Random
+ ld a, [hRandomAdd]
+ and a
+ ret nz
+ ld a, [hRandomSub]
+ cp $3
+ ret nc ; 3/65536 chance (00 00, 00 01 or 00 02)
+ ld a, [PartyCount]
+ ld b, a
+.randomMonSelectLoop
+ call Random
+ and $7
+ cp b
+ jr nc, .randomMonSelectLoop
+ ld hl, PartyMon1PokerusStatus
+ call GetPartyLocation ; get pokerus byte of random mon
+ ld a, [hl]
+ and $f0
+ ret nz ; if it already has pokerus, do nothing
+.randomPokerusLoop ; Simultaneously sample the strain and duration
+ call Random
+ and a
+ jr z, .randomPokerusLoop
+ ld b, a
+ and $f0
+ jr z, .load_pkrs
+ ld a, b
+ and $7
+ inc a
+.load_pkrs
+ ld b, a ; this should come before the label
+ swap b
+ and $3
+ inc a
+ add b
+ ld [hl], a
+ ret
+
+.TrySpreadPokerus:
+ call Random
+ cp 1 + 33 percent
+ ret nc ; 1/3 chance
+
+ ld a, [PartyCount]
+ cp 1
+ ret z ; only one mon, nothing to do
+
+ ld c, [hl]
+ ld a, b
+ cp 2
+ jr c, .checkPreviousMonsLoop ; no more mons after this one, go backwards
+
+ call Random
+ cp 1 + 50 percent
+ jr c, .checkPreviousMonsLoop ; 1/2 chance, go backwards
+.checkFollowingMonsLoop
+ add hl, de
+ ld a, [hl]
+ and a
+ jr z, .infectMon
+ ld c, a
+ and $3
+ ret z ; if mon has cured pokerus, stop searching
+ dec b ; go on to next mon
+ ld a, b
+ cp 1
+ jr nz, .checkFollowingMonsLoop ; no more mons left
+ ret
+
+.checkPreviousMonsLoop
+ ld a, [PartyCount]
+ cp b
+ ret z ; no more mons
+ ld a, l
+ sub e
+ ld l, a
+ ld a, h
+ sbc d
+ ld h, a
+ ld a, [hl]
+ and a
+ jr z, .infectMon
+ ld c, a
+ and $3
+ ret z ; if mon has cured pokerus, stop searching
+ inc b ; go on to next mon
+ jr .checkPreviousMonsLoop
+
+.infectMon
+ ld a, c
+ and $f0
+ ld b, a
+ ld a, c
+ swap a
+ and $3
+ inc a
+ add b
+ ld [hl], a
+ ret
+
+; any berry held by a Shuckle may be converted to berry juice
+ConvertBerriesToBerryJuice: ; 2ede6
+ ld hl, StatusFlags2
+ bit 6, [hl]
+ ret z
+ call Random
+ cp $10
+ ret nc ; 1/16 chance
+ ld hl, PartyMons
+ ld a, [PartyCount]
+.partyMonLoop
+ push af
+ push hl
+ ld a, [hl]
+ cp SHUCKLE
+ jr nz, .loopMon
+ ld bc, MON_ITEM
+ add hl, bc
+ ld a, [hl]
+ cp BERRY
+ jr z, .convertToJuice
+
+.loopMon
+ pop hl
+ ld bc, PARTYMON_STRUCT_LENGTH
+ add hl, bc
+ pop af
+ dec a
+ jr nz, .partyMonLoop
+ ret
+
+.convertToJuice
+ ld a, BERRY_JUICE
+ ld [hl], a
+ pop hl
+ pop af
+ ret
--- a/engine/pokerus_tick.asm
+++ /dev/null
@@ -1,26 +1,0 @@
-ApplyPokerusTick: ; 13988
-; decreases all pokemon's pokerus counter by b. if the lower nybble reaches zero, the pokerus is cured.
- ld hl, PartyMon1PokerusStatus ; PartyMon1 + MON_PKRS
- ld a, [PartyCount]
- and a
- ret z ; make sure it's not wasting time on an empty party
- ld c, a
-.loop
- ld a, [hl]
- and $f ; lower nybble is the number of days remaining
- jr z, .next ; if already 0, skip
- sub b ; subtract the number of days
- jr nc, .ok ; max(result, 0)
- xor a
-.ok
- ld d, a ; back up this value because we need to preserve the strain (upper nybble)
- ld a, [hl]
- and $f0
- add d
- ld [hl], a ; this prevents a cured pokemon from recontracting pokerus
-.next
- ld de, PARTYMON_STRUCT_LENGTH
- add hl, de
- dec c
- jr nz, .loop
- ret
--- a/engine/printhoursmins.asm
+++ /dev/null
@@ -1,64 +1,0 @@
-Function1dd6a9: ; 1dd6a9
-; XXX
- ld a, b
- ld b, c
- ld c, a
- push bc
- push de
- ld hl, sp+$2
- ld d, h
- ld e, l
- pop hl
- lb bc, PRINTNUM_LEADINGZEROS | 2, 5
- call PrintNum
- pop bc
- ret
-
-PrintHoursMins ; 1dd6bb (77:56bb)
-; Hours in b, minutes in c
- ld a, b
- cp 12
- push af
- jr c, .AM
- jr z, .PM
- sub 12
- jr .PM
-.AM:
- or a
- jr nz, .PM
- ld a, 12
-.PM:
- ld b, a
-; Crazy stuff happening with the stack
- push bc
- ld hl, sp+$1
- push de
- push hl
- pop de
- pop hl
- ld [hl], " "
- lb bc, 1, 2
- call PrintNum
- ld [hl], ":"
- inc hl
- ld d, h
- ld e, l
- ld hl, sp+$0
- push de
- push hl
- pop de
- pop hl
- lb bc, PRINTNUM_LEADINGZEROS | 1, 2
- call PrintNum
- pop bc
- ld de, String_AM
- pop af
- jr c, .place_am_pm
- ld de, String_PM
-.place_am_pm
- inc hl
- call PlaceString
- ret
-
-String_AM: db "AM@" ; 1dd6fc
-String_PM: db "PM@" ; 1dd6ff
--- /dev/null
+++ b/engine/routines/battlestart_copytilemapatonce.asm
@@ -1,0 +1,3 @@
+BattleStart_CopyTilemapAtOnce: ; 8cf4f
+ call CGBOnly_CopyTilemapAtOnce
+ ret
--- /dev/null
+++ b/engine/routines/checkbattlescene.asm
@@ -1,0 +1,47 @@
+CheckBattleScene: ; 4ea44
+; Return carry if battle scene is turned off.
+
+ ld a, 0
+ ld hl, wLinkMode
+ call GetFarWRAMByte
+ cp LINK_MOBILE
+ jr z, .mobile
+
+ ld a, [Options]
+ bit BATTLE_SCENE, a
+ jr nz, .off
+
+ and a
+ ret
+
+.mobile
+ ld a, [wcd2f]
+ and a
+ jr nz, .from_wram
+
+ ld a, $4
+ call GetSRAMBank
+ ld a, [$a60c]
+ ld c, a
+ call CloseSRAM
+
+ ld a, c
+ bit 0, c
+ jr z, .off
+
+ and a
+ ret
+
+.from_wram
+ ld a, $5
+ ld hl, w5_dc00
+ call GetFarWRAMByte
+ bit 0, a
+ jr z, .off
+
+ and a
+ ret
+
+.off
+ scf
+ ret
--- /dev/null
+++ b/engine/routines/checknickerrors.asm
@@ -1,0 +1,74 @@
+CheckNickErrors:: ; 669f
+; error-check monster nick before use
+; must be a peace offering to gamesharkers
+
+; input: de = nick location
+
+ push bc
+ push de
+ ld b, PKMN_NAME_LENGTH
+
+.checkchar
+; end of nick?
+ ld a, [de]
+ cp "@" ; terminator
+ jr z, .end
+
+; check if this char is a text command
+ ld hl, .textcommands
+ dec hl
+.loop
+; next entry
+ inc hl
+; reached end of commands table?
+ ld a, [hl]
+ cp -1
+ jr z, .done
+
+; is the current char between this value (inclusive)...
+ ld a, [de]
+ cp [hl]
+ inc hl
+ jr c, .loop
+; ...and this one?
+ cp [hl]
+ jr nc, .loop
+
+; replace it with a "?"
+ ld a, "?"
+ ld [de], a
+ jr .loop
+
+.done
+; next char
+ inc de
+; reached end of nick without finding a terminator?
+ dec b
+ jr nz, .checkchar
+
+; change nick to "?@"
+ pop de
+ push de
+ ld a, "?"
+ ld [de], a
+ inc de
+ ld a, "@"
+ ld [de], a
+.end
+; if the nick has any errors at this point it's out of our hands
+ pop de
+ pop bc
+ ret
+
+.textcommands ; 66cf
+; table defining which characters are actually text commands
+; format:
+ ; ≥ <
+ db "<START>", TX_BOX + 1
+ db "<PLAY_G>", $18 + 1
+ db $1d, "%" + 1
+ db $35, "<GREEN>" + 1
+ db "<ENEMY>", "<ENEMY>" + 1
+ db "<MOM>", "<TM>" + 1
+ db "<ROCKET>", "┘" + 1
+ db -1 ; end
--- /dev/null
+++ b/engine/routines/checksave.asm
@@ -1,0 +1,20 @@
+CheckSave:: ; 4cffe
+ ld a, BANK(sCheckValue1) ; BANK(sCheckValue2)
+ call GetSRAMBank
+ ld a, [sCheckValue1]
+ ld b, a
+ ld a, [sCheckValue2]
+ ld c, a
+ call CloseSRAM
+ ld a, b
+ cp SAVE_CHECK_VALUE_1
+ jr nz, .ok
+ ld a, c
+ cp SAVE_CHECK_VALUE_2
+ jr nz, .ok
+ ld c, $1
+ ret
+
+.ok
+ ld c, $0
+ ret
--- /dev/null
+++ b/engine/routines/checktime.asm
@@ -1,0 +1,19 @@
+CheckTime:: ; c000
+ ld a, [TimeOfDay]
+ ld hl, .TimeOfDayTable
+ ld de, 2
+ call IsInArray
+ inc hl
+ ld c, [hl]
+ ret c
+
+ xor a
+ ld c, a
+ ret
+
+.TimeOfDayTable: ; c012
+ db MORN_F, MORN
+ db DAY_F, DAY
+ db NITE_F, NITE
+ db NITE_F, NITE
+ db -1
--- /dev/null
+++ b/engine/routines/consumehelditem.asm
@@ -1,0 +1,80 @@
+ConsumeHeldItem: ; 27192
+ push hl
+ push de
+ push bc
+ ld a, [hBattleTurn]
+ and a
+ ld hl, OTPartyMon1Item
+ ld de, EnemyMonItem
+ ld a, [CurOTMon]
+ jr z, .theirturn
+ ld hl, PartyMon1Item
+ ld de, BattleMonItem
+ ld a, [CurBattleMon]
+
+.theirturn
+ push hl
+ push af
+ ld a, [de]
+ ld b, a
+ farcall GetItemHeldEffect
+ ld hl, .ConsumableEffects
+.loop
+ ld a, [hli]
+ cp b
+ jr z, .ok
+ inc a
+ jr nz, .loop
+ pop af
+ pop hl
+ pop bc
+ pop de
+ pop hl
+ ret
+
+.ok
+ xor a
+ ld [de], a
+ pop af
+ pop hl
+ call GetPartyLocation
+ ld a, [hBattleTurn]
+ and a
+ jr nz, .ourturn
+ ld a, [wBattleMode]
+ dec a
+ jr z, .done
+
+.ourturn
+ ld [hl], $0
+
+.done
+ pop bc
+ pop de
+ pop hl
+ ret
+
+.ConsumableEffects: ; 271de
+; Consumable items?
+ db HELD_BERRY
+ db HELD_2
+ db HELD_5
+ db HELD_HEAL_POISON
+ db HELD_HEAL_FREEZE
+ db HELD_HEAL_BURN
+ db HELD_HEAL_SLEEP
+ db HELD_HEAL_PARALYZE
+ db HELD_HEAL_STATUS
+ db HELD_30
+ db HELD_ATTACK_UP
+ db HELD_DEFENSE_UP
+ db HELD_SPEED_UP
+ db HELD_SP_ATTACK_UP
+ db HELD_SP_DEFENSE_UP
+ db HELD_ACCURACY_UP
+ db HELD_EVASION_UP
+ db HELD_38
+ db HELD_71
+ db HELD_ESCAPE
+ db HELD_CRITICAL_UP
+ db -1
--- /dev/null
+++ b/engine/routines/correcterrorsinplayerparty.asm
@@ -1,0 +1,229 @@
+CorrectErrorsInPlayerParty: ; unreferenced
+ ld hl, PartyCount
+ ld a, [hl]
+ and a
+ ret z
+
+ cp PARTY_LENGTH + 1
+ jr c, .party_length_okay
+ ld a, PARTY_LENGTH
+ ld [hl], a
+.party_length_okay
+ inc hl
+
+ ld b, a
+ ld c, 0
+.loop1
+ ld a, [hl]
+ and a
+ jr z, .invalid_species
+ cp NUM_POKEMON + 1
+ jr z, .invalid_species
+ cp EGG + 1
+ jr c, .next_species
+
+.invalid_species
+ ld [hl], SMEARGLE
+ push hl
+ push bc
+ ld a, c
+ ld hl, PartyMon1Species
+ call GetPartyLocation
+ ld [hl], SMEARGLE
+ pop bc
+ pop hl
+
+.next_species
+ inc hl
+ inc c
+ dec b
+ jr nz, .loop1
+ ld [hl], $ff
+
+ ld hl, PartyMon1
+ ld a, [PartyCount]
+ ld d, a
+ ld e, 0
+.loop2
+ push de
+ push hl
+ ld b, h
+ ld c, l
+ ld a, [hl]
+ and a
+ jr z, .invalid_species_2
+ cp NUM_POKEMON + 1
+ jr c, .check_level
+
+.invalid_species_2
+ ld [hl], SMEARGLE
+ push de
+ ld d, 0
+ ld hl, PartySpecies
+ add hl, de
+ pop de
+ ld a, SMEARGLE
+ ld [hl], a
+
+.check_level
+ ld [CurSpecies], a
+ call GetBaseData
+ ld hl, MON_LEVEL
+ add hl, bc
+ ld a, [hl]
+ cp MIN_LEVEL
+ ld a, MIN_LEVEL
+ jr c, .invalid_level
+ ld a, [hl]
+ cp MAX_LEVEL
+ jr c, .load_level
+ ld a, MAX_LEVEL
+.invalid_level
+ ld [hl], a
+.load_level
+ ld [CurPartyLevel], a
+
+ ld hl, MON_MAXHP
+ add hl, bc
+ ld d, h
+ ld e, l
+ ld hl, MON_STAT_EXP - 1
+ add hl, bc
+ ld b, $1
+ predef CalcPkmnStats
+ pop hl
+ ld bc, PARTYMON_STRUCT_LENGTH
+ add hl, bc
+ pop de
+ inc e
+ dec d
+ jr nz, .loop2
+
+ ld de, PartyMonNicknames
+ ld a, [PartyCount]
+ ld b, a
+ ld c, 0
+.loop3
+ push bc
+ call .GetLengthOfStringWith6CharCap
+ push de
+ farcall CheckStringForErrors
+ pop hl
+ pop bc
+ jr nc, .valid_nickname
+
+ push bc
+ push hl
+ ld hl, PartySpecies
+ push bc
+ ld b, 0
+ add hl, bc
+ pop bc
+ ld a, [hl]
+ cp EGG
+ ld hl, .TAMAGO
+ jr z, .got_nickname
+ ld [wd265], a
+ call GetPokemonName
+ ld hl, StringBuffer1
+.got_nickname
+ pop de
+ ld bc, PKMN_NAME_LENGTH
+ call CopyBytes
+ pop bc
+
+.valid_nickname
+ inc c
+ dec b
+ jr nz, .loop3
+
+ ld de, PartyMonOT
+ ld a, [PartyCount]
+ ld b, a
+ ld c, 0
+.loop4
+ push bc
+ call .GetLengthOfStringWith6CharCap
+ push de
+ farcall CheckStringForErrors
+ pop hl
+ jr nc, .valid_ot_name
+ ld d, h
+ ld e, l
+ ld hl, PlayerName
+ ld bc, NAME_LENGTH
+ call CopyBytes
+.valid_ot_name
+ pop bc
+ inc c
+ dec b
+ jr nz, .loop4
+
+ ld hl, PartyMon1Moves
+ ld a, [PartyCount]
+ ld b, a
+.loop5
+ push hl
+ ld c, NUM_MOVES
+ ld a, [hl]
+ and a
+ jr z, .invalid_move
+ cp NUM_ATTACKS + 1
+ jr c, .moves_loop
+.invalid_move
+ ld [hl], POUND
+
+.moves_loop
+ ld a, [hl]
+ and a
+ jr z, .fill_invalid_moves
+ cp NUM_ATTACKS + 1
+ jr c, .next_move
+
+.fill_invalid_moves
+ xor a
+ ld [hli], a
+ dec c
+ jr nz, .fill_invalid_moves
+ jr .next_pokemon
+
+.next_move
+ inc hl
+ dec c
+ jr nz, .moves_loop
+
+.next_pokemon
+ pop hl
+ push bc
+ ld bc, PARTYMON_STRUCT_LENGTH
+ add hl, bc
+ pop bc
+ dec b
+ jr nz, .loop5
+ ret
+; 13b6b
+
+.TAMAGO: ; 13b6b
+ db "タマゴ@@@"
+; 13b71
+
+.GetLengthOfStringWith6CharCap: ; 13b71
+ push de
+ ld c, 1
+ ld b, NAME_LENGTH_JAPANESE
+.search_loop
+ ld a, [de]
+ cp "@"
+ jr z, .done
+ inc de
+ inc c
+ dec b
+ jr nz, .search_loop
+ dec c
+ dec de
+ ld a, "@"
+ ld [de], a
+.done
+ pop de
+ ret
+; 13b87
--- /dev/null
+++ b/engine/routines/drawkrispackgfx.asm
@@ -1,0 +1,20 @@
+DrawKrisPackGFX: ; 48e81
+ ld hl, PackFGFXPointers
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld e, a
+ ld d, [hl]
+ ld hl, VTiles2 tile $50
+ lb bc, BANK(PackFGFX), 15
+ call Request2bpp
+ ret
+
+PackFGFXPointers: ; 48e93
+ dw PackFGFX + (15 tiles) * 1
+ dw PackFGFX + (15 tiles) * 3
+ dw PackFGFX + (15 tiles) * 0
+ dw PackFGFX + (15 tiles) * 2
+
+PackFGFX: ; 48e9b
+INCBIN "gfx/pack/pack_f.2bpp"
--- /dev/null
+++ b/engine/routines/emptyallsrambanks.asm
@@ -1,0 +1,19 @@
+EmptyAllSRAMBanks: ; 4cf1f
+ ld a, $0
+ call .EmptyBank
+ ld a, $1
+ call .EmptyBank
+ ld a, $2
+ call .EmptyBank
+ ld a, $3
+ call .EmptyBank
+ ret
+
+.EmptyBank: ; 4cf34
+ call GetSRAMBank
+ ld hl, SRAM_Begin
+ ld bc, SRAM_End - SRAM_Begin
+ xor a
+ call ByteFill
+ call CloseSRAM
+ ret
--- /dev/null
+++ b/engine/routines/flagpredef.asm
@@ -1,0 +1,70 @@
+FlagPredef: ; 4d7c1
+; Perform action b on flag c in flag array hl.
+; If checking a flag, check flag array d:hl unless d is 0.
+
+; For longer flag arrays, see FlagAction.
+
+ push hl
+ push bc
+
+; Divide by 8 to get the byte we want.
+ push bc
+ srl c
+ srl c
+ srl c
+ ld b, 0
+ add hl, bc
+ pop bc
+
+; Which bit we want from the byte
+ ld a, c
+ and 7
+ ld c, a
+
+; Shift left until we can mask the bit
+ ld a, 1
+ jr z, .shifted
+.shift
+ add a
+ dec c
+ jr nz, .shift
+.shifted
+ ld c, a
+
+; What are we doing to this flag?
+ dec b
+ jr z, .set ; 1
+ dec b
+ jr z, .check ; 2
+
+.reset
+ ld a, c
+ cpl
+ and [hl]
+ ld [hl], a
+ jr .done
+
+.set
+ ld a, [hl]
+ or c
+ ld [hl], a
+ jr .done
+
+.check
+ ld a, d
+ cp 0
+ jr nz, .farcheck
+
+ ld a, [hl]
+ and c
+ jr .done
+
+.farcheck
+ call GetFarByte
+ and c
+
+.done
+ pop bc
+ pop hl
+ ld c, a
+ ret
--- /dev/null
+++ b/engine/routines/getbreedmonlevelgrowth.asm
@@ -1,0 +1,27 @@
+GetBreedMon1LevelGrowth: ; e698
+ ld hl, wBreedMon1Stats
+ ld de, TempMon
+ ld bc, BOXMON_STRUCT_LENGTH
+ call CopyBytes
+ callfar CalcLevel
+ ld a, [wBreedMon1Level]
+ ld b, a
+ ld a, d
+ ld e, a
+ sub b
+ ld d, a
+ ret
+
+GetBreedMon2LevelGrowth: ; e6b3
+ ld hl, wBreedMon2Stats
+ ld de, TempMon
+ ld bc, BOXMON_STRUCT_LENGTH
+ call CopyBytes
+ callfar CalcLevel
+ ld a, [wBreedMon2Level]
+ ld b, a
+ ld a, d
+ ld e, a
+ sub b
+ ld d, a
+ ret
--- /dev/null
+++ b/engine/routines/getpokeballwobble.asm
@@ -1,0 +1,88 @@
+GetPokeBallWobble: ; f971 (3:7971)
+; Returns whether a Poke Ball will wobble in the catch animation.
+; Whether a Pokemon is caught is determined beforehand.
+
+ push de
+
+ ld a, [rSVBK]
+ ld d, a
+ push de
+
+ ld a, 1 ; BANK(Buffer2)
+ ld [rSVBK], a
+
+ ld a, [Buffer2]
+ inc a
+ ld [Buffer2], a
+
+; Wobble up to 3 times.
+ cp 3 + 1
+ jr z, .finished
+
+ ld a, [wWildMon]
+ and a
+ ld c, 0 ; next
+ jr nz, .done
+
+ ld hl, .WobbleProbabilities
+ ld a, [Buffer1]
+ ld b, a
+.loop
+ ld a, [hli]
+ cp b
+ jr nc, .checkwobble
+ inc hl
+ jr .loop
+
+.checkwobble
+ ld b, [hl]
+ call Random
+ cp b
+ ld c, 0 ; next
+ jr c, .done
+ ld c, 2 ; escaped
+ jr .done
+
+.finished
+ ld a, [wWildMon]
+ and a
+ ld c, 1 ; caught
+ jr nz, .done
+ ld c, 2 ; escaped
+
+.done
+ pop de
+ ld e, a
+ ld a, d
+ ld [rSVBK], a
+ ld a, e
+ pop de
+ ret
+
+.WobbleProbabilities: ; f9ba
+; catch rate, chance of wobbling / 255
+; nLeft/255 = (nRight/255) ** 4
+ db 1, 63
+ db 2, 75
+ db 3, 84
+ db 4, 90
+ db 5, 95
+ db 7, 103
+ db 10, 113
+ db 15, 126
+ db 20, 134
+ db 30, 149
+ db 40, 160
+ db 50, 169
+ db 60, 177
+ db 80, 191
+ db 100, 201
+ db 120, 211
+ db 140, 220
+ db 160, 227
+ db 180, 234
+ db 200, 240
+ db 220, 246
+ db 240, 251
+ db 254, 253
+ db 255, 255
--- /dev/null
+++ b/engine/routines/getsquareroot.asm
@@ -1,0 +1,30 @@
+GetSquareRoot: ; 13b87
+; Return the square root of de in b.
+
+; Rather than calculating the result, we take the index of the
+; first value in a table of squares that isn't lower than de.
+
+ ld hl, .Squares
+ ld b, 0
+.loop
+; Make sure we don't go past the end of the table.
+ inc b
+ ld a, b
+ cp $ff
+ ret z
+
+; Iterate over the table until b**2 >= de.
+ ld a, [hli]
+ sub e
+ ld a, [hli]
+ sbc d
+
+ jr c, .loop
+ ret
+
+.Squares: ; 13b98
+root set 1
+ rept $ff
+ dw root*root
+root set root+1
+ endr
--- /dev/null
+++ b/engine/routines/initlist.asm
@@ -1,0 +1,54 @@
+InitList: ; 50db9
+ ld a, [wInitListType]
+
+ cp INIT_ENEMYOT_LIST
+ jr nz, .check_party_ot_name
+ ld hl, OTPartyCount
+ ld de, OTPartyMonOT
+ ld a, ENEMY_OT_NAME
+ jr .done
+
+.check_party_ot_name
+ cp INIT_PLAYEROT_LIST
+ jr nz, .check_mon_name
+ ld hl, PartyCount
+ ld de, PartyMonOT
+ ld a, PARTY_OT_NAME
+ jr .done
+
+.check_mon_name
+ cp INIT_MON_LIST
+ jr nz, .check_item_name
+ ld hl, CurMart
+ ld de, PokemonNames
+ ld a, PKMN_NAME
+ jr .done
+
+.check_item_name
+ cp INIT_BAG_ITEM_LIST
+ jr nz, .check_ob_item_name
+ ld hl, NumItems
+ ld de, ItemNames
+ ld a, ITEM_NAME
+ jr .done
+
+.check_ob_item_name
+ ld hl, CurMart
+ ld de, ItemNames
+ ld a, ITEM_NAME
+.done
+ ld [wNamedObjectTypeBuffer], a
+ ld a, l
+ ld [wListPointer], a
+ ld a, h
+ ld [wListPointer + 1], a
+ ld a, e
+ ld [wUnusedD102], a
+ ld a, d
+ ld [wUnusedD102 + 1], a
+ ld bc, ItemAttributes
+ ld a, c
+ ld [wItemAttributesPtr], a
+ ld a, b
+ ld [wItemAttributesPtr + 1], a
+ ret
--- /dev/null
+++ b/engine/routines/knowsmove.asm
@@ -1,0 +1,25 @@
+KnowsMove: ; f9ea
+ ld a, MON_MOVES
+ call GetPartyParamLocation
+ ld a, [wPutativeTMHMMove]
+ ld b, a
+ ld c, NUM_MOVES
+.loop
+ ld a, [hli]
+ cp b
+ jr z, .knows_move
+ dec c
+ jr nz, .loop
+ and a
+ ret
+
+.knows_move
+ ld hl, .Text_knows
+ call PrintText
+ scf
+ ret
+
+.Text_knows: ; 0xfa06
+ ; knows @ .
+ text_jump UnknownText_0x1c5ea8
+ db "@"
--- /dev/null
+++ b/engine/routines/kurt_selectquantity_interpretjoypad.asm
@@ -1,0 +1,4 @@
+Kurt_SelectQuantity_InterpretJoypad: ; 27a28
+ call BuySellToss_InterpretJoypad
+ ld b, a
+ ret
--- /dev/null
+++ b/engine/routines/leveluphappinessmod.asm
@@ -1,0 +1,20 @@
+LevelUpHappinessMod: ; 2709e
+ ld a, [CurPartyMon]
+ ld hl, PartyMon1CaughtLocation
+ call GetPartyLocation
+ ld a, [hl]
+ and $7f
+ ld d, a
+ ld a, [MapGroup]
+ ld b, a
+ ld a, [MapNumber]
+ ld c, a
+ call GetWorldMapLocation
+ cp d
+ ld c, HAPPINESS_GAINLEVEL
+ jr nz, .ok
+ ld c, HAPPINESS_GAINLEVELATHOME
+
+.ok
+ callfar ChangeHappiness
+ ret
--- /dev/null
+++ b/engine/routines/loadmappart.asm
@@ -1,0 +1,36 @@
+_LoadMapPart:: ; 4d15b
+ ld hl, wMisc
+ ld a, [wMetatileStandingY]
+ and a
+ jr z, .top_row
+ ld bc, WMISC_WIDTH * 2
+ add hl, bc
+
+.top_row
+ ld a, [wMetatileStandingX]
+ and a
+ jr z, .left_column
+ inc hl
+ inc hl
+
+.left_column
+ decoord 0, 0
+ ld b, SCREEN_HEIGHT
+.loop
+ ld c, SCREEN_WIDTH
+.loop2
+ ld a, [hli]
+ ld [de], a
+ inc de
+ dec c
+ jr nz, .loop2
+ ld a, l
+ add 4
+ ld l, a
+ jr nc, .carry
+ inc h
+
+.carry
+ dec b
+ jr nz, .loop
+ ret
--- /dev/null
+++ b/engine/routines/loadpushoam.asm
@@ -1,0 +1,21 @@
+LoadPushOAM:: ; 4031
+ ld c, hPushOAM - $ff00
+ ld b, .PushOAMEnd - .PushOAM
+ ld hl, .PushOAM
+.loop
+ ld a, [hli]
+ ld [$ff00+c], a
+ inc c
+ dec b
+ jr nz, .loop
+ ret
+
+.PushOAM: ; 403f
+ ld a, Sprites / $100
+ ld [rDMA], a
+ ld a, (SpritesEnd - Sprites) / 4 ; 40
+.pushoam_loop
+ dec a
+ jr nz, .pushoam_loop
+ ret
+.PushOAMEnd
--- /dev/null
+++ b/engine/routines/newpokedexentry.asm
@@ -1,0 +1,52 @@
+NewPokedexEntry: ; fb877
+ ld a, [hMapAnims]
+ push af
+ xor a
+ ld [hMapAnims], a
+ call LowVolume
+ call ClearBGPalettes
+ call ClearTileMap
+ call UpdateSprites
+ call ClearSprites
+ ld a, [wPokedexStatus]
+ push af
+ ld a, [hSCX]
+ add $5
+ ld [hSCX], a
+ xor a
+ ld [wPokedexStatus], a
+ farcall _NewPokedexEntry
+ call WaitPressAorB_BlinkCursor
+ ld a, $1
+ ld [wPokedexStatus], a
+ farcall DisplayDexEntry
+ call WaitPressAorB_BlinkCursor
+ pop af
+ ld [wPokedexStatus], a
+ call MaxVolume
+ call RotateThreePalettesRight
+ ld a, [hSCX]
+ add -5 ; 251 ; NUM_POKEMON
+ ld [hSCX], a
+ call .ReturnFromDexRegistration
+ pop af
+ ld [hMapAnims], a
+ ret
+; fb8c8
+
+.ReturnFromDexRegistration: ; fb8c8
+ call ClearTileMap
+ call LoadFontsExtra
+ call LoadStandardFont
+ farcall Pokedex_PlaceFrontpicTopLeftCorner
+ call WaitBGMap2
+ farcall GetEnemyMonDVs
+ ld a, [hli]
+ ld [TempMonDVs], a
+ ld a, [hl]
+ ld [TempMonDVs + 1], a
+ ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS
+ call GetSGBLayout
+ call SetPalettes
+ ret
+; fb8f1
--- /dev/null
+++ b/engine/routines/phonering_copytilemapatonce.asm
@@ -1,0 +1,80 @@
+PhoneRing_CopyTilemapAtOnce: ; 4d188
+ ld a, [hCGB]
+ and a
+ jp z, WaitBGMap
+ ld a, [wSpriteUpdatesEnabled]
+ cp $0
+ jp z, WaitBGMap
+
+; What follows is a modified version of CopyTilemapAtOnce.
+ ld a, [hBGMapMode]
+ push af
+ xor a
+ ld [hBGMapMode], a
+ ld a, [hMapAnims]
+ push af
+ xor a
+ ld [hMapAnims], a
+.wait
+ ld a, [rLY]
+ cp $8f
+ jr c, .wait
+
+ di
+ ld a, BANK(VBGMap2)
+ ld [rVBK], a
+ hlcoord 0, 0, AttrMap
+ call .CopyTilemapAtOnce
+ ld a, BANK(VBGMap0)
+ ld [rVBK], a
+ hlcoord 0, 0
+ call .CopyTilemapAtOnce
+.wait2
+ ld a, [rLY]
+ cp $8f
+ jr c, .wait2
+ ei
+
+ pop af
+ ld [hMapAnims], a
+ pop af
+ ld [hBGMapMode], a
+ ret
+
+.CopyTilemapAtOnce: ; 4d1cb
+ ld [hSPBuffer], sp
+ ld sp, hl
+ ld a, [hBGMapAddress + 1]
+ ld h, a
+ ld l, 0
+ ld a, SCREEN_HEIGHT
+ ld [hTilesPerCycle], a
+ ld b, 1 << 1 ; not in v/hblank
+ ld c, rSTAT % $100
+
+.loop
+rept SCREEN_WIDTH / 2
+ pop de
+.loop\@
+ ld a, [$ff00+c]
+ and b
+ jr nz, .loop\@
+ ld [hl], e
+ inc l
+ ld [hl], d
+ inc l
+endr
+
+ ld de, BG_MAP_WIDTH - SCREEN_WIDTH
+ add hl, de
+ ld a, [hTilesPerCycle]
+ dec a
+ ld [hTilesPerCycle], a
+ jr nz, .loop
+
+ ld a, [hSPBuffer]
+ ld l, a
+ ld a, [hSPBuffer + 1]
+ ld h, a
+ ld sp, hl
+ ret
--- /dev/null
+++ b/engine/routines/placegraphic.asm
@@ -1,0 +1,56 @@
+PlaceGraphic: ; 2ef6e
+; Fill wBoxAlignment-aligned box width b height c
+; with iterating tile starting from hGraphicStartTile at hl.
+; Predef $13
+
+ ld de, SCREEN_WIDTH
+
+ ld a, [wBoxAlignment]
+ and a
+ jr nz, .right
+
+ ld a, [hGraphicStartTile]
+.x1
+ push bc
+ push hl
+
+.y1
+ ld [hl], a
+ add hl, de
+ inc a
+ dec c
+ jr nz, .y1
+
+ pop hl
+ inc hl
+ pop bc
+ dec b
+ jr nz, .x1
+ ret
+
+.right
+; Right-aligned.
+ push bc
+ ld b, 0
+ dec c
+ add hl, bc
+ pop bc
+
+ ld a, [hGraphicStartTile]
+.x2
+ push bc
+ push hl
+
+.y2
+ ld [hl], a
+ add hl, de
+ inc a
+ dec c
+ jr nz, .y2
+
+ pop hl
+ dec hl
+ pop bc
+ dec b
+ jr nz, .x2
+ ret
--- /dev/null
+++ b/engine/routines/placewaitingtext.asm
@@ -1,0 +1,24 @@
+PlaceWaitingText:: ; 4000
+ hlcoord 3, 10
+ ld b, 1
+ ld c, 11
+
+ ld a, [wBattleMode]
+ and a
+ jr z, .notinbattle
+
+ call TextBox
+ jr .proceed
+
+.notinbattle
+ predef Predef_LinkTextbox
+
+.proceed
+ hlcoord 4, 11
+ ld de, .Waiting
+ call PlaceString
+ ld c, 50
+ jp DelayFrames
+
+.Waiting: ; 4025
+ db "Waiting...!@"
--- /dev/null
+++ b/engine/routines/playslowcry.asm
@@ -1,0 +1,31 @@
+PlaySlowCry: ; fb841
+ ld a, [ScriptVar]
+ call LoadCryHeader
+ jr c, .done
+
+ ld hl, CryPitch
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld bc, -$140
+ add hl, bc
+ ld a, l
+ ld [CryPitch], a
+ ld a, h
+ ld [CryPitch + 1], a
+ ld hl, CryLength
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld bc, $60
+ add hl, bc
+ ld a, l
+ ld [CryLength], a
+ ld a, h
+ ld [CryLength + 1], a
+ farcall _PlayCryHeader
+ call WaitSFX
+
+.done
+ ret
+; fb877
--- /dev/null
+++ b/engine/routines/printhoursmins.asm
@@ -1,0 +1,64 @@
+Function1dd6a9: ; 1dd6a9
+; XXX
+ ld a, b
+ ld b, c
+ ld c, a
+ push bc
+ push de
+ ld hl, sp+$2
+ ld d, h
+ ld e, l
+ pop hl
+ lb bc, PRINTNUM_LEADINGZEROS | 2, 5
+ call PrintNum
+ pop bc
+ ret
+
+PrintHoursMins: ; 1dd6bb (77:56bb)
+; Hours in b, minutes in c
+ ld a, b
+ cp 12
+ push af
+ jr c, .AM
+ jr z, .PM
+ sub 12
+ jr .PM
+.AM:
+ or a
+ jr nz, .PM
+ ld a, 12
+.PM:
+ ld b, a
+; Crazy stuff happening with the stack
+ push bc
+ ld hl, sp+$1
+ push de
+ push hl
+ pop de
+ pop hl
+ ld [hl], " "
+ lb bc, 1, 2
+ call PrintNum
+ ld [hl], ":"
+ inc hl
+ ld d, h
+ ld e, l
+ ld hl, sp+$0
+ push de
+ push hl
+ pop de
+ pop hl
+ lb bc, PRINTNUM_LEADINGZEROS | 1, 2
+ call PrintNum
+ pop bc
+ ld de, String_AM
+ pop af
+ jr c, .place_am_pm
+ ld de, String_PM
+.place_am_pm
+ inc hl
+ call PlaceString
+ ret
+
+String_AM: db "AM@" ; 1dd6fc
+String_PM: db "PM@" ; 1dd6ff
--- /dev/null
+++ b/engine/routines/returntobattle_useball.asm
@@ -1,0 +1,19 @@
+_ReturnToBattle_UseBall: ; 2715c
+ call ClearBGPalettes
+ call ClearTileMap
+ ld a, [BattleType]
+ cp BATTLETYPE_TUTORIAL
+ jr z, .gettutorialbackpic
+ farcall GetBattleMonBackpic
+ jr .continue
+
+.gettutorialbackpic
+ farcall GetTrainerBackpic
+.continue
+ farcall GetEnemyMonFrontpic
+ farcall _LoadBattleFontsHPBar
+ call GetMemSGBLayout
+ call CloseWindow
+ call LoadStandardMenuDataHeader
+ call WaitBGMap
+ jp SetPalettes
--- /dev/null
+++ b/engine/routines/savemenu_copytilemapatonce.asm
@@ -1,0 +1,77 @@
+SaveMenu_CopyTilemapAtOnce: ; 4cf45 (13:4f45)
+ ld a, [hCGB]
+ and a
+ jp z, WaitBGMap
+
+; The following is a modified version of CopyTilemapAtOnce.
+ ld a, [hBGMapMode]
+ push af
+ xor a
+ ld [hBGMapMode], a
+ ld a, [hMapAnims]
+ push af
+ xor a
+ ld [hMapAnims], a
+.WaitLY:
+ ld a, [rLY]
+ cp $60
+ jr c, .WaitLY
+
+ di
+ ld a, BANK(VBGMap2)
+ ld [rVBK], a
+ hlcoord 0, 0, AttrMap
+ call .CopyTilemapAtOnce
+ ld a, BANK(VBGMap0)
+ ld [rVBK], a
+ hlcoord 0, 0
+ call .CopyTilemapAtOnce
+.WaitLY2:
+ ld a, [rLY]
+ cp $60
+ jr c, .WaitLY2
+ ei
+
+ pop af
+ ld [hMapAnims], a
+ pop af
+ ld [hBGMapMode], a
+ ret
+
+.CopyTilemapAtOnce: ; 4cf80 (13:4f80)
+ ld [hSPBuffer], sp ; $ffd9
+ ld sp, hl
+ ld a, [hBGMapAddress + 1]
+ ld h, a
+ ld l, 0
+ ld a, SCREEN_HEIGHT
+ ld [hTilesPerCycle], a
+ ld b, 1 << 1
+ ld c, rSTAT % $100
+
+.loop
+rept SCREEN_WIDTH / 2
+ pop de
+.loop\@
+ ld a, [$ff00+c]
+ and b
+ jr nz, .loop\@
+ ld [hl], e
+ inc l
+ ld [hl], d
+ inc l
+endr
+
+ ld de, BG_MAP_WIDTH - SCREEN_WIDTH
+ add hl, de
+ ld a, [hTilesPerCycle]
+ dec a
+ ld [hTilesPerCycle], a
+ jr nz, .loop
+
+ ld a, [hSPBuffer]
+ ld l, a
+ ld a, [hSPBuffer + 1]
+ ld h, a
+ ld sp, hl
+ ret
--- /dev/null
+++ b/engine/routines/sine.asm
@@ -1,0 +1,50 @@
+_Sine:: ; 84d9
+; A simple sine function.
+; Return d * sin(e) in hl.
+
+; e is a signed 6-bit value.
+ ld a, e
+ and %111111
+ cp %100000
+ jr nc, .negative
+
+ call .ApplySineWave
+ ld a, h
+ ret
+
+.negative
+ and %011111
+ call .ApplySineWave
+ ld a, h
+ xor -1
+ inc a
+ ret
+
+.ApplySineWave: ; 84ef
+ ld e, a
+ ld a, d
+ ld d, 0
+ ld hl, .sinewave
+ add hl, de
+ add hl, de
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld hl, 0
+
+; Factor amplitude
+.multiply
+ srl a
+ jr nc, .even
+ add hl, de
+.even
+ sla e
+ rl d
+ and a
+ jr nz, .multiply
+ ret
+
+.sinewave ; 850b
+; A $20-word table representing a sine wave.
+; 90 degrees is index $10 at a base amplitude of $100.
+ sine_wave $100
--- /dev/null
+++ b/engine/routines/switchpartymons.asm
@@ -1,0 +1,145 @@
+_SwitchPartyMons:
+ ld a, [wd0e3]
+ dec a
+ ld [Buffer3], a
+ ld b, a
+ ld a, [wMenuCursorY]
+ dec a
+ ld [Buffer2], a
+ cp b
+ jr z, .skip
+ call .SwapMonAndMail
+ ld a, [Buffer3]
+ call .ClearSprite
+ ld a, [Buffer2]
+ call .ClearSprite
+.skip
+ ret
+
+.ClearSprite: ; 50f34 (14:4f34)
+ push af
+ hlcoord 0, 1
+ ld bc, 2 * SCREEN_WIDTH
+ call AddNTimes
+ ld bc, 2 * SCREEN_WIDTH
+ ld a, " "
+ call ByteFill
+ pop af
+ ld hl, Sprites
+ ld bc, $10
+ call AddNTimes
+ ld de, $4
+ ld c, $4
+.gfx_loop
+ ld [hl], $a0
+ add hl, de
+ dec c
+ jr nz, .gfx_loop
+ ld de, SFX_SWITCH_POKEMON
+ call WaitPlaySFX
+ ret
+
+.SwapMonAndMail: ; 50f62 (14:4f62)
+ push hl
+ push de
+ push bc
+ ld bc, PartySpecies
+ ld a, [Buffer2]
+ ld l, a
+ ld h, $0
+ add hl, bc
+ ld d, h
+ ld e, l
+ ld a, [Buffer3]
+ ld l, a
+ ld h, $0
+ add hl, bc
+ ld a, [hl]
+ push af
+ ld a, [de]
+ ld [hl], a
+ pop af
+ ld [de], a
+ ld a, [Buffer2]
+ ld hl, PartyMon1Species
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call AddNTimes
+ push hl
+ ld de, wd002
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call CopyBytes
+ ld a, [Buffer3]
+ ld hl, PartyMon1
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call AddNTimes
+ pop de
+ push hl
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call CopyBytes
+ pop de
+ ld hl, wd002
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call CopyBytes
+ ld a, [Buffer2]
+ ld hl, PartyMonOT
+ call SkipNames
+ push hl
+ call .CopyNameTowd002
+ ld a, [Buffer3]
+ ld hl, PartyMonOT
+ call SkipNames
+ pop de
+ push hl
+ call .CopyName
+ pop de
+ ld hl, wd002
+ call .CopyName
+ ld hl, PartyMonNicknames
+ ld a, [Buffer2]
+ call SkipNames
+ push hl
+ call .CopyNameTowd002
+ ld hl, PartyMonNicknames
+ ld a, [Buffer3]
+ call SkipNames
+ pop de
+ push hl
+ call .CopyName
+ pop de
+ ld hl, wd002
+ call .CopyName
+ ld hl, sPartyMail
+ ld a, [Buffer2]
+ ld bc, MAIL_STRUCT_LENGTH
+ call AddNTimes
+ push hl
+ ld de, wd002
+ ld bc, MAIL_STRUCT_LENGTH
+ ld a, BANK(sPartyMail)
+ call GetSRAMBank
+ call CopyBytes
+ ld hl, sPartyMail
+ ld a, [Buffer3]
+ ld bc, MAIL_STRUCT_LENGTH
+ call AddNTimes
+ pop de
+ push hl
+ ld bc, MAIL_STRUCT_LENGTH
+ call CopyBytes
+ pop de
+ ld hl, wd002
+ ld bc, MAIL_STRUCT_LENGTH
+ call CopyBytes
+ call CloseSRAM
+ pop bc
+ pop de
+ pop hl
+ ret
+
+.CopyNameTowd002: ; 51036 (14:5036)
+ ld de, wd002
+
+.CopyName: ; 51039 (14:5039)
+ ld bc, NAME_LENGTH
+ call CopyBytes
+ ret
--- /dev/null
+++ b/engine/routines/townmap_convertlinebreakcharacters.asm
@@ -1,0 +1,21 @@
+TownMap_ConvertLineBreakCharacters: ; 1de2c5
+ ld hl, StringBuffer1
+.loop
+ ld a, [hl]
+ cp "@"
+ jr z, .end
+ cp "%"
+ jr z, .line_break
+ cp "¯"
+ jr z, .line_break
+ inc hl
+ jr .loop
+
+.line_break
+ ld [hl], "<LNBRK>"
+
+.end
+ ld de, StringBuffer1
+ hlcoord 9, 0
+ call PlaceString
+ ret
--- /dev/null
+++ b/engine/routines/trademonfrontpic.asm
@@ -1,0 +1,38 @@
+GetTrademonFrontpic: ; 4d7fd
+ ld a, [wOTTrademonSpecies]
+ ld hl, wOTTrademonDVs
+ ld de, VTiles2
+ push de
+ push af
+ predef GetUnownLetter
+ pop af
+ ld [CurPartySpecies], a
+ ld [CurSpecies], a
+ call GetBaseData
+ pop de
+ predef GetAnimatedFrontpicPredef
+ ret
+
+AnimateTrademonFrontpic: ; 4d81e
+ ld a, [wOTTrademonSpecies]
+ call IsAPokemon
+ ret c
+ farcall ShowOTTrademonStats
+ ld a, [wOTTrademonSpecies]
+ ld [CurPartySpecies], a
+ ld a, [wOTTrademonDVs]
+ ld [TempMonDVs], a
+ ld a, [wOTTrademonDVs + 1]
+ ld [TempMonDVs + 1], a
+ ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
+ call GetSGBLayout
+ ld a, %11100100 ; 3,2,1,0
+ call DmgToCgbBGPals
+ farcall TradeAnim_ShowGetmonFrontpic
+ ld a, [wOTTrademonSpecies]
+ ld [CurPartySpecies], a
+ hlcoord 7, 2
+ ld d, $0
+ ld e, ANIM_MON_TRADE
+ predef AnimateFrontpic
+ ret
--- /dev/null
+++ b/engine/routines/updatebattlehuds.asm
@@ -1,0 +1,9 @@
+_UpdateBattleHUDs:
+ farcall DrawPlayerHUD
+ ld hl, PlayerHPPal
+ call SetHPPal
+ farcall DrawEnemyHUD
+ ld hl, EnemyHPPal
+ call SetHPPal
+ farcall FinishBattleAnim
+ ret
--- /dev/null
+++ b/engine/routines/updateitemdescription.asm
@@ -1,0 +1,13 @@
+UpdateItemDescription: ; 0x244c3
+ ld a, [MenuSelection]
+ ld [CurSpecies], a
+ hlcoord 0, 12
+ ld b, 4
+ ld c, SCREEN_WIDTH - 2
+ call TextBox
+ ld a, [MenuSelection]
+ cp -1
+ ret z
+ decoord 1, 14
+ farcall PrintItemDescription
+ ret
--- a/engine/rtc.asm
+++ b/engine/rtc.asm
@@ -58,11 +58,11 @@
db -1, MORN_F
; 1404e
-Unknown_1404e: ; Unreferenced
- db 20, 2
- db 40, 0
- db 60, 1
- db -1, 0
+Unknown_1404e: ; unreferenced
+ db 20, NITE_F
+ db 40, MORN_F
+ db 60, DAY_F
+ db -1, MORN_F
; 14056
StageRTCTimeForSave: ; 14056
--- a/engine/save.asm
+++ b/engine/save.asm
@@ -3,7 +3,7 @@
farcall DisplaySaveInfoOnSave
call SpeechTextBox
call UpdateSprites
- farcall SaveMenu_LoadEDTile
+ farcall SaveMenu_CopyTilemapAtOnce
ld hl, Text_WouldYouLikeToSaveTheGame
call SaveTheGame_yesorno
jr nz, .refused
@@ -19,7 +19,7 @@
.refused
call ExitMenu
call ret_d90
- farcall SaveMenu_LoadEDTile
+ farcall SaveMenu_CopyTilemapAtOnce
scf
ret
--- a/engine/sine.asm
+++ /dev/null
@@ -1,50 +1,0 @@
-_Sine:: ; 84d9
-; A simple sine function.
-; Return d * sin(e) in hl.
-
-; e is a signed 6-bit value.
- ld a, e
- and %111111
- cp %100000
- jr nc, .negative
-
- call .ApplySineWave
- ld a, h
- ret
-
-.negative
- and %011111
- call .ApplySineWave
- ld a, h
- xor -1
- inc a
- ret
-
-.ApplySineWave: ; 84ef
- ld e, a
- ld a, d
- ld d, 0
- ld hl, .sinewave
- add hl, de
- add hl, de
- ld e, [hl]
- inc hl
- ld d, [hl]
- ld hl, 0
-
-; Factor amplitude
-.multiply
- srl a
- jr nc, .even
- add hl, de
-.even
- sla e
- rl d
- and a
- jr nz, .multiply
- ret
-
-.sinewave ; 850b
-; A $20-word table representing a sine wave.
-; 90 degrees is index $10 at a base amplitude of $100.
- sine_wave $100
--- a/engine/slot_machine.asm
+++ b/engine/slot_machine.asm
@@ -471,10 +471,10 @@
Slot_CheckCoinCaseFull: ; 92a04 (24:6a04)
ld a, d
- cp 9999 / $100
+ cp MAX_COINS / $100
jr c, .not_full
ld a, e
- cp 9999 % $100
+ cp MAX_COINS % $100
jr c, .not_full
scf
ret
@@ -766,14 +766,15 @@
; 92bbe (24:6bbe)
+; unreferenced
Function92bbe: ; 92bbe
push hl
srl a
srl a
- add Unknown_92bce % $100
+ add .Unknown_92bce % $100
ld l, a
ld a, 0
- adc Unknown_92bce / $100
+ adc .Unknown_92bce / $100
ld h, a
ld a, [hl]
pop hl
@@ -781,7 +782,7 @@
; 92bce
-Unknown_92bce: ; 92bce
+.Unknown_92bce: ; 92bce
db 0, 1, 2, 3, 4, 5
; 92bd4
--- a/engine/spawn_points.asm
+++ b/engine/spawn_points.asm
@@ -1,4 +1,3 @@
-
INCLUDE "data/maps/spawn_points.asm"
--- a/engine/square_root.asm
+++ /dev/null
@@ -1,30 +1,0 @@
-GetSquareRoot: ; 13b87
-; Return the square root of de in b.
-
-; Rather than calculating the result, we take the index of the
-; first value in a table of squares that isn't lower than de.
-
- ld hl, Squares
- ld b, 0
-.loop
-; Make sure we don't go past the end of the table.
- inc b
- ld a, b
- cp $ff
- ret z
-
-; Iterate over the table until b**2 >= de.
- ld a, [hli]
- sub e
- ld a, [hli]
- sbc d
-
- jr c, .loop
- ret
-
-Squares: ; 13b98
-root set 1
- rept $ff
- dw root*root
-root set root+1
- endr
--- a/engine/stats_screen.asm
+++ b/engine/stats_screen.asm
@@ -965,6 +965,7 @@
ret
; 4e32a (13:632a)
+; unreferenced
Unknown_4e32a: ; 4e32a
; A blank tile?
ds 16
--- a/engine/std_scripts.asm
+++ b/engine/std_scripts.asm
@@ -497,7 +497,7 @@
setevent EVENT_USED_THE_CARD_KEY_IN_THE_RADIO_TOWER
setevent EVENT_RIVAL_CHERRYGROVE_CITY
setevent EVENT_RIVAL_AZALEA_TOWN
- setevent EVENT_RIVAL_UNDERGROUND_PATH
+ setevent EVENT_RIVAL_GOLDENROD_UNDERGROUND
setevent EVENT_AZALEA_TOWN_SLOWPOKES
setevent EVENT_KURTS_HOUSE_SLOWPOKE
setevent EVENT_GUIDE_GENT_VISIBLE_IN_CHERRYGROVE
@@ -550,8 +550,8 @@
setevent EVENT_ECRUTEAK_POKE_CENTER_BILL
setevent EVENT_MYSTERY_GIFT_DELIVERY_GUY
setevent EVENT_LAKE_OF_RAGE_LANCE
- setevent EVENT_WAREHOUSE_LAYOUT_1
- setevent EVENT_WAREHOUSE_BLOCKED_OFF
+ setevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1
+ setevent EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_BLOCKED_OFF
setevent EVENT_DRAGONS_DEN_CLAIR
setevent EVENT_RIVAL_OLIVINE_CITY
setevent EVENT_RIVAL_VICTORY_ROAD
--- a/engine/switch_party_mons.asm
+++ /dev/null
@@ -1,145 +1,0 @@
-_SwitchPartyMons:
- ld a, [wd0e3]
- dec a
- ld [Buffer3], a
- ld b, a
- ld a, [wMenuCursorY]
- dec a
- ld [Buffer2], a
- cp b
- jr z, .skip
- call .SwapMonAndMail
- ld a, [Buffer3]
- call .ClearSprite
- ld a, [Buffer2]
- call .ClearSprite
-.skip
- ret
-
-.ClearSprite: ; 50f34 (14:4f34)
- push af
- hlcoord 0, 1
- ld bc, 2 * SCREEN_WIDTH
- call AddNTimes
- ld bc, 2 * SCREEN_WIDTH
- ld a, " "
- call ByteFill
- pop af
- ld hl, Sprites
- ld bc, $10
- call AddNTimes
- ld de, $4
- ld c, $4
-.gfx_loop
- ld [hl], $a0
- add hl, de
- dec c
- jr nz, .gfx_loop
- ld de, SFX_SWITCH_POKEMON
- call WaitPlaySFX
- ret
-
-.SwapMonAndMail: ; 50f62 (14:4f62)
- push hl
- push de
- push bc
- ld bc, PartySpecies
- ld a, [Buffer2]
- ld l, a
- ld h, $0
- add hl, bc
- ld d, h
- ld e, l
- ld a, [Buffer3]
- ld l, a
- ld h, $0
- add hl, bc
- ld a, [hl]
- push af
- ld a, [de]
- ld [hl], a
- pop af
- ld [de], a
- ld a, [Buffer2]
- ld hl, PartyMon1Species
- ld bc, PARTYMON_STRUCT_LENGTH
- call AddNTimes
- push hl
- ld de, wd002
- ld bc, PARTYMON_STRUCT_LENGTH
- call CopyBytes
- ld a, [Buffer3]
- ld hl, PartyMon1
- ld bc, PARTYMON_STRUCT_LENGTH
- call AddNTimes
- pop de
- push hl
- ld bc, PARTYMON_STRUCT_LENGTH
- call CopyBytes
- pop de
- ld hl, wd002
- ld bc, PARTYMON_STRUCT_LENGTH
- call CopyBytes
- ld a, [Buffer2]
- ld hl, PartyMonOT
- call SkipNames
- push hl
- call .CopyNameTowd002
- ld a, [Buffer3]
- ld hl, PartyMonOT
- call SkipNames
- pop de
- push hl
- call .CopyName
- pop de
- ld hl, wd002
- call .CopyName
- ld hl, PartyMonNicknames
- ld a, [Buffer2]
- call SkipNames
- push hl
- call .CopyNameTowd002
- ld hl, PartyMonNicknames
- ld a, [Buffer3]
- call SkipNames
- pop de
- push hl
- call .CopyName
- pop de
- ld hl, wd002
- call .CopyName
- ld hl, sPartyMail
- ld a, [Buffer2]
- ld bc, MAIL_STRUCT_LENGTH
- call AddNTimes
- push hl
- ld de, wd002
- ld bc, MAIL_STRUCT_LENGTH
- ld a, BANK(sPartyMail)
- call GetSRAMBank
- call CopyBytes
- ld hl, sPartyMail
- ld a, [Buffer3]
- ld bc, MAIL_STRUCT_LENGTH
- call AddNTimes
- pop de
- push hl
- ld bc, MAIL_STRUCT_LENGTH
- call CopyBytes
- pop de
- ld hl, wd002
- ld bc, MAIL_STRUCT_LENGTH
- call CopyBytes
- call CloseSRAM
- pop bc
- pop de
- pop hl
- ret
-
-.CopyNameTowd002: ; 51036 (14:5036)
- ld de, wd002
-
-.CopyName: ; 51039 (14:5039)
- ld bc, NAME_LENGTH
- call CopyBytes
- ret
--- a/engine/trademon_frontpic.asm
+++ /dev/null
@@ -1,38 +1,0 @@
-GetTrademonFrontpic: ; 4d7fd
- ld a, [wOTTrademonSpecies]
- ld hl, wOTTrademonDVs
- ld de, VTiles2
- push de
- push af
- predef GetUnownLetter
- pop af
- ld [CurPartySpecies], a
- ld [CurSpecies], a
- call GetBaseData
- pop de
- predef GetAnimatedFrontpicPredef
- ret
-
-AnimateTrademonFrontpic: ; 4d81e
- ld a, [wOTTrademonSpecies]
- call IsAPokemon
- ret c
- farcall ShowOTTrademonStats
- ld a, [wOTTrademonSpecies]
- ld [CurPartySpecies], a
- ld a, [wOTTrademonDVs]
- ld [TempMonDVs], a
- ld a, [wOTTrademonDVs + 1]
- ld [TempMonDVs + 1], a
- ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
- call GetSGBLayout
- ld a, %11100100 ; 3,2,1,0
- call DmgToCgbBGPals
- farcall TradeAnim_ShowGetmonFrontpic
- ld a, [wOTTrademonSpecies]
- ld [CurPartySpecies], a
- hlcoord 7, 2
- ld d, $0
- ld e, ANIM_MON_TRADE
- predef AnimateFrontpic
- ret
--- a/engine/unown_dex.asm
+++ b/engine/unown_dex.asm
@@ -48,4 +48,5 @@
jr .loop
; fba5a (3e:7a5a)
+
INCLUDE "data/unown_words.asm"
--- a/engine/unused_correct_party.asm
+++ /dev/null
@@ -1,229 +1,0 @@
-CorrectErrorsInPlayerParty: ; unreferenced
- ld hl, PartyCount
- ld a, [hl]
- and a
- ret z
-
- cp PARTY_LENGTH + 1
- jr c, .party_length_okay
- ld a, PARTY_LENGTH
- ld [hl], a
-.party_length_okay
- inc hl
-
- ld b, a
- ld c, 0
-.loop1
- ld a, [hl]
- and a
- jr z, .invalid_species
- cp NUM_POKEMON + 1
- jr z, .invalid_species
- cp EGG + 1
- jr c, .next_species
-
-.invalid_species
- ld [hl], SMEARGLE
- push hl
- push bc
- ld a, c
- ld hl, PartyMon1Species
- call GetPartyLocation
- ld [hl], SMEARGLE
- pop bc
- pop hl
-
-.next_species
- inc hl
- inc c
- dec b
- jr nz, .loop1
- ld [hl], $ff
-
- ld hl, PartyMon1
- ld a, [PartyCount]
- ld d, a
- ld e, 0
-.loop2
- push de
- push hl
- ld b, h
- ld c, l
- ld a, [hl]
- and a
- jr z, .invalid_species_2
- cp NUM_POKEMON + 1
- jr c, .check_level
-
-.invalid_species_2
- ld [hl], SMEARGLE
- push de
- ld d, 0
- ld hl, PartySpecies
- add hl, de
- pop de
- ld a, SMEARGLE
- ld [hl], a
-
-.check_level
- ld [CurSpecies], a
- call GetBaseData
- ld hl, MON_LEVEL
- add hl, bc
- ld a, [hl]
- cp MIN_LEVEL
- ld a, MIN_LEVEL
- jr c, .invalid_level
- ld a, [hl]
- cp MAX_LEVEL
- jr c, .load_level
- ld a, MAX_LEVEL
-.invalid_level
- ld [hl], a
-.load_level
- ld [CurPartyLevel], a
-
- ld hl, MON_MAXHP
- add hl, bc
- ld d, h
- ld e, l
- ld hl, MON_STAT_EXP - 1
- add hl, bc
- ld b, $1
- predef CalcPkmnStats
- pop hl
- ld bc, PARTYMON_STRUCT_LENGTH
- add hl, bc
- pop de
- inc e
- dec d
- jr nz, .loop2
-
- ld de, PartyMonNicknames
- ld a, [PartyCount]
- ld b, a
- ld c, 0
-.loop3
- push bc
- call .GetLengthOfStringWith6CharCap
- push de
- farcall CheckStringForErrors
- pop hl
- pop bc
- jr nc, .valid_nickname
-
- push bc
- push hl
- ld hl, PartySpecies
- push bc
- ld b, 0
- add hl, bc
- pop bc
- ld a, [hl]
- cp EGG
- ld hl, .TAMAGO
- jr z, .got_nickname
- ld [wd265], a
- call GetPokemonName
- ld hl, StringBuffer1
-.got_nickname
- pop de
- ld bc, PKMN_NAME_LENGTH
- call CopyBytes
- pop bc
-
-.valid_nickname
- inc c
- dec b
- jr nz, .loop3
-
- ld de, PartyMonOT
- ld a, [PartyCount]
- ld b, a
- ld c, 0
-.loop4
- push bc
- call .GetLengthOfStringWith6CharCap
- push de
- farcall CheckStringForErrors
- pop hl
- jr nc, .valid_ot_name
- ld d, h
- ld e, l
- ld hl, PlayerName
- ld bc, NAME_LENGTH
- call CopyBytes
-.valid_ot_name
- pop bc
- inc c
- dec b
- jr nz, .loop4
-
- ld hl, PartyMon1Moves
- ld a, [PartyCount]
- ld b, a
-.loop5
- push hl
- ld c, NUM_MOVES
- ld a, [hl]
- and a
- jr z, .invalid_move
- cp NUM_ATTACKS + 1
- jr c, .moves_loop
-.invalid_move
- ld [hl], POUND
-
-.moves_loop
- ld a, [hl]
- and a
- jr z, .fill_invalid_moves
- cp NUM_ATTACKS + 1
- jr c, .next_move
-
-.fill_invalid_moves
- xor a
- ld [hli], a
- dec c
- jr nz, .fill_invalid_moves
- jr .next_pokemon
-
-.next_move
- inc hl
- dec c
- jr nz, .moves_loop
-
-.next_pokemon
- pop hl
- push bc
- ld bc, PARTYMON_STRUCT_LENGTH
- add hl, bc
- pop bc
- dec b
- jr nz, .loop5
- ret
-; 13b6b
-
-.TAMAGO: ; 13b6b
- db "タマゴ@@@"
-; 13b71
-
-.GetLengthOfStringWith6CharCap: ; 13b71
- push de
- ld c, 1
- ld b, NAME_LENGTH_JAPANESE
-.search_loop
- ld a, [de]
- cp "@"
- jr z, .done
- inc de
- inc c
- dec b
- jr nz, .search_loop
- dec c
- dec de
- ld a, "@"
- ld [de], a
-.done
- pop de
- ret
-; 13b87
--- a/event/basement_key.asm
+++ b/event/basement_key.asm
@@ -1,11 +1,11 @@
_BasementKey: ; 507b4
; Are we even in the right map to use this?
ld a, [MapGroup]
- cp GROUP_WAREHOUSE_ENTRANCE
+ cp GROUP_GOLDENROD_UNDERGROUND
jr nz, .nope
ld a, [MapNumber]
- cp MAP_WAREHOUSE_ENTRANCE
+ cp MAP_GOLDENROD_UNDERGROUND
jr nz, .nope
; Are we on the tile in front of the door?
call GetFacingTileCoord
--- a/event/mom.asm
+++ b/event/mom.asm
@@ -476,7 +476,7 @@
lb bc, PRINTNUM_MONEY | PRINTNUM_LEADINGZEROS | 3, 6
call PrintNum
call UpdateSprites
- call CGBOnly_LoadEDTile
+ call CGBOnly_CopyTilemapAtOnce
ret
; 1656b
--- a/home.asm
+++ b/home.asm
@@ -532,7 +532,7 @@
ld a, 1
ld [hBGMapMode], a
- jr LoadEDTile
+ jr CopyTilemapAtOnce
.dmg
; WaitBGMap
@@ -543,13 +543,13 @@
ret
; 3238
-CGBOnly_LoadEDTile:: ; 3238
+CGBOnly_CopyTilemapAtOnce:: ; 3238
ld a, [hCGB]
and a
jr z, WaitBGMap
-LoadEDTile:: ; 323d
- jr .LoadEDTile
+CopyTilemapAtOnce:: ; 323d
+ jr .CopyTilemapAtOnce
; 323f
; XXX
@@ -557,7 +557,7 @@
ret
; 3246
-.LoadEDTile: ; 3246
+.CopyTilemapAtOnce: ; 3246
ld a, [hBGMapMode]
push af
xor a
@@ -574,11 +574,11 @@
jr c, .wait
di
- ld a, 1 ; BANK(VTiles3)
+ ld a, BANK(VTiles3)
ld [rVBK], a
hlcoord 0, 0, AttrMap
call .StackPointerMagic
- ld a, 0 ; BANK(VTiles0)
+ ld a, BANK(VTiles0)
ld [rVBK], a
hlcoord 0, 0
call .StackPointerMagic
@@ -623,7 +623,7 @@
inc l
endr
- ld de, $20 - SCREEN_WIDTH
+ ld de, BG_MAP_WIDTH - SCREEN_WIDTH
add hl, de
ld a, [hTilesPerCycle]
dec a
--- a/main.asm
+++ b/main.asm
@@ -3,58 +3,13 @@
SECTION "bank1", ROMX
-PlaceWaitingText:: ; 4000
- hlcoord 3, 10
- ld b, 1
- ld c, 11
-
- ld a, [wBattleMode]
- and a
- jr z, .notinbattle
-
- call TextBox
- jr .proceed
-
-.notinbattle
- predef Predef_LinkTextbox
-
-.proceed
- hlcoord 4, 11
- ld de, .Waiting
- call PlaceString
- ld c, 50
- jp DelayFrames
-
-.Waiting: ; 4025
- db "Waiting...!@"
-
-LoadPushOAM:: ; 4031
- ld c, hPushOAM - $ff00
- ld b, PushOAMEnd - PushOAM
- ld hl, PushOAM
-.loop
- ld a, [hli]
- ld [$ff00+c], a
- inc c
- dec b
- jr nz, .loop
- ret
-
-PushOAM: ; 403f
- ld a, Sprites / $100
- ld [rDMA], a
- ld a, (SpritesEnd - Sprites) / 4 ; 40
-.loop
- dec a
- jr nz, .loop
- ret
-PushOAMEnd
-
+INCLUDE "engine/routines/placewaitingtext.asm"
+INCLUDE "engine/routines/loadpushoam.asm"
INCLUDE "engine/map_objects.asm"
INCLUDE "engine/intro_menu.asm"
INCLUDE "engine/init_map.asm"
INCLUDE "engine/learn.asm"
-INCLUDE "engine/check_nick_errors.asm"
+INCLUDE "engine/routines/checknickerrors.asm"
INCLUDE "engine/math.asm"
INCLUDE "data/items/item_attributes.asm"
INCLUDE "engine/npc_movement.asm"
@@ -65,7 +20,7 @@
SECTION "bank2", ROMX
INCLUDE "engine/player_object.asm"
-INCLUDE "engine/sine.asm"
+INCLUDE "engine/routines/sine.asm"
INCLUDE "engine/predef.asm"
INCLUDE "engine/color.asm"
@@ -72,7 +27,7 @@
SECTION "bank3", ROMX
-INCLUDE "engine/check_time.asm"
+INCLUDE "engine/routines/checktime.asm"
INCLUDE "engine/specials.asm"
INCLUDE "engine/printnum.asm"
INCLUDE "engine/health.asm"
@@ -82,10 +37,11 @@
INCLUDE "engine/anim_hp_bar.asm"
INCLUDE "engine/move_mon.asm"
INCLUDE "engine/billspctop.asm"
-INCLUDE "engine/get_breedmon_growth.asm"
+INCLUDE "engine/routines/getbreedmonlevelgrowth.asm"
INCLUDE "event/bug_contest/caught_mon.asm"
INCLUDE "engine/item_effects.asm"
-INCLUDE "engine/knows_move.asm"
+INCLUDE "engine/routines/getpokeballwobble.asm"
+INCLUDE "engine/routines/knowsmove.asm"
SECTION "bank4", ROMX
@@ -106,10 +62,10 @@
INCLUDE "event/misc_scripts_2.asm"
INCLUDE "event/std_collision.asm"
INCLUDE "event/bug_contest/judging.asm"
-INCLUDE "engine/pokerus_tick.asm"
+INCLUDE "engine/pokerus/apply_pokerus_tick.asm"
INCLUDE "event/bug_contest/contest_2.asm"
-INCLUDE "engine/unused_correct_party.asm"
-INCLUDE "engine/square_root.asm"
+INCLUDE "engine/routines/correcterrorsinplayerparty.asm"
+INCLUDE "engine/routines/getsquareroot.asm"
SECTION "bank5", ROMX
@@ -141,21 +97,7 @@
INCLUDE "data/text_buffers.asm"
INCLUDE "engine/menu.asm"
-
-UpdateItemDescription: ; 0x244c3
- ld a, [MenuSelection]
- ld [CurSpecies], a
- hlcoord 0, 12
- ld b, 4
- ld c, SCREEN_WIDTH - 2
- call TextBox
- ld a, [MenuSelection]
- cp -1
- ret z
- decoord 1, 14
- farcall PrintItemDescription
- ret
-
+INCLUDE "engine/routines/updateitemdescription.asm"
INCLUDE "engine/pokepic.asm"
INCLUDE "engine/map_objects_2.asm"
INCLUDE "engine/scrolling_menu.asm"
@@ -167,68 +109,28 @@
INCLUDE "engine/trainer_card.asm"
INCLUDE "engine/prof_oaks_pc.asm"
INCLUDE "engine/decorations.asm"
-
-LevelUpHappinessMod: ; 2709e
- ld a, [CurPartyMon]
- ld hl, PartyMon1CaughtLocation
- call GetPartyLocation
- ld a, [hl]
- and $7f
- ld d, a
- ld a, [MapGroup]
- ld b, a
- ld a, [MapNumber]
- ld c, a
- call GetWorldMapLocation
- cp d
- ld c, HAPPINESS_GAINLEVEL
- jr nz, .ok
- ld c, HAPPINESS_GAINLEVELATHOME
-
-.ok
- callfar ChangeHappiness
- ret
-
+INCLUDE "engine/routines/leveluphappinessmod.asm"
INCLUDE "data/trainers/trainer_dvs.asm"
-
-_ReturnToBattle_UseBall: ; 2715c
- call ClearBGPalettes
- call ClearTileMap
- ld a, [BattleType]
- cp BATTLETYPE_TUTORIAL
- jr z, .gettutorialbackpic
- farcall GetBattleMonBackpic
- jr .continue
-
-.gettutorialbackpic
- farcall GetTrainerBackpic
-.continue
- farcall GetEnemyMonFrontpic
- farcall _LoadBattleFontsHPBar
- call GetMemSGBLayout
- call CloseWindow
- call LoadStandardMenuDataHeader
- call WaitBGMap
- jp SetPalettes
-
-INCLUDE "engine/consume_held_item.asm"
+INCLUDE "engine/routines/returntobattle_useball.asm"
+INCLUDE "engine/routines/consumehelditem.asm"
INCLUDE "battle/moves/move_effects_pointers.asm"
INCLUDE "battle/moves/move_effects.asm"
+INCLUDE "engine/routines/kurt_selectquantity_interpretjoypad.asm"
-Kurt_SelectQuantity_InterpretJoypad: ; 27a28
- call BuySellToss_InterpretJoypad
- ld b, a
- ret
-
SECTION "bankA", ROMX
INCLUDE "engine/link.asm"
INCLUDE "engine/wildmons.asm"
INCLUDE "battle/link_result.asm"
-INCLUDE "engine/player_gfx_2.asm"
+ChrisBackpic: ; 2ba1a
+INCBIN "gfx/player/chris_back.2bpp.lz"
+DudeBackpic: ; 2bbaa
+INCBIN "gfx/battle/dude.2bpp.lz"
+
+
SECTION "bankB", ROMX
INCLUDE "battle/trainer_huds.asm"
@@ -238,9 +140,9 @@
INCLUDE "engine/mystery_gift_2.asm"
INCLUDE "engine/tmhm2.asm"
INCLUDE "battle/moves/move_descriptions.asm"
-INCLUDE "engine/pokerus.asm"
+INCLUDE "engine/pokerus/pokerus.asm"
INCLUDE "engine/start_battle.asm"
-INCLUDE "engine/place_graphics.asm"
+INCLUDE "engine/routines/placegraphic.asm"
SECTION "Effect Commands", ROMX
@@ -284,7 +186,7 @@
SECTION "Crystal Unique", ROMX
INCLUDE "engine/init_gender.asm"
-INCLUDE "engine/pack_f.asm"
+INCLUDE "engine/routines/drawkrispackgfx.asm"
INCLUDE "event/move_tutor.asm"
INCLUDE "engine/crystal_colors.asm"
INCLUDE "event/celebi.asm"
@@ -300,7 +202,8 @@
INCLUDE "engine/map_palettes.asm"
INCLUDE "tilesets/palette_maps.asm"
-Unknown_4ce05: ; unreferenced
+; unreferenced
+; 0x4ce05
rept 26
db $06
endr
@@ -307,227 +210,13 @@
; 0x4ce1f
INCLUDE "data/collision_permissions.asm"
-INCLUDE "engine/empty_sram.asm"
-
-SaveMenu_LoadEDTile: ; 4cf45 (13:4f45)
- ld a, [hCGB]
- and a
- jp z, WaitBGMap
-
-; The following is a modified version of LoadEDTile.
- ld a, [hBGMapMode]
- push af
- xor a
- ld [hBGMapMode], a
- ld a, [hMapAnims]
- push af
- xor a
- ld [hMapAnims], a
-.WaitLY:
- ld a, [rLY]
- cp $60
- jr c, .WaitLY
-
- di
- ld a, 1 ; BANK(VBGMap2)
- ld [rVBK], a
- hlcoord 0, 0, AttrMap
- call .LoadEDTile
- ld a, 0 ; BANK(VBGMap0)
- ld [rVBK], a
- hlcoord 0, 0
- call .LoadEDTile
-.WaitLY2:
- ld a, [rLY]
- cp $60
- jr c, .WaitLY2
- ei
-
- pop af
- ld [hMapAnims], a
- pop af
- ld [hBGMapMode], a
- ret
-
-.LoadEDTile: ; 4cf80 (13:4f80)
- ld [hSPBuffer], sp ; $ffd9
- ld sp, hl
- ld a, [hBGMapAddress + 1]
- ld h, a
- ld l, 0
- ld a, SCREEN_HEIGHT
- ld [hTilesPerCycle], a
- ld b, 1 << 1
- ld c, rSTAT % $100
-
-.loop
-rept SCREEN_WIDTH / 2
- pop de
-.loop\@
- ld a, [$ff00+c]
- and b
- jr nz, .loop\@
- ld [hl], e
- inc l
- ld [hl], d
- inc l
-endr
-
- ld de, $20 - SCREEN_WIDTH
- add hl, de
- ld a, [hTilesPerCycle]
- dec a
- ld [hTilesPerCycle], a
- jr nz, .loop
-
- ld a, [hSPBuffer]
- ld l, a
- ld a, [hSPBuffer + 1]
- ld h, a
- ld sp, hl
- ret
-
-CheckSave:: ; 4cffe
- ld a, BANK(sCheckValue1) ; BANK(sCheckValue2)
- call GetSRAMBank
- ld a, [sCheckValue1]
- ld b, a
- ld a, [sCheckValue2]
- ld c, a
- call CloseSRAM
- ld a, b
- cp SAVE_CHECK_VALUE_1
- jr nz, .ok
- ld a, c
- cp SAVE_CHECK_VALUE_2
- jr nz, .ok
- ld c, $1
- ret
-
-.ok
- ld c, $0
- ret
-
+INCLUDE "engine/routines/emptyallsrambanks.asm"
+INCLUDE "engine/routines/savemenu_copytilemapatonce.asm"
+INCLUDE "engine/routines/checksave.asm"
INCLUDE "data/maps/map_scenes.asm"
+INCLUDE "engine/routines/loadmappart.asm"
+INCLUDE "engine/routines/phonering_copytilemapatonce.asm"
-_LoadMapPart:: ; 4d15b
- ld hl, wMisc
- ld a, [wMetatileStandingY]
- and a
- jr z, .top_row
- ld bc, WMISC_WIDTH * 2
- add hl, bc
-
-.top_row
- ld a, [wMetatileStandingX]
- and a
- jr z, .left_column
- inc hl
- inc hl
-
-.left_column
- decoord 0, 0
- ld b, SCREEN_HEIGHT
-.loop
- ld c, SCREEN_WIDTH
-.loop2
- ld a, [hli]
- ld [de], a
- inc de
- dec c
- jr nz, .loop2
- ld a, l
- add 4
- ld l, a
- jr nc, .carry
- inc h
-
-.carry
- dec b
- jr nz, .loop
- ret
-
-PhoneRing_LoadEDTile: ; 4d188
- ld a, [hCGB]
- and a
- jp z, WaitBGMap
- ld a, [wSpriteUpdatesEnabled]
- cp $0
- jp z, WaitBGMap
-
-; What follows is a modified version of LoadEDTile.
- ld a, [hBGMapMode]
- push af
- xor a
- ld [hBGMapMode], a
- ld a, [hMapAnims]
- push af
- xor a
- ld [hMapAnims], a
-.wait
- ld a, [rLY]
- cp $8f
- jr c, .wait
-
- di
- ld a, 1 ; BANK(VBGMap2)
- ld [rVBK], a
- hlcoord 0, 0, AttrMap
- call .LoadEDTile
- ld a, 0 ; BANK(VBGMap0)
- ld [rVBK], a
- hlcoord 0, 0
- call .LoadEDTile
-.wait2
- ld a, [rLY]
- cp $8f
- jr c, .wait2
- ei
-
- pop af
- ld [hMapAnims], a
- pop af
- ld [hBGMapMode], a
- ret
-
-.LoadEDTile: ; 4d1cb
- ld [hSPBuffer], sp
- ld sp, hl
- ld a, [hBGMapAddress + 1]
- ld h, a
- ld l, 0
- ld a, SCREEN_HEIGHT
- ld [hTilesPerCycle], a
- ld b, 1 << 1 ; not in v/hblank
- ld c, rSTAT % $100
-
-.loop
-rept SCREEN_WIDTH / 2
- pop de
-.loop\@
- ld a, [$ff00+c]
- and b
- jr nz, .loop\@
- ld [hl], e
- inc l
- ld [hl], d
- inc l
-endr
-
- ld de, $20 - SCREEN_WIDTH
- add hl, de
- ld a, [hTilesPerCycle]
- dec a
- ld [hTilesPerCycle], a
- jr nz, .loop
-
- ld a, [hSPBuffer]
- ld l, a
- ld a, [hSPBuffer + 1]
- ld h, a
- ld sp, hl
- ret
-
Shrink1Pic: ; 4d249
INCBIN "gfx/shrink/shrink1.2bpp.lz"
@@ -534,129 +223,12 @@
Shrink2Pic: ; 4d2d9
INCBIN "gfx/shrink/shrink2.2bpp.lz"
-LinkMonStatsScreen: ; 4d319
- ld a, [wMenuCursorY]
- dec a
- ld [CurPartyMon], a
- call LowVolume
- predef StatsScreenInit
- ld a, [CurPartyMon]
- inc a
- ld [wMenuCursorY], a
- call ClearScreen
- call ClearBGPalettes
- call MaxVolume
- farcall LoadTradeScreenBorder
- farcall Link_WaitBGMap
- farcall InitTradeSpeciesList
- farcall SetTradeRoomBGPals
- call WaitBGMap2
- ret
-
-Link_WaitBGMap: ; 4d354
- call WaitBGMap
- call WaitBGMap2
- ret
-
-LinkTextbox2: ; 4d35b
- ld h, d
- ld l, e
- push bc
- push hl
- call .PlaceBorder
- pop hl
- pop bc
- ld de, AttrMap - TileMap
- add hl, de
- inc b
- inc b
- inc c
- inc c
- ld a, $7
-.row
- push bc
- push hl
-.col
- ld [hli], a
- dec c
- jr nz, .col
- pop hl
- ld de, SCREEN_WIDTH
- add hl, de
- pop bc
- dec b
- jr nz, .row
- ret
-
-.PlaceBorder: ; 4d37e
- push hl
- ld a, $76
- ld [hli], a
- inc a
- call .PlaceRow
- inc a
- ld [hl], a
- pop hl
- ld de, SCREEN_WIDTH
- add hl, de
-.loop
- push hl
- ld a, "┌"
- ld [hli], a
- ld a, " "
- call .PlaceRow
- ld [hl], "─"
- pop hl
- ld de, SCREEN_WIDTH
- add hl, de
- dec b
- jr nz, .loop
- ld a, "┐"
- ld [hli], a
- ld a, "│"
- call .PlaceRow
- ld [hl], "└"
- ret
-
-.PlaceRow: ; 4d3ab
- ld d, c
-.row_loop
- ld [hli], a
- dec d
- jr nz, .row_loop
- ret
-
+INCLUDE "engine/link_2.asm"
INCLUDE "engine/delete_save_change_clock.asm"
INCLUDE "tilesets/tileset_headers.asm"
-INCLUDE "engine/flag_predef.asm"
-INCLUDE "engine/trademon_frontpic.asm"
-
-CheckPokerus: ; 4d860
-; Return carry if a monster in your party has Pokerus
-
-; Get number of monsters to iterate over
- ld a, [PartyCount]
- and a
- jr z, .NoPokerus
- ld b, a
-; Check each monster in the party for Pokerus
- ld hl, PartyMon1PokerusStatus
- ld de, PARTYMON_STRUCT_LENGTH
-.Check:
- ld a, [hl]
- and $0f ; only the bottom nybble is used
- jr nz, .HasPokerus
-; Next PartyMon
- add hl, de
- dec b
- jr nz, .Check
-.NoPokerus:
- and a
- ret
-.HasPokerus:
- scf
- ret
-
+INCLUDE "engine/routines/flagpredef.asm"
+INCLUDE "engine/routines/trademonfrontpic.asm"
+INCLUDE "engine/pokerus/check_pokerus.asm"
INCLUDE "event/lucky_number.asm"
INCLUDE "engine/caught_data.asm"
INCLUDE "engine/search2.asm"
@@ -667,7 +239,7 @@
INCLUDE "mobile/get_trainer_class.asm"
INCLUDE "battle/sliding_intro.asm"
INCLUDE "mobile/print_opp_message.asm"
-INCLUDE "engine/check_battle_scene.asm"
+INCLUDE "engine/routines/checkbattlescene.asm"
INCLUDE "engine/gbc_only.asm"
INCLUDE "event/poke_seer.asm"
@@ -685,9 +257,9 @@
INCLUDE "text/types.asm"
INCLUDE "text/unused_gen_1_trainers.asm"
INCLUDE "engine/mon_stats.asm"
-INCLUDE "engine/init_list.asm"
+INCLUDE "engine/routines/initlist.asm"
INCLUDE "engine/experience.asm"
-INCLUDE "engine/switch_party_mons.asm"
+INCLUDE "engine/routines/switchpartymons.asm"
INCLUDE "gfx/load_pics.asm"
INCLUDE "engine/move_mon_wo_mail.asm"
INCLUDE "data/pokemon/base_stats.asm"
@@ -751,11 +323,7 @@
INCLUDE "engine/battle_transition.asm"
INCLUDE "event/field_moves.asm"
INCLUDE "event/magnet_train.asm"
-
-BattleStart_LoadEDTile: ; 8cf4f
- call CGBOnly_LoadEDTile
- ret
-
+INCLUDE "engine/routines/battlestart_copytilemapatonce.asm"
INCLUDE "engine/sprites.asm"
INCLUDE "engine/mon_icons.asm"
@@ -897,8 +465,8 @@
INCLUDE "gfx/font.asm"
INCLUDE "engine/time_capsule.asm"
INCLUDE "event/name_rater.asm"
-INCLUDE "engine/play_slow_cry.asm"
-INCLUDE "engine/new_pokedex_entry.asm"
+INCLUDE "engine/routines/playslowcry.asm"
+INCLUDE "engine/routines/newpokedexentry.asm"
INCLUDE "engine/time_capsule_2.asm"
INCLUDE "engine/unown_dex.asm"
INCLUDE "event/magikarp.asm"
@@ -973,15 +541,7 @@
SECTION "bank5E", ROMX
-_UpdateBattleHUDs:
- farcall DrawPlayerHUD
- ld hl, PlayerHPPal
- call SetHPPal
- farcall DrawEnemyHUD
- ld hl, EnemyHPPal
- call SetHPPal
- farcall FinishBattleAnim
- ret
+INCLUDE "engine/routines/updatebattlehuds.asm"
SECTION "mobile_5e", ROMX
@@ -1036,11 +596,15 @@
SECTION "bank77_2", ROMX
-INCLUDE "engine/printhoursmins.asm"
+INCLUDE "engine/routines/printhoursmins.asm"
INCLUDE "engine/diploma.asm"
INCLUDE "engine/pokedex_3.asm"
INCLUDE "event/catch_tutorial_input.asm"
-INCLUDE "engine/pokegear_2.asm"
+INCLUDE "engine/routines/townmap_convertlinebreakcharacters.asm"
+
+PokegearGFX: ; 1de2e4
+INCBIN "gfx/pokegear/pokegear.2bpp.lz"
+
INCLUDE "engine/european_mail.asm"
--- a/maps.asm
+++ b/maps.asm
@@ -139,7 +139,7 @@
INCLUDE "maps/DiglettsCave.asm"
INCLUDE "maps/MountMoon.asm"
-INCLUDE "maps/Underground.asm"
+INCLUDE "maps/UndergroundPath.asm"
INCLUDE "maps/RockTunnel1F.asm"
INCLUDE "maps/RockTunnelB1F.asm"
INCLUDE "maps/SafariZoneFuchsiaGateBeta.asm"
@@ -176,10 +176,10 @@
SECTION "Map Scripts 10", ROMX
INCLUDE "maps/Route22.asm"
-INCLUDE "maps/WarehouseEntrance.asm"
-INCLUDE "maps/UndergroundPathSwitchRoomEntrances.asm"
+INCLUDE "maps/GoldenrodUnderground.asm"
+INCLUDE "maps/GoldenrodUndergroundSwitchRoomEntrances.asm"
INCLUDE "maps/GoldenrodDeptStoreB1F.asm"
-INCLUDE "maps/UndergroundWarehouse.asm"
+INCLUDE "maps/GoldenrodUndergroundWarehouse.asm"
INCLUDE "maps/MountMortar1FOutside.asm"
INCLUDE "maps/MountMortar1FInside.asm"
INCLUDE "maps/MountMortar2FInside.asm"
@@ -304,7 +304,7 @@
INCLUDE "maps/SilphCo1F.asm"
INCLUDE "maps/CopycatsHouse1F.asm"
INCLUDE "maps/CopycatsHouse2F.asm"
-INCLUDE "maps/Route5UndergroundEntrance.asm"
+INCLUDE "maps/Route5UndergroundPathEntrance.asm"
INCLUDE "maps/Route5SaffronCityGate.asm"
INCLUDE "maps/Route5CleanseTagSpeechHouse.asm"
@@ -350,7 +350,7 @@
INCLUDE "maps/VermilionHouseDiglettsCaveSpeechHouse.asm"
INCLUDE "maps/VermilionGym.asm"
INCLUDE "maps/Route6SaffronGate.asm"
-INCLUDE "maps/Route6UndergroundEntrance.asm"
+INCLUDE "maps/Route6UndergroundPathEntrance.asm"
INCLUDE "maps/Pokecenter2F.asm"
INCLUDE "maps/TradeCenter.asm"
INCLUDE "maps/Colosseum.asm"
--- a/maps/CeladonGameCorner.asm
+++ b/maps/CeladonGameCorner.asm
@@ -58,7 +58,7 @@
buttonsound
checkitem COIN_CASE
iffalse .NoCoinCase
- checkcoins 9998
+ checkcoins MAX_COINS - 1
if_equal $0, .FullCoinCase
stringtotext .coinname, $1
scall .GiveCoins
--- a/maps/GoldenrodCity.asm
+++ b/maps/GoldenrodCity.asm
@@ -572,8 +572,8 @@
warp_def $15, $e, 1, GOLDENROD_GAME_CORNER
warp_def $f, $5, 1, RADIO_TOWER_1F
warp_def $1, $13, 3, ROUTE_35_GOLDENROD_GATE
- warp_def $5, $9, 8, UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES
- warp_def $1d, $b, 5, UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES
+ warp_def $5, $9, 8, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES
+ warp_def $1d, $b, 5, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES
warp_def $1b, $f, 1, GOLDENROD_POKECENTER_1F
.CoordEvents:
--- a/maps/GoldenrodDeptStoreB1F.asm
+++ b/maps/GoldenrodDeptStoreB1F.asm
@@ -27,9 +27,9 @@
jump UnknownScript_0x7d791
UnknownScript_0x7d791:
- checkevent EVENT_WAREHOUSE_LAYOUT_2
+ checkevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2
iftrue .Layout2
- checkevent EVENT_WAREHOUSE_LAYOUT_3
+ checkevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3
iftrue .Layout3
changeblock $a, $8, $d
return
@@ -43,7 +43,7 @@
return
UnknownScript_0x7d7ac:
- clearevent EVENT_WAREHOUSE_BLOCKED_OFF
+ clearevent EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_BLOCKED_OFF
return
GoldenrodDeptStoreB1FBlackBelt1Script:
@@ -115,7 +115,7 @@
.Warps:
db 3
- warp_def $2, $11, 3, UNDERGROUND_WAREHOUSE
+ warp_def $2, $11, 3, GOLDENROD_UNDERGROUND_WAREHOUSE
warp_def $4, $9, 1, GOLDENROD_DEPT_STORE_ELEVATOR
warp_def $4, $a, 2, GOLDENROD_DEPT_STORE_ELEVATOR
--- a/maps/GoldenrodDeptStoreElevator.asm
+++ b/maps/GoldenrodDeptStoreElevator.asm
@@ -14,30 +14,30 @@
playsound SFX_ELEVATOR
earthquake 60
waitsfx
- checkevent EVENT_WAREHOUSE_BLOCKED_OFF
+ checkevent EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_BLOCKED_OFF
iftrue .Done
- checkevent EVENT_WAREHOUSE_LAYOUT_1
+ checkevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1
iftrue .BoxLayout1
- checkevent EVENT_WAREHOUSE_LAYOUT_2
+ checkevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2
iftrue .BoxLayout2
- checkevent EVENT_WAREHOUSE_LAYOUT_3
+ checkevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3
iftrue .BoxLayout3
.BoxLayout3:
- setevent EVENT_WAREHOUSE_LAYOUT_1
- clearevent EVENT_WAREHOUSE_LAYOUT_2
- clearevent EVENT_WAREHOUSE_LAYOUT_3
+ setevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1
+ clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2
+ clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3
end
.BoxLayout1:
- clearevent EVENT_WAREHOUSE_LAYOUT_1
- setevent EVENT_WAREHOUSE_LAYOUT_2
- clearevent EVENT_WAREHOUSE_LAYOUT_3
+ clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1
+ setevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2
+ clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3
end
.BoxLayout2:
- clearevent EVENT_WAREHOUSE_LAYOUT_1
- clearevent EVENT_WAREHOUSE_LAYOUT_2
- setevent EVENT_WAREHOUSE_LAYOUT_3
+ clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1
+ clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2
+ setevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3
end
.Done:
--- /dev/null
+++ b/maps/GoldenrodUnderground.asm
@@ -1,0 +1,683 @@
+const_value set 2
+ const GOLDENRODUNDERGROUND_SUPER_NERD1
+ const GOLDENRODUNDERGROUND_SUPER_NERD2
+ const GOLDENRODUNDERGROUND_SUPER_NERD3
+ const GOLDENRODUNDERGROUND_SUPER_NERD4
+ const GOLDENRODUNDERGROUND_POKE_BALL
+ const GOLDENRODUNDERGROUND_GRAMPS
+ const GOLDENRODUNDERGROUND_SUPER_NERD5
+ const GOLDENRODUNDERGROUND_SUPER_NERD6
+ const GOLDENRODUNDERGROUND_GRANNY
+
+GoldenrodUnderground_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 3
+ dbw MAPCALLBACK_NEWMAP, .ResetSwitches
+ dbw MAPCALLBACK_TILES, .CheckBasementKey
+ dbw MAPCALLBACK_OBJECTS, .CheckDayOfWeek
+
+.ResetSwitches:
+ clearevent EVENT_SWITCH_1
+ clearevent EVENT_SWITCH_2
+ clearevent EVENT_SWITCH_3
+ clearevent EVENT_EMERGENCY_SWITCH
+ clearevent EVENT_SWITCH_4
+ clearevent EVENT_SWITCH_5
+ clearevent EVENT_SWITCH_6
+ clearevent EVENT_SWITCH_7
+ clearevent EVENT_SWITCH_8
+ clearevent EVENT_SWITCH_9
+ clearevent EVENT_SWITCH_10
+ clearevent EVENT_SWITCH_11
+ clearevent EVENT_SWITCH_12
+ clearevent EVENT_SWITCH_13
+ clearevent EVENT_SWITCH_14
+ writebyte $0
+ copyvartobyte UndergroundSwitchPositions
+ return
+
+.CheckBasementKey:
+ checkevent EVENT_USED_BASEMENT_KEY
+ iffalse .LockBasementDoor
+ return
+
+.LockBasementDoor:
+ changeblock $12, $6, $3d
+ return
+
+.CheckDayOfWeek:
+ checkcode VAR_WEEKDAY
+ if_equal MONDAY, .Monday
+ if_equal TUESDAY, .Tuesday
+ if_equal WEDNESDAY, .Wednesday
+ if_equal THURSDAY, .Thursday
+ if_equal FRIDAY, .Friday
+ if_equal SATURDAY, .Saturday
+
+.Sunday:
+ disappear GOLDENRODUNDERGROUND_GRAMPS
+ disappear GOLDENRODUNDERGROUND_SUPER_NERD5
+ appear GOLDENRODUNDERGROUND_SUPER_NERD6
+ appear GOLDENRODUNDERGROUND_GRANNY
+ return
+
+.Monday:
+ disappear GOLDENRODUNDERGROUND_GRAMPS
+ checkmorn
+ iffalse .NotMondayMorning
+ appear GOLDENRODUNDERGROUND_GRAMPS
+.NotMondayMorning:
+ disappear GOLDENRODUNDERGROUND_SUPER_NERD5
+ disappear GOLDENRODUNDERGROUND_SUPER_NERD6
+ disappear GOLDENRODUNDERGROUND_GRANNY
+ return
+
+.Tuesday:
+ disappear GOLDENRODUNDERGROUND_GRAMPS
+ appear GOLDENRODUNDERGROUND_SUPER_NERD5
+ disappear GOLDENRODUNDERGROUND_SUPER_NERD6
+ disappear GOLDENRODUNDERGROUND_GRANNY
+ return
+
+.Wednesday:
+ disappear GOLDENRODUNDERGROUND_GRAMPS
+ disappear GOLDENRODUNDERGROUND_SUPER_NERD5
+ appear GOLDENRODUNDERGROUND_SUPER_NERD6
+ disappear GOLDENRODUNDERGROUND_GRANNY
+ return
+
+.Thursday:
+ disappear GOLDENRODUNDERGROUND_GRAMPS
+ appear GOLDENRODUNDERGROUND_SUPER_NERD5
+ disappear GOLDENRODUNDERGROUND_SUPER_NERD6
+ disappear GOLDENRODUNDERGROUND_GRANNY
+ return
+
+.Friday:
+ disappear GOLDENRODUNDERGROUND_GRAMPS
+ disappear GOLDENRODUNDERGROUND_SUPER_NERD5
+ appear GOLDENRODUNDERGROUND_SUPER_NERD6
+ disappear GOLDENRODUNDERGROUND_GRANNY
+ return
+
+.Saturday:
+ disappear GOLDENRODUNDERGROUND_GRAMPS
+ appear GOLDENRODUNDERGROUND_SUPER_NERD5
+ disappear GOLDENRODUNDERGROUND_SUPER_NERD6
+ appear GOLDENRODUNDERGROUND_GRANNY
+ return
+
+TrainerSupernerdEric:
+ trainer EVENT_BEAT_SUPER_NERD_ERIC, SUPER_NERD, ERIC, SupernerdEricSeenText, SupernerdEricBeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext SupernerdEricAfterBattleText
+ waitbutton
+ closetext
+ end
+
+TrainerSupernerdTeru:
+ trainer EVENT_BEAT_SUPER_NERD_TERU, SUPER_NERD, TERU, SupernerdTeruSeenText, SupernerdTeruBeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext SupernerdTeruAfterBattleText
+ waitbutton
+ closetext
+ end
+
+TrainerPokemaniacIssac:
+ trainer EVENT_BEAT_POKEMANIAC_ISSAC, POKEMANIAC, ISSAC, PokemaniacIssacSeenText, PokemaniacIssacBeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext PokemaniacIssacAfterBattleText
+ waitbutton
+ closetext
+ end
+
+TrainerPokemaniacDonald:
+ trainer EVENT_BEAT_POKEMANIAC_DONALD, POKEMANIAC, DONALD, PokemaniacDonaldSeenText, PokemaniacDonaldBeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext PokemaniacDonaldAfterBattleText
+ waitbutton
+ closetext
+ end
+
+GrannyScript_0x7c132:
+ opentext
+ checkcode VAR_WEEKDAY
+ if_equal SUNDAY, .Open
+ if_equal SATURDAY, .Open
+ jump GoldenrodUndergroundScript_ShopClosed
+
+.Open:
+ pokemart MARTTYPE_BITTER, MART_UNDERGROUND
+ closetext
+ end
+
+GrampsScript_0x7c146:
+ opentext
+ checkflag ENGINE_GOLDENROD_UNDERGROUND_MERCHANT_CLOSED
+ iftrue GoldenrodUndergroundScript_ShopClosed
+ checkcode VAR_WEEKDAY
+ if_equal MONDAY, .CheckMorn
+ jump GoldenrodUndergroundScript_ShopClosed
+
+.CheckMorn:
+ checkmorn
+ iffalse GoldenrodUndergroundScript_ShopClosed
+ pokemart MARTTYPE_BARGAIN, 0
+ closetext
+ end
+
+OlderHaircutBrotherScript:
+ opentext
+ checkcode VAR_WEEKDAY
+ if_equal TUESDAY, .DoHaircut
+ if_equal THURSDAY, .DoHaircut
+ if_equal SATURDAY, .DoHaircut
+ jump GoldenrodUndergroundScript_ShopClosed
+
+.DoHaircut:
+ checkflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
+ iftrue .AlreadyGotHaircut
+ special PlaceMoneyTopRight
+ writetext UnknownText_0x7c5f9
+ yesorno
+ iffalse .Refused
+ checkmoney $0, 500
+ if_equal $2, .NotEnoughMoney
+ writetext UnknownText_0x7c69a
+ buttonsound
+ special Special_YoungerHaircutBrother
+ if_equal $0, .Refused
+ if_equal $1, .Refused
+ setflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
+ if_equal $2, .two
+ if_equal $3, .three
+ jump .else
+
+.two
+ setevent EVENT_GAVE_KURT_APRICORNS
+ clearevent EVENT_RECEIVED_BALLS_FROM_KURT
+ clearevent EVENT_DRAGON_SHRINE_QUESTION_2
+ jump .then
+
+.three
+ clearevent EVENT_GAVE_KURT_APRICORNS
+ setevent EVENT_RECEIVED_BALLS_FROM_KURT
+ clearevent EVENT_DRAGON_SHRINE_QUESTION_2
+ jump .then
+
+.else
+ clearevent EVENT_GAVE_KURT_APRICORNS
+ clearevent EVENT_RECEIVED_BALLS_FROM_KURT
+ setevent EVENT_DRAGON_SHRINE_QUESTION_2
+ jump .then
+
+.then
+ takemoney $0, 500
+ special PlaceMoneyTopRight
+ writetext UnknownText_0x7c6b8
+ waitbutton
+ closetext
+ special FadeOutPalettes
+ playmusic MUSIC_HEAL
+ pause 60
+ special FadeInPalettes
+ special RestartMapMusic
+ opentext
+ writetext UnknownText_0x7c6d8
+ waitbutton
+ checkevent EVENT_GAVE_KURT_APRICORNS
+ iftrue UnknownScript_0x7c2bb
+ checkevent EVENT_RECEIVED_BALLS_FROM_KURT
+ iftrue UnknownScript_0x7c2c4
+ jump UnknownScript_0x7c2cd
+
+.Refused:
+ writetext UnknownText_0x7c6ea
+ waitbutton
+ closetext
+ end
+
+.NotEnoughMoney:
+ writetext UnknownText_0x7c709
+ waitbutton
+ closetext
+ end
+
+.AlreadyGotHaircut:
+ writetext UnknownText_0x7c72b
+ waitbutton
+ closetext
+ end
+
+YoungerHaircutBrotherScript:
+ opentext
+ checkcode VAR_WEEKDAY
+ if_equal SUNDAY, .DoHaircut
+ if_equal WEDNESDAY, .DoHaircut
+ if_equal FRIDAY, .DoHaircut
+ jump GoldenrodUndergroundScript_ShopClosed
+
+.DoHaircut:
+ checkflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
+ iftrue .AlreadyGotHaircut
+ special PlaceMoneyTopRight
+ writetext UnknownText_0x7c75c
+ yesorno
+ iffalse .Refused
+ checkmoney $0, 300
+ if_equal $2, .NotEnoughMoney
+ writetext UnknownText_0x7c7f1
+ buttonsound
+ special Special_OlderHaircutBrother
+ if_equal $0, .Refused
+ if_equal $1, .Refused
+ setflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
+ if_equal $2, .two
+ if_equal $3, .three
+ jump .else
+
+.two
+ setevent EVENT_GAVE_KURT_APRICORNS
+ clearevent EVENT_RECEIVED_BALLS_FROM_KURT
+ clearevent EVENT_DRAGON_SHRINE_QUESTION_2
+ jump .then
+
+.three
+ clearevent EVENT_GAVE_KURT_APRICORNS
+ setevent EVENT_RECEIVED_BALLS_FROM_KURT
+ clearevent EVENT_DRAGON_SHRINE_QUESTION_2
+ jump .then
+
+.else
+ clearevent EVENT_GAVE_KURT_APRICORNS
+ clearevent EVENT_RECEIVED_BALLS_FROM_KURT
+ setevent EVENT_DRAGON_SHRINE_QUESTION_2
+ jump .then
+
+.then
+ takemoney $0, 300
+ special PlaceMoneyTopRight
+ writetext UnknownText_0x7c80e
+ waitbutton
+ closetext
+ special FadeOutPalettes
+ playmusic MUSIC_HEAL
+ pause 60
+ special FadeInPalettes
+ special RestartMapMusic
+ opentext
+ writetext UnknownText_0x7c82a
+ waitbutton
+ checkevent EVENT_GAVE_KURT_APRICORNS
+ iftrue UnknownScript_0x7c2bb
+ checkevent EVENT_RECEIVED_BALLS_FROM_KURT
+ iftrue UnknownScript_0x7c2c4
+ jump UnknownScript_0x7c2cd
+
+.Refused:
+ writetext UnknownText_0x7c842
+ waitbutton
+ closetext
+ end
+
+.NotEnoughMoney:
+ writetext UnknownText_0x7c85b
+ waitbutton
+ closetext
+ end
+
+.AlreadyGotHaircut:
+ writetext UnknownText_0x7c87b
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x7c2bb:
+ writetext HaircutBrosText_SlightlyHappier
+ special PlayCurMonCry
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x7c2c4:
+ writetext HaircutBrosText_Happier
+ special PlayCurMonCry
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x7c2cd:
+ writetext HaircutBrosText_MuchHappier
+ special PlayCurMonCry
+ waitbutton
+ closetext
+ end
+
+BasementDoorScript::
+ opentext
+ checkevent EVENT_USED_BASEMENT_KEY
+ iftrue .Open
+ checkitem BASEMENT_KEY
+ iftrue .Unlock
+ writetext UnknownText_0x7c5b0
+ waitbutton
+ closetext
+ end
+
+.Unlock:
+ playsound SFX_TRANSACTION
+ writetext UnknownText_0x7c5d6
+ waitbutton
+ closetext
+ changeblock $12, $6, $2e
+ reloadmappart
+ closetext
+ setevent EVENT_USED_BASEMENT_KEY
+ end
+
+.Open:
+ writetext UnknownText_0x7c5c3
+ waitbutton
+ closetext
+ end
+
+GoldenrodUndergroundScript_ShopClosed:
+ writetext UnknownText_0x7c904
+ waitbutton
+ closetext
+ end
+
+GoldenrodUndergroundCoinCase:
+ itemball COIN_CASE
+
+MapGoldenrodUndergroundSignpost1Script:
+ jumptext UnknownText_0x7c91a
+
+GoldenrodUndergroundHiddenParlyzHeal:
+ dwb EVENT_GOLDENROD_UNDERGROUND_HIDDEN_PARLYZ_HEAL, PARLYZ_HEAL
+
+GoldenrodUndergroundHiddenSuperPotion:
+ dwb EVENT_GOLDENROD_UNDERGROUND_HIDDEN_SUPER_POTION, SUPER_POTION
+
+GoldenrodUndergroundHiddenAntidote:
+ dwb EVENT_GOLDENROD_UNDERGROUND_HIDDEN_ANTIDOTE, ANTIDOTE
+
+SupernerdEricSeenText:
+ text "I got booted out"
+ line "of the GAME COR-"
+ cont "NER."
+
+ para "I was trying to"
+ line "cheat using my"
+ cont "#MON…"
+ done
+
+SupernerdEricBeatenText:
+ text "…Grumble…"
+ done
+
+SupernerdEricAfterBattleText:
+ text "I guess I have to"
+ line "do things fair and"
+ cont "square…"
+ done
+
+SupernerdTeruSeenText:
+ text "Do you consider"
+ line "type alignments in"
+ cont "battle?"
+
+ para "If you know your"
+ line "type advantages,"
+
+ para "you'll do better"
+ line "in battle."
+ done
+
+SupernerdTeruBeatenText:
+ text "Ow, ow, ow!"
+ done
+
+SupernerdTeruAfterBattleText:
+ text "I know my #MON"
+ line "type alignments."
+
+ para "But I only use one"
+ line "type of #MON."
+ done
+
+PokemaniacIssacSeenText:
+ text "My #MON just"
+ line "got a haircut!"
+
+ para "I'll show you how"
+ line "strong it is!"
+ done
+
+PokemaniacIssacBeatenText:
+ text "Aiyeeee!"
+ done
+
+PokemaniacIssacAfterBattleText:
+ text "Your #MON will"
+ line "like you more if"
+
+ para "you give them"
+ line "haircuts."
+ done
+
+PokemaniacDonaldSeenText:
+ text "I think you have"
+ line "some rare #MON"
+ cont "with you."
+
+ para "Let me see them!"
+ done
+
+PokemaniacDonaldBeatenText:
+ text "Gaah! I lost!"
+ line "That makes me mad!"
+ done
+
+PokemaniacDonaldAfterBattleText:
+ text "Are you making a"
+ line "#DEX? Here's a"
+ cont "hot tip."
+
+ para "The HIKER on ROUTE"
+ line "33, ANTHONY, is a"
+ cont "good guy."
+
+ para "He'll phone you if"
+ line "he sees any rare"
+ cont "#MON."
+ done
+
+UnknownText_0x7c5b0:
+ text "The door's locked…"
+ done
+
+UnknownText_0x7c5c3:
+ text "The door is open."
+ done
+
+UnknownText_0x7c5d6:
+ text "The BASEMENT KEY"
+ line "opened the door."
+ done
+
+UnknownText_0x7c5f9:
+ text "Welcome!"
+
+ para "I run the #MON"
+ line "SALON!"
+
+ para "I'm the older and"
+ line "better of the two"
+ cont "HAIRCUT BROTHERS."
+
+ para "I can make your"
+ line "#MON beautiful"
+ cont "for just ¥500."
+
+ para "Would you like me"
+ line "to do that?"
+ done
+
+UnknownText_0x7c69a:
+ text "Which #MON"
+ line "should I work on?"
+ done
+
+UnknownText_0x7c6b8:
+ text "OK! Watch it"
+ line "become beautiful!"
+ done
+
+UnknownText_0x7c6d8:
+ text "There! All done!"
+ done
+
+UnknownText_0x7c6ea:
+ text "Is that right?"
+ line "That's a shame!"
+ done
+
+UnknownText_0x7c709:
+ text "You'll need more"
+ line "money than that."
+ done
+
+UnknownText_0x7c72b:
+ text "I do only one"
+ line "haircut a day. I'm"
+ cont "done for today."
+ done
+
+UnknownText_0x7c75c:
+ text "Welcome to the"
+ line "#MON SALON!"
+
+ para "I'm the younger"
+ line "and less expen-"
+ cont "sive of the two"
+ cont "HAIRCUT BROTHERS."
+
+ para "I'll spiff up your"
+ line "#MON for just"
+ cont "¥300."
+
+ para "So? How about it?"
+ done
+
+UnknownText_0x7c7f1:
+ text "OK, which #MON"
+ line "should I do?"
+ done
+
+UnknownText_0x7c80e:
+ text "OK! I'll make it"
+ line "look cool!"
+ done
+
+UnknownText_0x7c82a:
+ text "There we go!"
+ line "All done!"
+ done
+
+UnknownText_0x7c842:
+ text "No? "
+ line "How disappointing!"
+ done
+
+UnknownText_0x7c85b:
+ text "You're a little"
+ line "short on funds."
+ done
+
+UnknownText_0x7c87b:
+ text "I can do only one"
+ line "haircut a day."
+
+ para "Sorry, but I'm all"
+ line "done for today."
+ done
+
+HaircutBrosText_SlightlyHappier:
+ text_from_ram StringBuffer3
+ text " looks a"
+ line "little happier."
+ done
+
+HaircutBrosText_Happier:
+ text_from_ram StringBuffer3
+ text " looks"
+ line "happy."
+ done
+
+HaircutBrosText_MuchHappier:
+ text_from_ram StringBuffer3
+ text " looks"
+ line "delighted!"
+ done
+
+UnknownText_0x7c904:
+ text "We're not open"
+ line "today."
+ done
+
+UnknownText_0x7c91a:
+ text "NO ENTRY BEYOND"
+ line "THIS POINT"
+ done
+
+GoldenrodUnderground_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 6
+ warp_def $2, $3, 7, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES
+ warp_def $22, $3, 4, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES
+ warp_def $6, $12, 4, GOLDENROD_UNDERGROUND
+ warp_def $1f, $15, 3, GOLDENROD_UNDERGROUND
+ warp_def $1f, $16, 3, GOLDENROD_UNDERGROUND
+ warp_def $1b, $16, 1, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 5
+ bg_event 6, 18, BGEVENT_READ, BasementDoorScript
+ bg_event 6, 19, BGEVENT_READ, MapGoldenrodUndergroundSignpost1Script
+ bg_event 13, 6, BGEVENT_ITEM, GoldenrodUndergroundHiddenParlyzHeal
+ bg_event 18, 4, BGEVENT_ITEM, GoldenrodUndergroundHiddenSuperPotion
+ bg_event 8, 17, BGEVENT_ITEM, GoldenrodUndergroundHiddenAntidote
+
+.ObjectEvents:
+ db 9
+ object_event SPRITE_SUPER_NERD, 31, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerSupernerdEric, -1
+ object_event SPRITE_SUPER_NERD, 9, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerSupernerdTeru, -1
+ object_event SPRITE_SUPER_NERD, 27, 3, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerPokemaniacIssac, -1
+ object_event SPRITE_SUPER_NERD, 6, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPokemaniacDonald, -1
+ object_event SPRITE_POKE_BALL, 25, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodUndergroundCoinCase, EVENT_GOLDENROD_UNDERGROUND_COIN_CASE
+ object_event SPRITE_GRAMPS, 11, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, GrampsScript_0x7c146, EVENT_GOLDENROD_UNDERGROUND_GRAMPS
+ object_event SPRITE_SUPER_NERD, 14, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, OlderHaircutBrotherScript, EVENT_GOLDENROD_UNDERGROUND_OLDER_HAIRCUT_BROTHER
+ object_event SPRITE_SUPER_NERD, 15, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, YoungerHaircutBrotherScript, EVENT_GOLDENROD_UNDERGROUND_YOUNGER_HAIRCUT_BROTHER
+ object_event SPRITE_GRANNY, 21, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, GrannyScript_0x7c132, EVENT_GOLDENROD_UNDERGROUND_GRANNY
--- /dev/null
+++ b/maps/GoldenrodUnderground.blk
@@ -1,0 +1,1 @@
+''''''''''''''1:''''''''''''''''''''''''''.'''''':''''''''''852''''''''''''83''''''''''''852''''''''''''3'''''''''''':''''''''''''852''''''''''''83''''''''''''8''''''''''''''4;+'''5''''''<0 '''5''''''%&''''''''''''''''1''''''''''''
\ No newline at end of file
--- /dev/null
+++ b/maps/GoldenrodUndergroundSwitchRoomEntrances.asm
@@ -1,0 +1,974 @@
+UNDERGROUND_DOOR_CLOSED1 EQU $2a
+UNDERGROUND_DOOR_CLOSED2 EQU $3e
+UNDERGROUND_DOOR_CLOSED3 EQU $3f
+UNDERGROUND_DOOR_OPEN1 EQU $2d
+UNDERGROUND_DOOR_OPEN2 EQU $3d
+
+ugdoor: macro
+\1_YCOORD EQU \2
+\1_XCOORD EQU \3
+endm
+
+ ugdoor UGDOOR_1, $10, $06
+ ugdoor UGDOOR_2, $0a, $06
+ ugdoor UGDOOR_3, $02, $06
+ ugdoor UGDOOR_4, $02, $0a
+ ugdoor UGDOOR_5, $0a, $0a
+ ugdoor UGDOOR_6, $10, $0a
+ ugdoor UGDOOR_7, $0c, $06
+ ugdoor UGDOOR_8, $0c, $08
+ ugdoor UGDOOR_9, $06, $06
+ ugdoor UGDOOR_10, $06, $08
+ ugdoor UGDOOR_11, $0c, $0a
+ ugdoor UGDOOR_12, $0c, $0c
+ ugdoor UGDOOR_13, $06, $0a
+ ugdoor UGDOOR_14, $06, $0c
+ ugdoor UGDOOR_15, $12, $0a
+ ugdoor UGDOOR_16, $12, $0c
+
+doorstate: macro
+ changeblock UGDOOR_\1_YCOORD, UGDOOR_\1_XCOORD, UNDERGROUND_DOOR_\2
+endm
+
+const_value set 2
+ const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_PHARMACIST1
+ const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_PHARMACIST2
+ const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_ROCKET1
+ const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_ROCKET2
+ const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_ROCKET3
+ const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_ROCKET_GIRL
+ const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_TEACHER
+ const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SUPER_NERD
+ const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_POKE_BALL1
+ const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_POKE_BALL2
+ const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER
+
+GoldenrodUndergroundSwitchRoomEntrances_MapScriptHeader:
+.SceneScripts:
+ db 2
+ scene_script .DummyScene0
+ scene_script .DummyScene1
+
+.MapCallbacks:
+ db 1
+ dbw MAPCALLBACK_TILES, .UpdateDoorPositions
+
+.DummyScene0:
+ end
+
+.DummyScene1:
+ end
+
+.UpdateDoorPositions:
+ checkevent EVENT_SWITCH_4
+ iffalse .false4
+ doorstate 1, OPEN1
+.false4
+ checkevent EVENT_SWITCH_5
+ iffalse .false5
+ doorstate 2, OPEN1
+.false5
+ checkevent EVENT_SWITCH_6
+ iffalse .false6
+ doorstate 3, OPEN1
+.false6
+ checkevent EVENT_SWITCH_7
+ iffalse .false7
+ doorstate 4, OPEN1
+.false7
+ checkevent EVENT_SWITCH_8
+ iffalse .false8
+ doorstate 5, OPEN1
+.false8
+ checkevent EVENT_SWITCH_9
+ iffalse .false9
+ doorstate 6, OPEN1
+.false9
+ checkevent EVENT_SWITCH_10
+ iffalse .false10
+ doorstate 7, CLOSED1
+ doorstate 8, OPEN1
+.false10
+ checkevent EVENT_SWITCH_11
+ iffalse .false11
+ doorstate 9, CLOSED1
+ doorstate 10, OPEN1
+.false11
+ checkevent EVENT_SWITCH_12
+ iffalse .false12
+ doorstate 11, CLOSED1
+ doorstate 12, OPEN1
+.false12
+ checkevent EVENT_SWITCH_13
+ iffalse .false13
+ doorstate 13, CLOSED1
+ doorstate 14, OPEN1
+.false13
+ checkevent EVENT_SWITCH_14
+ iffalse .false14
+ doorstate 15, CLOSED1
+ doorstate 16, OPEN1
+.false14
+ return
+
+SuperNerdScript_0x7ca7a:
+ jumptextfaceplayer GoldenrodUndergroundSwitchRoomEntrances_SuperNerdText
+
+TeacherScript_0x7ca7d:
+ jumptextfaceplayer GoldenrodUndergroundSwitchRoomEntrances_TeacherText
+
+UndergroundSilverScene1:
+ spriteface PLAYER, RIGHT
+ showemote EMOTE_SHOCK, PLAYER, 15
+ special Special_FadeOutMusic
+ pause 15
+ playsound SFX_EXIT_BUILDING
+ appear GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER
+ waitsfx
+ applymovement GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER, UndergroundSilverApproachMovement1
+ spriteface PLAYER, RIGHT
+ scall UndergroundSilverBattleScript
+ applymovement GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER, UndergroundSilverRetreatMovement1
+ playsound SFX_EXIT_BUILDING
+ disappear GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER
+ setscene 1
+ waitsfx
+ playmapmusic
+ end
+
+UndergroundSilverScene2:
+ spriteface PLAYER, RIGHT
+ showemote EMOTE_SHOCK, PLAYER, 15
+ special Special_FadeOutMusic
+ pause 15
+ playsound SFX_EXIT_BUILDING
+ appear GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER
+ waitsfx
+ applymovement GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER, UndergroundSilverApproachMovement2
+ spriteface PLAYER, RIGHT
+ scall UndergroundSilverBattleScript
+ applymovement GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER, UndergroundSilverRetreatMovement2
+ playsound SFX_EXIT_BUILDING
+ disappear GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER
+ setscene 1
+ waitsfx
+ playmapmusic
+ end
+
+UndergroundSilverBattleScript:
+ checkevent EVENT_RIVAL_BURNED_TOWER
+ iftrue .Continue
+ setevent EVENT_RIVAL_BURNED_TOWER
+ setmapscene BURNED_TOWER_1F, 1
+.Continue:
+ playmusic MUSIC_RIVAL_ENCOUNTER
+ opentext
+ writetext UndergroundSilverBeforeText
+ waitbutton
+ closetext
+ setevent EVENT_RIVAL_GOLDENROD_UNDERGROUND
+ checkevent EVENT_GOT_TOTODILE_FROM_ELM
+ iftrue .Totodile
+ checkevent EVENT_GOT_CHIKORITA_FROM_ELM
+ iftrue .Chikorita
+ winlosstext UndergroundSilverWinText, UndergroundSilverLossText
+ setlasttalked GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER
+ loadtrainer RIVAL1, RIVAL1_4_TOTODILE
+ startbattle
+ dontrestartmapmusic
+ reloadmapafterbattle
+ jump .FinishRivalBattle
+
+.Totodile:
+ winlosstext UndergroundSilverWinText, UndergroundSilverLossText
+ setlasttalked GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER
+ loadtrainer RIVAL1, RIVAL1_4_CHIKORITA
+ startbattle
+ dontrestartmapmusic
+ reloadmapafterbattle
+ jump .FinishRivalBattle
+
+.Chikorita:
+ winlosstext UndergroundSilverWinText, UndergroundSilverLossText
+ setlasttalked GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER
+ loadtrainer RIVAL1, RIVAL1_4_CYNDAQUIL
+ startbattle
+ dontrestartmapmusic
+ reloadmapafterbattle
+ jump .FinishRivalBattle
+
+.FinishRivalBattle:
+ playmusic MUSIC_RIVAL_AFTER
+ opentext
+ writetext UndergroundSilverAfterText
+ waitbutton
+ closetext
+ end
+
+TrainerGruntM11:
+ trainer EVENT_BEAT_ROCKET_GRUNTM_11, GRUNTM, GRUNTM_11, GruntM11SeenText, GruntM11BeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext GruntM11AfterBattleText
+ waitbutton
+ closetext
+ end
+
+TrainerGruntM25:
+ trainer EVENT_BEAT_ROCKET_GRUNTM_25, GRUNTM, GRUNTM_25, GruntM25SeenText, GruntM25BeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext GruntM25AfterBattleText
+ waitbutton
+ closetext
+ end
+
+TrainerBurglarDuncan:
+ trainer EVENT_BEAT_BURGLAR_DUNCAN, BURGLAR, DUNCAN, BurglarDuncanSeenText, BurglarDuncanBeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext BurglarDuncanAfterBattleText
+ waitbutton
+ closetext
+ end
+
+TrainerBurglarEddie:
+ trainer EVENT_BEAT_BURGLAR_EDDIE, BURGLAR, EDDIE, BurglarEddieSeenText, BurglarEddieBeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext BurglarEddieAfterBattleText
+ waitbutton
+ closetext
+ end
+
+TrainerGruntM13:
+ trainer EVENT_BEAT_ROCKET_GRUNTM_13, GRUNTM, GRUNTM_13, GruntM13SeenText, GruntM13BeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext GruntM13AfterBattleText
+ waitbutton
+ closetext
+ end
+
+TrainerGruntF3:
+ trainer EVENT_BEAT_ROCKET_GRUNTF_3, GRUNTF, GRUNTF_3, GruntF3SeenText, GruntF3BeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext GruntF3AfterBattleText
+ waitbutton
+ closetext
+ end
+
+Switch1Script:
+ opentext
+ writetext SwitchRoomText_Switch1
+ buttonsound
+ checkevent EVENT_SWITCH_1
+ iftrue .On
+ writetext SwitchRoomText_OffTurnOn
+ yesorno
+ iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
+ copybytetovar UndergroundSwitchPositions
+ addvar 1
+ copyvartobyte UndergroundSwitchPositions
+ setevent EVENT_SWITCH_1
+ jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
+
+.On:
+ writetext SwitchRoomText_OnTurnOff
+ yesorno
+ iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
+ copybytetovar UndergroundSwitchPositions
+ addvar -1
+ copyvartobyte UndergroundSwitchPositions
+ clearevent EVENT_SWITCH_1
+ jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
+
+Switch2Script:
+ opentext
+ writetext SwitchRoomText_Switch2
+ buttonsound
+ checkevent EVENT_SWITCH_2
+ iftrue .On
+ writetext SwitchRoomText_OffTurnOn
+ yesorno
+ iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
+ copybytetovar UndergroundSwitchPositions
+ addvar 2
+ copyvartobyte UndergroundSwitchPositions
+ setevent EVENT_SWITCH_2
+ jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
+
+.On:
+ writetext SwitchRoomText_OnTurnOff
+ yesorno
+ iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
+ copybytetovar UndergroundSwitchPositions
+ addvar -2
+ copyvartobyte UndergroundSwitchPositions
+ clearevent EVENT_SWITCH_2
+ jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
+
+Switch3Script:
+ opentext
+ writetext SwitchRoomText_Switch3
+ buttonsound
+ checkevent EVENT_SWITCH_3
+ iftrue .On
+ writetext SwitchRoomText_OffTurnOn
+ yesorno
+ iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
+ copybytetovar UndergroundSwitchPositions
+ addvar 3
+ copyvartobyte UndergroundSwitchPositions
+ setevent EVENT_SWITCH_3
+ jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
+
+.On:
+ writetext SwitchRoomText_OnTurnOff
+ yesorno
+ iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
+ copybytetovar UndergroundSwitchPositions
+ addvar -3
+ copyvartobyte UndergroundSwitchPositions
+ clearevent EVENT_SWITCH_3
+ jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
+
+EmergencySwitchScript:
+ opentext
+ writetext SwitchRoomText_Emergency
+ buttonsound
+ checkevent EVENT_EMERGENCY_SWITCH
+ iftrue .On
+ writetext SwitchRoomText_OffTurnOn
+ yesorno
+ iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
+ writebyte 7
+ copyvartobyte UndergroundSwitchPositions
+ setevent EVENT_EMERGENCY_SWITCH
+ setevent EVENT_SWITCH_1
+ setevent EVENT_SWITCH_2
+ setevent EVENT_SWITCH_3
+ jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
+
+.On:
+ writetext SwitchRoomText_OnTurnOff
+ yesorno
+ iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
+ writebyte 0
+ copyvartobyte UndergroundSwitchPositions
+ clearevent EVENT_EMERGENCY_SWITCH
+ clearevent EVENT_SWITCH_1
+ clearevent EVENT_SWITCH_2
+ clearevent EVENT_SWITCH_3
+ jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
+
+GoldenrodUndergroundSwitchRoomEntrances_DontToggle:
+ closetext
+ end
+
+GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors:
+ copybytetovar UndergroundSwitchPositions
+ if_equal 0, .Position0
+ if_equal 1, .Position1
+ if_equal 2, .Position2
+ if_equal 3, .Position3
+ if_equal 4, .Position4
+ if_equal 5, .Position5
+ if_equal 6, .Position6
+ if_equal 7, .EmergencyPosition
+.Position0:
+ playsound SFX_ENTER_DOOR
+ scall .Clear4
+ scall .Clear5
+ scall .Clear6
+ scall .Clear7
+ scall .Clear8
+ scall .Clear9
+ scall .Clear10
+ scall .Clear11
+ scall .Clear12
+ scall .Clear13
+ scall .Clear14
+ reloadmappart
+ closetext
+ end
+
+.Position1:
+ playsound SFX_ENTER_DOOR
+ scall .Set4
+ scall .Set10
+ scall .Set13
+ scall .Clear9
+ scall .Clear11
+ scall .Clear12
+ scall .Clear14
+ reloadmappart
+ closetext
+ end
+
+.Position2:
+ playsound SFX_ENTER_DOOR
+ scall .Set5
+ scall .Set11
+ scall .Set12
+ scall .Clear8
+ scall .Clear10
+ scall .Clear13
+ scall .Clear14
+ reloadmappart
+ closetext
+ end
+
+.Position3:
+ playsound SFX_ENTER_DOOR
+ scall .Set6
+ scall .Set10
+ scall .Set13
+ scall .Clear7
+ scall .Clear11
+ scall .Clear12
+ scall .Clear14
+ reloadmappart
+ closetext
+ end
+
+.Position4:
+ playsound SFX_ENTER_DOOR
+ scall .Set7
+ scall .Set11
+ scall .Set12
+ scall .Clear6
+ scall .Clear10
+ scall .Clear13
+ scall .Clear14
+ reloadmappart
+ closetext
+ end
+
+.Position5:
+ playsound SFX_ENTER_DOOR
+ scall .Set8
+ scall .Set10
+ scall .Set13
+ scall .Clear5
+ scall .Clear11
+ scall .Clear12
+ scall .Clear14
+ reloadmappart
+ closetext
+ end
+
+.Position6:
+ playsound SFX_ENTER_DOOR
+ scall .Set9
+ scall .Set11
+ scall .Set12
+ scall .Set14
+ scall .Clear4
+ scall .Clear10
+ scall .Clear13
+ reloadmappart
+ closetext
+ end
+
+.EmergencyPosition:
+ playsound SFX_ENTER_DOOR
+ scall .Clear4
+ scall .Clear5
+ scall .Set6
+ scall .Clear7
+ scall .Set8
+ scall .Set9
+ scall .Clear10
+ scall .Set11
+ scall .Set12
+ scall .Clear13
+ scall .Set14
+ reloadmappart
+ closetext
+ writebyte 6
+ copyvartobyte UndergroundSwitchPositions
+ end
+
+.Set4:
+ doorstate 1, OPEN1
+ setevent EVENT_SWITCH_4
+ end
+
+.Set5:
+ doorstate 2, OPEN1
+ setevent EVENT_SWITCH_5
+ end
+
+.Set6:
+ doorstate 3, OPEN1
+ setevent EVENT_SWITCH_6
+ end
+
+.Set7:
+ doorstate 4, OPEN1
+ setevent EVENT_SWITCH_7
+ end
+
+.Set8:
+ doorstate 5, OPEN1
+ setevent EVENT_SWITCH_8
+ end
+
+.Set9:
+ doorstate 6, OPEN1
+ setevent EVENT_SWITCH_9
+ end
+
+.Set10:
+ doorstate 7, CLOSED1
+ doorstate 8, OPEN1
+ setevent EVENT_SWITCH_10
+ end
+
+.Set11:
+ doorstate 9, CLOSED1
+ doorstate 10, OPEN1
+ setevent EVENT_SWITCH_11
+ end
+
+.Set12:
+ doorstate 11, CLOSED1
+ doorstate 12, OPEN1
+ setevent EVENT_SWITCH_12
+ end
+
+.Set13:
+ doorstate 13, CLOSED1
+ doorstate 14, OPEN1
+ setevent EVENT_SWITCH_13
+ end
+
+.Set14:
+ doorstate 15, CLOSED1
+ doorstate 16, OPEN1
+ setevent EVENT_SWITCH_14
+ end
+
+.Clear4:
+ doorstate 1, CLOSED2
+ clearevent EVENT_SWITCH_4
+ end
+
+.Clear5:
+ doorstate 2, CLOSED2
+ clearevent EVENT_SWITCH_5
+ end
+
+.Clear6:
+ doorstate 3, CLOSED2
+ clearevent EVENT_SWITCH_6
+ end
+
+.Clear7:
+ doorstate 4, CLOSED2
+ clearevent EVENT_SWITCH_7
+ end
+
+.Clear8:
+ doorstate 5, CLOSED2
+ clearevent EVENT_SWITCH_8
+ end
+
+.Clear9:
+ doorstate 6, CLOSED2
+ clearevent EVENT_SWITCH_9
+ end
+
+.Clear10:
+ doorstate 7, CLOSED3
+ doorstate 8, OPEN2
+ clearevent EVENT_SWITCH_10
+ end
+
+.Clear11:
+ doorstate 9, CLOSED3
+ doorstate 10, OPEN2
+ clearevent EVENT_SWITCH_11
+ end
+
+.Clear12:
+ doorstate 11, CLOSED3
+ doorstate 12, OPEN2
+ clearevent EVENT_SWITCH_12
+ end
+
+.Clear13:
+ doorstate 13, CLOSED3
+ doorstate 14, OPEN2
+ clearevent EVENT_SWITCH_13
+ end
+
+.Clear14:
+ doorstate 15, CLOSED3
+ doorstate 16, OPEN2
+ clearevent EVENT_SWITCH_14
+ end
+
+GoldenrodUndergroundSwitchRoomEntrancesSmokeBall:
+ itemball SMOKE_BALL
+
+GoldenrodUndergroundSwitchRoomEntrancesFullHeal:
+ itemball FULL_HEAL
+
+GoldenrodUndergroundSwitchRoomEntrancesHiddenMaxPotion:
+ dwb EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_HIDDEN_MAX_POTION, MAX_POTION
+
+GoldenrodUndergroundSwitchRoomEntrancesHiddenRevive:
+ dwb EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_HIDDEN_REVIVE, REVIVE
+
+UndergroundSilverApproachMovement1:
+ step DOWN
+ step LEFT
+ step LEFT
+ step LEFT
+ step_end
+
+UndergroundSilverApproachMovement2:
+ step DOWN
+ step DOWN
+ step LEFT
+ step LEFT
+ step LEFT
+ step_end
+
+UndergroundSilverRetreatMovement1:
+ step RIGHT
+ step RIGHT
+ step RIGHT
+ step UP
+ step_end
+
+UndergroundSilverRetreatMovement2:
+ step RIGHT
+ step RIGHT
+ step RIGHT
+ step UP
+ step UP
+ step_end
+
+UndergroundSilverBeforeText:
+ text "Hold it!"
+
+ para "I saw you, so I"
+ line "tailed you."
+
+ para "I don't need you"
+ line "underfoot while I"
+
+ para "take care of TEAM"
+ line "ROCKET."
+
+ para "…Wait a second."
+ line "You beat me be-"
+ cont "fore, didn't you?"
+
+ para "That was just a"
+ line "fluke."
+
+ para "But I repay my"
+ line "debts!"
+ done
+
+UndergroundSilverWinText:
+ text "…Why…"
+ line "Why do I lose?"
+
+ para "I've assembled the"
+ line "toughest #MON."
+
+ para "I didn't ease up"
+ line "on the gas."
+
+ para "So why do I lose?"
+ done
+
+UndergroundSilverAfterText:
+ text "…I don't under-"
+ line "stand…"
+
+ para "Is what that LANCE"
+ line "guy said true?"
+
+ para "That I don't treat"
+ line "#MON properly?"
+
+ para "Love…"
+
+ para "Trust…"
+
+ para "Are they really"
+ line "what I lack?"
+
+ para "Are they keeping"
+ line "me from winning?"
+
+ para "I… I just don't"
+ line "understand."
+
+ para "But it's not going"
+ line "to end here."
+
+ para "Not now. Not"
+ line "because of this."
+
+ para "I won't give up my"
+ line "dream of becoming"
+
+ para "the world's best"
+ line "#MON trainer!"
+ done
+
+UndergroundSilverLossText:
+ text "Humph. This is my"
+ line "real power, wimp."
+
+ para "I'll make TEAM"
+ line "ROCKET history."
+
+ para "And I'm going to"
+ line "grind that LANCE"
+ cont "under my heels."
+ done
+
+GoldenrodUndergroundSwitchRoomEntrances_SuperNerdText:
+ text "I was challenged"
+ line "to a battle down-"
+ cont "stairs."
+
+ para "It's rough down"
+ line "there. You'd"
+ cont "better be careful."
+ done
+
+GoldenrodUndergroundSwitchRoomEntrances_TeacherText:
+ text "There are some"
+ line "shops downstairs…"
+
+ para "But there are"
+ line "also trainers."
+
+ para "I'm scared to go"
+ line "down there."
+ done
+
+GruntM11SeenText:
+ text "Open one shutter,"
+ line "another closes."
+
+ para "Bet you can't get"
+ line "where you want!"
+ done
+
+GruntM11BeatenText:
+ text "Drat! I was sunk"
+ line "by indecision!"
+ done
+
+GruntM11AfterBattleText:
+ text "I'm confused too…"
+ line "The switch on the"
+
+ para "end is the one to"
+ line "press first, but…"
+ done
+
+GruntM25SeenText:
+ text "Kwahaha!"
+
+ para "Confounded by the"
+ line "shutters, are we?"
+
+ para "I'll let you in on"
+ line "a secret if you"
+ cont "can beat me!"
+ done
+
+GruntM25BeatenText:
+ text "Uwww…"
+ line "I blew it."
+ done
+
+GruntM25AfterBattleText:
+ text "All right. A hint!"
+
+ para "Change the order"
+ line "of switching."
+
+ para "That'll change the"
+ line "ways the shutters"
+ cont "open and close."
+ done
+
+BurglarDuncanSeenText:
+ text "Fork over your"
+ line "goodies!"
+ done
+
+BurglarDuncanBeatenText:
+ text "Mercy!"
+ done
+
+BurglarDuncanAfterBattleText:
+ text "Steal and sell!"
+ line "That's basic in"
+ cont "crime, kid!"
+ done
+
+BurglarEddieSeenText:
+ text "They ditched this"
+ line "project before"
+ cont "they finished."
+
+ para "I'm searching for"
+ line "leftover loot."
+ done
+
+BurglarEddieBeatenText:
+ text "Over the top!"
+ done
+
+BurglarEddieAfterBattleText:
+ text "UNDERGROUND WARE-"
+ line "HOUSE?"
+
+ para "What do you want"
+ line "to go there for?"
+
+ para "There's nothing"
+ line "down there."
+ done
+
+GruntM13SeenText:
+ text "I don't care if"
+ line "you're lost."
+
+ para "You show up here,"
+ line "you're nothing but"
+ cont "a victim!"
+ done
+
+GruntM13BeatenText:
+ text "Urk! Yeah, think"
+ line "you're cool, huh?"
+ done
+
+GruntM13AfterBattleText:
+ text "You must have ice"
+ line "in your veins to"
+ cont "dis TEAM ROCKET."
+ done
+
+SwitchRoomText_Switch1:
+ text "It's labeled"
+ line "SWITCH 1."
+ done
+
+GruntF3SeenText:
+ text "Are you lost? No,"
+ line "you can't be."
+
+ para "You don't have"
+ line "that scared look."
+
+ para "I'll give you"
+ line "something to be"
+ cont "scared about!"
+ done
+
+GruntF3BeatenText:
+ text "How could you?"
+ done
+
+GruntF3AfterBattleText:
+ text "Go wherever you'd"
+ line "like! Get lost!"
+ cont "See if I care!"
+ done
+
+SwitchRoomText_OffTurnOn:
+ text "It's OFF."
+ line "Turn it ON?"
+ done
+
+SwitchRoomText_OnTurnOff:
+ text "It's ON."
+ line "Turn it OFF?"
+ done
+
+SwitchRoomText_Switch2:
+ text "It's labeled"
+ line "SWITCH 2."
+ done
+
+SwitchRoomText_Switch3:
+ text "It's labeled"
+ line "SWITCH 3."
+ done
+
+SwitchRoomText_Emergency:
+ text "It's labeled"
+ line "EMERGENCY."
+ done
+
+GoldenrodUndergroundSwitchRoomEntrances_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 9
+ warp_def $3, $17, 6, GOLDENROD_UNDERGROUND
+ warp_def $a, $16, 1, GOLDENROD_UNDERGROUND_WAREHOUSE
+ warp_def $a, $17, 2, GOLDENROD_UNDERGROUND_WAREHOUSE
+ warp_def $19, $5, 2, GOLDENROD_UNDERGROUND
+ warp_def $1d, $4, 14, GOLDENROD_CITY
+ warp_def $1d, $5, 14, GOLDENROD_CITY
+ warp_def $19, $15, 1, GOLDENROD_UNDERGROUND
+ warp_def $1d, $14, 13, GOLDENROD_CITY
+ warp_def $1d, $15, 13, GOLDENROD_CITY
+
+.CoordEvents:
+ db 2
+ coord_event 0, $4, $13, UndergroundSilverScene1
+ coord_event 0, $5, $13, UndergroundSilverScene2
+
+.BGEvents:
+ db 6
+ bg_event 1, 16, BGEVENT_READ, Switch1Script
+ bg_event 1, 10, BGEVENT_READ, Switch2Script
+ bg_event 1, 2, BGEVENT_READ, Switch3Script
+ bg_event 11, 20, BGEVENT_READ, EmergencySwitchScript
+ bg_event 9, 8, BGEVENT_ITEM, GoldenrodUndergroundSwitchRoomEntrancesHiddenMaxPotion
+ bg_event 8, 1, BGEVENT_ITEM, GoldenrodUndergroundSwitchRoomEntrancesHiddenRevive
+
+.ObjectEvents:
+ db 11
+ object_event SPRITE_PHARMACIST, 12, 9, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 2, TrainerBurglarDuncan, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_PHARMACIST, 8, 4, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 2, TrainerBurglarEddie, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKET, 2, 17, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM13, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKET, 2, 11, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM11, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKET, 2, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM25, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKET_GIRL, 12, 19, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerGruntF3, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_TEACHER, 27, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TeacherScript_0x7ca7d, -1
+ object_event SPRITE_SUPER_NERD, 27, 19, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SuperNerdScript_0x7ca7a, -1
+ object_event SPRITE_POKE_BALL, 12, 1, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodUndergroundSwitchRoomEntrancesSmokeBall, EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_SMOKE_BALL
+ object_event SPRITE_POKE_BALL, 9, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodUndergroundSwitchRoomEntrancesFullHeal, EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_FULL_HEAL
+ object_event SPRITE_SILVER, 3, 23, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_GOLDENROD_UNDERGROUND
--- /dev/null
+++ b/maps/GoldenrodUndergroundSwitchRoomEntrances.blk
@@ -1,0 +1,2 @@
+*7**7*7***---*--*--*-)--------------*>*?*>?*>---=--=--*>*?*>?*>?7<---=--=--=--***********************
+((----
\ No newline at end of file
--- /dev/null
+++ b/maps/GoldenrodUndergroundWarehouse.asm
@@ -1,0 +1,237 @@
+const_value set 2
+ const GOLDENRODUNDERGROUNDWAREHOUSE_ROCKET1
+ const GOLDENRODUNDERGROUNDWAREHOUSE_ROCKET2
+ const GOLDENRODUNDERGROUNDWAREHOUSE_ROCKET3
+ const GOLDENRODUNDERGROUNDWAREHOUSE_GENTLEMAN
+ const GOLDENRODUNDERGROUNDWAREHOUSE_POKE_BALL1
+ const GOLDENRODUNDERGROUNDWAREHOUSE_POKE_BALL2
+ const GOLDENRODUNDERGROUNDWAREHOUSE_POKE_BALL3
+
+GoldenrodUndergroundWarehouse_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 1
+ dbw MAPCALLBACK_NEWMAP, .ResetSwitches
+
+.ResetSwitches:
+ clearevent EVENT_SWITCH_1
+ clearevent EVENT_SWITCH_2
+ clearevent EVENT_SWITCH_3
+ clearevent EVENT_EMERGENCY_SWITCH
+ clearevent EVENT_SWITCH_4
+ clearevent EVENT_SWITCH_5
+ clearevent EVENT_SWITCH_6
+ clearevent EVENT_SWITCH_7
+ clearevent EVENT_SWITCH_8
+ clearevent EVENT_SWITCH_9
+ clearevent EVENT_SWITCH_10
+ clearevent EVENT_SWITCH_11
+ clearevent EVENT_SWITCH_12
+ clearevent EVENT_SWITCH_13
+ clearevent EVENT_SWITCH_14
+ writebyte $0
+ copyvartobyte UndergroundSwitchPositions
+ return
+
+TrainerGruntM24:
+ trainer EVENT_BEAT_ROCKET_GRUNTM_24, GRUNTM, GRUNTM_24, GruntM24SeenText, GruntM24BeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext GruntM24AfterBattleText
+ waitbutton
+ closetext
+ end
+
+TrainerGruntM14:
+ trainer EVENT_BEAT_ROCKET_GRUNTM_14, GRUNTM, GRUNTM_14, GruntM14SeenText, GruntM14BeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext GruntM14AfterBattleText
+ waitbutton
+ closetext
+ end
+
+TrainerGruntM15:
+ trainer EVENT_BEAT_ROCKET_GRUNTM_15, GRUNTM, GRUNTM_15, GruntM15SeenText, GruntM15BeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext GruntM15AfterBattleText
+ waitbutton
+ closetext
+ end
+
+GentlemanScript_0x7d9bf:
+ faceplayer
+ opentext
+ checkevent EVENT_RECEIVED_CARD_KEY
+ iftrue UnknownScript_0x7d9de
+ writetext UnknownText_0x7dbc6
+ buttonsound
+ verbosegiveitem CARD_KEY
+ setevent EVENT_RECEIVED_CARD_KEY
+ setevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1
+ clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2
+ clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3
+ writetext UnknownText_0x7dc5b
+ buttonsound
+UnknownScript_0x7d9de:
+ writetext UnknownText_0x7dc8d
+ waitbutton
+ closetext
+ end
+
+GoldenrodUndergroundWarehouseMaxEther:
+ itemball MAX_ETHER
+
+GoldenrodUndergroundWarehouseTMSleepTalk:
+ itemball TM_SLEEP_TALK
+
+GoldenrodUndergroundWarehouseUltraBall:
+ itemball ULTRA_BALL
+
+GruntM24SeenText:
+ text "How did you get"
+ line "this far?"
+
+ para "I guess it can't"
+ line "be helped. I'll"
+ cont "dispose of you."
+ done
+
+GruntM24BeatenText:
+ text "I got disposed of…"
+ done
+
+GruntM24AfterBattleText:
+ text "TEAM ROCKET will"
+ line "keep going, wait-"
+ cont "ing for the return"
+ cont "of GIOVANNI."
+
+ para "We'll do whatever"
+ line "it takes."
+ done
+
+GruntM14SeenText:
+ text "You're not going"
+ line "any farther!"
+
+ para "I don't show mercy"
+ line "to my enemies, not"
+ cont "even brats!"
+ done
+
+GruntM14BeatenText:
+ text "Blast it!"
+ done
+
+GruntM14AfterBattleText:
+ text "I lost…"
+
+ para "Please forgive me,"
+ line "GIOVANNI!"
+ done
+
+GruntM15SeenText:
+ text "Hyuck-hyuck-hyuck!"
+ line "I remember you!"
+
+ para "You got me good"
+ line "at our hideout!"
+ done
+
+GruntM15BeatenText:
+ text "Hyuck-hyuck-hyuck!"
+ line "So, that's how?"
+ done
+
+GruntM15AfterBattleText:
+ text "Hyuck-hyuck-hyuck!"
+ line "That was a blast!"
+ cont "I'll remember you!"
+ done
+
+UnknownText_0x7dbc6:
+ text "DIRECTOR: Who?"
+ line "What? You came to"
+ cont "rescue me?"
+
+ para "Thank you!"
+
+ para "The RADIO TOWER!"
+
+ para "What's happening"
+ line "there?"
+
+ para "Taken over by TEAM"
+ line "ROCKET?"
+
+ para "Here. Take this"
+ line "CARD KEY."
+ done
+
+UnknownText_0x7dc5b:
+ text "DIRECTOR: Use that"
+ line "to open the shut-"
+ cont "ters on 3F."
+ done
+
+UnknownText_0x7dc8d:
+ text "I'm begging you to"
+ line "help."
+
+ para "There's no telling"
+ line "what they'll do if"
+
+ para "they control the"
+ line "transmitter."
+
+ para "They may even be"
+ line "able to control"
+
+ para "#MON using a"
+ line "special signal!"
+
+ para "You're the only"
+ line "one I can call on."
+
+ para "Please save the"
+ line "RADIO TOWER…"
+
+ para "And all the #-"
+ line "MON nationwide!"
+ done
+
+GoldenrodUndergroundWarehouse_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $c, $2, 2, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES
+ warp_def $c, $3, 3, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES
+ warp_def $2, $11, 1, GOLDENROD_DEPT_STORE_B1F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 7
+ object_event SPRITE_ROCKET, 8, 9, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM24, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKET, 15, 8, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM14, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKET, 3, 14, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 4, TrainerGruntM15, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_GENTLEMAN, 8, 12, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GentlemanScript_0x7d9bf, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_POKE_BALL, 15, 18, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodUndergroundWarehouseMaxEther, EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_MAX_ETHER
+ object_event SPRITE_POKE_BALL, 9, 13, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodUndergroundWarehouseTMSleepTalk, EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_TM_SLEEP_TALK
+ object_event SPRITE_POKE_BALL, 1, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodUndergroundWarehouseUltraBall, EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_ULTRA_BALL
--- /dev/null
+++ b/maps/GoldenrodUndergroundWarehouse.blk
@@ -1,0 +1,3 @@
+
+
+ ,.4 0 2//////-
\ No newline at end of file
--- a/maps/Route43Gate.asm
+++ b/maps/Route43Gate.asm
@@ -1,3 +1,5 @@
+ROUTE43GATE_TOLL EQU 1000
+
const_value set 2
const ROUTE43GATE_OFFICER
const ROUTE43GATE_ROCKET1
@@ -48,17 +50,17 @@
opentext
writetext RocketText_TollFee
buttonsound
- checkmoney $0, 999
+ checkmoney $0, ROUTE43GATE_TOLL - 1
if_equal $0, RocketScript_TollSouth
jump RocketScript_YoureBrokeSouth
RocketScript_TollSouth:
- takemoney $0, 1000
+ takemoney $0, ROUTE43GATE_TOLL
writetext RocketText_ThankYou
jump RocketScript_ShakeDownSouth
RocketScript_YoureBrokeSouth:
- takemoney $0, 1000
+ takemoney $0, ROUTE43GATE_TOLL
writetext RocketText_AllYouGot
jump RocketScript_ShakeDownSouth
@@ -80,17 +82,17 @@
opentext
writetext RocketText_TollFee
buttonsound
- checkmoney $0, 999
+ checkmoney $0, ROUTE43GATE_TOLL - 1
if_equal $0, RocketScript_TollNorth
jump RocketScript_YoureBrokeNorth
RocketScript_TollNorth:
- takemoney $0, 1000
+ takemoney $0, ROUTE43GATE_TOLL
writetext RocketText_ThankYou
jump RocketScript_ShakeDownNorth
RocketScript_YoureBrokeNorth:
- takemoney $0, 1000
+ takemoney $0, ROUTE43GATE_TOLL
writetext RocketText_AllYouGot
jump RocketScript_ShakeDownNorth
--- a/maps/Route5.asm
+++ b/maps/Route5.asm
@@ -45,7 +45,7 @@
.Warps:
db 4
- warp_def $f, $11, 1, ROUTE_5_UNDERGROUND_ENTRANCE
+ warp_def $f, $11, 1, ROUTE_5_UNDERGROUND_PATH_ENTRANCE
warp_def $11, $8, 1, ROUTE_5_SAFFRON_CITY_GATE
warp_def $11, $9, 2, ROUTE_5_SAFFRON_CITY_GATE
warp_def $b, $a, 1, ROUTE_5_CLEANSE_TAG_SPEECH_HOUSE
--- a/maps/Route5UndergroundEntrance.asm
+++ /dev/null
@@ -1,40 +1,0 @@
-const_value set 2
- const ROUTE5UNDERGROUNDENTRANCE_TEACHER
-
-Route5UndergroundEntrance_MapScriptHeader:
-.SceneScripts:
- db 0
-
-.MapCallbacks:
- db 0
-
-Route5UndergroundEntranceTeacherScript:
- jumptextfaceplayer Route5UndergroundEntranceTeacherText
-
-Route5UndergroundEntranceTeacherText:
- text "Many cities in"
- line "JOHTO have long"
-
- para "histories. I'd"
- line "love to visit!"
- done
-
-Route5UndergroundEntrance_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $7, $3, 1, ROUTE_5
- warp_def $7, $4, 1, ROUTE_5
- warp_def $3, $4, 1, UNDERGROUND
-
-.CoordEvents:
- db 0
-
-.BGEvents:
- db 0
-
-.ObjectEvents:
- db 1
- object_event SPRITE_TEACHER, 2, 2, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route5UndergroundEntranceTeacherScript, -1
--- /dev/null
+++ b/maps/Route5UndergroundPathEntrance.asm
@@ -1,0 +1,40 @@
+const_value set 2
+ const ROUTE5UNDERGROUNDPATHENTRANCE_TEACHER
+
+Route5UndergroundPathEntrance_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+Route5UndergroundPathEntranceTeacherScript:
+ jumptextfaceplayer Route5UndergroundPathEntranceTeacherText
+
+Route5UndergroundPathEntranceTeacherText:
+ text "Many cities in"
+ line "JOHTO have long"
+
+ para "histories. I'd"
+ line "love to visit!"
+ done
+
+Route5UndergroundPathEntrance_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $7, $3, 1, ROUTE_5
+ warp_def $7, $4, 1, ROUTE_5
+ warp_def $3, $4, 1, UNDERGROUND_PATH
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 1
+ object_event SPRITE_TEACHER, 2, 2, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route5UndergroundPathEntranceTeacherScript, -1
--- a/maps/Route6.asm
+++ b/maps/Route6.asm
@@ -97,7 +97,7 @@
.Warps:
db 2
- warp_def $3, $11, 1, ROUTE_6_UNDERGROUND_ENTRANCE
+ warp_def $3, $11, 1, ROUTE_6_UNDERGROUND_PATH_ENTRANCE
warp_def $1, $6, 3, ROUTE_6_SAFFRON_GATE
.CoordEvents:
--- a/maps/Route6UndergroundEntrance.asm
+++ /dev/null
@@ -1,25 +1,0 @@
-Route6UndergroundEntrance_MapScriptHeader:
-.SceneScripts:
- db 0
-
-.MapCallbacks:
- db 0
-
-Route6UndergroundEntrance_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $7, $3, 1, ROUTE_6
- warp_def $7, $4, 1, ROUTE_6
- warp_def $3, $4, 2, UNDERGROUND
-
-.CoordEvents:
- db 0
-
-.BGEvents:
- db 0
-
-.ObjectEvents:
- db 0
--- /dev/null
+++ b/maps/Route6UndergroundPathEntrance.asm
@@ -1,0 +1,25 @@
+Route6UndergroundPathEntrance_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+Route6UndergroundPathEntrance_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $7, $3, 1, ROUTE_6
+ warp_def $7, $4, 1, ROUTE_6
+ warp_def $3, $4, 2, UNDERGROUND_PATH
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 0
--- a/maps/Underground.asm
+++ /dev/null
@@ -1,34 +1,0 @@
-Underground_MapScriptHeader:
-.SceneScripts:
- db 0
-
-.MapCallbacks:
- db 0
-
-UndergroundHiddenFullRestore:
- dwb EVENT_UNDERGROUND_HIDDEN_FULL_RESTORE, FULL_RESTORE
-
-
-UndergroundHiddenXSpecial:
- dwb EVENT_UNDERGROUND_HIDDEN_X_SPECIAL, X_SPECIAL
-
-
-Underground_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 2
- warp_def $2, $3, 3, ROUTE_5_UNDERGROUND_ENTRANCE
- warp_def $18, $3, 3, ROUTE_6_UNDERGROUND_ENTRANCE
-
-.CoordEvents:
- db 0
-
-.BGEvents:
- db 2
- bg_event 9, 3, BGEVENT_ITEM, UndergroundHiddenFullRestore
- bg_event 19, 1, BGEVENT_ITEM, UndergroundHiddenXSpecial
-
-.ObjectEvents:
- db 0
--- a/maps/Underground.blk
+++ /dev/null
@@ -1,2 +1,0 @@
-
-
\ No newline at end of file
--- /dev/null
+++ b/maps/UndergroundPath.asm
@@ -1,0 +1,34 @@
+UndergroundPath_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+UndergroundPathHiddenFullRestore:
+ dwb EVENT_UNDERGROUND_PATH_HIDDEN_FULL_RESTORE, FULL_RESTORE
+
+
+UndergroundPathHiddenXSpecial:
+ dwb EVENT_UNDERGROUND_PATH_HIDDEN_X_SPECIAL, X_SPECIAL
+
+
+UndergroundPath_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 2
+ warp_def $2, $3, 3, ROUTE_5_UNDERGROUND_PATH_ENTRANCE
+ warp_def $18, $3, 3, ROUTE_6_UNDERGROUND_PATH_ENTRANCE
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 2
+ bg_event 9, 3, BGEVENT_ITEM, UndergroundPathHiddenFullRestore
+ bg_event 19, 1, BGEVENT_ITEM, UndergroundPathHiddenXSpecial
+
+.ObjectEvents:
+ db 0
--- /dev/null
+++ b/maps/UndergroundPath.blk
@@ -1,0 +1,2 @@
+
+
\ No newline at end of file
--- a/maps/UndergroundPathSwitchRoomEntrances.asm
+++ /dev/null
@@ -1,976 +1,0 @@
-UNDERGROUND_DOOR_CLOSED1 EQU $2a
-UNDERGROUND_DOOR_CLOSED2 EQU $3e
-UNDERGROUND_DOOR_CLOSED3 EQU $3f
-UNDERGROUND_DOOR_OPEN1 EQU $2d
-UNDERGROUND_DOOR_OPEN2 EQU $3d
-
-ugdoor: macro
-\1_YCOORD EQU \2
-\1_XCOORD EQU \3
-endm
-
- ugdoor UGDOOR_1, $10, $06
- ugdoor UGDOOR_2, $0a, $06
- ugdoor UGDOOR_3, $02, $06
- ugdoor UGDOOR_4, $02, $0a
- ugdoor UGDOOR_5, $0a, $0a
- ugdoor UGDOOR_6, $10, $0a
- ugdoor UGDOOR_7, $0c, $06
- ugdoor UGDOOR_8, $0c, $08
- ugdoor UGDOOR_9, $06, $06
- ugdoor UGDOOR_10, $06, $08
- ugdoor UGDOOR_11, $0c, $0a
- ugdoor UGDOOR_12, $0c, $0c
- ugdoor UGDOOR_13, $06, $0a
- ugdoor UGDOOR_14, $06, $0c
- ugdoor UGDOOR_15, $12, $0a
- ugdoor UGDOOR_16, $12, $0c
-
-doorstate: macro
- changeblock UGDOOR_\1_YCOORD, UGDOOR_\1_XCOORD, UNDERGROUND_DOOR_\2
-endm
-
-const_value set 2
- const UNDERGROUNDPATHSWITCHROOMENTRANCES_PHARMACIST1
- const UNDERGROUNDPATHSWITCHROOMENTRANCES_PHARMACIST2
- const UNDERGROUNDPATHSWITCHROOMENTRANCES_ROCKET1
- const UNDERGROUNDPATHSWITCHROOMENTRANCES_ROCKET2
- const UNDERGROUNDPATHSWITCHROOMENTRANCES_ROCKET3
- const UNDERGROUNDPATHSWITCHROOMENTRANCES_ROCKET_GIRL
- const UNDERGROUNDPATHSWITCHROOMENTRANCES_TEACHER
- const UNDERGROUNDPATHSWITCHROOMENTRANCES_SUPER_NERD
- const UNDERGROUNDPATHSWITCHROOMENTRANCES_POKE_BALL1
- const UNDERGROUNDPATHSWITCHROOMENTRANCES_POKE_BALL2
- const UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER
-
-UndergroundPathSwitchRoomEntrances_MapScriptHeader:
-.SceneScripts:
- db 2
- scene_script .DummyScene0
- scene_script .DummyScene1
-
-.MapCallbacks:
- db 1
- dbw MAPCALLBACK_TILES, .UpdateDoorPositions
-
-.DummyScene0:
- end
-
-.DummyScene1:
- end
-
-.UpdateDoorPositions:
- checkevent EVENT_SWITCH_4
- iffalse .false4
- doorstate 1, OPEN1
-.false4
- checkevent EVENT_SWITCH_5
- iffalse .false5
- doorstate 2, OPEN1
-.false5
- checkevent EVENT_SWITCH_6
- iffalse .false6
- doorstate 3, OPEN1
-.false6
- checkevent EVENT_SWITCH_7
- iffalse .false7
- doorstate 4, OPEN1
-.false7
- checkevent EVENT_SWITCH_8
- iffalse .false8
- doorstate 5, OPEN1
-.false8
- checkevent EVENT_SWITCH_9
- iffalse .false9
- doorstate 6, OPEN1
-.false9
- checkevent EVENT_SWITCH_10
- iffalse .false10
- doorstate 7, CLOSED1
- doorstate 8, OPEN1
-.false10
- checkevent EVENT_SWITCH_11
- iffalse .false11
- doorstate 9, CLOSED1
- doorstate 10, OPEN1
-.false11
- checkevent EVENT_SWITCH_12
- iffalse .false12
- doorstate 11, CLOSED1
- doorstate 12, OPEN1
-.false12
- checkevent EVENT_SWITCH_13
- iffalse .false13
- doorstate 13, CLOSED1
- doorstate 14, OPEN1
-.false13
- checkevent EVENT_SWITCH_14
- iffalse .false14
- doorstate 15, CLOSED1
- doorstate 16, OPEN1
-.false14
- return
-
-SuperNerdScript_0x7ca7a:
- jumptextfaceplayer UndergroundPathSwitchRoomEntrances_SuperNerdText
-
-TeacherScript_0x7ca7d:
- jumptextfaceplayer UndergroundPathSwitchRoomEntrances_TeacherText
-
-UndergroundSilverScene1:
- spriteface PLAYER, RIGHT
- showemote EMOTE_SHOCK, PLAYER, 15
- special Special_FadeOutMusic
- pause 15
- playsound SFX_EXIT_BUILDING
- appear UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER
- waitsfx
- applymovement UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER, UndergroundSilverApproachMovement1
- spriteface PLAYER, RIGHT
- scall UndergroundSilverBattleScript
- applymovement UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER, UndergroundSilverRetreatMovement1
- playsound SFX_EXIT_BUILDING
- disappear UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER
- setscene 1
- waitsfx
- playmapmusic
- end
-
-UndergroundSilverScene2:
- spriteface PLAYER, RIGHT
- showemote EMOTE_SHOCK, PLAYER, 15
- special Special_FadeOutMusic
- pause 15
- playsound SFX_EXIT_BUILDING
- appear UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER
- waitsfx
- applymovement UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER, UndergroundSilverApproachMovement2
- spriteface PLAYER, RIGHT
- scall UndergroundSilverBattleScript
- applymovement UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER, UndergroundSilverRetreatMovement2
- playsound SFX_EXIT_BUILDING
- disappear UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER
- setscene 1
- waitsfx
- playmapmusic
- end
-
-UndergroundSilverBattleScript:
- checkevent EVENT_RIVAL_BURNED_TOWER
- iftrue .Continue
- setevent EVENT_RIVAL_BURNED_TOWER
- setmapscene BURNED_TOWER_1F, 1
-.Continue:
- playmusic MUSIC_RIVAL_ENCOUNTER
- opentext
- writetext UndergroundSilverBeforeText
- waitbutton
- closetext
- setevent EVENT_RIVAL_UNDERGROUND_PATH
- checkevent EVENT_GOT_TOTODILE_FROM_ELM
- iftrue .Totodile
- checkevent EVENT_GOT_CHIKORITA_FROM_ELM
- iftrue .Chikorita
- winlosstext UndergroundSilverWinText, UndergroundSilverLossText
- setlasttalked UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER
- loadtrainer RIVAL1, RIVAL1_4_TOTODILE
- startbattle
- dontrestartmapmusic
- reloadmapafterbattle
- jump .FinishRivalBattle
-
-.Totodile:
- winlosstext UndergroundSilverWinText, UndergroundSilverLossText
- setlasttalked UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER
- loadtrainer RIVAL1, RIVAL1_4_CHIKORITA
- startbattle
- dontrestartmapmusic
- reloadmapafterbattle
- jump .FinishRivalBattle
-
-.Chikorita:
- winlosstext UndergroundSilverWinText, UndergroundSilverLossText
- setlasttalked UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER
- loadtrainer RIVAL1, RIVAL1_4_CYNDAQUIL
- startbattle
- dontrestartmapmusic
- reloadmapafterbattle
- jump .FinishRivalBattle
-
-.FinishRivalBattle:
- playmusic MUSIC_RIVAL_AFTER
- opentext
- writetext UndergroundSilverAfterText
- waitbutton
- closetext
- end
-
-TrainerGruntM11:
- trainer EVENT_BEAT_ROCKET_GRUNTM_11, GRUNTM, GRUNTM_11, GruntM11SeenText, GruntM11BeatenText, 0, .Script
-
-.Script:
- end_if_just_battled
- opentext
- writetext GruntM11AfterBattleText
- waitbutton
- closetext
- end
-
-TrainerGruntM25:
- trainer EVENT_BEAT_ROCKET_GRUNTM_25, GRUNTM, GRUNTM_25, GruntM25SeenText, GruntM25BeatenText, 0, .Script
-
-.Script:
- end_if_just_battled
- opentext
- writetext GruntM25AfterBattleText
- waitbutton
- closetext
- end
-
-TrainerBurglarDuncan:
- trainer EVENT_BEAT_BURGLAR_DUNCAN, BURGLAR, DUNCAN, BurglarDuncanSeenText, BurglarDuncanBeatenText, 0, .Script
-
-.Script:
- end_if_just_battled
- opentext
- writetext BurglarDuncanAfterBattleText
- waitbutton
- closetext
- end
-
-TrainerBurglarEddie:
- trainer EVENT_BEAT_BURGLAR_EDDIE, BURGLAR, EDDIE, BurglarEddieSeenText, BurglarEddieBeatenText, 0, .Script
-
-.Script:
- end_if_just_battled
- opentext
- writetext BurglarEddieAfterBattleText
- waitbutton
- closetext
- end
-
-TrainerGruntM13:
- trainer EVENT_BEAT_ROCKET_GRUNTM_13, GRUNTM, GRUNTM_13, GruntM13SeenText, GruntM13BeatenText, 0, .Script
-
-.Script:
- end_if_just_battled
- opentext
- writetext GruntM13AfterBattleText
- waitbutton
- closetext
- end
-
-TrainerGruntF3:
- trainer EVENT_BEAT_ROCKET_GRUNTF_3, GRUNTF, GRUNTF_3, GruntF3SeenText, GruntF3BeatenText, 0, .Script
-
-.Script:
- end_if_just_battled
- opentext
- writetext GruntF3AfterBattleText
- waitbutton
- closetext
- end
-
-Switch1Script:
- opentext
- writetext SwitchRoomText_Switch1
- buttonsound
- checkevent EVENT_SWITCH_1
- iftrue .On
- writetext SwitchRoomText_OffTurnOn
- yesorno
- iffalse UndergroundPathSwitchRoomEntrances_DontToggle
- copybytetovar UndergroundSwitchPositions
- addvar 1
- copyvartobyte UndergroundSwitchPositions
- setevent EVENT_SWITCH_1
- jump UndergroundPathSwitchRoomEntrances_UpdateDoors
-
-.On:
- writetext SwitchRoomText_OnTurnOff
- yesorno
- iffalse UndergroundPathSwitchRoomEntrances_DontToggle
- copybytetovar UndergroundSwitchPositions
- addvar -1
- copyvartobyte UndergroundSwitchPositions
- clearevent EVENT_SWITCH_1
- jump UndergroundPathSwitchRoomEntrances_UpdateDoors
-
-Switch2Script:
- opentext
- writetext SwitchRoomText_Switch2
- buttonsound
- checkevent EVENT_SWITCH_2
- iftrue .On
- writetext SwitchRoomText_OffTurnOn
- yesorno
- iffalse UndergroundPathSwitchRoomEntrances_DontToggle
- copybytetovar UndergroundSwitchPositions
- addvar 2
- copyvartobyte UndergroundSwitchPositions
- setevent EVENT_SWITCH_2
- jump UndergroundPathSwitchRoomEntrances_UpdateDoors
-
-.On:
- writetext SwitchRoomText_OnTurnOff
- yesorno
- iffalse UndergroundPathSwitchRoomEntrances_DontToggle
- copybytetovar UndergroundSwitchPositions
- addvar -2
- copyvartobyte UndergroundSwitchPositions
- clearevent EVENT_SWITCH_2
- jump UndergroundPathSwitchRoomEntrances_UpdateDoors
-
-Switch3Script:
- opentext
- writetext SwitchRoomText_Switch3
- buttonsound
- checkevent EVENT_SWITCH_3
- iftrue .On
- writetext SwitchRoomText_OffTurnOn
- yesorno
- iffalse UndergroundPathSwitchRoomEntrances_DontToggle
- copybytetovar UndergroundSwitchPositions
- addvar 3
- copyvartobyte UndergroundSwitchPositions
- setevent EVENT_SWITCH_3
- jump UndergroundPathSwitchRoomEntrances_UpdateDoors
-
-.On:
- writetext SwitchRoomText_OnTurnOff
- yesorno
- iffalse UndergroundPathSwitchRoomEntrances_DontToggle
- copybytetovar UndergroundSwitchPositions
- addvar -3
- copyvartobyte UndergroundSwitchPositions
- clearevent EVENT_SWITCH_3
- jump UndergroundPathSwitchRoomEntrances_UpdateDoors
-
-EmergencySwitchScript:
- opentext
- writetext SwitchRoomText_Emergency
- buttonsound
- checkevent EVENT_EMERGENCY_SWITCH
- iftrue .On
- writetext SwitchRoomText_OffTurnOn
- yesorno
- iffalse UndergroundPathSwitchRoomEntrances_DontToggle
- writebyte 7
- copyvartobyte UndergroundSwitchPositions
- setevent EVENT_EMERGENCY_SWITCH
- setevent EVENT_SWITCH_1
- setevent EVENT_SWITCH_2
- setevent EVENT_SWITCH_3
- jump UndergroundPathSwitchRoomEntrances_UpdateDoors
-
-.On:
- writetext SwitchRoomText_OnTurnOff
- yesorno
- iffalse UndergroundPathSwitchRoomEntrances_DontToggle
- writebyte 0
- copyvartobyte UndergroundSwitchPositions
- clearevent EVENT_EMERGENCY_SWITCH
- clearevent EVENT_SWITCH_1
- clearevent EVENT_SWITCH_2
- clearevent EVENT_SWITCH_3
- jump UndergroundPathSwitchRoomEntrances_UpdateDoors
-
-UndergroundPathSwitchRoomEntrances_DontToggle:
- closetext
- end
-
-UndergroundPathSwitchRoomEntrances_UpdateDoors:
- copybytetovar UndergroundSwitchPositions
- if_equal 0, .Position0
- if_equal 1, .Position1
- if_equal 2, .Position2
- if_equal 3, .Position3
- if_equal 4, .Position4
- if_equal 5, .Position5
- if_equal 6, .Position6
- if_equal 7, .EmergencyPosition
-.Position0:
- playsound SFX_ENTER_DOOR
- scall .Clear4
- scall .Clear5
- scall .Clear6
- scall .Clear7
- scall .Clear8
- scall .Clear9
- scall .Clear10
- scall .Clear11
- scall .Clear12
- scall .Clear13
- scall .Clear14
- reloadmappart
- closetext
- end
-
-.Position1:
- playsound SFX_ENTER_DOOR
- scall .Set4
- scall .Set10
- scall .Set13
- scall .Clear9
- scall .Clear11
- scall .Clear12
- scall .Clear14
- reloadmappart
- closetext
- end
-
-.Position2:
- playsound SFX_ENTER_DOOR
- scall .Set5
- scall .Set11
- scall .Set12
- scall .Clear8
- scall .Clear10
- scall .Clear13
- scall .Clear14
- reloadmappart
- closetext
- end
-
-.Position3:
- playsound SFX_ENTER_DOOR
- scall .Set6
- scall .Set10
- scall .Set13
- scall .Clear7
- scall .Clear11
- scall .Clear12
- scall .Clear14
- reloadmappart
- closetext
- end
-
-.Position4:
- playsound SFX_ENTER_DOOR
- scall .Set7
- scall .Set11
- scall .Set12
- scall .Clear6
- scall .Clear10
- scall .Clear13
- scall .Clear14
- reloadmappart
- closetext
- end
-
-.Position5:
- playsound SFX_ENTER_DOOR
- scall .Set8
- scall .Set10
- scall .Set13
- scall .Clear5
- scall .Clear11
- scall .Clear12
- scall .Clear14
- reloadmappart
- closetext
- end
-
-.Position6:
- playsound SFX_ENTER_DOOR
- scall .Set9
- scall .Set11
- scall .Set12
- scall .Set14
- scall .Clear4
- scall .Clear10
- scall .Clear13
- reloadmappart
- closetext
- end
-
-.EmergencyPosition:
- playsound SFX_ENTER_DOOR
- scall .Clear4
- scall .Clear5
- scall .Set6
- scall .Clear7
- scall .Set8
- scall .Set9
- scall .Clear10
- scall .Set11
- scall .Set12
- scall .Clear13
- scall .Set14
- reloadmappart
- closetext
- writebyte 6
- copyvartobyte UndergroundSwitchPositions
- end
-
-.Set4:
- doorstate 1, OPEN1
- setevent EVENT_SWITCH_4
- end
-
-.Set5:
- doorstate 2, OPEN1
- setevent EVENT_SWITCH_5
- end
-
-.Set6:
- doorstate 3, OPEN1
- setevent EVENT_SWITCH_6
- end
-
-.Set7:
- doorstate 4, OPEN1
- setevent EVENT_SWITCH_7
- end
-
-.Set8:
- doorstate 5, OPEN1
- setevent EVENT_SWITCH_8
- end
-
-.Set9:
- doorstate 6, OPEN1
- setevent EVENT_SWITCH_9
- end
-
-.Set10:
- doorstate 7, CLOSED1
- doorstate 8, OPEN1
- setevent EVENT_SWITCH_10
- end
-
-.Set11:
- doorstate 9, CLOSED1
- doorstate 10, OPEN1
- setevent EVENT_SWITCH_11
- end
-
-.Set12:
- doorstate 11, CLOSED1
- doorstate 12, OPEN1
- setevent EVENT_SWITCH_12
- end
-
-.Set13:
- doorstate 13, CLOSED1
- doorstate 14, OPEN1
- setevent EVENT_SWITCH_13
- end
-
-.Set14:
- doorstate 15, CLOSED1
- doorstate 16, OPEN1
- setevent EVENT_SWITCH_14
- end
-
-.Clear4:
- doorstate 1, CLOSED2
- clearevent EVENT_SWITCH_4
- end
-
-.Clear5:
- doorstate 2, CLOSED2
- clearevent EVENT_SWITCH_5
- end
-
-.Clear6:
- doorstate 3, CLOSED2
- clearevent EVENT_SWITCH_6
- end
-
-.Clear7:
- doorstate 4, CLOSED2
- clearevent EVENT_SWITCH_7
- end
-
-.Clear8:
- doorstate 5, CLOSED2
- clearevent EVENT_SWITCH_8
- end
-
-.Clear9:
- doorstate 6, CLOSED2
- clearevent EVENT_SWITCH_9
- end
-
-.Clear10:
- doorstate 7, CLOSED3
- doorstate 8, OPEN2
- clearevent EVENT_SWITCH_10
- end
-
-.Clear11:
- doorstate 9, CLOSED3
- doorstate 10, OPEN2
- clearevent EVENT_SWITCH_11
- end
-
-.Clear12:
- doorstate 11, CLOSED3
- doorstate 12, OPEN2
- clearevent EVENT_SWITCH_12
- end
-
-.Clear13:
- doorstate 13, CLOSED3
- doorstate 14, OPEN2
- clearevent EVENT_SWITCH_13
- end
-
-.Clear14:
- doorstate 15, CLOSED3
- doorstate 16, OPEN2
- clearevent EVENT_SWITCH_14
- end
-
-UndergroundPathSwitchRoomEntrancesSmokeBall:
- itemball SMOKE_BALL
-
-UndergroundPathSwitchRoomEntrancesFullHeal:
- itemball FULL_HEAL
-
-UndergroundPathSwitchRoomEntrancesHiddenMaxPotion:
- dwb EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_HIDDEN_MAX_POTION, MAX_POTION
-
-
-UndergroundPathSwitchRoomEntrancesHiddenRevive:
- dwb EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_HIDDEN_REVIVE, REVIVE
-
-
-UndergroundSilverApproachMovement1:
- step DOWN
- step LEFT
- step LEFT
- step LEFT
- step_end
-
-UndergroundSilverApproachMovement2:
- step DOWN
- step DOWN
- step LEFT
- step LEFT
- step LEFT
- step_end
-
-UndergroundSilverRetreatMovement1:
- step RIGHT
- step RIGHT
- step RIGHT
- step UP
- step_end
-
-UndergroundSilverRetreatMovement2:
- step RIGHT
- step RIGHT
- step RIGHT
- step UP
- step UP
- step_end
-
-UndergroundSilverBeforeText:
- text "Hold it!"
-
- para "I saw you, so I"
- line "tailed you."
-
- para "I don't need you"
- line "underfoot while I"
-
- para "take care of TEAM"
- line "ROCKET."
-
- para "…Wait a second."
- line "You beat me be-"
- cont "fore, didn't you?"
-
- para "That was just a"
- line "fluke."
-
- para "But I repay my"
- line "debts!"
- done
-
-UndergroundSilverWinText:
- text "…Why…"
- line "Why do I lose?"
-
- para "I've assembled the"
- line "toughest #MON."
-
- para "I didn't ease up"
- line "on the gas."
-
- para "So why do I lose?"
- done
-
-UndergroundSilverAfterText:
- text "…I don't under-"
- line "stand…"
-
- para "Is what that LANCE"
- line "guy said true?"
-
- para "That I don't treat"
- line "#MON properly?"
-
- para "Love…"
-
- para "Trust…"
-
- para "Are they really"
- line "what I lack?"
-
- para "Are they keeping"
- line "me from winning?"
-
- para "I… I just don't"
- line "understand."
-
- para "But it's not going"
- line "to end here."
-
- para "Not now. Not"
- line "because of this."
-
- para "I won't give up my"
- line "dream of becoming"
-
- para "the world's best"
- line "#MON trainer!"
- done
-
-UndergroundSilverLossText:
- text "Humph. This is my"
- line "real power, wimp."
-
- para "I'll make TEAM"
- line "ROCKET history."
-
- para "And I'm going to"
- line "grind that LANCE"
- cont "under my heels."
- done
-
-UndergroundPathSwitchRoomEntrances_SuperNerdText:
- text "I was challenged"
- line "to a battle down-"
- cont "stairs."
-
- para "It's rough down"
- line "there. You'd"
- cont "better be careful."
- done
-
-UndergroundPathSwitchRoomEntrances_TeacherText:
- text "There are some"
- line "shops downstairs…"
-
- para "But there are"
- line "also trainers."
-
- para "I'm scared to go"
- line "down there."
- done
-
-GruntM11SeenText:
- text "Open one shutter,"
- line "another closes."
-
- para "Bet you can't get"
- line "where you want!"
- done
-
-GruntM11BeatenText:
- text "Drat! I was sunk"
- line "by indecision!"
- done
-
-GruntM11AfterBattleText:
- text "I'm confused too…"
- line "The switch on the"
-
- para "end is the one to"
- line "press first, but…"
- done
-
-GruntM25SeenText:
- text "Kwahaha!"
-
- para "Confounded by the"
- line "shutters, are we?"
-
- para "I'll let you in on"
- line "a secret if you"
- cont "can beat me!"
- done
-
-GruntM25BeatenText:
- text "Uwww…"
- line "I blew it."
- done
-
-GruntM25AfterBattleText:
- text "All right. A hint!"
-
- para "Change the order"
- line "of switching."
-
- para "That'll change the"
- line "ways the shutters"
- cont "open and close."
- done
-
-BurglarDuncanSeenText:
- text "Fork over your"
- line "goodies!"
- done
-
-BurglarDuncanBeatenText:
- text "Mercy!"
- done
-
-BurglarDuncanAfterBattleText:
- text "Steal and sell!"
- line "That's basic in"
- cont "crime, kid!"
- done
-
-BurglarEddieSeenText:
- text "They ditched this"
- line "project before"
- cont "they finished."
-
- para "I'm searching for"
- line "leftover loot."
- done
-
-BurglarEddieBeatenText:
- text "Over the top!"
- done
-
-BurglarEddieAfterBattleText:
- text "UNDERGROUND WARE-"
- line "HOUSE?"
-
- para "What do you want"
- line "to go there for?"
-
- para "There's nothing"
- line "down there."
- done
-
-GruntM13SeenText:
- text "I don't care if"
- line "you're lost."
-
- para "You show up here,"
- line "you're nothing but"
- cont "a victim!"
- done
-
-GruntM13BeatenText:
- text "Urk! Yeah, think"
- line "you're cool, huh?"
- done
-
-GruntM13AfterBattleText:
- text "You must have ice"
- line "in your veins to"
- cont "dis TEAM ROCKET."
- done
-
-SwitchRoomText_Switch1:
- text "It's labeled"
- line "SWITCH 1."
- done
-
-GruntF3SeenText:
- text "Are you lost? No,"
- line "you can't be."
-
- para "You don't have"
- line "that scared look."
-
- para "I'll give you"
- line "something to be"
- cont "scared about!"
- done
-
-GruntF3BeatenText:
- text "How could you?"
- done
-
-GruntF3AfterBattleText:
- text "Go wherever you'd"
- line "like! Get lost!"
- cont "See if I care!"
- done
-
-SwitchRoomText_OffTurnOn:
- text "It's OFF."
- line "Turn it ON?"
- done
-
-SwitchRoomText_OnTurnOff:
- text "It's ON."
- line "Turn it OFF?"
- done
-
-SwitchRoomText_Switch2:
- text "It's labeled"
- line "SWITCH 2."
- done
-
-SwitchRoomText_Switch3:
- text "It's labeled"
- line "SWITCH 3."
- done
-
-SwitchRoomText_Emergency:
- text "It's labeled"
- line "EMERGENCY."
- done
-
-UndergroundPathSwitchRoomEntrances_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 9
- warp_def $3, $17, 6, WAREHOUSE_ENTRANCE
- warp_def $a, $16, 1, UNDERGROUND_WAREHOUSE
- warp_def $a, $17, 2, UNDERGROUND_WAREHOUSE
- warp_def $19, $5, 2, WAREHOUSE_ENTRANCE
- warp_def $1d, $4, 14, GOLDENROD_CITY
- warp_def $1d, $5, 14, GOLDENROD_CITY
- warp_def $19, $15, 1, WAREHOUSE_ENTRANCE
- warp_def $1d, $14, 13, GOLDENROD_CITY
- warp_def $1d, $15, 13, GOLDENROD_CITY
-
-.CoordEvents:
- db 2
- coord_event 0, $4, $13, UndergroundSilverScene1
- coord_event 0, $5, $13, UndergroundSilverScene2
-
-.BGEvents:
- db 6
- bg_event 1, 16, BGEVENT_READ, Switch1Script
- bg_event 1, 10, BGEVENT_READ, Switch2Script
- bg_event 1, 2, BGEVENT_READ, Switch3Script
- bg_event 11, 20, BGEVENT_READ, EmergencySwitchScript
- bg_event 9, 8, BGEVENT_ITEM, UndergroundPathSwitchRoomEntrancesHiddenMaxPotion
- bg_event 8, 1, BGEVENT_ITEM, UndergroundPathSwitchRoomEntrancesHiddenRevive
-
-.ObjectEvents:
- db 11
- object_event SPRITE_PHARMACIST, 12, 9, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 2, TrainerBurglarDuncan, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- object_event SPRITE_PHARMACIST, 8, 4, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 2, TrainerBurglarEddie, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- object_event SPRITE_ROCKET, 2, 17, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM13, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- object_event SPRITE_ROCKET, 2, 11, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM11, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- object_event SPRITE_ROCKET, 2, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM25, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- object_event SPRITE_ROCKET_GIRL, 12, 19, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerGruntF3, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- object_event SPRITE_TEACHER, 27, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TeacherScript_0x7ca7d, -1
- object_event SPRITE_SUPER_NERD, 27, 19, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SuperNerdScript_0x7ca7a, -1
- object_event SPRITE_POKE_BALL, 12, 1, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UndergroundPathSwitchRoomEntrancesSmokeBall, EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_SMOKE_BALL
- object_event SPRITE_POKE_BALL, 9, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UndergroundPathSwitchRoomEntrancesFullHeal, EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_FULL_HEAL
- object_event SPRITE_SILVER, 3, 23, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_UNDERGROUND_PATH
--- a/maps/UndergroundPathSwitchRoomEntrances.blk
+++ /dev/null
@@ -1,2 +1,0 @@
-*7**7*7***---*--*--*-)--------------*>*?*>?*>---=--=--*>*?*>?*>?7<---=--=--=--***********************
-((----
\ No newline at end of file
--- a/maps/UndergroundWarehouse.asm
+++ /dev/null
@@ -1,237 +1,0 @@
-const_value set 2
- const UNDERGROUNDWAREHOUSE_ROCKET1
- const UNDERGROUNDWAREHOUSE_ROCKET2
- const UNDERGROUNDWAREHOUSE_ROCKET3
- const UNDERGROUNDWAREHOUSE_GENTLEMAN
- const UNDERGROUNDWAREHOUSE_POKE_BALL1
- const UNDERGROUNDWAREHOUSE_POKE_BALL2
- const UNDERGROUNDWAREHOUSE_POKE_BALL3
-
-UndergroundWarehouse_MapScriptHeader:
-.SceneScripts:
- db 0
-
-.MapCallbacks:
- db 1
- dbw MAPCALLBACK_NEWMAP, .ResetSwitches
-
-.ResetSwitches:
- clearevent EVENT_SWITCH_1
- clearevent EVENT_SWITCH_2
- clearevent EVENT_SWITCH_3
- clearevent EVENT_EMERGENCY_SWITCH
- clearevent EVENT_SWITCH_4
- clearevent EVENT_SWITCH_5
- clearevent EVENT_SWITCH_6
- clearevent EVENT_SWITCH_7
- clearevent EVENT_SWITCH_8
- clearevent EVENT_SWITCH_9
- clearevent EVENT_SWITCH_10
- clearevent EVENT_SWITCH_11
- clearevent EVENT_SWITCH_12
- clearevent EVENT_SWITCH_13
- clearevent EVENT_SWITCH_14
- writebyte $0
- copyvartobyte UndergroundSwitchPositions
- return
-
-TrainerGruntM24:
- trainer EVENT_BEAT_ROCKET_GRUNTM_24, GRUNTM, GRUNTM_24, GruntM24SeenText, GruntM24BeatenText, 0, .Script
-
-.Script:
- end_if_just_battled
- opentext
- writetext GruntM24AfterBattleText
- waitbutton
- closetext
- end
-
-TrainerGruntM14:
- trainer EVENT_BEAT_ROCKET_GRUNTM_14, GRUNTM, GRUNTM_14, GruntM14SeenText, GruntM14BeatenText, 0, .Script
-
-.Script:
- end_if_just_battled
- opentext
- writetext GruntM14AfterBattleText
- waitbutton
- closetext
- end
-
-TrainerGruntM15:
- trainer EVENT_BEAT_ROCKET_GRUNTM_15, GRUNTM, GRUNTM_15, GruntM15SeenText, GruntM15BeatenText, 0, .Script
-
-.Script:
- end_if_just_battled
- opentext
- writetext GruntM15AfterBattleText
- waitbutton
- closetext
- end
-
-GentlemanScript_0x7d9bf:
- faceplayer
- opentext
- checkevent EVENT_RECEIVED_CARD_KEY
- iftrue UnknownScript_0x7d9de
- writetext UnknownText_0x7dbc6
- buttonsound
- verbosegiveitem CARD_KEY
- setevent EVENT_RECEIVED_CARD_KEY
- setevent EVENT_WAREHOUSE_LAYOUT_1
- clearevent EVENT_WAREHOUSE_LAYOUT_2
- clearevent EVENT_WAREHOUSE_LAYOUT_3
- writetext UnknownText_0x7dc5b
- buttonsound
-UnknownScript_0x7d9de:
- writetext UnknownText_0x7dc8d
- waitbutton
- closetext
- end
-
-UndergroundWarehouseMaxEther:
- itemball MAX_ETHER
-
-UndergroundWarehouseTMSleepTalk:
- itemball TM_SLEEP_TALK
-
-UndergroundWarehouseUltraBall:
- itemball ULTRA_BALL
-
-GruntM24SeenText:
- text "How did you get"
- line "this far?"
-
- para "I guess it can't"
- line "be helped. I'll"
- cont "dispose of you."
- done
-
-GruntM24BeatenText:
- text "I got disposed of…"
- done
-
-GruntM24AfterBattleText:
- text "TEAM ROCKET will"
- line "keep going, wait-"
- cont "ing for the return"
- cont "of GIOVANNI."
-
- para "We'll do whatever"
- line "it takes."
- done
-
-GruntM14SeenText:
- text "You're not going"
- line "any farther!"
-
- para "I don't show mercy"
- line "to my enemies, not"
- cont "even brats!"
- done
-
-GruntM14BeatenText:
- text "Blast it!"
- done
-
-GruntM14AfterBattleText:
- text "I lost…"
-
- para "Please forgive me,"
- line "GIOVANNI!"
- done
-
-GruntM15SeenText:
- text "Hyuck-hyuck-hyuck!"
- line "I remember you!"
-
- para "You got me good"
- line "at our hideout!"
- done
-
-GruntM15BeatenText:
- text "Hyuck-hyuck-hyuck!"
- line "So, that's how?"
- done
-
-GruntM15AfterBattleText:
- text "Hyuck-hyuck-hyuck!"
- line "That was a blast!"
- cont "I'll remember you!"
- done
-
-UnknownText_0x7dbc6:
- text "DIRECTOR: Who?"
- line "What? You came to"
- cont "rescue me?"
-
- para "Thank you!"
-
- para "The RADIO TOWER!"
-
- para "What's happening"
- line "there?"
-
- para "Taken over by TEAM"
- line "ROCKET?"
-
- para "Here. Take this"
- line "CARD KEY."
- done
-
-UnknownText_0x7dc5b:
- text "DIRECTOR: Use that"
- line "to open the shut-"
- cont "ters on 3F."
- done
-
-UnknownText_0x7dc8d:
- text "I'm begging you to"
- line "help."
-
- para "There's no telling"
- line "what they'll do if"
-
- para "they control the"
- line "transmitter."
-
- para "They may even be"
- line "able to control"
-
- para "#MON using a"
- line "special signal!"
-
- para "You're the only"
- line "one I can call on."
-
- para "Please save the"
- line "RADIO TOWER…"
-
- para "And all the #-"
- line "MON nationwide!"
- done
-
-UndergroundWarehouse_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $c, $2, 2, UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES
- warp_def $c, $3, 3, UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES
- warp_def $2, $11, 1, GOLDENROD_DEPT_STORE_B1F
-
-.CoordEvents:
- db 0
-
-.BGEvents:
- db 0
-
-.ObjectEvents:
- db 7
- object_event SPRITE_ROCKET, 8, 9, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM24, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- object_event SPRITE_ROCKET, 15, 8, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM14, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- object_event SPRITE_ROCKET, 3, 14, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 4, TrainerGruntM15, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- object_event SPRITE_GENTLEMAN, 8, 12, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GentlemanScript_0x7d9bf, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- object_event SPRITE_POKE_BALL, 15, 18, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UndergroundWarehouseMaxEther, EVENT_UNDERGROUND_WAREHOUSE_MAX_ETHER
- object_event SPRITE_POKE_BALL, 9, 13, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UndergroundWarehouseTMSleepTalk, EVENT_UNDERGROUND_WAREHOUSE_TM_SLEEP_TALK
- object_event SPRITE_POKE_BALL, 1, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UndergroundWarehouseUltraBall, EVENT_UNDERGROUND_WAREHOUSE_ULTRA_BALL
--- a/maps/UndergroundWarehouse.blk
+++ /dev/null
@@ -1,3 +1,0 @@
-
-
- ,.4 0 2//////-
\ No newline at end of file
--- a/maps/WarehouseEntrance.asm
+++ /dev/null
@@ -1,686 +1,0 @@
-const_value set 2
- const WAREHOUSEENTRANCE_SUPER_NERD1
- const WAREHOUSEENTRANCE_SUPER_NERD2
- const WAREHOUSEENTRANCE_SUPER_NERD3
- const WAREHOUSEENTRANCE_SUPER_NERD4
- const WAREHOUSEENTRANCE_POKE_BALL
- const WAREHOUSEENTRANCE_GRAMPS
- const WAREHOUSEENTRANCE_SUPER_NERD5
- const WAREHOUSEENTRANCE_SUPER_NERD6
- const WAREHOUSEENTRANCE_GRANNY
-
-WarehouseEntrance_MapScriptHeader:
-.SceneScripts:
- db 0
-
-.MapCallbacks:
- db 3
- dbw MAPCALLBACK_NEWMAP, .ResetSwitches
- dbw MAPCALLBACK_TILES, .CheckBasementKey
- dbw MAPCALLBACK_OBJECTS, .CheckDayOfWeek
-
-.ResetSwitches:
- clearevent EVENT_SWITCH_1
- clearevent EVENT_SWITCH_2
- clearevent EVENT_SWITCH_3
- clearevent EVENT_EMERGENCY_SWITCH
- clearevent EVENT_SWITCH_4
- clearevent EVENT_SWITCH_5
- clearevent EVENT_SWITCH_6
- clearevent EVENT_SWITCH_7
- clearevent EVENT_SWITCH_8
- clearevent EVENT_SWITCH_9
- clearevent EVENT_SWITCH_10
- clearevent EVENT_SWITCH_11
- clearevent EVENT_SWITCH_12
- clearevent EVENT_SWITCH_13
- clearevent EVENT_SWITCH_14
- writebyte $0
- copyvartobyte UndergroundSwitchPositions
- return
-
-.CheckBasementKey:
- checkevent EVENT_USED_BASEMENT_KEY
- iffalse .LockBasementDoor
- return
-
-.LockBasementDoor:
- changeblock $12, $6, $3d
- return
-
-.CheckDayOfWeek:
- checkcode VAR_WEEKDAY
- if_equal MONDAY, .Monday
- if_equal TUESDAY, .Tuesday
- if_equal WEDNESDAY, .Wednesday
- if_equal THURSDAY, .Thursday
- if_equal FRIDAY, .Friday
- if_equal SATURDAY, .Saturday
-
-.Sunday:
- disappear WAREHOUSEENTRANCE_GRAMPS
- disappear WAREHOUSEENTRANCE_SUPER_NERD5
- appear WAREHOUSEENTRANCE_SUPER_NERD6
- appear WAREHOUSEENTRANCE_GRANNY
- return
-
-.Monday:
- disappear WAREHOUSEENTRANCE_GRAMPS
- checkmorn
- iffalse .NotMondayMorning
- appear WAREHOUSEENTRANCE_GRAMPS
-.NotMondayMorning:
- disappear WAREHOUSEENTRANCE_SUPER_NERD5
- disappear WAREHOUSEENTRANCE_SUPER_NERD6
- disappear WAREHOUSEENTRANCE_GRANNY
- return
-
-.Tuesday:
- disappear WAREHOUSEENTRANCE_GRAMPS
- appear WAREHOUSEENTRANCE_SUPER_NERD5
- disappear WAREHOUSEENTRANCE_SUPER_NERD6
- disappear WAREHOUSEENTRANCE_GRANNY
- return
-
-.Wednesday:
- disappear WAREHOUSEENTRANCE_GRAMPS
- disappear WAREHOUSEENTRANCE_SUPER_NERD5
- appear WAREHOUSEENTRANCE_SUPER_NERD6
- disappear WAREHOUSEENTRANCE_GRANNY
- return
-
-.Thursday:
- disappear WAREHOUSEENTRANCE_GRAMPS
- appear WAREHOUSEENTRANCE_SUPER_NERD5
- disappear WAREHOUSEENTRANCE_SUPER_NERD6
- disappear WAREHOUSEENTRANCE_GRANNY
- return
-
-.Friday:
- disappear WAREHOUSEENTRANCE_GRAMPS
- disappear WAREHOUSEENTRANCE_SUPER_NERD5
- appear WAREHOUSEENTRANCE_SUPER_NERD6
- disappear WAREHOUSEENTRANCE_GRANNY
- return
-
-.Saturday:
- disappear WAREHOUSEENTRANCE_GRAMPS
- appear WAREHOUSEENTRANCE_SUPER_NERD5
- disappear WAREHOUSEENTRANCE_SUPER_NERD6
- appear WAREHOUSEENTRANCE_GRANNY
- return
-
-TrainerSupernerdEric:
- trainer EVENT_BEAT_SUPER_NERD_ERIC, SUPER_NERD, ERIC, SupernerdEricSeenText, SupernerdEricBeatenText, 0, .Script
-
-.Script:
- end_if_just_battled
- opentext
- writetext SupernerdEricAfterBattleText
- waitbutton
- closetext
- end
-
-TrainerSupernerdTeru:
- trainer EVENT_BEAT_SUPER_NERD_TERU, SUPER_NERD, TERU, SupernerdTeruSeenText, SupernerdTeruBeatenText, 0, .Script
-
-.Script:
- end_if_just_battled
- opentext
- writetext SupernerdTeruAfterBattleText
- waitbutton
- closetext
- end
-
-TrainerPokemaniacIssac:
- trainer EVENT_BEAT_POKEMANIAC_ISSAC, POKEMANIAC, ISSAC, PokemaniacIssacSeenText, PokemaniacIssacBeatenText, 0, .Script
-
-.Script:
- end_if_just_battled
- opentext
- writetext PokemaniacIssacAfterBattleText
- waitbutton
- closetext
- end
-
-TrainerPokemaniacDonald:
- trainer EVENT_BEAT_POKEMANIAC_DONALD, POKEMANIAC, DONALD, PokemaniacDonaldSeenText, PokemaniacDonaldBeatenText, 0, .Script
-
-.Script:
- end_if_just_battled
- opentext
- writetext PokemaniacDonaldAfterBattleText
- waitbutton
- closetext
- end
-
-GrannyScript_0x7c132:
- opentext
- checkcode VAR_WEEKDAY
- if_equal SUNDAY, .Open
- if_equal SATURDAY, .Open
- jump WarehouseEntranceScript_ShopClosed
-
-.Open:
- pokemart MARTTYPE_BITTER, MART_UNDERGROUND
- closetext
- end
-
-GrampsScript_0x7c146:
- opentext
- checkflag ENGINE_GOLDENROD_UNDERGROUND_MERCHANT_CLOSED
- iftrue WarehouseEntranceScript_ShopClosed
- checkcode VAR_WEEKDAY
- if_equal MONDAY, .CheckMorn
- jump WarehouseEntranceScript_ShopClosed
-
-.CheckMorn:
- checkmorn
- iffalse WarehouseEntranceScript_ShopClosed
- pokemart MARTTYPE_BARGAIN, 0
- closetext
- end
-
-OlderHaircutBrotherScript:
- opentext
- checkcode VAR_WEEKDAY
- if_equal TUESDAY, .DoHaircut
- if_equal THURSDAY, .DoHaircut
- if_equal SATURDAY, .DoHaircut
- jump WarehouseEntranceScript_ShopClosed
-
-.DoHaircut:
- checkflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
- iftrue .AlreadyGotHaircut
- special PlaceMoneyTopRight
- writetext UnknownText_0x7c5f9
- yesorno
- iffalse .Refused
- checkmoney $0, 500
- if_equal $2, .NotEnoughMoney
- writetext UnknownText_0x7c69a
- buttonsound
- special Special_YoungerHaircutBrother
- if_equal $0, .Refused
- if_equal $1, .Refused
- setflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
- if_equal $2, .two
- if_equal $3, .three
- jump .else
-
-.two
- setevent EVENT_GAVE_KURT_APRICORNS
- clearevent EVENT_RECEIVED_BALLS_FROM_KURT
- clearevent EVENT_DRAGON_SHRINE_QUESTION_2
- jump .then
-
-.three
- clearevent EVENT_GAVE_KURT_APRICORNS
- setevent EVENT_RECEIVED_BALLS_FROM_KURT
- clearevent EVENT_DRAGON_SHRINE_QUESTION_2
- jump .then
-
-.else
- clearevent EVENT_GAVE_KURT_APRICORNS
- clearevent EVENT_RECEIVED_BALLS_FROM_KURT
- setevent EVENT_DRAGON_SHRINE_QUESTION_2
- jump .then
-
-.then
- takemoney $0, 500
- special PlaceMoneyTopRight
- writetext UnknownText_0x7c6b8
- waitbutton
- closetext
- special FadeOutPalettes
- playmusic MUSIC_HEAL
- pause 60
- special FadeInPalettes
- special RestartMapMusic
- opentext
- writetext UnknownText_0x7c6d8
- waitbutton
- checkevent EVENT_GAVE_KURT_APRICORNS
- iftrue UnknownScript_0x7c2bb
- checkevent EVENT_RECEIVED_BALLS_FROM_KURT
- iftrue UnknownScript_0x7c2c4
- jump UnknownScript_0x7c2cd
-
-.Refused:
- writetext UnknownText_0x7c6ea
- waitbutton
- closetext
- end
-
-.NotEnoughMoney:
- writetext UnknownText_0x7c709
- waitbutton
- closetext
- end
-
-.AlreadyGotHaircut:
- writetext UnknownText_0x7c72b
- waitbutton
- closetext
- end
-
-YoungerHaircutBrotherScript:
- opentext
- checkcode VAR_WEEKDAY
- if_equal SUNDAY, .DoHaircut
- if_equal WEDNESDAY, .DoHaircut
- if_equal FRIDAY, .DoHaircut
- jump WarehouseEntranceScript_ShopClosed
-
-.DoHaircut:
- checkflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
- iftrue .AlreadyGotHaircut
- special PlaceMoneyTopRight
- writetext UnknownText_0x7c75c
- yesorno
- iffalse .Refused
- checkmoney $0, 300
- if_equal $2, .NotEnoughMoney
- writetext UnknownText_0x7c7f1
- buttonsound
- special Special_OlderHaircutBrother
- if_equal $0, .Refused
- if_equal $1, .Refused
- setflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
- if_equal $2, .two
- if_equal $3, .three
- jump .else
-
-.two
- setevent EVENT_GAVE_KURT_APRICORNS
- clearevent EVENT_RECEIVED_BALLS_FROM_KURT
- clearevent EVENT_DRAGON_SHRINE_QUESTION_2
- jump .then
-
-.three
- clearevent EVENT_GAVE_KURT_APRICORNS
- setevent EVENT_RECEIVED_BALLS_FROM_KURT
- clearevent EVENT_DRAGON_SHRINE_QUESTION_2
- jump .then
-
-.else
- clearevent EVENT_GAVE_KURT_APRICORNS
- clearevent EVENT_RECEIVED_BALLS_FROM_KURT
- setevent EVENT_DRAGON_SHRINE_QUESTION_2
- jump .then
-
-.then
- takemoney $0, 300
- special PlaceMoneyTopRight
- writetext UnknownText_0x7c80e
- waitbutton
- closetext
- special FadeOutPalettes
- playmusic MUSIC_HEAL
- pause 60
- special FadeInPalettes
- special RestartMapMusic
- opentext
- writetext UnknownText_0x7c82a
- waitbutton
- checkevent EVENT_GAVE_KURT_APRICORNS
- iftrue UnknownScript_0x7c2bb
- checkevent EVENT_RECEIVED_BALLS_FROM_KURT
- iftrue UnknownScript_0x7c2c4
- jump UnknownScript_0x7c2cd
-
-.Refused:
- writetext UnknownText_0x7c842
- waitbutton
- closetext
- end
-
-.NotEnoughMoney:
- writetext UnknownText_0x7c85b
- waitbutton
- closetext
- end
-
-.AlreadyGotHaircut:
- writetext UnknownText_0x7c87b
- waitbutton
- closetext
- end
-
-UnknownScript_0x7c2bb:
- writetext HaircutBrosText_SlightlyHappier
- special PlayCurMonCry
- waitbutton
- closetext
- end
-
-UnknownScript_0x7c2c4:
- writetext HaircutBrosText_Happier
- special PlayCurMonCry
- waitbutton
- closetext
- end
-
-UnknownScript_0x7c2cd:
- writetext HaircutBrosText_MuchHappier
- special PlayCurMonCry
- waitbutton
- closetext
- end
-
-BasementDoorScript::
- opentext
- checkevent EVENT_USED_BASEMENT_KEY
- iftrue .Open
- checkitem BASEMENT_KEY
- iftrue .Unlock
- writetext UnknownText_0x7c5b0
- waitbutton
- closetext
- end
-
-.Unlock:
- playsound SFX_TRANSACTION
- writetext UnknownText_0x7c5d6
- waitbutton
- closetext
- changeblock $12, $6, $2e
- reloadmappart
- closetext
- setevent EVENT_USED_BASEMENT_KEY
- end
-
-.Open:
- writetext UnknownText_0x7c5c3
- waitbutton
- closetext
- end
-
-WarehouseEntranceScript_ShopClosed:
- writetext UnknownText_0x7c904
- waitbutton
- closetext
- end
-
-WarehouseEntranceCoinCase:
- itemball COIN_CASE
-
-MapWarehouseEntranceSignpost1Script:
- jumptext UnknownText_0x7c91a
-
-WarehouseEntranceHiddenParlyzHeal:
- dwb EVENT_WAREHOUSE_ENTRANCE_HIDDEN_PARLYZ_HEAL, PARLYZ_HEAL
-
-
-WarehouseEntranceHiddenSuperPotion:
- dwb EVENT_WAREHOUSE_ENTRANCE_HIDDEN_SUPER_POTION, SUPER_POTION
-
-
-WarehouseEntranceHiddenAntidote:
- dwb EVENT_WAREHOUSE_ENTRANCE_HIDDEN_ANTIDOTE, ANTIDOTE
-
-
-SupernerdEricSeenText:
- text "I got booted out"
- line "of the GAME COR-"
- cont "NER."
-
- para "I was trying to"
- line "cheat using my"
- cont "#MON…"
- done
-
-SupernerdEricBeatenText:
- text "…Grumble…"
- done
-
-SupernerdEricAfterBattleText:
- text "I guess I have to"
- line "do things fair and"
- cont "square…"
- done
-
-SupernerdTeruSeenText:
- text "Do you consider"
- line "type alignments in"
- cont "battle?"
-
- para "If you know your"
- line "type advantages,"
-
- para "you'll do better"
- line "in battle."
- done
-
-SupernerdTeruBeatenText:
- text "Ow, ow, ow!"
- done
-
-SupernerdTeruAfterBattleText:
- text "I know my #MON"
- line "type alignments."
-
- para "But I only use one"
- line "type of #MON."
- done
-
-PokemaniacIssacSeenText:
- text "My #MON just"
- line "got a haircut!"
-
- para "I'll show you how"
- line "strong it is!"
- done
-
-PokemaniacIssacBeatenText:
- text "Aiyeeee!"
- done
-
-PokemaniacIssacAfterBattleText:
- text "Your #MON will"
- line "like you more if"
-
- para "you give them"
- line "haircuts."
- done
-
-PokemaniacDonaldSeenText:
- text "I think you have"
- line "some rare #MON"
- cont "with you."
-
- para "Let me see them!"
- done
-
-PokemaniacDonaldBeatenText:
- text "Gaah! I lost!"
- line "That makes me mad!"
- done
-
-PokemaniacDonaldAfterBattleText:
- text "Are you making a"
- line "#DEX? Here's a"
- cont "hot tip."
-
- para "The HIKER on ROUTE"
- line "33, ANTHONY, is a"
- cont "good guy."
-
- para "He'll phone you if"
- line "he sees any rare"
- cont "#MON."
- done
-
-UnknownText_0x7c5b0:
- text "The door's locked…"
- done
-
-UnknownText_0x7c5c3:
- text "The door is open."
- done
-
-UnknownText_0x7c5d6:
- text "The BASEMENT KEY"
- line "opened the door."
- done
-
-UnknownText_0x7c5f9:
- text "Welcome!"
-
- para "I run the #MON"
- line "SALON!"
-
- para "I'm the older and"
- line "better of the two"
- cont "HAIRCUT BROTHERS."
-
- para "I can make your"
- line "#MON beautiful"
- cont "for just ¥500."
-
- para "Would you like me"
- line "to do that?"
- done
-
-UnknownText_0x7c69a:
- text "Which #MON"
- line "should I work on?"
- done
-
-UnknownText_0x7c6b8:
- text "OK! Watch it"
- line "become beautiful!"
- done
-
-UnknownText_0x7c6d8:
- text "There! All done!"
- done
-
-UnknownText_0x7c6ea:
- text "Is that right?"
- line "That's a shame!"
- done
-
-UnknownText_0x7c709:
- text "You'll need more"
- line "money than that."
- done
-
-UnknownText_0x7c72b:
- text "I do only one"
- line "haircut a day. I'm"
- cont "done for today."
- done
-
-UnknownText_0x7c75c:
- text "Welcome to the"
- line "#MON SALON!"
-
- para "I'm the younger"
- line "and less expen-"
- cont "sive of the two"
- cont "HAIRCUT BROTHERS."
-
- para "I'll spiff up your"
- line "#MON for just"
- cont "¥300."
-
- para "So? How about it?"
- done
-
-UnknownText_0x7c7f1:
- text "OK, which #MON"
- line "should I do?"
- done
-
-UnknownText_0x7c80e:
- text "OK! I'll make it"
- line "look cool!"
- done
-
-UnknownText_0x7c82a:
- text "There we go!"
- line "All done!"
- done
-
-UnknownText_0x7c842:
- text "No? "
- line "How disappointing!"
- done
-
-UnknownText_0x7c85b:
- text "You're a little"
- line "short on funds."
- done
-
-UnknownText_0x7c87b:
- text "I can do only one"
- line "haircut a day."
-
- para "Sorry, but I'm all"
- line "done for today."
- done
-
-HaircutBrosText_SlightlyHappier:
- text_from_ram StringBuffer3
- text " looks a"
- line "little happier."
- done
-
-HaircutBrosText_Happier:
- text_from_ram StringBuffer3
- text " looks"
- line "happy."
- done
-
-HaircutBrosText_MuchHappier:
- text_from_ram StringBuffer3
- text " looks"
- line "delighted!"
- done
-
-UnknownText_0x7c904:
- text "We're not open"
- line "today."
- done
-
-UnknownText_0x7c91a:
- text "NO ENTRY BEYOND"
- line "THIS POINT"
- done
-
-WarehouseEntrance_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 6
- warp_def $2, $3, 7, UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES
- warp_def $22, $3, 4, UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES
- warp_def $6, $12, 4, WAREHOUSE_ENTRANCE
- warp_def $1f, $15, 3, WAREHOUSE_ENTRANCE
- warp_def $1f, $16, 3, WAREHOUSE_ENTRANCE
- warp_def $1b, $16, 1, UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES
-
-.CoordEvents:
- db 0
-
-.BGEvents:
- db 5
- bg_event 6, 18, BGEVENT_READ, BasementDoorScript
- bg_event 6, 19, BGEVENT_READ, MapWarehouseEntranceSignpost1Script
- bg_event 13, 6, BGEVENT_ITEM, WarehouseEntranceHiddenParlyzHeal
- bg_event 18, 4, BGEVENT_ITEM, WarehouseEntranceHiddenSuperPotion
- bg_event 8, 17, BGEVENT_ITEM, WarehouseEntranceHiddenAntidote
-
-.ObjectEvents:
- db 9
- object_event SPRITE_SUPER_NERD, 31, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerSupernerdEric, -1
- object_event SPRITE_SUPER_NERD, 9, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerSupernerdTeru, -1
- object_event SPRITE_SUPER_NERD, 27, 3, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerPokemaniacIssac, -1
- object_event SPRITE_SUPER_NERD, 6, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPokemaniacDonald, -1
- object_event SPRITE_POKE_BALL, 25, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, WarehouseEntranceCoinCase, EVENT_WAREHOUSE_ENTRANCE_COIN_CASE
- object_event SPRITE_GRAMPS, 11, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, GrampsScript_0x7c146, EVENT_WAREHOUSE_ENTRANCE_GRAMPS
- object_event SPRITE_SUPER_NERD, 14, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, OlderHaircutBrotherScript, EVENT_WAREHOUSE_ENTRANCE_OLDER_HAIRCUT_BROTHER
- object_event SPRITE_SUPER_NERD, 15, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, YoungerHaircutBrotherScript, EVENT_WAREHOUSE_ENTRANCE_YOUNGER_HAIRCUT_BROTHER
- object_event SPRITE_GRANNY, 21, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, GrannyScript_0x7c132, EVENT_WAREHOUSE_ENTRANCE_GRANNY
--- a/maps/WarehouseEntrance.blk
+++ /dev/null
@@ -1,1 +1,0 @@
-''''''''''''''1:''''''''''''''''''''''''''.'''''':''''''''''852''''''''''''83''''''''''''852''''''''''''3'''''''''''':''''''''''''852''''''''''''83''''''''''''8''''''''''''''4;+'''5''''''<0 '''5''''''%&''''''''''''''''1''''''''''''
\ No newline at end of file
--- a/maps/blockdata.asm
+++ b/maps/blockdata.asm
@@ -462,8 +462,8 @@
NationalParkBugContest_BlockData:
INCBIN "maps/NationalPark.blk"
-Route6UndergroundEntrance_BlockData:
-Route5UndergroundEntrance_BlockData:
+Route5UndergroundPathEntrance_BlockData:
+Route6UndergroundPathEntrance_BlockData:
INCBIN "maps/UndergroundPathEntrance.blk"
BetaPokecenterTradeStation_BlockData:
@@ -571,17 +571,17 @@
Route18_BlockData:
INCBIN "maps/Route18.blk"
-WarehouseEntrance_BlockData:
- INCBIN "maps/WarehouseEntrance.blk"
+GoldenrodUnderground_BlockData:
+ INCBIN "maps/GoldenrodUnderground.blk"
-UndergroundPathSwitchRoomEntrances_BlockData:
- INCBIN "maps/UndergroundPathSwitchRoomEntrances.blk"
+GoldenrodUndergroundSwitchRoomEntrances_BlockData:
+ INCBIN "maps/GoldenrodUndergroundSwitchRoomEntrances.blk"
GoldenrodDeptStoreB1F_BlockData:
INCBIN "maps/GoldenrodDeptStoreB1F.blk"
-UndergroundWarehouse_BlockData:
- INCBIN "maps/UndergroundWarehouse.blk"
+GoldenrodUndergroundWarehouse_BlockData:
+ INCBIN "maps/GoldenrodUndergroundWarehouse.blk"
BetaElevator_BlockData:
INCBIN "maps/BetaElevator.blk"
@@ -953,8 +953,8 @@
SafariZoneBeta_BlockData:
INCBIN "maps/SafariZoneBeta.blk"
-Underground_BlockData:
- INCBIN "maps/Underground.blk"
+UndergroundPath_BlockData:
+ INCBIN "maps/UndergroundPath.blk"
Route39Barn_BlockData:
INCBIN "maps/Route39Barn.blk"
--- a/maps/map_headers.asm
+++ b/maps/map_headers.asm
@@ -124,10 +124,10 @@
map_header TeamRocketBaseB2F, TILESET_POWER_PLANT, DUNGEON, MAHOGANY_TOWN, MUSIC_ROCKET_HIDEOUT, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header TeamRocketBaseB3F, TILESET_POWER_PLANT, DUNGEON, MAHOGANY_TOWN, MUSIC_ROCKET_HIDEOUT, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header IlexForest, TILESET_ILEX_FOREST, CAVE, ILEX_FOREST, MUSIC_UNION_CAVE, 0, PALETTE_NITE, FISHGROUP_POND
- map_header WarehouseEntrance, TILESET_GATE, DUNGEON, GOLDENROD_CITY, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
- map_header UndergroundPathSwitchRoomEntrances, TILESET_GYM_1, DUNGEON, GOLDENROD_CITY, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header GoldenrodUnderground, TILESET_GATE, DUNGEON, GOLDENROD_CITY, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header GoldenrodUndergroundSwitchRoomEntrances, TILESET_GYM_1, DUNGEON, GOLDENROD_CITY, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header GoldenrodDeptStoreB1F, TILESET_UNDERGROUND, DUNGEON, GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, 1, PALETTE_DAY, FISHGROUP_SHORE
- map_header UndergroundWarehouse, TILESET_UNDERGROUND, DUNGEON, GOLDENROD_CITY, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header GoldenrodUndergroundWarehouse, TILESET_UNDERGROUND, DUNGEON, GOLDENROD_CITY, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header MountMortar1FOutside, TILESET_WHIRL_ISLANDS, CAVE, MT_MORTAR, MUSIC_UNION_CAVE, 1, PALETTE_NITE, FISHGROUP_LAKE
map_header MountMortar1FInside, TILESET_WHIRL_ISLANDS, CAVE, MT_MORTAR, MUSIC_UNION_CAVE, 1, PALETTE_NITE, FISHGROUP_LAKE
map_header MountMortar2FInside, TILESET_WHIRL_ISLANDS, CAVE, MT_MORTAR, MUSIC_UNION_CAVE, 1, PALETTE_NITE, FISHGROUP_LAKE
@@ -157,7 +157,7 @@
map_header TohjoFalls, TILESET_CAVE, CAVE, TOHJO_FALLS, MUSIC_UNION_CAVE, 1, PALETTE_NITE, FISHGROUP_LAKE
map_header DiglettsCave, TILESET_CAVE, CAVE, DIGLETTS_CAVE, MUSIC_MT_MOON, 1, PALETTE_NITE, FISHGROUP_SHORE
map_header MountMoon, TILESET_CAVE, CAVE, MT_MOON, MUSIC_MT_MOON, 1, PALETTE_NITE, FISHGROUP_SHORE
- map_header Underground, TILESET_UNDERGROUND, GATE, UNDERGROUND, MUSIC_MT_MOON, 0, PALETTE_NITE, FISHGROUP_SHORE
+ map_header UndergroundPath, TILESET_UNDERGROUND, GATE, UNDERGROUND_PATH, MUSIC_MT_MOON, 0, PALETTE_NITE, FISHGROUP_SHORE
map_header RockTunnel1F, TILESET_WHIRL_ISLANDS, CAVE, ROCK_TUNNEL, MUSIC_MT_MOON, 1, PALETTE_DARK, FISHGROUP_SHORE
map_header RockTunnelB1F, TILESET_WHIRL_ISLANDS, CAVE, ROCK_TUNNEL, MUSIC_MT_MOON, 1, PALETTE_DARK, FISHGROUP_SHORE
map_header SafariZoneFuchsiaGateBeta, TILESET_GATE, INDOOR, FUCHSIA_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
@@ -300,7 +300,7 @@
map_header VermilionHouseDiglettsCaveSpeechHouse, TILESET_HOUSE_1, INDOOR, VERMILION_CITY, MUSIC_VERMILION_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header VermilionGym, TILESET_GAME_CORNER, INDOOR, VERMILION_CITY, MUSIC_GYM, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header Route6SaffronGate, TILESET_GATE, GATE, ROUTE_6, MUSIC_ROUTE_3, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header Route6UndergroundEntrance, TILESET_GATE, GATE, ROUTE_6, MUSIC_ROUTE_3, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header Route6UndergroundPathEntrance, TILESET_GATE, GATE, ROUTE_6, MUSIC_ROUTE_3, 0, PALETTE_DAY, FISHGROUP_SHORE
MapGroup_Pallet:
@@ -491,7 +491,7 @@
map_header SilphCo1F, TILESET_POWER_PLANT, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header CopycatsHouse1F, TILESET_PLAYERS_HOUSE, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header CopycatsHouse2F, TILESET_PLAYERS_HOUSE, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header Route5UndergroundEntrance, TILESET_GATE, GATE, ROUTE_5, MUSIC_ROUTE_3, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header Route5UndergroundPathEntrance, TILESET_GATE, GATE, ROUTE_5, MUSIC_ROUTE_3, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route5SaffronCityGate, TILESET_GATE, GATE, ROUTE_5, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route5CleanseTagSpeechHouse, TILESET_HOUSE_1, INDOOR, ROUTE_5, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
--- a/maps/second_map_headers.asm
+++ b/maps/second_map_headers.asm
@@ -416,10 +416,10 @@
map_header_2 TeamRocketBaseB2F, TEAM_ROCKET_BASE_B2F, $0, 0
map_header_2 TeamRocketBaseB3F, TEAM_ROCKET_BASE_B3F, $0, 0
map_header_2 IlexForest, ILEX_FOREST, $5, 0
- map_header_2 WarehouseEntrance, WAREHOUSE_ENTRANCE, $0, 0
- map_header_2 UndergroundPathSwitchRoomEntrances, UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES, $0, 0
+ map_header_2 GoldenrodUnderground, GOLDENROD_UNDERGROUND, $0, 0
+ map_header_2 GoldenrodUndergroundSwitchRoomEntrances, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES, $0, 0
map_header_2 GoldenrodDeptStoreB1F, GOLDENROD_DEPT_STORE_B1F, $0, 0
- map_header_2 UndergroundWarehouse, UNDERGROUND_WAREHOUSE, $0, 0
+ map_header_2 GoldenrodUndergroundWarehouse, GOLDENROD_UNDERGROUND_WAREHOUSE, $0, 0
map_header_2 MountMortar1FOutside, MOUNT_MORTAR_1F_OUTSIDE, $9, 0
map_header_2 MountMortar1FInside, MOUNT_MORTAR_1F_INSIDE, $9, 0
map_header_2 MountMortar2FInside, MOUNT_MORTAR_2F_INSIDE, $9, 0
@@ -464,7 +464,7 @@
map_header_2 Route42EcruteakGate, ROUTE_42_ECRUTEAK_GATE, $0, 0
map_header_2 DiglettsCave, DIGLETTS_CAVE, $9, 0
map_header_2 MountMoon, MOUNT_MOON, $9, 0
- map_header_2 Underground, UNDERGROUND, $0, 0
+ map_header_2 UndergroundPath, UNDERGROUND_PATH, $0, 0
map_header_2 RockTunnel1F, ROCK_TUNNEL_1F, $9, 0
map_header_2 RockTunnelB1F, ROCK_TUNNEL_B1F, $9, 0
map_header_2 SafariZoneFuchsiaGateBeta, SAFARI_ZONE_FUCHSIA_GATE_BETA, $0, 0
@@ -552,7 +552,7 @@
map_header_2 VermilionHouseDiglettsCaveSpeechHouse, VERMILION_HOUSE_DIGLETTS_CAVE_SPEECH_HOUSE, $0, 0
map_header_2 VermilionGym, VERMILION_GYM, $0, 0
map_header_2 Route6SaffronGate, ROUTE_6_SAFFRON_GATE, $0, 0
- map_header_2 Route6UndergroundEntrance, ROUTE_6_UNDERGROUND_ENTRANCE, $0, 0
+ map_header_2 Route6UndergroundPathEntrance, ROUTE_6_UNDERGROUND_PATH_ENTRANCE, $0, 0
map_header_2 RedsHouse1F, REDS_HOUSE_1F, $0, 0
map_header_2 RedsHouse2F, REDS_HOUSE_2F, $0, 0
map_header_2 BluesHouse, BLUES_HOUSE, $0, 0
@@ -672,7 +672,7 @@
map_header_2 SilphCo1F, SILPH_CO_1F, $0, 0
map_header_2 CopycatsHouse1F, COPYCATS_HOUSE_1F, $0, 0
map_header_2 CopycatsHouse2F, COPYCATS_HOUSE_2F, $0, 0
- map_header_2 Route5UndergroundEntrance, ROUTE_5_UNDERGROUND_ENTRANCE, $0, 0
+ map_header_2 Route5UndergroundPathEntrance, ROUTE_5_UNDERGROUND_PATH_ENTRANCE, $0, 0
map_header_2 Route5SaffronCityGate, ROUTE_5_SAFFRON_CITY_GATE, $0, 0
map_header_2 Route5CleanseTagSpeechHouse, ROUTE_5_CLEANSE_TAG_SPEECH_HOUSE, $0, 0
map_header_2 CherrygroveMart, CHERRYGROVE_MART, $0, 0
--- a/mobile/mobile_22.asm
+++ b/mobile/mobile_22.asm
@@ -2226,7 +2226,7 @@
push hl
call Mobile22_SetBGMapMode0
call _hl_
- call CGBOnly_LoadEDTile
+ call CGBOnly_CopyTilemapAtOnce
pop hl
asm_89d90: ; 89d90 (22:5d90)
@@ -2670,7 +2670,7 @@
inc hl
ld a, $6
call Function8a5a3
- call CGBOnly_LoadEDTile
+ call CGBOnly_CopyTilemapAtOnce
pop bc
ld a, c
cp $b
@@ -2685,7 +2685,7 @@
ld a, $6
hlcoord 15, 4, AttrMap
call Function8a5a3
- call CGBOnly_LoadEDTile
+ call CGBOnly_CopyTilemapAtOnce
jp Function89e36
Function8a0a1: ; 8a0a1 (22:60a1)
--- a/mobile/mobile_22_2.asm
+++ b/mobile/mobile_22_2.asm
@@ -411,7 +411,7 @@
call Function8b4fd
ld e, $0
call Function89c44
- call CGBOnly_LoadEDTile
+ call CGBOnly_CopyTilemapAtOnce
ret
Function8b555: ; 8b555 (22:7555)
--- a/mobile/mobile_40.asm
+++ b/mobile/mobile_40.asm
@@ -3089,7 +3089,7 @@
; 1013dd
Function1013dd: ; 1013dd
- call CGBOnly_LoadEDTile
+ call CGBOnly_CopyTilemapAtOnce
ret
; 1013e1
--- a/wram.asm
+++ b/wram.asm
@@ -2427,85 +2427,85 @@
ds 13
; map scene ids
-wPokecenter2FSceneID:: db ; d972
-wTradeCenterSceneID:: db ; d973
-wColosseumSceneID:: db ; d974
-wTimeCapsuleSceneID:: db ; d975
-wPowerPlantSceneID:: db ; d976
-wCeruleanGymSceneID:: db ; d977
-wRoute25SceneID:: db ; d978
-wTrainerHouseB1FSceneID:: db ; d979
-wVictoryRoadGateSceneID:: db ; d97a
-wSaffronTrainStationSceneID:: db ; d97b
-wRoute16GateSceneID:: db ; d97c
-wRoute1718GateSceneID:: db ; d97d
-wIndigoPlateauPokecenter1FSceneID:: db ; d97e
-wWillsRoomSceneID:: db ; d97f
-wKogasRoomSceneID:: db ; d980
-wBrunosRoomSceneID:: db ; d981
-wKarensRoomSceneID:: db ; d982
-wLancesRoomSceneID:: db ; d983
-wHallOfFameSceneID:: db ; d984
-wRoute27SceneID:: db ; d985
-wNewBarkTownSceneID:: db ; d986
-wElmsLabSceneID:: db ; d987
-wKrissHouse1FSceneID:: db ; d988
-wRoute29SceneID:: db ; d989
-wCherrygroveCitySceneID:: db ; d98a
-wMrPokemonsHouseSceneID:: db ; d98b
-wRoute32SceneID:: db ; d98c
-wRoute35NationalParkGateSceneID:: db ; d98d
-wRoute36SceneID:: db ; d98e
-wRoute36NationalParkGateSceneID:: db ; d98f
-wAzaleaTownSceneID:: db ; d990
-wGoldenrodGymSceneID:: db ; d991
-wGoldenrodMagnetTrainStationSceneID:: db ; d992
-wGoldenrodPokecenter1FSceneID:: db ; d993
-wOlivineCitySceneID:: db ; d994
-wRoute34SceneID:: db ; d995
-wRoute34IlexForestGateSceneID:: db ; d996
-wEcruteakHouseSceneID:: db ; d997
-wWiseTriosRoomSceneID:: db ; d998
-wEcruteakPokecenter1FSceneID:: db ; d999
-wEcruteakGymSceneID:: db ; d99a
-wMahoganyTownSceneID:: db ; d99b
-wRoute42SceneID:: db ; d99c
-wCianwoodCitySceneID:: db ; d99d
-wBattleTower1FSceneID:: db ; d99e
-wBattleTowerBattleRoomSceneID:: db ; d99f
-wBattleTowerElevatorSceneID:: db ; d9a0
-wBattleTowerHallwaySceneID:: db ; d9a1
-wBattleTowerOutsideSceneID:: db ; d9a2
-wRoute43GateSceneID:: db ; d9a3
-wMountMoonSceneID:: db ; d9a4
-wSproutTower3FSceneID:: db ; d9a5
-wTinTower1FSceneID:: db ; d9a6
-wBurnedTower1FSceneID:: db ; d9a7
-wBurnedTowerB1FSceneID:: db ; d9a8
-wRadioTower5FSceneID:: db ; d9a9
-wRuinsOfAlphOutsideSceneID:: db ; d9aa
-wRuinsOfAlphResearchCenterSceneID:: db ; d9ab
-wRuinsOfAlphHoOhChamberSceneID:: db ; d9ac
-wRuinsOfAlphKabutoChamberSceneID:: db ; d9ad
-wRuinsOfAlphOmanyteChamberSceneID:: db ; d9ae
-wRuinsOfAlphAerodactylChamberSceneID:: db ; d9af
-wRuinsOfAlphInnerChamberSceneID:: db ; d9b0
-wMahoganyMart1FSceneID:: db ; d9b1
-wTeamRocketBaseB1FSceneID:: db ; d9b2
-wTeamRocketBaseB2FSceneID:: db ; d9b3
-wTeamRocketBaseB3FSceneID:: db ; d9b4
-wUndergroundPathSwitchRoomEntrancesSceneID:: db ; d9b5
-wSilverCaveRoom3SceneID:: db ; d9b6
-wVictoryRoadSceneID:: db ; d9b7
-wDragonsDenB1FSceneID:: db ; d9b8
-wDragonShrineSceneID:: db ; d9b9
-wOlivinePortSceneID:: db ; d9ba
-wVermilionPortSceneID:: db ; d9bb
-wFastShip1FSceneID:: db ; d9bc
-wFastShipB1FSceneID:: db ; d9bd
-wMountMoonSquareSceneID:: db ; d9be
-wMobileTradeRoomMobileSceneID:: db ; d9bf
-wMobileBattleRoomSceneID:: db ; d9c0
+wPokecenter2FSceneID:: db ; d972
+wTradeCenterSceneID:: db ; d973
+wColosseumSceneID:: db ; d974
+wTimeCapsuleSceneID:: db ; d975
+wPowerPlantSceneID:: db ; d976
+wCeruleanGymSceneID:: db ; d977
+wRoute25SceneID:: db ; d978
+wTrainerHouseB1FSceneID:: db ; d979
+wVictoryRoadGateSceneID:: db ; d97a
+wSaffronTrainStationSceneID:: db ; d97b
+wRoute16GateSceneID:: db ; d97c
+wRoute1718GateSceneID:: db ; d97d
+wIndigoPlateauPokecenter1FSceneID:: db ; d97e
+wWillsRoomSceneID:: db ; d97f
+wKogasRoomSceneID:: db ; d980
+wBrunosRoomSceneID:: db ; d981
+wKarensRoomSceneID:: db ; d982
+wLancesRoomSceneID:: db ; d983
+wHallOfFameSceneID:: db ; d984
+wRoute27SceneID:: db ; d985
+wNewBarkTownSceneID:: db ; d986
+wElmsLabSceneID:: db ; d987
+wKrissHouse1FSceneID:: db ; d988
+wRoute29SceneID:: db ; d989
+wCherrygroveCitySceneID:: db ; d98a
+wMrPokemonsHouseSceneID:: db ; d98b
+wRoute32SceneID:: db ; d98c
+wRoute35NationalParkGateSceneID:: db ; d98d
+wRoute36SceneID:: db ; d98e
+wRoute36NationalParkGateSceneID:: db ; d98f
+wAzaleaTownSceneID:: db ; d990
+wGoldenrodGymSceneID:: db ; d991
+wGoldenrodMagnetTrainStationSceneID:: db ; d992
+wGoldenrodPokecenter1FSceneID:: db ; d993
+wOlivineCitySceneID:: db ; d994
+wRoute34SceneID:: db ; d995
+wRoute34IlexForestGateSceneID:: db ; d996
+wEcruteakHouseSceneID:: db ; d997
+wWiseTriosRoomSceneID:: db ; d998
+wEcruteakPokecenter1FSceneID:: db ; d999
+wEcruteakGymSceneID:: db ; d99a
+wMahoganyTownSceneID:: db ; d99b
+wRoute42SceneID:: db ; d99c
+wCianwoodCitySceneID:: db ; d99d
+wBattleTower1FSceneID:: db ; d99e
+wBattleTowerBattleRoomSceneID:: db ; d99f
+wBattleTowerElevatorSceneID:: db ; d9a0
+wBattleTowerHallwaySceneID:: db ; d9a1
+wBattleTowerOutsideSceneID:: db ; d9a2
+wRoute43GateSceneID:: db ; d9a3
+wMountMoonSceneID:: db ; d9a4
+wSproutTower3FSceneID:: db ; d9a5
+wTinTower1FSceneID:: db ; d9a6
+wBurnedTower1FSceneID:: db ; d9a7
+wBurnedTowerB1FSceneID:: db ; d9a8
+wRadioTower5FSceneID:: db ; d9a9
+wRuinsOfAlphOutsideSceneID:: db ; d9aa
+wRuinsOfAlphResearchCenterSceneID:: db ; d9ab
+wRuinsOfAlphHoOhChamberSceneID:: db ; d9ac
+wRuinsOfAlphKabutoChamberSceneID:: db ; d9ad
+wRuinsOfAlphOmanyteChamberSceneID:: db ; d9ae
+wRuinsOfAlphAerodactylChamberSceneID:: db ; d9af
+wRuinsOfAlphInnerChamberSceneID:: db ; d9b0
+wMahoganyMart1FSceneID:: db ; d9b1
+wTeamRocketBaseB1FSceneID:: db ; d9b2
+wTeamRocketBaseB2FSceneID:: db ; d9b3
+wTeamRocketBaseB3FSceneID:: db ; d9b4
+wGoldenrodUndergroundSwitchRoomEntrancesSceneID:: db ; d9b5
+wSilverCaveRoom3SceneID:: db ; d9b6
+wVictoryRoadSceneID:: db ; d9b7
+wDragonsDenB1FSceneID:: db ; d9b8
+wDragonShrineSceneID:: db ; d9b9
+wOlivinePortSceneID:: db ; d9ba
+wVermilionPortSceneID:: db ; d9bb
+wFastShip1FSceneID:: db ; d9bc
+wFastShipB1FSceneID:: db ; d9bd
+wMountMoonSquareSceneID:: db ; d9be
+wMobileTradeRoomMobileSceneID:: db ; d9bf
+wMobileBattleRoomSceneID:: db ; d9c0
ds 49