mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Make frontier util compile
This commit is contained in:
parent
90ef269426
commit
7de1c4bd14
@ -6,6 +6,238 @@
|
||||
.text
|
||||
|
||||
|
||||
thumb_func_start CreateFrontierBrainPokemon
|
||||
CreateFrontierBrainPokemon: @ 81A4E04
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0x44
|
||||
ldr r0, =0x000040cf
|
||||
bl VarGet
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
str r0, [sp, 0x20]
|
||||
bl sub_81A513C
|
||||
str r0, [sp, 0x24]
|
||||
ldr r0, [sp, 0x20]
|
||||
cmp r0, 0x1
|
||||
bne _081A4E44
|
||||
ldr r0, =0x000003fe
|
||||
bl TrainerIdToDomeTournamentId
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
bl GetTrainerMonCountInBits
|
||||
adds r4, r0, 0
|
||||
b _081A4E46
|
||||
.pool
|
||||
_081A4E44:
|
||||
movs r4, 0x7
|
||||
_081A4E46:
|
||||
bl ZeroEnemyPartyMons
|
||||
movs r1, 0
|
||||
str r1, [sp, 0x18]
|
||||
bl SetFacilityPtrsGetLevel
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
str r0, [sp, 0x1C]
|
||||
movs r2, 0
|
||||
str r2, [sp, 0x14]
|
||||
_081A4E5C:
|
||||
movs r0, 0x1
|
||||
ands r0, r4
|
||||
asrs r4, 1
|
||||
str r4, [sp, 0x30]
|
||||
ldr r3, [sp, 0x14]
|
||||
adds r3, 0x1
|
||||
str r3, [sp, 0x28]
|
||||
cmp r0, 0
|
||||
bne _081A4E70
|
||||
b _081A4FC4
|
||||
_081A4E70:
|
||||
ldr r4, [sp, 0x14]
|
||||
lsls r4, 2
|
||||
mov r9, r4
|
||||
ldr r0, [sp, 0x24]
|
||||
lsls r0, 4
|
||||
str r0, [sp, 0x38]
|
||||
ldr r1, [sp, 0x20]
|
||||
lsls r1, 4
|
||||
str r1, [sp, 0x34]
|
||||
ldr r2, [sp, 0x1C]
|
||||
lsls r2, 24
|
||||
str r2, [sp, 0x3C]
|
||||
ldr r3, [sp, 0x18]
|
||||
adds r3, 0x1
|
||||
str r3, [sp, 0x2C]
|
||||
ldr r0, [sp, 0x14]
|
||||
add r0, r9
|
||||
lsls r0, 2
|
||||
mov r8, r0
|
||||
_081A4E96:
|
||||
bl Random
|
||||
adds r4, r0, 0
|
||||
bl Random
|
||||
lsls r4, 16
|
||||
lsrs r7, r4, 16
|
||||
lsls r0, 16
|
||||
orrs r7, r0
|
||||
ldr r0, =0x0000ef2a
|
||||
adds r1, r7, 0
|
||||
bl IsShinyOtIdPersonality
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _081A4E96
|
||||
ldr r4, [sp, 0x38]
|
||||
ldr r1, [sp, 0x24]
|
||||
subs r0, r4, r1
|
||||
lsls r5, r0, 2
|
||||
mov r2, r8
|
||||
adds r4, r2, r5
|
||||
ldr r3, [sp, 0x34]
|
||||
ldr r1, [sp, 0x20]
|
||||
subs r0, r3, r1
|
||||
lsls r6, r0, 3
|
||||
adds r4, r6
|
||||
ldr r2, =sFrontierBrainsMons
|
||||
adds r4, r2
|
||||
adds r0, r7, 0
|
||||
bl GetNatureFromPersonality
|
||||
ldrb r1, [r4, 0x5]
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r1, r0
|
||||
bne _081A4E96
|
||||
ldr r4, [sp, 0x18]
|
||||
movs r0, 0x64
|
||||
adds r3, r4, 0
|
||||
muls r3, r0
|
||||
mov r8, r3
|
||||
ldr r1, =gEnemyParty
|
||||
add r1, r8
|
||||
mov r10, r1
|
||||
ldr r4, [sp, 0x14]
|
||||
add r4, r9
|
||||
lsls r4, 2
|
||||
adds r0, r4, r5
|
||||
adds r0, r6
|
||||
ldr r2, =sFrontierBrainsMons
|
||||
adds r0, r2
|
||||
ldrh r1, [r0]
|
||||
ldr r3, [sp, 0x3C]
|
||||
lsrs r2, r3, 24
|
||||
ldrb r3, [r0, 0x4]
|
||||
movs r0, 0x1
|
||||
str r0, [sp]
|
||||
str r7, [sp, 0x4]
|
||||
str r0, [sp, 0x8]
|
||||
ldr r0, =0x0000ef2a
|
||||
str r0, [sp, 0xC]
|
||||
mov r0, r10
|
||||
bl CreateMon
|
||||
ldr r0, =sFrontierBrainsMons
|
||||
adds r5, r0
|
||||
adds r5, r6, r5
|
||||
adds r4, r5, r4
|
||||
adds r4, 0x2
|
||||
mov r0, r10
|
||||
movs r1, 0xC
|
||||
adds r2, r4, 0
|
||||
bl SetMonData
|
||||
movs r7, 0
|
||||
mov r6, r8
|
||||
ldr r3, =gEnemyParty
|
||||
_081A4F32:
|
||||
adds r1, r7, 0
|
||||
adds r1, 0x1A
|
||||
ldr r0, [sp, 0x14]
|
||||
add r0, r9
|
||||
lsls r4, r0, 2
|
||||
adds r2, r5, r4
|
||||
adds r0, r7, 0x6
|
||||
adds r2, r0
|
||||
adds r0, r6, r3
|
||||
str r3, [sp, 0x40]
|
||||
bl SetMonData
|
||||
adds r7, 0x1
|
||||
ldr r3, [sp, 0x40]
|
||||
cmp r7, 0x5
|
||||
ble _081A4F32
|
||||
movs r1, 0xFF
|
||||
add r0, sp, 0x10
|
||||
strb r1, [r0]
|
||||
movs r7, 0
|
||||
ldr r1, [sp, 0x18]
|
||||
movs r2, 0x64
|
||||
adds r6, r1, 0
|
||||
muls r6, r2
|
||||
ldr r3, =gUnknown_08611578
|
||||
mov r8, r3
|
||||
ldr r3, =gEnemyParty
|
||||
adds r5, r4, 0
|
||||
_081A4F6A:
|
||||
ldr r4, [sp, 0x38]
|
||||
ldr r0, [sp, 0x24]
|
||||
subs r1, r4, r0
|
||||
lsls r1, 2
|
||||
adds r1, r5, r1
|
||||
ldr r2, [sp, 0x34]
|
||||
ldr r4, [sp, 0x20]
|
||||
subs r0, r2, r4
|
||||
lsls r0, 3
|
||||
adds r1, r0
|
||||
add r1, r8
|
||||
ldrh r4, [r1]
|
||||
lsls r2, r7, 24
|
||||
lsrs r2, 24
|
||||
adds r0, r6, r3
|
||||
adds r1, r4, 0
|
||||
str r3, [sp, 0x40]
|
||||
bl SetMonMoveSlot
|
||||
ldr r3, [sp, 0x40]
|
||||
cmp r4, 0xDA
|
||||
bne _081A4F9C
|
||||
movs r1, 0
|
||||
add r0, sp, 0x10
|
||||
strb r1, [r0]
|
||||
_081A4F9C:
|
||||
adds r5, 0x2
|
||||
adds r7, 0x1
|
||||
cmp r7, 0x3
|
||||
ble _081A4F6A
|
||||
ldr r0, [sp, 0x18]
|
||||
movs r1, 0x64
|
||||
adds r4, r0, 0
|
||||
muls r4, r1
|
||||
ldr r0, =gEnemyParty
|
||||
adds r4, r0
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x20
|
||||
add r2, sp, 0x10
|
||||
bl SetMonData
|
||||
adds r0, r4, 0
|
||||
bl CalculateMonStats
|
||||
ldr r2, [sp, 0x2C]
|
||||
str r2, [sp, 0x18]
|
||||
_081A4FC4:
|
||||
ldr r4, [sp, 0x30]
|
||||
ldr r3, [sp, 0x28]
|
||||
str r3, [sp, 0x14]
|
||||
cmp r3, 0x2
|
||||
bgt _081A4FD0
|
||||
b _081A4E5C
|
||||
_081A4FD0:
|
||||
add sp, 0x44
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end CreateFrontierBrainPokemon
|
||||
|
||||
thumb_func_start sub_81A4FF0
|
||||
sub_81A4FF0: @ 81A4FF0
|
||||
|
@ -9,8 +9,7 @@ struct ApprenticeTrainer
|
||||
u16 otId;
|
||||
u8 facilityClass;
|
||||
u16 species[APPRENTICE_SPECIES_COUNT];
|
||||
u8 unk;
|
||||
u8 unk_;
|
||||
u8 id;
|
||||
u16 easyChatWords[6];
|
||||
};
|
||||
|
||||
|
@ -388,112 +388,128 @@ const struct ApprenticeTrainer gApprentices[] =
|
||||
.otId = 0xBDC9,
|
||||
.facilityClass = 0x43,
|
||||
.species = {SPECIES_BEAUTIFLY, SPECIES_DUSTOX, SPECIES_ILLUMISE, SPECIES_SHIFTRY, SPECIES_BRELOOM, SPECIES_NINJASK, SPECIES_SHEDINJA, SPECIES_PINSIR, SPECIES_HERACROSS, SPECIES_VOLBEAT},
|
||||
.rest = {0, 0, 0x1D, 8, 0x3e, 20, 0, 12, 1, 10, 0x30, 6, 0x44, 20},
|
||||
.id = 0,
|
||||
.easyChatWords = {0x81D, 0x143E, 0xC00, 0xA01, 0x630, 0x1444},
|
||||
},
|
||||
{
|
||||
.name = {_("ヒロオ"), _("LIONEL"), _("LIONEL"), _("CAIO"), _("LUDWIG"), _("LEO")},
|
||||
.otId = 0xCF09,
|
||||
.facilityClass = 0x2B,
|
||||
.species = {SPECIES_SWELLOW, SPECIES_SWALOT, SPECIES_SHUCKLE, SPECIES_MANECTRIC, SPECIES_TORKOAL, SPECIES_HARIYAMA, SPECIES_MIGHTYENA, SPECIES_LUDICOLO, SPECIES_CRAWDAUNT, SPECIES_WHISCASH},
|
||||
.rest = {1, 0, 0x38, 12, 1, 10, 0x30, 6, 6, 10, 0x20, 0x10, 0x13, 0x22},
|
||||
.id = 1,
|
||||
.easyChatWords = {0xC38, 0xA01, 0x630, 0xA06, 0x1020, 0x2213},
|
||||
},
|
||||
{
|
||||
.name = {_("ケイジ"), _("SONNY"), _("HERVE"), _("FEDRO"), _("WENZEL"), _("SANTI")},
|
||||
.otId = 0x2E34,
|
||||
.facilityClass = 0x26,
|
||||
.species = {SPECIES_LINOONE, SPECIES_MIGHTYENA, SPECIES_WHISCASH, SPECIES_ZANGOOSE, SPECIES_SEVIPER, SPECIES_NINETALES, SPECIES_KECLEON, SPECIES_SHUCKLE, SPECIES_MANECTRIC, SPECIES_MACHAMP},
|
||||
.rest = {2, 0, 1, 10, 10, 0x16, 0x15, 14, 0x30, 6, 0x3b, 12, 0x4, 12},
|
||||
.id = 2,
|
||||
.easyChatWords = {0xA01, 0x160A, 0xE15, 0x630, 0xC3B, 0xC04},
|
||||
},
|
||||
{
|
||||
.name = {_("ユラ"), _("LAYLA"), _("LAYLA"), _("ASTRID"), _("SONJA"), _("LOLA")},
|
||||
.otId = 0x84EF,
|
||||
.facilityClass = 0x47,
|
||||
.species = {SPECIES_SWALOT, SPECIES_XATU, SPECIES_ALTARIA, SPECIES_GOLDUCK, SPECIES_FLYGON, SPECIES_ALAKAZAM, SPECIES_GARDEVOIR, SPECIES_WAILORD, SPECIES_GRUMPIG, SPECIES_MIGHTYENA},
|
||||
.rest = {3, 0, 11, 16, 15, 0x1e, 0x39, 16, 0x21, 0x14, 0x3, 12, 0xff, 0xff},
|
||||
.id = 3,
|
||||
.easyChatWords = {0x100B, 0x1E0F, 0x1039, 0x1421, 0xC03, 0xFFFF},
|
||||
},
|
||||
{
|
||||
.name = {_("ヨウカ"), _("MACY"), _("AMELIE"), _("CLEO"), _("MARIA"), _("ELISA")},
|
||||
.otId = 0x1E43,
|
||||
.facilityClass = 0x27,
|
||||
.species = {SPECIES_WIGGLYTUFF, SPECIES_LINOONE, SPECIES_KINGDRA, SPECIES_DELCATTY, SPECIES_RAICHU, SPECIES_FEAROW, SPECIES_STARMIE, SPECIES_MEDICHAM, SPECIES_SHIFTRY, SPECIES_BEAUTIFLY},
|
||||
.rest = {4, 0, 15, 0x1e, 0x14, 16, 6, 16, 15, 0x28, 0x1c, 0x1c, 0x13, 0x1c},
|
||||
.id = 4,
|
||||
.easyChatWords = {0x1E0F, 0x1014, 0x1006, 0x280F, 0x1C1C, 0x1C13},
|
||||
},
|
||||
{
|
||||
.name = {_("ヤスシ"), _("DONTE"), _("BRAHIM"), _("GLAUCO"), _("JOSEF"), _("ROQUE")},
|
||||
.otId = 0x379F,
|
||||
.facilityClass = 0x30,
|
||||
.species = {SPECIES_STARMIE, SPECIES_DODRIO, SPECIES_AGGRON, SPECIES_MAGNETON, SPECIES_MACHAMP, SPECIES_ARMALDO, SPECIES_HERACROSS, SPECIES_NOSEPASS, SPECIES_EXPLOUD, SPECIES_MIGHTYENA},
|
||||
.rest = {5, 0, 0x29, 0x0A, 0x08, 0x14, 0x2F, 0x10, 0x38, 0x16, 0x20, 0x08, 0x00, 0x0C},
|
||||
.id = 5,
|
||||
.easyChatWords = {0xA29, 0x1408, 0x102F, 0x1638, 0x820, 0xC00},
|
||||
},
|
||||
{
|
||||
.name = {_("ミサオ"), _("AMIRA"), _("LAURE"), _("DAFNE"), _("AMELIE"), _("LARA")},
|
||||
.otId = 0xF555,
|
||||
.facilityClass = 0x31,
|
||||
.species = {SPECIES_STARMIE, SPECIES_DODRIO, SPECIES_MAGNETON, SPECIES_MEDICHAM, SPECIES_MIGHTYENA, SPECIES_GLALIE, SPECIES_GOLEM, SPECIES_ELECTRODE, SPECIES_PELIPPER, SPECIES_SHARPEDO},
|
||||
.rest = {6, 0, 0x0B, 0x0C, 0x3E, 0x12, 0x00, 0x0C, 0x31, 0x0A, 0x30, 0x14, 0x00, 0x0C},
|
||||
.id = 6,
|
||||
.easyChatWords = {0xC0B, 0x123E, 0xC00, 0xA31, 0x1430, 0xC00},
|
||||
},
|
||||
{
|
||||
.name = {_("カズサ"), _("KALI"), _("JODIE"), _("ILENIA"), _("KARO"), _("ELSA")},
|
||||
.otId = 0x8D26,
|
||||
.facilityClass = 0x14,
|
||||
.species = {SPECIES_NINETALES, SPECIES_ALAKAZAM, SPECIES_SCEPTILE, SPECIES_SALAMENCE, SPECIES_GOLDUCK, SPECIES_MAWILE, SPECIES_WEEZING, SPECIES_LANTURN, SPECIES_GARDEVOIR, SPECIES_MILOTIC},
|
||||
.rest = {7, 0, 0x06, 0x0A, 0x20, 0x06, 0x1F, 0x0A, 0x02, 0x0A, 0x03, 0x0C, 0xFF, 0xFF},
|
||||
.id = 7,
|
||||
.easyChatWords = {0xA06, 0x620, 0xA1F, 0xA02, 0xC03, 0xFFFF},
|
||||
},
|
||||
{
|
||||
.name = {_("スミレ"), _("ANNIE"), _("ANNIE"), _("IMELDA"), _("INES"), _("ROSA")},
|
||||
.otId = 0x800C,
|
||||
.facilityClass = 0xD,
|
||||
.species = {SPECIES_SCEPTILE, SPECIES_VILEPLUME, SPECIES_BELLOSSOM, SPECIES_ROSELIA, SPECIES_CORSOLA, SPECIES_FLYGON, SPECIES_BRELOOM, SPECIES_MILOTIC, SPECIES_ALTARIA, SPECIES_CRADILY},
|
||||
.rest = {8, 0, 0x22, 0x1E, 0x33, 0x04, 0x0E, 0x02, 0x02, 0x0A, 0x1E, 0x10, 0x00, 0x0C},
|
||||
.id = 8,
|
||||
.easyChatWords = {0x1E22, 0x433, 0x20E, 0xA02, 0x101E, 0xC00},
|
||||
},
|
||||
{
|
||||
.name = {_("アキノリ"), _("DILLEN"), _("RENE"), _("INDRO"), _("DETLEF"), _("PEDRO")},
|
||||
.otId = 0x469f,
|
||||
.facilityClass = 0,
|
||||
.species = {SPECIES_SKARMORY, SPECIES_GOLEM, SPECIES_BLAZIKEN, SPECIES_CAMERUPT, SPECIES_DONPHAN, SPECIES_MUK, SPECIES_SALAMENCE, SPECIES_TROPIUS, SPECIES_SOLROCK, SPECIES_RHYDON},
|
||||
.rest = {9, 0, 0x3D, 0x0A, 0x11, 0x10, 0x1E, 0x0E, 0x1C, 0x20, 0x04, 0x0C, 0xFF, 0xFF},
|
||||
.id = 9,
|
||||
.easyChatWords = {0xA3D, 0x1011, 0xE1E, 0x201C, 0xC04, 0xFFFF},
|
||||
},
|
||||
{
|
||||
.name = {_("トウゾウ"), _("DALLAS"), _("BRUNO"), _("LEARCO"), _("ANSGAR"), _("MANOLO")},
|
||||
.otId = 0x71FC,
|
||||
.facilityClass = 0x2D,
|
||||
.species = {SPECIES_SEAKING, SPECIES_STARMIE, SPECIES_GOLDUCK, SPECIES_TENTACRUEL, SPECIES_OCTILLERY, SPECIES_GOREBYSS, SPECIES_GLALIE, SPECIES_WAILORD, SPECIES_SHARPEDO, SPECIES_KINGDRA},
|
||||
.rest = {10, 0, 0x05, 0x0A, 0x06, 0x06, 0x0E, 0x16, 0x14, 0x0A, 0x00, 0x0C, 0xFF, 0xFF},
|
||||
.id = 10,
|
||||
.easyChatWords = {0xA05, 0x606, 0x160E, 0xA14, 0xC00, 0xFFFF},
|
||||
},
|
||||
{
|
||||
.name = {_("セイヤ"), _("FRANK"), _("FRANK"), _("OLINDO"), _("FRANK"), _("MAURO")},
|
||||
.otId = 0xA39E,
|
||||
.facilityClass = 0x3A,
|
||||
.species = {SPECIES_QUAGSIRE, SPECIES_STARMIE, SPECIES_PELIPPER, SPECIES_CRAWDAUNT, SPECIES_WAILORD, SPECIES_GYARADOS, SPECIES_SWAMPERT, SPECIES_LANTURN, SPECIES_WHISCASH, SPECIES_SHUCKLE},
|
||||
.rest = {11, 0, 0x0E, 0x28, 0x3D, 0x10, 0x0F, 0x24, 0x14, 0x0A, 0x23, 0x1E, 0x24, 0x10},
|
||||
.id = 11,
|
||||
.easyChatWords = {0x280E, 0x103D, 0x240F, 0xA14, 0x1E23, 0x1024},
|
||||
},
|
||||
{
|
||||
.name = {_("リュウジ"), _("LAMONT"), _("XAV"), _("ORFEO"), _("JÜRGEN"), _("JORGE")},
|
||||
.otId = 0xE590,
|
||||
.facilityClass = 0x19,
|
||||
.species = {SPECIES_ABSOL, SPECIES_CROBAT, SPECIES_EXPLOUD, SPECIES_MAGNETON, SPECIES_SHARPEDO, SPECIES_MANECTRIC, SPECIES_METAGROSS, SPECIES_ELECTRODE, SPECIES_NOSEPASS, SPECIES_WEEZING},
|
||||
.rest = {12, 0, 0x20, 0x10, 0x2E, 0x06, 0x0B, 0x10, 0x22, 0x1E, 0x0F, 0x1E, 0x0B, 0x10},
|
||||
.id = 12,
|
||||
.easyChatWords = {0x1020, 0x62E, 0x100B, 0x1E22, 0x1E0F, 0x100B},
|
||||
},
|
||||
{
|
||||
.name = {_("カツアキ"), _("TYRESE"), _("ANDY"), _("PARIDE"), _("DAVID"), _("CHICHO")},
|
||||
.otId = 0xD018,
|
||||
.facilityClass = 10,
|
||||
.species = {SPECIES_BLAZIKEN, SPECIES_GOLEM, SPECIES_MACHAMP, SPECIES_RHYDON, SPECIES_HARIYAMA, SPECIES_AGGRON, SPECIES_MEDICHAM, SPECIES_ZANGOOSE, SPECIES_VIGOROTH, SPECIES_SLAKING},
|
||||
.rest = {13, 0, 0x29, 0x0A, 0x3A, 0x06, 0x15, 0x0E, 0x35, 0x14, 0x34, 0x10, 0x1E, 0x06},
|
||||
.id = 13,
|
||||
.easyChatWords = {0xA29, 0x63A, 0xE15, 0x1435, 0x1034, 0x61E},
|
||||
},
|
||||
{
|
||||
.name = {_("トシミツ"), _("DANTE"), _("DANTE"), _("RAOUL"), _("LOTHAR"), _("PABLO")},
|
||||
.otId = 0xBC75,
|
||||
.facilityClass = 14,
|
||||
.species = {SPECIES_SCEPTILE, SPECIES_SANDSLASH, SPECIES_FLYGON, SPECIES_CLAYDOL, SPECIES_ARMALDO, SPECIES_CROBAT, SPECIES_CRADILY, SPECIES_SOLROCK, SPECIES_LUNATONE, SPECIES_GOLEM},
|
||||
.rest = {14, 0, 0x01, 0x0A, 0x17, 0x10, 0x43, 0x12, 0x22, 0x1E, 0x0B, 0x10, 0x0F, 0x28},
|
||||
.id = 14,
|
||||
.easyChatWords = {0xA01, 0x1017, 0x1243, 0x1E22, 0x100B, 0x280F},
|
||||
},
|
||||
{
|
||||
.name = {_("ローウェン"), _("ARTURO"), _("ARTURO"), _("ROMOLO"), _("BRIAN"), _("ARTURO")},
|
||||
.otId = 0xFA02,
|
||||
.facilityClass = 0x20,
|
||||
.species = {SPECIES_ABSOL, SPECIES_MIGHTYENA, SPECIES_ALAKAZAM, SPECIES_BANETTE, SPECIES_NINETALES, SPECIES_CLAYDOL, SPECIES_MUK, SPECIES_SALAMENCE, SPECIES_WALREIN, SPECIES_DUSCLOPS},
|
||||
.rest = {15, 0, 0x0F, 0x1E, 0x04, 0x14, 0x2F, 0x10, 0x06, 0x10, 0x20, 0x10, 0x03, 0x0E},
|
||||
.id = 15,
|
||||
.easyChatWords = {0x1E0F, 0x1404, 0x102F, 0x1006, 0x1020, 0xE03},
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include "battle.h"
|
||||
#include "battle_setup.h"
|
||||
#include "battle_tower.h"
|
||||
#include "battle_frontier_2.h"
|
||||
#include "frontier_util.h"
|
||||
#include "battle_message.h"
|
||||
#include "event_data.h"
|
||||
#include "overworld.h"
|
||||
|
@ -1670,7 +1670,7 @@ static void CreateFrontierFactorySelectableMons(u8 firstMonId)
|
||||
u32 otId = 0;
|
||||
u8 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u8 var_2C = gSaveBlock2Ptr->frontier.field_DE2[battleMode][lvlMode] / 7;
|
||||
u8 var_2C = gSaveBlock2Ptr->frontier.factoryWinStreaks[battleMode][lvlMode] / 7;
|
||||
u8 var_28 = 0;
|
||||
|
||||
gFacilityTrainerMons = gBattleFrontierMons;
|
||||
|
@ -27,7 +27,7 @@ void sub_8195980(void)
|
||||
gSaveBlock2Ptr->frontier.field_CA9_a = 0;
|
||||
gSaveBlock2Ptr->frontier.field_CA9_b = 0;
|
||||
if (!(gSaveBlock2Ptr->frontier.field_CDC & gUnknown_0860DE98[battleMode][lvlMode]))
|
||||
gSaveBlock2Ptr->frontier.field_DC8[battleMode][lvlMode] = 0;
|
||||
gSaveBlock2Ptr->frontier.palaceWinStreaks[battleMode][lvlMode] = 0;
|
||||
|
||||
saved_warp2_set(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1);
|
||||
gTrainerBattleOpponent_A = 0;
|
||||
@ -44,7 +44,7 @@ void sub_8195A38(void)
|
||||
gSpecialVar_Result = gSaveBlock2Ptr->frontier.field_DC4[1];
|
||||
break;
|
||||
case 1:
|
||||
gSpecialVar_Result = gSaveBlock2Ptr->frontier.field_DC8[battleMode][lvlMode];
|
||||
gSpecialVar_Result = gSaveBlock2Ptr->frontier.palaceWinStreaks[battleMode][lvlMode];
|
||||
break;
|
||||
case 2:
|
||||
gSpecialVar_Result = ((gSaveBlock2Ptr->frontier.field_CDC & gUnknown_0860DE98[battleMode][lvlMode]) != 0);
|
||||
@ -63,7 +63,7 @@ void sub_8195AE4(void)
|
||||
gSaveBlock2Ptr->frontier.field_DC4[1] = gSpecialVar_0x8006;
|
||||
break;
|
||||
case 1:
|
||||
gSaveBlock2Ptr->frontier.field_DC8[battleMode][lvlMode] = gSpecialVar_0x8006;
|
||||
gSaveBlock2Ptr->frontier.palaceWinStreaks[battleMode][lvlMode] = gSpecialVar_0x8006;
|
||||
break;
|
||||
case 2:
|
||||
if (gSpecialVar_0x8006)
|
||||
@ -79,9 +79,9 @@ void sub_8195BB0(void)
|
||||
u32 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
|
||||
if (gSaveBlock2Ptr->frontier.field_DC8[battleMode][lvlMode] < 50)
|
||||
if (gSaveBlock2Ptr->frontier.palaceWinStreaks[battleMode][lvlMode] < 50)
|
||||
gSpecialVar_Result = Random() % 3;
|
||||
else if (gSaveBlock2Ptr->frontier.field_DC8[battleMode][lvlMode] < 99)
|
||||
else if (gSaveBlock2Ptr->frontier.palaceWinStreaks[battleMode][lvlMode] < 99)
|
||||
gSpecialVar_Result = 3;
|
||||
else
|
||||
gSpecialVar_Result = 4;
|
||||
@ -105,14 +105,14 @@ void sub_8195C7C(void)
|
||||
u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
u8 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||
|
||||
if (gSaveBlock2Ptr->frontier.field_DC8[battleMode][lvlMode] < 9999)
|
||||
if (gSaveBlock2Ptr->frontier.palaceWinStreaks[battleMode][lvlMode] < 9999)
|
||||
{
|
||||
u16 wat = 0;
|
||||
gSaveBlock2Ptr->frontier.field_DC8[battleMode][lvlMode]++;
|
||||
gSaveBlock2Ptr->frontier.palaceWinStreaks[battleMode][lvlMode]++;
|
||||
if (lvlMode < gSaveBlock2Ptr->frontier.field_DD0[battleMode][lvlMode])
|
||||
wat = 1;
|
||||
if (gSaveBlock2Ptr->frontier.field_DC8[battleMode][wat] != 0)
|
||||
gSaveBlock2Ptr->frontier.field_DD0[battleMode][lvlMode] = gSaveBlock2Ptr->frontier.field_DC8[battleMode][lvlMode];
|
||||
if (gSaveBlock2Ptr->frontier.palaceWinStreaks[battleMode][wat] != 0)
|
||||
gSaveBlock2Ptr->frontier.field_DD0[battleMode][lvlMode] = gSaveBlock2Ptr->frontier.palaceWinStreaks[battleMode][lvlMode];
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "menu.h"
|
||||
#include "recorded_battle.h"
|
||||
#include "international_string_util.h"
|
||||
#include "battle_frontier_2.h"
|
||||
#include "frontier_util.h"
|
||||
#include "battle_tower.h"
|
||||
#include "data2.h"
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "random.h"
|
||||
#include "item.h"
|
||||
#include "battle_factory.h"
|
||||
#include "battle_frontier_2.h"
|
||||
#include "frontier_util.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/region_map_sections.h"
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "field_message_box.h"
|
||||
#include "strings.h"
|
||||
#include "rom_818CFC8.h"
|
||||
#include "battle_frontier_2.h"
|
||||
#include "frontier_util.h"
|
||||
#include "pokenav.h"
|
||||
#include "event_data.h"
|
||||
#include "script.h"
|
||||
|
@ -2158,73 +2158,73 @@ void sub_8139F20(void)
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
if (gSaveBlock2Ptr->frontier.winStreaks[var][0] >= gSaveBlock2Ptr->frontier.winStreaks[var][1])
|
||||
if (gSaveBlock2Ptr->frontier.towerWinStreaks[var][0] >= gSaveBlock2Ptr->frontier.towerWinStreaks[var][1])
|
||||
{
|
||||
unk = gSaveBlock2Ptr->frontier.winStreaks[var][0];
|
||||
unk = gSaveBlock2Ptr->frontier.towerWinStreaks[var][0];
|
||||
}
|
||||
else
|
||||
{
|
||||
unk = gSaveBlock2Ptr->frontier.winStreaks[var][1];
|
||||
unk = gSaveBlock2Ptr->frontier.towerWinStreaks[var][1];
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (gSaveBlock2Ptr->frontier.field_D0C[0][0] >= gSaveBlock2Ptr->frontier.field_D0C[0][1])
|
||||
if (gSaveBlock2Ptr->frontier.domeWinStreaks[0][0] >= gSaveBlock2Ptr->frontier.domeWinStreaks[0][1])
|
||||
{
|
||||
unk = gSaveBlock2Ptr->frontier.field_D0C[0][0];
|
||||
unk = gSaveBlock2Ptr->frontier.domeWinStreaks[0][0];
|
||||
}
|
||||
else
|
||||
{
|
||||
unk = gSaveBlock2Ptr->frontier.field_D0C[0][1];
|
||||
unk = gSaveBlock2Ptr->frontier.domeWinStreaks[0][1];
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (gSaveBlock2Ptr->frontier.field_DE2[0][0] >= gSaveBlock2Ptr->frontier.field_DE2[0][1])
|
||||
if (gSaveBlock2Ptr->frontier.factoryWinStreaks[0][0] >= gSaveBlock2Ptr->frontier.factoryWinStreaks[0][1])
|
||||
{
|
||||
unk = gSaveBlock2Ptr->frontier.field_DE2[0][0];
|
||||
unk = gSaveBlock2Ptr->frontier.factoryWinStreaks[0][0];
|
||||
}
|
||||
else
|
||||
{
|
||||
unk = gSaveBlock2Ptr->frontier.field_DE2[0][1];
|
||||
unk = gSaveBlock2Ptr->frontier.factoryWinStreaks[0][1];
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (gSaveBlock2Ptr->frontier.field_DC8[0][0] >= gSaveBlock2Ptr->frontier.field_DC8[0][1])
|
||||
if (gSaveBlock2Ptr->frontier.palaceWinStreaks[0][0] >= gSaveBlock2Ptr->frontier.palaceWinStreaks[0][1])
|
||||
{
|
||||
unk = gSaveBlock2Ptr->frontier.field_DC8[0][0];
|
||||
unk = gSaveBlock2Ptr->frontier.palaceWinStreaks[0][0];
|
||||
}
|
||||
else
|
||||
{
|
||||
unk = gSaveBlock2Ptr->frontier.field_DC8[0][1];
|
||||
unk = gSaveBlock2Ptr->frontier.palaceWinStreaks[0][1];
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (gSaveBlock2Ptr->frontier.field_DDA[0] >= gSaveBlock2Ptr->frontier.field_DDA[1])
|
||||
if (gSaveBlock2Ptr->frontier.arenaWinStreaks[0] >= gSaveBlock2Ptr->frontier.arenaWinStreaks[1])
|
||||
{
|
||||
unk = gSaveBlock2Ptr->frontier.field_DDA[0];
|
||||
unk = gSaveBlock2Ptr->frontier.arenaWinStreaks[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
unk = gSaveBlock2Ptr->frontier.field_DDA[1];
|
||||
unk = gSaveBlock2Ptr->frontier.arenaWinStreaks[1];
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
if (gSaveBlock2Ptr->frontier.field_E04[0] >= gSaveBlock2Ptr->frontier.field_E04[1])
|
||||
if (gSaveBlock2Ptr->frontier.pikeWinStreaks[0] >= gSaveBlock2Ptr->frontier.pikeWinStreaks[1])
|
||||
{
|
||||
unk = gSaveBlock2Ptr->frontier.field_E04[0];
|
||||
unk = gSaveBlock2Ptr->frontier.pikeWinStreaks[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
unk = gSaveBlock2Ptr->frontier.field_E04[1];
|
||||
unk = gSaveBlock2Ptr->frontier.pikeWinStreaks[1];
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
if (gSaveBlock2Ptr->frontier.field_E1A[0] >= gSaveBlock2Ptr->frontier.field_E1A[1])
|
||||
if (gSaveBlock2Ptr->frontier.pyramidWinStreaks[0] >= gSaveBlock2Ptr->frontier.pyramidWinStreaks[1])
|
||||
{
|
||||
unk = gSaveBlock2Ptr->frontier.field_E1A[0];
|
||||
unk = gSaveBlock2Ptr->frontier.pyramidWinStreaks[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
unk = gSaveBlock2Ptr->frontier.field_E1A[1];
|
||||
unk = gSaveBlock2Ptr->frontier.pyramidWinStreaks[1];
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -2253,7 +2253,7 @@ void sub_813A080(void)
|
||||
|
||||
for (i = 0; i < 9; i++)
|
||||
{
|
||||
if (gUnknown_085B2CDC[i] > gSaveBlock2Ptr->frontier.winStreaks[battleMode][lvlMode])
|
||||
if (gUnknown_085B2CDC[i] > gSaveBlock2Ptr->frontier.towerWinStreaks[battleMode][lvlMode])
|
||||
{
|
||||
gSpecialVar_0x8005 = 4;
|
||||
gSpecialVar_0x8006 = i + 5;
|
||||
@ -2997,7 +2997,7 @@ void sub_813A8FC(void)
|
||||
{
|
||||
u8 string[32];
|
||||
u32 x;
|
||||
StringCopy(ConvertIntToDecimalStringN(string, gSaveBlock2Ptr->frontier.frontierBattlePoints, STR_CONV_MODE_RIGHT_ALIGN, 4), gText_BP);
|
||||
StringCopy(ConvertIntToDecimalStringN(string, gSaveBlock2Ptr->frontier.battlePoints, STR_CONV_MODE_RIGHT_ALIGN, 4), gText_BP);
|
||||
x = GetStringRightAlignXOffset(1, string, 48);
|
||||
AddTextPrinterParameterized(gUnknown_0203AB6D, 1, string, x, 1, 0, NULL);
|
||||
}
|
||||
@ -3028,31 +3028,31 @@ void sub_813A988(void)
|
||||
|
||||
void sub_813A9A4(void)
|
||||
{
|
||||
if (gSaveBlock2Ptr->frontier.frontierBattlePoints < gSpecialVar_0x8004)
|
||||
if (gSaveBlock2Ptr->frontier.battlePoints < gSpecialVar_0x8004)
|
||||
{
|
||||
gSaveBlock2Ptr->frontier.frontierBattlePoints = 0;
|
||||
gSaveBlock2Ptr->frontier.battlePoints = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
gSaveBlock2Ptr->frontier.frontierBattlePoints -= gSpecialVar_0x8004;
|
||||
gSaveBlock2Ptr->frontier.battlePoints -= gSpecialVar_0x8004;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_813A9D0(void)
|
||||
{
|
||||
if (gSaveBlock2Ptr->frontier.frontierBattlePoints + gSpecialVar_0x8004 > 0x270F)
|
||||
if (gSaveBlock2Ptr->frontier.battlePoints + gSpecialVar_0x8004 > 9999)
|
||||
{
|
||||
gSaveBlock2Ptr->frontier.frontierBattlePoints = 0x270f;
|
||||
gSaveBlock2Ptr->frontier.battlePoints = 9999;
|
||||
}
|
||||
else
|
||||
{
|
||||
gSaveBlock2Ptr->frontier.frontierBattlePoints = gSaveBlock2Ptr->frontier.frontierBattlePoints + gSpecialVar_0x8004;
|
||||
gSaveBlock2Ptr->frontier.battlePoints = gSaveBlock2Ptr->frontier.battlePoints + gSpecialVar_0x8004;
|
||||
}
|
||||
}
|
||||
|
||||
u16 sub_813AA04(void)
|
||||
{
|
||||
return gSaveBlock2Ptr->frontier.frontierBattlePoints;
|
||||
return gSaveBlock2Ptr->frontier.battlePoints;
|
||||
}
|
||||
|
||||
void sub_813AA18(void)
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "overworld.h"
|
||||
#include "bg.h"
|
||||
#include "battle_frontier_2.h"
|
||||
#include "frontier_util.h"
|
||||
#include "constants/rgb.h"
|
||||
#include "fieldmap.h"
|
||||
#include "fldeff_80F9BCC.h"
|
||||
|
@ -1782,6 +1782,7 @@ struct FrontierBrainMon
|
||||
|
||||
extern const struct FrontierBrainMon sFrontierBrainsMons[][2][3];
|
||||
|
||||
/*
|
||||
void CreateFrontierBrainPokemon(void)
|
||||
{
|
||||
s32 i, j;
|
||||
@ -1830,3 +1831,4 @@ void CreateFrontierBrainPokemon(void)
|
||||
monPartyId++;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "item_menu.h"
|
||||
#include "battle.h"
|
||||
#include "battle_controllers.h"
|
||||
#include "battle_frontier_2.h"
|
||||
#include "frontier_util.h"
|
||||
#include "berry_tag_screen.h"
|
||||
#include "bg.h"
|
||||
#include "constants/items.h"
|
||||
|
@ -52,7 +52,7 @@
|
||||
#include "tv.h"
|
||||
#include "scanline_effect.h"
|
||||
#include "wild_encounter.h"
|
||||
#include "battle_frontier_2.h"
|
||||
#include "frontier_util.h"
|
||||
#include "constants/abilities.h"
|
||||
#include "constants/map_types.h"
|
||||
#include "constants/maps.h"
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "main.h"
|
||||
#include "battle.h"
|
||||
#include "battle_anim.h"
|
||||
#include "battle_frontier_2.h"
|
||||
#include "frontier_util.h"
|
||||
#include "battle_message.h"
|
||||
#include "battle_tent.h"
|
||||
#include "bg.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "battle_frontier_2.h"
|
||||
#include "frontier_util.h"
|
||||
#include "battle_setup.h"
|
||||
#include "berry.h"
|
||||
#include "clock.h"
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "task.h"
|
||||
#include "overworld.h"
|
||||
#include "link.h"
|
||||
#include "battle_frontier_2.h"
|
||||
#include "frontier_util.h"
|
||||
#include "rom_818CFC8.h"
|
||||
#include "field_specials.h"
|
||||
#include "event_object_movement.h"
|
||||
|
2
src/tv.c
2
src/tv.c
@ -1972,7 +1972,7 @@ void sub_80EDB44(void)
|
||||
show->rivalTrainer.nGoldSymbols ++;
|
||||
}
|
||||
}
|
||||
show->rivalTrainer.battlePoints = gSaveBlock2Ptr->frontier.frontierBattlePoints;
|
||||
show->rivalTrainer.battlePoints = gSaveBlock2Ptr->frontier.battlePoints;
|
||||
StringCopy(show->rivalTrainer.playerName, gSaveBlock2Ptr->playerName);
|
||||
tv_store_id_3x(show);
|
||||
show->rivalTrainer.language = gGameLanguage;
|
||||
|
Loading…
Reference in New Issue
Block a user