summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Huderle <huderlem@gmail.com>2017-12-26 16:08:02 -0600
committerMarcus Huderle <huderlem@gmail.com>2017-12-26 16:08:40 -0600
commit82230589d1170e14c48b6d8b5ccadd8ded5465ce (patch)
treef57f111781e20af16d748a02098237ec95fcdc10
parent80cddf0cd4946d85e5e23ec90c530ca2ea54732d (diff)
Add bg_secret_base_event macro, and define secret base id constants
-rw-r--r--asm/macros/map.inc4
-rw-r--r--data/map_events.s1
-rw-r--r--data/maps/events/Route110.inc4
-rw-r--r--data/maps/events/Route111.inc16
-rw-r--r--data/maps/events/Route113.inc2
-rw-r--r--data/maps/events/Route114.inc14
-rw-r--r--data/maps/events/Route115.inc22
-rw-r--r--data/maps/events/Route116.inc8
-rw-r--r--data/maps/events/Route118.inc10
-rw-r--r--data/maps/events/Route119.inc26
-rw-r--r--data/maps/events/Route120.inc16
-rw-r--r--data/maps/events/Route121.inc8
-rw-r--r--data/maps/events/Route123.inc6
-rw-r--r--data/maps/events/Route125.inc8
-rw-r--r--data/maps/events/Route127.inc10
-rw-r--r--include/constants/secret_bases.h29
-rw-r--r--src/field/field_control_avatar.c2
17 files changed, 110 insertions, 76 deletions
diff --git a/asm/macros/map.inc b/asm/macros/map.inc
index 6e4005f7d..db37d9346 100644
--- a/asm/macros/map.inc
+++ b/asm/macros/map.inc
@@ -61,6 +61,10 @@
bg_event \x, \y, \height, 7, 0, \item, ((\flag) - FLAG_HIDDEN_ITEMS_START), 0
.endm
+ .macro bg_secret_base_event x, y, height, secret_base_id
+ bg_event \x, \y, \height, 8, 0, \secret_base_id, 0, 0
+ .endm
+
.macro map_events npcs, warps, traps, signs
.byte _num_npcs, _num_warps, _num_traps, _num_signs
.4byte \npcs, \warps, \traps, \signs
diff --git a/data/map_events.s b/data/map_events.s
index 6bfcc0292..a06eb36d0 100644
--- a/data/map_events.s
+++ b/data/map_events.s
@@ -2,6 +2,7 @@
#include "constants/items.h"
#include "constants/map_objects.h"
#include "constants/maps.h"
+#include "constants/secret_bases.h"
#include "constants/vars.h"
#include "constants/weather.h"
.include "asm/macros.inc"
diff --git a/data/maps/events/Route110.inc b/data/maps/events/Route110.inc
index 0a3569f6c..229573076 100644
--- a/data/maps/events/Route110.inc
+++ b/data/maps/events/Route110.inc
@@ -53,8 +53,8 @@ Route110_MapBGEvents:: @ 83820C0
bg_event 20, 94, 0, 0, 0, Route110_EventScript_14F9DD
bg_event 7, 75, 0, 0, 0, Route110_EventScript_14F9F8
bg_event 3, 17, 0, 0, 0, Route110_EventScript_14FA0A
- bg_event 16, 25, 0, 8, 0, ITEM_MACHO_BRACE, 0, 0
- bg_event 17, 25, 0, 8, 0, ITEM_SOUL_DEW, 0, 0
+ bg_secret_base_event 16, 25, 0, SECRET_BASE_TREE3(1)
+ bg_secret_base_event 17, 25, 0, SECRET_BASE_TREE4(1)
bg_event 35, 39, 3, 0, 0, Route110_EventScript_14FA13
bg_event 37, 70, 3, 0, 0, Route110_EventScript_14FA1C
bg_event 8, 67, 0, 0, 0, Route110_EventScript_14FA25
diff --git a/data/maps/events/Route111.inc b/data/maps/events/Route111.inc
index 62256e1f7..1725e7ff6 100644
--- a/data/maps/events/Route111.inc
+++ b/data/maps/events/Route111.inc
@@ -82,17 +82,17 @@ Route111_MapBGEvents:: @ 8382738
bg_event 24, 126, 0, 0, 0, Route111_EventScript_15035F
bg_event 7, 66, 0, 0, 0, Route111_EventScript_150371
bg_event 13, 6, 0, 0, 0, Route111_EventScript_15037A
- bg_event 24, 36, 0, 8, 0, ITEM_FAB_MAIL, 0, 0
- bg_event 34, 50, 0, 8, 0, ITEM_LUM_BERRY, 0, 0
- bg_event 33, 34, 0, 8, 0, ITEM_ORANGE_MAIL, 0, 0
+ bg_secret_base_event 24, 36, 0, SECRET_BASE_YELLOW_CAVE2(1)
+ bg_secret_base_event 34, 50, 0, SECRET_BASE_YELLOW_CAVE3(1)
+ bg_secret_base_event 33, 34, 0, SECRET_BASE_YELLOW_CAVE1(1)
bg_event 25, 19, 0, 0, 0, Route111_EventScript_150383
- bg_event 35, 1, 0, 8, 0, ITEM_POTION, 0, 0
- bg_event 35, 31, 0, 8, 0, ITEM_POMEG_BERRY, 0, 0
+ bg_secret_base_event 35, 1, 0, SECRET_BASE_RED_CAVE2(3)
+ bg_secret_base_event 35, 31, 0, SECRET_BASE_YELLOW_CAVE4(3)
bg_hidden_item_event 26, 70, 0, ITEM_STARDUST, FLAG_HIDDEN_ITEM_2
- bg_event 27, 27, 3, 8, 0, ITEM_REVIVAL_HERB, 0, 0
+ bg_secret_base_event 27, 27, 3, SECRET_BASE_RED_CAVE4(3)
bg_event 7, 84, 3, 0, 0, Route111_EventScript_15038C
- bg_event 14, 19, 0, 8, 0, ITEM_PAMTRE_BERRY, 0, 0
- bg_event 13, 19, 0, 8, 0, ITEM_RABUTA_BERRY, 0, 0
+ bg_secret_base_event 14, 19, 0, SECRET_BASE_TREE1(4)
+ bg_secret_base_event 13, 19, 0, SECRET_BASE_TREE1(1)
bg_hidden_item_event 19, 55, 0, ITEM_PROTEIN, FLAG_HIDDEN_ITEM_38
bg_hidden_item_event 35, 66, 0, ITEM_RARE_CANDY, FLAG_HIDDEN_ITEM_39
diff --git a/data/maps/events/Route113.inc b/data/maps/events/Route113.inc
index 13ac20534..0f69b0547 100644
--- a/data/maps/events/Route113.inc
+++ b/data/maps/events/Route113.inc
@@ -40,7 +40,7 @@ Route113_MapBGEvents:: @ 8382BE0
bg_event 11, 9, 0, 0, 0, Route113_EventScript_150620
bg_event 58, 4, 3, 0, 0, Route113_EventScript_150632
bg_event 31, 5, 0, 0, 0, Route113_EventScript_150629
- bg_event 49, 8, 0, 8, 0, ITEM_GREAT_BALL, 0, 0
+ bg_secret_base_event 49, 8, 0, SECRET_BASE_RED_CAVE1(3)
bg_hidden_item_event 72, 4, 3, ITEM_ETHER, FLAG_HIDDEN_ITEM_3
bg_hidden_item_event 22, 5, 3, ITEM_TM32, FLAG_HIDDEN_ITEM_1E
diff --git a/data/maps/events/Route114.inc b/data/maps/events/Route114.inc
index f701b2cfa..709714072 100644
--- a/data/maps/events/Route114.inc
+++ b/data/maps/events/Route114.inc
@@ -31,15 +31,15 @@ Route114_MapWarps:: @ 8382E70
Route114_MapBGEvents:: @ 8382E88
bg_event 7, 64, 0, 0, 0, Route114_EventScript_1507D6
bg_event 31, 7, 0, 0, 0, Route114_EventScript_1507DF
- bg_event 9, 47, 0, 8, 0, ITEM_RED_FLUTE, 0, 0
- bg_event 30, 51, 0, 8, 0, ITEM_GREEN_SHARD, 0, 0
- bg_event 11, 62, 0, 8, 0, 61, 0, 0
- bg_event 19, 70, 0, 8, 0, ITEM_PP_MAX, 0, 0
- bg_event 11, 27, 0, 8, 0, ITEM_EXP_SHARE, 0, 0
- bg_event 12, 27, 0, 8, 0, ITEM_DEEP_SEA_TOOTH, 0, 0
+ bg_secret_base_event 9, 47, 0, SECRET_BASE_BROWN_CAVE1(1)
+ bg_secret_base_event 30, 51, 0, SECRET_BASE_BROWN_CAVE2(1)
+ bg_secret_base_event 11, 62, 0, SECRET_BASE_BROWN_CAVE3(1)
+ bg_secret_base_event 19, 70, 0, SECRET_BASE_BROWN_CAVE4(1)
+ bg_secret_base_event 11, 27, 0, SECRET_BASE_TREE3(2)
+ bg_secret_base_event 12, 27, 0, SECRET_BASE_TREE4(2)
bg_event 25, 38, 3, 0, 0, Route114_EventScript_1507E8
bg_hidden_item_event 20, 57, 3, ITEM_CARBOS, FLAG_HIDDEN_ITEM_4
- bg_event 32, 57, 0, 8, 0, ITEM_GUARD_SPEC, 0, 0
+ bg_secret_base_event 32, 57, 0, SECRET_BASE_BROWN_CAVE4(3)
bg_hidden_item_event 7, 30, 3, ITEM_REVIVE, FLAG_HIDDEN_ITEM_2A
Route114_MapEvents:: @ 8382F18
diff --git a/data/maps/events/Route115.inc b/data/maps/events/Route115.inc
index 7b8d48758..b19ef6009 100644
--- a/data/maps/events/Route115.inc
+++ b/data/maps/events/Route115.inc
@@ -20,19 +20,19 @@ Route115_MapWarps:: @ 83830AC
warp_def 27, 37, 0, 1, MAP_METEOR_FALLS_1F_1R
Route115_MapBGEvents:: @ 83830B4
- bg_event 32, 6, 0, 8, 0, 72, 0, 0
- bg_event 21, 18, 0, 8, 0, 62, 0, 0
+ bg_secret_base_event 32, 6, 0, SECRET_BASE_BROWN_CAVE4(2)
+ bg_secret_base_event 21, 18, 0, SECRET_BASE_BROWN_CAVE3(2)
bg_event 16, 64, 0, 0, 0, Route115_EventScript_150937
bg_event 25, 38, 3, 0, 0, Route115_EventScript_150940
- bg_event 8, 30, 0, 8, 0, ITEM_CHERI_BERRY, 0, 0
- bg_event 32, 39, 0, 8, 0, ITEM_BLACK_FLUTE, 0, 0
- bg_event 26, 15, 0, 8, 0, 52, 0, 0
- bg_event 23, 8, 0, 8, 0, ITEM_WHITE_FLUTE, 0, 0
- bg_event 32, 46, 0, 8, 0, 53, 0, 0
- bg_event 7, 20, 0, 8, 0, ITEM_STARF_BERRY, 0, 0
- bg_event 8, 20, 0, 8, 0, ITEM_QUICK_CLAW, 0, 0
- bg_event 25, 24, 0, 8, 0, ITEM_HP_UP, 0, 0
- bg_event 20, 53, 0, 8, 0, ITEM_HYPER_POTION, 0, 0
+ bg_secret_base_event 8, 30, 0, SECRET_BASE_YELLOW_CAVE2(3)
+ bg_secret_base_event 32, 39, 0, SECRET_BASE_BROWN_CAVE1(2)
+ bg_secret_base_event 26, 15, 0, SECRET_BASE_BROWN_CAVE2(2)
+ bg_secret_base_event 23, 8, 0, SECRET_BASE_BROWN_CAVE1(3)
+ bg_secret_base_event 32, 46, 0, SECRET_BASE_BROWN_CAVE2(3)
+ bg_secret_base_event 7, 20, 0, SECRET_BASE_TREE2(4)
+ bg_secret_base_event 8, 20, 0, SECRET_BASE_TREE3(3)
+ bg_secret_base_event 25, 24, 0, SECRET_BASE_BROWN_CAVE3(3)
+ bg_secret_base_event 20, 53, 0, SECRET_BASE_RED_CAVE3(1)
bg_hidden_item_event 15, 49, 3, ITEM_HEART_SCALE, FLAG_HIDDEN_ITEM_61
Route115_MapEvents:: @ 838315C
diff --git a/data/maps/events/Route116.inc b/data/maps/events/Route116.inc
index 0acd83d88..ff5a842f7 100644
--- a/data/maps/events/Route116.inc
+++ b/data/maps/events/Route116.inc
@@ -34,12 +34,12 @@ Route116_MapBGEvents:: @ 83833A8
bg_event 5, 10, 0, 0, 0, Route116_EventScript_150B30
bg_event 48, 9, 0, 0, 0, Route116_EventScript_150B39
bg_event 40, 9, 0, 0, 0, Route116_EventScript_150B42
- bg_event 71, 4, 0, 8, 0, ITEM_FLUFFY_TAIL, 0, 0
- bg_event 79, 11, 0, 8, 0, 91, 0, 0
+ bg_secret_base_event 71, 4, 0, SECRET_BASE_BLUE_CAVE1(1)
+ bg_secret_base_event 79, 11, 0, SECRET_BASE_BLUE_CAVE2(1)
bg_event 16, 12, 0, 0, 0, Route116_EventScript_150B4B
bg_event 29, 10, 0, 0, 0, Route116_EventScript_150B54
- bg_event 56, 6, 0, 8, 0, 102, 0, 0
- bg_event 55, 15, 0, 8, 0, 112, 0, 0
+ bg_secret_base_event 56, 6, 0, SECRET_BASE_BLUE_CAVE3(2)
+ bg_secret_base_event 55, 15, 0, SECRET_BASE_BLUE_CAVE4(2)
bg_hidden_item_event 22, 9, 3, ITEM_SUPER_POTION, FLAG_HIDDEN_ITEM_2D
bg_hidden_item_event 70, 13, 3, ITEM_BLACK_GLASSES, FLAG_HIDDEN_ITEM_60
diff --git a/data/maps/events/Route118.inc b/data/maps/events/Route118.inc
index 60e8f27f0..3c16827a7 100644
--- a/data/maps/events/Route118.inc
+++ b/data/maps/events/Route118.inc
@@ -26,13 +26,13 @@ Route118_MapCoordEvents:: @ 8383864
coord_event 45, 11, 3, 0, VAR_ROUTE118_STATE, 0, 0, Route118_EventScript_150FE4
Route118_MapBGEvents:: @ 8383894
- bg_event 47, 14, 0, 8, 0, ITEM_MASTER_BALL, 0, 0
+ bg_secret_base_event 47, 14, 0, SECRET_BASE_RED_CAVE1(1)
bg_event 13, 6, 0, 0, 0, Route118_EventScript_150F9C
bg_event 56, 8, 0, 0, 0, Route118_EventScript_150FA5
- bg_event 67, 6, 0, 8, 0, ITEM_LUXURY_BALL, 0, 0
- bg_event 29, 5, 0, 8, 0, ITEM_HARBOR_MAIL, 0, 0
- bg_event 47, 5, 0, 8, 0, ITEM_SPELON_BERRY, 0, 0
- bg_event 46, 5, 0, 8, 0, ITEM_PETAYA_BERRY, 0, 0
+ bg_secret_base_event 67, 6, 0, SECRET_BASE_RED_CAVE2(1)
+ bg_secret_base_event 29, 5, 0, SECRET_BASE_YELLOW_CAVE1(2)
+ bg_secret_base_event 47, 5, 0, SECRET_BASE_TREE1(3)
+ bg_secret_base_event 46, 5, 0, SECRET_BASE_TREE2(1)
bg_hidden_item_event 31, 13, 3, ITEM_IRON, FLAG_HIDDEN_ITEM_43
bg_hidden_item_event 12, 14, 3, ITEM_HEART_SCALE, FLAG_HIDDEN_ITEM_42
diff --git a/data/maps/events/Route119.inc b/data/maps/events/Route119.inc
index c3d75ff52..b26f6685e 100644
--- a/data/maps/events/Route119.inc
+++ b/data/maps/events/Route119.inc
@@ -71,21 +71,21 @@ Route119_MapCoordEvents:: @ 8383C9C
Route119_MapBGEvents:: @ 8383E2C
bg_event 9, 33, 0, 0, 0, Route119_EventScript_15142C
bg_event 27, 19, 0, 0, 0, Route119_EventScript_151423
- bg_event 5, 2, 0, 8, 0, ITEM_DRAGON_SCALE, 0, 0
- bg_event 4, 89, 0, 8, 0, ITEM_LIGHT_BALL, 0, 0
- bg_event 5, 15, 0, 8, 0, ITEM_POISON_BARB, 0, 0
- bg_event 7, 101, 3, 8, 0, ITEM_NEVER_MELT_ICE, 0, 0
- bg_event 34, 24, 3, 8, 0, ITEM_LAX_INCENSE, 0, 0
- bg_event 31, 73, 3, 8, 0, 231, 0, 0
- bg_event 16, 81, 0, 8, 0, ITEM_TINY_MUSHROOM, 0, 0
- bg_event 16, 28, 0, 8, 0, 113, 0, 0
+ bg_secret_base_event 5, 2, 0, SECRET_BASE_SHRUB1(1)
+ bg_secret_base_event 4, 89, 0, SECRET_BASE_SHRUB1(2)
+ bg_secret_base_event 5, 15, 0, SECRET_BASE_SHRUB2(1)
+ bg_secret_base_event 7, 101, 3, SECRET_BASE_SHRUB2(2)
+ bg_secret_base_event 34, 24, 3, SECRET_BASE_SHRUB3(1)
+ bg_secret_base_event 31, 73, 3, SECRET_BASE_SHRUB4(1)
+ bg_secret_base_event 16, 81, 0, SECRET_BASE_BLUE_CAVE3(3)
+ bg_secret_base_event 16, 28, 0, SECRET_BASE_BLUE_CAVE4(3)
bg_hidden_item_event 17, 82, 3, ITEM_CALCIUM, FLAG_HIDDEN_ITEM_5
bg_hidden_item_event 38, 63, 3, ITEM_ULTRA_BALL, FLAG_HIDDEN_ITEM_6
- bg_event 26, 81, 0, 8, 0, ITEM_FULL_HEAL, 0, 0
- bg_event 19, 76, 0, 8, 0, ITEM_LANSAT_BERRY, 0, 0
- bg_event 18, 76, 0, 8, 0, ITEM_DEEP_SEA_SCALE, 0, 0
- bg_event 4, 15, 0, 8, 0, ITEM_METAL_POWDER, 0, 0
- bg_event 6, 2, 0, 8, 0, 233, 0, 0
+ bg_secret_base_event 26, 81, 0, SECRET_BASE_RED_CAVE3(3)
+ bg_secret_base_event 19, 76, 0, SECRET_BASE_TREE2(3)
+ bg_secret_base_event 18, 76, 0, SECRET_BASE_TREE4(3)
+ bg_secret_base_event 4, 15, 0, SECRET_BASE_SHRUB3(3)
+ bg_secret_base_event 6, 2, 0, SECRET_BASE_SHRUB4(3)
bg_hidden_item_event 26, 120, 3, ITEM_FULL_HEAL, FLAG_HIDDEN_ITEM_44
bg_hidden_item_event 20, 29, 3, ITEM_MAX_ETHER, FLAG_HIDDEN_ITEM_57
bg_event 28, 9, 0, 0, 0, Route119_EventScript_151605
diff --git a/data/maps/events/Route120.inc b/data/maps/events/Route120.inc
index b326c703a..909882c2d 100644
--- a/data/maps/events/Route120.inc
+++ b/data/maps/events/Route120.inc
@@ -69,18 +69,18 @@ Route120_MapCoordEvents:: @ 8384318
Route120_MapBGEvents:: @ 8384448
bg_event 27, 3, 3, 0, 0, Route120_EventScript_1519A1
bg_event 38, 88, 3, 0, 0, Route120_EventScript_1519AA
- bg_event 28, 62, 0, 8, 0, 101, 0, 0
- bg_event 30, 62, 0, 8, 0, ITEM_HEART_SCALE, 0, 0
- bg_event 26, 10, 0, 8, 0, ITEM_LUCKY_PUNCH, 0, 0
- bg_event 29, 85, 5, 8, 0, 232, 0, 0
- bg_event 18, 12, 0, 8, 0, ITEM_SUN_STONE, 0, 0
- bg_event 38, 54, 0, 8, 0, ITEM_SOFT_SAND, 0, 0
- bg_event 31, 23, 0, 8, 0, ITEM_SPELL_TAG, 0, 0
+ bg_secret_base_event 28, 62, 0, SECRET_BASE_BLUE_CAVE3(1)
+ bg_secret_base_event 30, 62, 0, SECRET_BASE_BLUE_CAVE4(1)
+ bg_secret_base_event 26, 10, 0, SECRET_BASE_SHRUB3(2)
+ bg_secret_base_event 29, 85, 5, SECRET_BASE_SHRUB4(2)
+ bg_secret_base_event 18, 12, 0, SECRET_BASE_BLUE_CAVE2(3)
+ bg_secret_base_event 38, 54, 0, SECRET_BASE_SHRUB1(3)
+ bg_secret_base_event 31, 23, 0, SECRET_BASE_SHRUB2(3)
bg_hidden_item_event 9, 1, 3, ITEM_RARE_CANDY, FLAG_HIDDEN_ITEM_47
bg_hidden_item_event 31, 11, 3, ITEM_REVIVE, FLAG_HIDDEN_ITEM_54
bg_hidden_item_event 0, 86, 3, ITEM_RARE_CANDY, FLAG_HIDDEN_ITEM_45
bg_hidden_item_event 24, 42, 3, ITEM_ZINC, FLAG_HIDDEN_ITEM_46
- bg_event 5, 76, 0, 8, 0, ITEM_HARD_STONE, 0, 0
+ bg_secret_base_event 5, 76, 0, SECRET_BASE_SHRUB1(4)
Route120_MapEvents:: @ 83844F0
map_events Route120_MapObjects, Route120_MapWarps, Route120_MapCoordEvents, Route120_MapBGEvents
diff --git a/data/maps/events/Route121.inc b/data/maps/events/Route121.inc
index a475d78a2..f6f0b8962 100644
--- a/data/maps/events/Route121.inc
+++ b/data/maps/events/Route121.inc
@@ -33,10 +33,10 @@ Route121_MapCoordEvents:: @ 838471C
Route121_MapBGEvents:: @ 838475C
bg_event 32, 14, 0, 0, 0, Route121_EventScript_151B13
- bg_event 40, 11, 0, 8, 0, ITEM_PREMIER_BALL, 0, 0
- bg_event 18, 13, 0, 8, 0, ITEM_SUPER_POTION, 0, 0
- bg_event 43, 7, 0, 8, 0, ITEM_NOMEL_BERRY, 0, 0
- bg_event 42, 7, 0, 8, 0, ITEM_APICOT_BERRY, 0, 0
+ bg_secret_base_event 40, 11, 0, SECRET_BASE_RED_CAVE2(2)
+ bg_secret_base_event 18, 13, 0, SECRET_BASE_RED_CAVE3(2)
+ bg_secret_base_event 43, 7, 0, SECRET_BASE_TREE1(2)
+ bg_secret_base_event 42, 7, 0, SECRET_BASE_TREE2(2)
bg_event 39, 6, 0, 0, 0, Route121_EventScript_151B1C
bg_hidden_item_event 23, 10, 3, ITEM_HP_UP, FLAG_HIDDEN_ITEM_27
bg_hidden_item_event 58, 3, 3, ITEM_NUGGET, FLAG_HIDDEN_ITEM_28
diff --git a/data/maps/events/Route123.inc b/data/maps/events/Route123.inc
index 291deb4e1..a52b927fc 100644
--- a/data/maps/events/Route123.inc
+++ b/data/maps/events/Route123.inc
@@ -63,12 +63,12 @@ Route123_MapCoordEvents:: @ 8384B30
Route123_MapBGEvents:: @ 8384C90
bg_event 117, 10, 0, 0, 0, Route123_EventScript_151CBF
- bg_event 47, 3, 0, 8, 0, 82, 0, 0
- bg_event 49, 3, 0, 8, 0, 92, 0, 0
+ bg_secret_base_event 47, 3, 0, SECRET_BASE_BLUE_CAVE1(2)
+ bg_secret_base_event 49, 3, 0, SECRET_BASE_BLUE_CAVE2(2)
bg_event 10, 12, 3, 0, 0, Route123_EventScript_151CB6
bg_hidden_item_event 75, 1, 3, ITEM_SUPER_REPEL, FLAG_HIDDEN_ITEM_7
bg_event 20, 7, 3, 0, 0, Route123_EventScript_151CC8
- bg_event 57, 5, 0, 8, 0, ITEM_SUPER_REPEL, 0, 0
+ bg_secret_base_event 57, 5, 0, SECRET_BASE_BLUE_CAVE1(3)
bg_hidden_item_event 12, 1, 3, ITEM_REVIVE, FLAG_HIDDEN_ITEM_29
bg_hidden_item_event 91, 15, 3, ITEM_HYPER_POTION, FLAG_HIDDEN_ITEM_4A
diff --git a/data/maps/events/Route125.inc b/data/maps/events/Route125.inc
index 585296ac3..860992732 100644
--- a/data/maps/events/Route125.inc
+++ b/data/maps/events/Route125.inc
@@ -11,10 +11,10 @@ Route125_MapWarps:: @ 8384ED0
warp_def 22, 19, 0, 0, MAP_SHOAL_CAVE_LOW_TIDE_ENTRANCE_ROOM
Route125_MapBGEvents:: @ 8384ED8
- bg_event 53, 10, 0, 8, 0, ITEM_ULTRA_BALL, 0, 0
- bg_event 55, 11, 0, 8, 0, ITEM_HEAL_POWDER, 0, 0
- bg_event 7, 25, 0, 8, 0, ITEM_RETRO_MAIL, 0, 0
- bg_event 24, 32, 0, 8, 0, ITEM_PINAP_BERRY, 0, 0
+ bg_secret_base_event 53, 10, 0, SECRET_BASE_RED_CAVE1(2)
+ bg_secret_base_event 55, 11, 0, SECRET_BASE_RED_CAVE4(2)
+ bg_secret_base_event 7, 25, 0, SECRET_BASE_YELLOW_CAVE2(2)
+ bg_secret_base_event 24, 32, 0, SECRET_BASE_YELLOW_CAVE4(2)
Route125_MapEvents:: @ 8384F08
map_events Route125_MapObjects, Route125_MapWarps, 0x0, Route125_MapBGEvents
diff --git a/data/maps/events/Route127.inc b/data/maps/events/Route127.inc
index d71b15c74..5d4d7623a 100644
--- a/data/maps/events/Route127.inc
+++ b/data/maps/events/Route127.inc
@@ -10,11 +10,11 @@ Route127_MapObjects:: @ 8384FA8
object_event 9, MAP_OBJ_GFX_BLACK_BELT, 0, 63, 0, 63, 0, 3, 1, 17, 0, 1, 0, 3, 0, Route127_EventScript_1520ED, 0, 0, 0
Route127_MapBGEvents:: @ 8385080
- bg_event 59, 67, 0, 8, 0, ITEM_ENERGY_ROOT, 0, 0
- bg_event 59, 72, 0, 8, 0, ITEM_SITRUS_BERRY, 0, 0
- bg_event 67, 63, 0, 8, 0, ITEM_WEPEAR_BERRY, 0, 0
- bg_event 61, 21, 0, 8, 0, ITEM_FIGY_BERRY, 0, 0
- bg_event 45, 24, 0, 8, 0, ITEM_GLITTER_MAIL, 0, 0
+ bg_secret_base_event 59, 67, 0, SECRET_BASE_RED_CAVE4(1)
+ bg_secret_base_event 59, 72, 0, SECRET_BASE_YELLOW_CAVE3(2)
+ bg_secret_base_event 67, 63, 0, SECRET_BASE_YELLOW_CAVE4(1)
+ bg_secret_base_event 61, 21, 0, SECRET_BASE_YELLOW_CAVE3(3)
+ bg_secret_base_event 45, 24, 0, SECRET_BASE_YELLOW_CAVE1(3)
Route127_MapEvents:: @ 83850BC
map_events Route127_MapObjects, 0x0, 0x0, Route127_MapBGEvents
diff --git a/include/constants/secret_bases.h b/include/constants/secret_bases.h
new file mode 100644
index 000000000..f9748183c
--- /dev/null
+++ b/include/constants/secret_bases.h
@@ -0,0 +1,29 @@
+#ifndef GUARD_CONSTANTS_SECRET_BASES_H
+#define GUARD_CONSTANTS_SECRET_BASES_H
+
+#define SECRET_BASE_RED_CAVE1(n) (0 + n)
+#define SECRET_BASE_RED_CAVE2(n) (10 + n)
+#define SECRET_BASE_RED_CAVE3(n) (20 + n)
+#define SECRET_BASE_RED_CAVE4(n) (30 + n)
+#define SECRET_BASE_BROWN_CAVE1(n) (40 + n)
+#define SECRET_BASE_BROWN_CAVE2(n) (50 + n)
+#define SECRET_BASE_BROWN_CAVE3(n) (60 + n)
+#define SECRET_BASE_BROWN_CAVE4(n) (70 + n)
+#define SECRET_BASE_BLUE_CAVE1(n) (80 + n)
+#define SECRET_BASE_BLUE_CAVE2(n) (90 + n)
+#define SECRET_BASE_BLUE_CAVE3(n) (100 + n)
+#define SECRET_BASE_BLUE_CAVE4(n) (110 + n)
+#define SECRET_BASE_YELLOW_CAVE1(n) (120 + n)
+#define SECRET_BASE_YELLOW_CAVE2(n) (130 + n)
+#define SECRET_BASE_YELLOW_CAVE3(n) (140 + n)
+#define SECRET_BASE_YELLOW_CAVE4(n) (150 + n)
+#define SECRET_BASE_TREE1(n) (160 + n)
+#define SECRET_BASE_TREE2(n) (170 + n)
+#define SECRET_BASE_TREE3(n) (180 + n)
+#define SECRET_BASE_TREE4(n) (190 + n)
+#define SECRET_BASE_SHRUB1(n) (200 + n)
+#define SECRET_BASE_SHRUB2(n) (210 + n)
+#define SECRET_BASE_SHRUB3(n) (220 + n)
+#define SECRET_BASE_SHRUB4(n) (230 + n)
+
+#endif // GUARD_CONSTANTS_SECRET_BASES_H
diff --git a/src/field/field_control_avatar.c b/src/field/field_control_avatar.c
index b63ebf87a..947dc3e56 100644
--- a/src/field/field_control_avatar.c
+++ b/src/field/field_control_avatar.c
@@ -363,7 +363,7 @@ static u8 *TryGetInvisibleMapObjectScript(struct MapPosition *position, u8 unuse
case 8:
if (c == 2)
{
- gSpecialVar_0x8004 = (u32)bgEvent->bgUnion.script;
+ gSpecialVar_0x8004 = bgEvent->bgUnion.secretBaseId;
if (sub_80BC050())
return gUnknown_081A2C51;
}