summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2017-10-26 22:49:51 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2017-10-26 22:49:51 -0400
commitfcaccb85015d6c407182acbd8b78a3794f2681b1 (patch)
treecb4107912d007d3d1879a9d7fccb4f980d4f6f44 /src
parent1ed15b3952a3d9f43ee8133e14c82450300795ad (diff)
through sub_80EA30C
Diffstat (limited to 'src')
-rw-r--r--src/secret_base.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/secret_base.c b/src/secret_base.c
index a18dbbb0b..68a663cfe 100644
--- a/src/secret_base.c
+++ b/src/secret_base.c
@@ -29,6 +29,8 @@
#include "strings.h"
#include "international_string_util.h"
#include "event_data.h"
+#include "battle.h"
+#include "rom6.h"
#include "decoration.h"
#include "decoration_inventory.h"
#include "secret_base.h"
@@ -1211,3 +1213,59 @@ u8 sub_80EA20C(u8 sbId)
{
return (gSaveBlock1Ptr->secretBases[sbId].trainerId[0] % 5) + (gSaveBlock1Ptr->secretBases[sbId].gender * 5);
}
+
+const u8 *sub_80EA250(void)
+{
+ u8 param;
+
+ param = sub_80EA20C(VarGet(VAR_0x4054));
+ if (param == 0)
+ {
+ return gUnknown_08274966;
+ }
+ if (param == 1)
+ {
+ return gUnknown_08274D13;
+ }
+ if (param == 2)
+ {
+ return gUnknown_08274FFE;
+ }
+ if (param == 3)
+ {
+ return gUnknown_08275367;
+ }
+ if (param == 4)
+ {
+ return gUnknown_082756C7;
+ }
+ if (param == 5)
+ {
+ return gUnknown_08274B24;
+ }
+ if (param == 6)
+ {
+ return gUnknown_08274E75;
+ }
+ if (param == 7)
+ {
+ return gUnknown_082751E1;
+ }
+ if (param == 8)
+ {
+ return gUnknown_082754F6;
+ }
+ return gUnknown_082758CC;
+}
+
+void sub_80EA2E4(void)
+{
+ sub_813BADC(TRUE);
+ gTrainerBattleOpponent_A = 0x400;
+ gBattleTypeFlags = BATTLE_TYPE_TRAINER | BATTLE_TYPE_SECRET_BASE;
+}
+
+void sub_80EA30C(void)
+{
+ gSaveBlock1Ptr->secretBases[VarGet(VAR_0x4054)].sbr_field_1_5 = gScriptResult;
+}