Merge pull request #335 from DizzyEggg/battledoc
Document some not labeled battle things
@ -7327,8 +7327,8 @@ _081A36C2:
|
||||
bx r1
|
||||
thumb_func_end sub_81A3610
|
||||
|
||||
thumb_func_start sub_81A36D0
|
||||
sub_81A36D0: @ 81A36D0
|
||||
thumb_func_start CopyFrontierTrainerText
|
||||
CopyFrontierTrainerText: @ 81A36D0
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
@ -7561,7 +7561,7 @@ _081A38F8:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81A36D0
|
||||
thumb_func_end CopyFrontierTrainerText
|
||||
|
||||
thumb_func_start sub_81A3908
|
||||
sub_81A3908: @ 81A3908
|
||||
|
@ -28079,8 +28079,8 @@ sub_81D5520: @ 81D5520
|
||||
.pool
|
||||
thumb_func_end sub_81D5520
|
||||
|
||||
thumb_func_start sub_81D5530
|
||||
sub_81D5530: @ 81D5530
|
||||
thumb_func_start GetTrainerHillOpponentClass
|
||||
GetTrainerHillOpponentClass: @ 81D5530
|
||||
lsls r0, 24
|
||||
movs r1, 0xFF
|
||||
lsls r1, 24
|
||||
@ -28096,10 +28096,10 @@ sub_81D5530: @ 81D5530
|
||||
ldrb r0, [r0]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end sub_81D5530
|
||||
thumb_func_end GetTrainerHillOpponentClass
|
||||
|
||||
thumb_func_start sub_81D5554
|
||||
sub_81D5554: @ 81D5554
|
||||
thumb_func_start GetTrainerHillTrainerName
|
||||
GetTrainerHillTrainerName: @ 81D5554
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
lsls r1, 24
|
||||
@ -28125,10 +28125,10 @@ _081D556E:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81D5554
|
||||
thumb_func_end GetTrainerHillTrainerName
|
||||
|
||||
thumb_func_start sub_81D5588
|
||||
sub_81D5588: @ 81D5588
|
||||
thumb_func_start GetTrainerHillTrainerFrontSpriteId
|
||||
GetTrainerHillTrainerFrontSpriteId: @ 81D5588
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
lsls r4, 16
|
||||
@ -28160,7 +28160,7 @@ sub_81D5588: @ 81D5588
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_81D5588
|
||||
thumb_func_end GetTrainerHillTrainerFrontSpriteId
|
||||
|
||||
thumb_func_start sub_81D55D0
|
||||
sub_81D55D0: @ 81D55D0
|
||||
@ -28324,8 +28324,8 @@ _081D5722:
|
||||
.pool
|
||||
thumb_func_end sub_81D5710
|
||||
|
||||
thumb_func_start sub_81D572C
|
||||
sub_81D572C: @ 81D572C
|
||||
thumb_func_start CopyTrainerHillTrainerText
|
||||
CopyTrainerHillTrainerText: @ 81D572C
|
||||
push {r4-r6,lr}
|
||||
adds r4, r1, 0
|
||||
lsls r0, 24
|
||||
@ -28441,7 +28441,7 @@ _081D580E:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81D572C
|
||||
thumb_func_end CopyTrainerHillTrainerText
|
||||
|
||||
thumb_func_start sub_81D581C
|
||||
sub_81D581C: @ 81D581C
|
||||
@ -29704,7 +29704,7 @@ sub_81D62B4: @ 81D62B4
|
||||
ldr r0, =gSpecialVar_LastTalked
|
||||
ldrh r1, [r0]
|
||||
movs r0, 0x5
|
||||
bl sub_81D572C
|
||||
bl CopyTrainerHillTrainerText
|
||||
bl sub_80982B8
|
||||
pop {r0}
|
||||
bx r0
|
||||
|
12
charmap.txt
@ -360,7 +360,7 @@ B_ATK_NAME_WITH_PREFIX_MON1 = FD 0D
|
||||
B_ATK_PARTNER_NAME = FD 0E
|
||||
B_ATK_NAME_WITH_PREFIX = FD 0F
|
||||
B_DEF_NAME_WITH_PREFIX = FD 10
|
||||
B_EFF_NAME_WITH_PREFIX = FD 11 @ EFF = short for gEffectBank
|
||||
B_EFF_NAME_WITH_PREFIX = FD 11 @ EFF = short for gEffectBattler
|
||||
B_ACTIVE_NAME_WITH_PREFIX = FD 12
|
||||
B_SCR_ACTIVE_NAME_WITH_PREFIX = FD 13
|
||||
B_CURRENT_MOVE = FD 14
|
||||
@ -373,11 +373,11 @@ B_SCR_ACTIVE_ABILITY = FD 1A
|
||||
B_EFF_ABILITY = FD 1B
|
||||
B_TRAINER1_CLASS = FD 1C
|
||||
B_TRAINER1_NAME = FD 1D
|
||||
B_1E = FD 1E @ trainer name for a link player
|
||||
B_1F = FD 1F @ trainer name for a link player
|
||||
B_20 = FD 20 @ trainer name for a link player
|
||||
B_21 = FD 21 @ trainer name for a link player
|
||||
B_22 = FD 22 @ trainer name for a link player
|
||||
B_LINK_PLAYER_NAME = FD 1E
|
||||
B_LINK_PARTNER_NAME = FD 1F
|
||||
B_LINK_OPPONENT1_NAME = FD 20
|
||||
B_LINK_OPPONENT2_NAME = FD 21
|
||||
B_LINK_SCR_TRAINER_NAME = FD 22
|
||||
B_PLAYER_NAME = FD 23
|
||||
B_TRAINER1_LOSE_TEXT = FD 24
|
||||
B_TRAINER1_WIN_TEXT = FD 25
|
||||
|
@ -2968,7 +2968,7 @@ BattleScript_PayDayMoneyAndPickUpItems::
|
||||
BattleScript_LocalBattleLost::
|
||||
jumpifbattletype BATTLE_TYPE_DOME, BattleScript_CheckDomeDrew
|
||||
jumpifbattletype BATTLE_TYPE_FRONTIER, BattleScript_LocalBattleLostPrintTrainersWinText
|
||||
jumpifbattletype BATTLE_TYPE_x4000000, BattleScript_LocalBattleLostPrintTrainersWinText
|
||||
jumpifbattletype BATTLE_TYPE_TRAINER_HILL, BattleScript_LocalBattleLostPrintTrainersWinText
|
||||
jumpifbattletype BATTLE_TYPE_EREADER_TRAINER, BattleScript_LocalBattleLostEnd
|
||||
jumpifhalfword CMP_EQUAL, gTrainerBattleOpponent_A, 0x400, BattleScript_LocalBattleLostEnd
|
||||
BattleScript_LocalBattleLostPrintWhiteOut::
|
||||
|
Before Width: | Height: | Size: 284 B After Width: | Height: | Size: 284 B |
Before Width: | Height: | Size: 293 B After Width: | Height: | Size: 293 B |
Before Width: | Height: | Size: 297 B After Width: | Height: | Size: 297 B |
Before Width: | Height: | Size: 296 B After Width: | Height: | Size: 296 B |
Before Width: | Height: | Size: 336 B After Width: | Height: | Size: 336 B |
@ -1,6 +1,11 @@
|
||||
#ifndef GUARD_BATTLE_FRONTIER_2_H
|
||||
#define GUARD_BATTLE_FRONTIER_2_H
|
||||
|
||||
#define FRONTIER_BEFORE_TEXT 0
|
||||
#define FRONTIER_WIN_TEXT 1
|
||||
#define FRONTIER_LOSE_TEXT 2
|
||||
|
||||
void CopyFrontierTrainerText(u8 whichText, u16 trainerId);
|
||||
void sub_81A8934(u8);
|
||||
void sub_81A895C(void);
|
||||
u16 sub_81A89A0(u8);
|
||||
|
@ -34,11 +34,11 @@
|
||||
#define B_TXT_EFF_ABILITY 0x1B
|
||||
#define B_TXT_TRAINER1_CLASS 0x1C
|
||||
#define B_TXT_TRAINER1_NAME 0x1D
|
||||
#define B_TXT_1E 0x1E // trainer name for a link player
|
||||
#define B_TXT_1F 0x1F // trainer name for a link player
|
||||
#define B_TXT_20 0x20 // trainer name for a link player
|
||||
#define B_TXT_21 0x21 // trainer name for a link player
|
||||
#define B_TXT_22 0x22 // trainer name for a link player
|
||||
#define B_TXT_LINK_PLAYER_NAME 0x1E
|
||||
#define B_TXT_LINK_PARTNER_NAME 0x1F
|
||||
#define B_TXT_LINK_OPPONENT1_NAME 0x20
|
||||
#define B_TXT_LINK_OPPONENT2_NAME 0x21
|
||||
#define B_TXT_LINK_SCR_TRAINER_NAME 0x22
|
||||
#define B_TXT_PLAYER_NAME 0x23
|
||||
#define B_TXT_TRAINER1_LOSE_TEXT 0x24
|
||||
#define B_TXT_TRAINER1_WIN_TEXT 0x25
|
||||
|
@ -46,7 +46,7 @@
|
||||
// Battle Type Flags
|
||||
#define BATTLE_TYPE_DOUBLE 0x0001
|
||||
#define BATTLE_TYPE_LINK 0x0002
|
||||
#define BATTLE_TYPE_WILD 0x0004
|
||||
#define BATTLE_TYPE_IS_MASTER 0x0004 // In not-link battles, it's always set.
|
||||
#define BATTLE_TYPE_TRAINER 0x0008
|
||||
#define BATTLE_TYPE_FIRST_BATTLE 0x0010
|
||||
#define BATTLE_TYPE_20 0x0020
|
||||
@ -70,7 +70,7 @@
|
||||
#define BATTLE_TYPE_x800000 0x800000
|
||||
#define BATTLE_TYPE_RECORDED 0x1000000
|
||||
#define BATTLE_TYPE_x2000000 0x2000000
|
||||
#define BATTLE_TYPE_x4000000 0x4000000
|
||||
#define BATTLE_TYPE_TRAINER_HILL 0x4000000
|
||||
#define BATTLE_TYPE_SECRET_BASE 0x8000000
|
||||
#define BATTLE_TYPE_GROUDON 0x10000000
|
||||
#define BATTLE_TYPE_KYOGRE 0x20000000
|
||||
|
@ -369,7 +369,7 @@ void BattleAI_SetupAIData(u8 defaultScoreMoves)
|
||||
AI_THINKING_STRUCT->aiFlags = AI_SCRIPT_FIRST_BATTLE;
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_FACTORY)
|
||||
AI_THINKING_STRUCT->aiFlags = GetAiScriptsInBattleFactory();
|
||||
else if (gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_x4000000 | BATTLE_TYPE_SECRET_BASE))
|
||||
else if (gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_TRAINER_HILL | BATTLE_TYPE_SECRET_BASE))
|
||||
AI_THINKING_STRUCT->aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_CHECK_VIABILITY | AI_SCRIPT_TRY_TO_FAINT;
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS)
|
||||
AI_THINKING_STRUCT->aiFlags = gTrainers[gTrainerBattleOpponent_A].aiFlags | gTrainers[gTrainerBattleOpponent_B].aiFlags;
|
||||
|
@ -40,7 +40,7 @@ extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[];
|
||||
extern void sub_8172EF0(u8 battlerId, struct Pokemon *mon);
|
||||
extern void sub_81A57E4(u8 battlerId, u16 stringId);
|
||||
extern u8 GetFrontierBrainTrainerPicIndex(void);
|
||||
extern u8 sub_81D5588(u16 trainerId);
|
||||
extern u8 GetTrainerHillTrainerFrontSpriteId(u16 trainerId);
|
||||
extern u8 GetFrontierTrainerFrontSpriteId(u16 trainerId);
|
||||
extern u8 GetEreaderTrainerFrontSpriteId(void);
|
||||
|
||||
@ -1236,18 +1236,18 @@ static void OpponentHandleDrawTrainerPic(void)
|
||||
{
|
||||
trainerPicId = GetFrontierBrainTrainerPicIndex();
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_x4000000)
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_TRAINER_HILL)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS)
|
||||
{
|
||||
if (gActiveBattler == 1)
|
||||
trainerPicId = sub_81D5588(gTrainerBattleOpponent_A);
|
||||
trainerPicId = GetTrainerHillTrainerFrontSpriteId(gTrainerBattleOpponent_A);
|
||||
else
|
||||
trainerPicId = sub_81D5588(gTrainerBattleOpponent_B);
|
||||
trainerPicId = GetTrainerHillTrainerFrontSpriteId(gTrainerBattleOpponent_B);
|
||||
}
|
||||
else
|
||||
{
|
||||
trainerPicId = sub_81D5588(gTrainerBattleOpponent_A);
|
||||
trainerPicId = GetTrainerHillTrainerFrontSpriteId(gTrainerBattleOpponent_A);
|
||||
}
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER)
|
||||
@ -1320,18 +1320,18 @@ static void OpponentHandleTrainerSlide(void)
|
||||
{
|
||||
trainerPicId = GetFrontierBrainTrainerPicIndex();
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_x4000000)
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_TRAINER_HILL)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS)
|
||||
{
|
||||
if (gActiveBattler == 1)
|
||||
trainerPicId = sub_81D5588(gTrainerBattleOpponent_A);
|
||||
trainerPicId = GetTrainerHillTrainerFrontSpriteId(gTrainerBattleOpponent_A);
|
||||
else
|
||||
trainerPicId = sub_81D5588(gTrainerBattleOpponent_B);
|
||||
trainerPicId = GetTrainerHillTrainerFrontSpriteId(gTrainerBattleOpponent_B);
|
||||
}
|
||||
else
|
||||
{
|
||||
trainerPicId = sub_81D5588(gTrainerBattleOpponent_A);
|
||||
trainerPicId = GetTrainerHillTrainerFrontSpriteId(gTrainerBattleOpponent_A);
|
||||
}
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER)
|
||||
@ -1998,7 +1998,7 @@ static void OpponentHandleResetActionMoveSelection(void)
|
||||
|
||||
static void OpponentHandleCmd55(void)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_LINK && !(gBattleTypeFlags & BATTLE_TYPE_WILD))
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_LINK && !(gBattleTypeFlags & BATTLE_TYPE_IS_MASTER))
|
||||
{
|
||||
gMain.inBattle = 0;
|
||||
gMain.callback1 = gPreBattleCallback1;
|
||||
|
@ -687,7 +687,7 @@ static void SafariHandleCmd55(void)
|
||||
FadeOutMapMusic(5);
|
||||
BeginFastPaletteFade(3);
|
||||
SafariBufferExecCompleted();
|
||||
if ((gBattleTypeFlags & BATTLE_TYPE_LINK) && !(gBattleTypeFlags & BATTLE_TYPE_WILD))
|
||||
if ((gBattleTypeFlags & BATTLE_TYPE_LINK) && !(gBattleTypeFlags & BATTLE_TYPE_IS_MASTER))
|
||||
gBattlerControllerFuncs[gActiveBattler] = sub_81595E4;
|
||||
}
|
||||
|
||||
|
@ -1560,7 +1560,7 @@ static void WallyHandleCmd55(void)
|
||||
BeginFastPaletteFade(3);
|
||||
WallyBufferExecCompleted();
|
||||
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_WILD) && gBattleTypeFlags & BATTLE_TYPE_LINK)
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_IS_MASTER) && gBattleTypeFlags & BATTLE_TYPE_LINK)
|
||||
gBattlerControllerFuncs[gActiveBattler] = sub_80587B0;
|
||||
}
|
||||
|
||||
|
@ -330,7 +330,7 @@ static void InitSinglePlayerBtlControllers(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_WILD)
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_IS_MASTER)
|
||||
{
|
||||
gBattlerControllerFuncs[0] = SetControllerToRecordedPlayer;
|
||||
gBattlerPositions[0] = B_POSITION_PLAYER_LEFT;
|
||||
@ -391,7 +391,7 @@ static void InitLinkBtlControllers(void)
|
||||
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE))
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_WILD)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_IS_MASTER)
|
||||
{
|
||||
gBattleMainFunc = BeginBattleIntro;
|
||||
|
||||
@ -416,7 +416,7 @@ static void InitLinkBtlControllers(void)
|
||||
}
|
||||
else if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI) && gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_WILD)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_IS_MASTER)
|
||||
{
|
||||
gBattleMainFunc = BeginBattleIntro;
|
||||
|
||||
@ -453,7 +453,7 @@ static void InitLinkBtlControllers(void)
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_BATTLE_TOWER)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_WILD)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_IS_MASTER)
|
||||
{
|
||||
gBattleMainFunc = BeginBattleIntro;
|
||||
|
||||
@ -501,7 +501,7 @@ static void InitLinkBtlControllers(void)
|
||||
{
|
||||
multiplayerId = GetMultiplayerId();
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_WILD)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_IS_MASTER)
|
||||
gBattleMainFunc = BeginBattleIntro;
|
||||
|
||||
for (i = 0; i < MAX_BATTLERS_COUNT; i++)
|
||||
@ -700,14 +700,14 @@ static void CreateTasksForSendRecvLinkBuffers(void)
|
||||
enum
|
||||
{
|
||||
LINK_BUFF_BUFFER_ID,
|
||||
LINK_BUFF_ACTIVE_BANK,
|
||||
LINK_BUFF_ACTIVE_BATTLER,
|
||||
LINK_BUFF_ATTACKER,
|
||||
LINK_BUFF_TARGET,
|
||||
LINK_BUFF_SIZE_LO,
|
||||
LINK_BUFF_SIZE_HI,
|
||||
LINK_BUFF_ABSENT_BANK_FLAGS,
|
||||
LINK_BUFF_EFFECT_BANK,
|
||||
LINK_BUFF_DATA
|
||||
LINK_BUFF_ABSENT_BATTLER_FLAGS,
|
||||
LINK_BUFF_EFFECT_BATTLER,
|
||||
LINK_BUFF_DATA,
|
||||
};
|
||||
|
||||
void PrepareBufferDataTransferLink(u8 bufferId, u16 size, u8 *data)
|
||||
@ -722,13 +722,13 @@ void PrepareBufferDataTransferLink(u8 bufferId, u16 size, u8 *data)
|
||||
gTasks[gUnknown_02022D08].data[14] = 0;
|
||||
}
|
||||
gLinkBattleSendBuffer[gTasks[gUnknown_02022D08].data[14] + LINK_BUFF_BUFFER_ID] = bufferId;
|
||||
gLinkBattleSendBuffer[gTasks[gUnknown_02022D08].data[14] + LINK_BUFF_ACTIVE_BANK] = gActiveBattler;
|
||||
gLinkBattleSendBuffer[gTasks[gUnknown_02022D08].data[14] + LINK_BUFF_ACTIVE_BATTLER] = gActiveBattler;
|
||||
gLinkBattleSendBuffer[gTasks[gUnknown_02022D08].data[14] + LINK_BUFF_ATTACKER] = gBattlerAttacker;
|
||||
gLinkBattleSendBuffer[gTasks[gUnknown_02022D08].data[14] + LINK_BUFF_TARGET] = gBattlerTarget;
|
||||
gLinkBattleSendBuffer[gTasks[gUnknown_02022D08].data[14] + LINK_BUFF_SIZE_LO] = alignedSize;
|
||||
gLinkBattleSendBuffer[gTasks[gUnknown_02022D08].data[14] + LINK_BUFF_SIZE_HI] = (alignedSize & 0x0000FF00) >> 8;
|
||||
gLinkBattleSendBuffer[gTasks[gUnknown_02022D08].data[14] + LINK_BUFF_ABSENT_BANK_FLAGS] = gAbsentBattlerFlags;
|
||||
gLinkBattleSendBuffer[gTasks[gUnknown_02022D08].data[14] + LINK_BUFF_EFFECT_BANK] = gEffectBattler;
|
||||
gLinkBattleSendBuffer[gTasks[gUnknown_02022D08].data[14] + LINK_BUFF_ABSENT_BATTLER_FLAGS] = gAbsentBattlerFlags;
|
||||
gLinkBattleSendBuffer[gTasks[gUnknown_02022D08].data[14] + LINK_BUFF_EFFECT_BATTLER] = gEffectBattler;
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
gLinkBattleSendBuffer[gTasks[gUnknown_02022D08].data[14] + LINK_BUFF_DATA + i] = data[i];
|
||||
@ -877,7 +877,7 @@ static void Task_HandleCopyReceivedLinkBuffersData(u8 taskId)
|
||||
gTasks[taskId].data[12] = 0;
|
||||
gTasks[taskId].data[15] = 0;
|
||||
}
|
||||
battlerId = gLinkBattleRecvBuffer[gTasks[taskId].data[15] + LINK_BUFF_ACTIVE_BANK];
|
||||
battlerId = gLinkBattleRecvBuffer[gTasks[taskId].data[15] + LINK_BUFF_ACTIVE_BATTLER];
|
||||
blockSize = gLinkBattleRecvBuffer[gTasks[taskId].data[15] + LINK_BUFF_SIZE_LO] | (gLinkBattleRecvBuffer[gTasks[taskId].data[15] + LINK_BUFF_SIZE_HI] << 8);
|
||||
|
||||
switch (gLinkBattleRecvBuffer[gTasks[taskId].data[15] + 0])
|
||||
@ -886,19 +886,19 @@ static void Task_HandleCopyReceivedLinkBuffersData(u8 taskId)
|
||||
if (gBattleControllerExecFlags & gBitTable[battlerId])
|
||||
return;
|
||||
|
||||
memcpy(gBattleBufferA[battlerId], &gLinkBattleRecvBuffer[gTasks[taskId].data[15] + 8], blockSize);
|
||||
memcpy(gBattleBufferA[battlerId], &gLinkBattleRecvBuffer[gTasks[taskId].data[15] + LINK_BUFF_DATA], blockSize);
|
||||
sub_803F850(battlerId);
|
||||
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_WILD))
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_IS_MASTER))
|
||||
{
|
||||
gBattlerAttacker = gLinkBattleRecvBuffer[gTasks[taskId].data[15] + 2];
|
||||
gBattlerTarget = gLinkBattleRecvBuffer[gTasks[taskId].data[15] + 3];
|
||||
gAbsentBattlerFlags = gLinkBattleRecvBuffer[gTasks[taskId].data[15] + 6];
|
||||
gEffectBattler = gLinkBattleRecvBuffer[gTasks[taskId].data[15] + 7];
|
||||
gBattlerAttacker = gLinkBattleRecvBuffer[gTasks[taskId].data[15] + LINK_BUFF_ATTACKER];
|
||||
gBattlerTarget = gLinkBattleRecvBuffer[gTasks[taskId].data[15] + LINK_BUFF_TARGET];
|
||||
gAbsentBattlerFlags = gLinkBattleRecvBuffer[gTasks[taskId].data[15] + LINK_BUFF_ABSENT_BATTLER_FLAGS];
|
||||
gEffectBattler = gLinkBattleRecvBuffer[gTasks[taskId].data[15] + LINK_BUFF_EFFECT_BATTLER];
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
memcpy(gBattleBufferB[battlerId], &gLinkBattleRecvBuffer[gTasks[taskId].data[15] + 8], blockSize);
|
||||
memcpy(gBattleBufferB[battlerId], &gLinkBattleRecvBuffer[gTasks[taskId].data[15] + LINK_BUFF_DATA], blockSize);
|
||||
break;
|
||||
case 2:
|
||||
var = gLinkBattleRecvBuffer[gTasks[taskId].data[15] + LINK_BUFF_DATA];
|
||||
|
@ -47,11 +47,11 @@ extern const u32 gUnknown_08C093F0[];
|
||||
extern const u32 gSubstituteDollTilemap[];
|
||||
extern const u32 gSubstituteDollGfx[];
|
||||
extern const u16 gSubstituteDollPal[];
|
||||
extern const u8 gUnknown_08C1F1C8[];
|
||||
extern const u8 gUnknown_08C1F46C[];
|
||||
extern const u8 gUnknown_08C1F5E8[];
|
||||
extern const u8 gUnknown_08C1F76C[];
|
||||
extern const u8 gUnknown_08C1F8E8[];
|
||||
extern const u8 gHealthboxSinglesPlayerGfx[];
|
||||
extern const u8 gHealthboxSinglesOpponentGfx[];
|
||||
extern const u8 gHealthboxDoublesPlayerGfx[];
|
||||
extern const u8 gHealthboxDoublesOpponentGfx[];
|
||||
extern const u8 gHealthboxSafariGfx[];
|
||||
extern const u8 gBlankGfxCompressed[];
|
||||
extern const u16 gBattleInterface_BallStatusBarPal[];
|
||||
extern const u16 gBattleInterface_BallDisplayPal[];
|
||||
@ -72,29 +72,29 @@ static void ClearSpritesBattlerHealthboxAnimData(void);
|
||||
// const rom data
|
||||
static const struct CompressedSpriteSheet sSpriteSheet_SinglesPlayerHealthbox =
|
||||
{
|
||||
gUnknown_08C1F1C8, 0x1000, TAG_HEALTHBOX_PLAYER1_TILE
|
||||
gHealthboxSinglesPlayerGfx, 0x1000, TAG_HEALTHBOX_PLAYER1_TILE
|
||||
};
|
||||
|
||||
static const struct CompressedSpriteSheet sSpriteSheet_SinglesOpponentHealthbox =
|
||||
{
|
||||
gUnknown_08C1F46C, 0x1000, TAG_HEALTHBOX_OPPONENT1_TILE
|
||||
gHealthboxSinglesOpponentGfx, 0x1000, TAG_HEALTHBOX_OPPONENT1_TILE
|
||||
};
|
||||
|
||||
static const struct CompressedSpriteSheet sSpriteSheets_DoublesPlayerHealthbox[2] =
|
||||
{
|
||||
{gUnknown_08C1F5E8, 0x800, TAG_HEALTHBOX_PLAYER1_TILE},
|
||||
{gUnknown_08C1F5E8, 0x800, TAG_HEALTHBOX_PLAYER2_TILE}
|
||||
{gHealthboxDoublesPlayerGfx, 0x800, TAG_HEALTHBOX_PLAYER1_TILE},
|
||||
{gHealthboxDoublesPlayerGfx, 0x800, TAG_HEALTHBOX_PLAYER2_TILE}
|
||||
};
|
||||
|
||||
static const struct CompressedSpriteSheet sSpriteSheets_DoublesOpponentHealthbox[2] =
|
||||
{
|
||||
{gUnknown_08C1F76C, 0x800, TAG_HEALTHBOX_OPPONENT1_TILE},
|
||||
{gUnknown_08C1F76C, 0x800, TAG_HEALTHBOX_OPPONENT2_TILE}
|
||||
{gHealthboxDoublesOpponentGfx, 0x800, TAG_HEALTHBOX_OPPONENT1_TILE},
|
||||
{gHealthboxDoublesOpponentGfx, 0x800, TAG_HEALTHBOX_OPPONENT2_TILE}
|
||||
};
|
||||
|
||||
static const struct CompressedSpriteSheet sSpriteSheet_SafariHealthbox =
|
||||
{
|
||||
gUnknown_08C1F8E8, 0x1000, TAG_HEALTHBOX_SAFARI_TILE
|
||||
gHealthboxSafariGfx, 0x1000, TAG_HEALTHBOX_SAFARI_TILE
|
||||
};
|
||||
|
||||
static const struct CompressedSpriteSheet sSpriteSheets_HealthBar[MAX_BATTLERS_COUNT] =
|
||||
|
@ -877,7 +877,7 @@ static void sub_8036EB8(u8 arg0, u8 arg1)
|
||||
if (gBlockRecvBuffer[0][0] == 256)
|
||||
{
|
||||
if (arg1 == 0)
|
||||
gBattleTypeFlags |= BATTLE_TYPE_WILD | BATTLE_TYPE_TRAINER;
|
||||
gBattleTypeFlags |= BATTLE_TYPE_IS_MASTER | BATTLE_TYPE_TRAINER;
|
||||
else
|
||||
gBattleTypeFlags |= BATTLE_TYPE_TRAINER;
|
||||
var++;
|
||||
@ -896,7 +896,7 @@ static void sub_8036EB8(u8 arg0, u8 arg1)
|
||||
if (i == arg0)
|
||||
{
|
||||
if (arg1 == 0)
|
||||
gBattleTypeFlags |= BATTLE_TYPE_WILD | BATTLE_TYPE_TRAINER;
|
||||
gBattleTypeFlags |= BATTLE_TYPE_IS_MASTER | BATTLE_TYPE_TRAINER;
|
||||
else
|
||||
gBattleTypeFlags |= BATTLE_TYPE_TRAINER;
|
||||
var++;
|
||||
@ -916,7 +916,7 @@ static void sub_8036EB8(u8 arg0, u8 arg1)
|
||||
}
|
||||
|
||||
if (i == arg0)
|
||||
gBattleTypeFlags |= BATTLE_TYPE_WILD | BATTLE_TYPE_TRAINER;
|
||||
gBattleTypeFlags |= BATTLE_TYPE_IS_MASTER | BATTLE_TYPE_TRAINER;
|
||||
else
|
||||
gBattleTypeFlags |= BATTLE_TYPE_TRAINER;
|
||||
}
|
||||
@ -979,7 +979,7 @@ static void CB2_HandleStartBattle(void)
|
||||
else
|
||||
{
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED))
|
||||
gBattleTypeFlags |= BATTLE_TYPE_WILD;
|
||||
gBattleTypeFlags |= BATTLE_TYPE_IS_MASTER;
|
||||
gBattleCommunication[MULTIUSE_STATE] = 15;
|
||||
SetAllPlayersBerryData();
|
||||
}
|
||||
@ -1087,7 +1087,7 @@ static void CB2_HandleStartBattle(void)
|
||||
if ((GetBlockReceivedStatus() & 3) == 3)
|
||||
{
|
||||
ResetBlockReceivedFlags();
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_WILD))
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_IS_MASTER))
|
||||
memcpy(&gRecordedBattleRngSeed, gBlockRecvBuffer[enemyMultiplayerId], sizeof(gRecordedBattleRngSeed));
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
}
|
||||
@ -1181,7 +1181,7 @@ static void CB2_HandleStartMultiPartnerBattle(void)
|
||||
else
|
||||
{
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED))
|
||||
gBattleTypeFlags |= BATTLE_TYPE_WILD;
|
||||
gBattleTypeFlags |= BATTLE_TYPE_IS_MASTER;
|
||||
gBattleCommunication[MULTIUSE_STATE] = 13;
|
||||
SetAllPlayersBerryData();
|
||||
}
|
||||
@ -1340,7 +1340,7 @@ static void CB2_HandleStartMultiPartnerBattle(void)
|
||||
if ((GetBlockReceivedStatus() & 3) == 3)
|
||||
{
|
||||
ResetBlockReceivedFlags();
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_WILD))
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_IS_MASTER))
|
||||
memcpy(&gRecordedBattleRngSeed, gBlockRecvBuffer[enemyMultiplayerId], sizeof(gRecordedBattleRngSeed));
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
}
|
||||
@ -1568,7 +1568,7 @@ static void CB2_HandleStartMultiBattle(void)
|
||||
else
|
||||
{
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED))
|
||||
gBattleTypeFlags |= BATTLE_TYPE_WILD;
|
||||
gBattleTypeFlags |= BATTLE_TYPE_IS_MASTER;
|
||||
gBattleCommunication[MULTIUSE_STATE] = 7;
|
||||
SetAllPlayersBerryData();
|
||||
}
|
||||
@ -1920,7 +1920,7 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 fir
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_TRAINER && !(gBattleTypeFlags & (BATTLE_TYPE_FRONTIER
|
||||
| BATTLE_TYPE_EREADER_TRAINER
|
||||
| BATTLE_TYPE_x4000000)))
|
||||
| BATTLE_TYPE_TRAINER_HILL)))
|
||||
{
|
||||
if (firstTrainer == TRUE)
|
||||
ZeroEnemyPartyMons();
|
||||
@ -3302,7 +3302,7 @@ static void BattleIntroGetMonsData(void)
|
||||
{
|
||||
case 0:
|
||||
gActiveBattler = gBattleCommunication[1];
|
||||
BtlController_EmitGetMonData(0, 0, 0);
|
||||
BtlController_EmitGetMonData(0, REQUEST_ALL_BATTLE, 0);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
break;
|
||||
@ -3385,7 +3385,7 @@ static void BattleIntroDrawTrainersOrMonsSprites(void)
|
||||
| BATTLE_TYPE_FRONTIER
|
||||
| BATTLE_TYPE_LINK
|
||||
| BATTLE_TYPE_x2000000
|
||||
| BATTLE_TYPE_x4000000)))
|
||||
| BATTLE_TYPE_TRAINER_HILL)))
|
||||
{
|
||||
HandleSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBattler].species), FLAG_SET_SEEN, gBattleMons[gActiveBattler].personality);
|
||||
}
|
||||
@ -3398,7 +3398,7 @@ static void BattleIntroDrawTrainersOrMonsSprites(void)
|
||||
| BATTLE_TYPE_FRONTIER
|
||||
| BATTLE_TYPE_LINK
|
||||
| BATTLE_TYPE_x2000000
|
||||
| BATTLE_TYPE_x4000000)))
|
||||
| BATTLE_TYPE_TRAINER_HILL)))
|
||||
{
|
||||
HandleSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBattler].species), FLAG_SET_SEEN, gBattleMons[gActiveBattler].personality);
|
||||
}
|
||||
@ -3709,7 +3709,7 @@ static void BattleIntroRecordMonsToDex(void)
|
||||
| BATTLE_TYPE_FRONTIER
|
||||
| BATTLE_TYPE_LINK
|
||||
| BATTLE_TYPE_x2000000
|
||||
| BATTLE_TYPE_x4000000)))
|
||||
| BATTLE_TYPE_TRAINER_HILL)))
|
||||
{
|
||||
HandleSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBattler].species), FLAG_SET_SEEN, gBattleMons[gActiveBattler].personality);
|
||||
}
|
||||
@ -4326,7 +4326,7 @@ static void HandleTurnActionSelectionState(void)
|
||||
}
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_TRAINER
|
||||
&& gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_x4000000)
|
||||
&& gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_TRAINER_HILL)
|
||||
&& gBattleBufferB[gActiveBattler][1] == B_ACTION_RUN)
|
||||
{
|
||||
gSelectionBattleScripts[gActiveBattler] = BattleScript_AskIfWantsToForfeitMatch;
|
||||
@ -4978,7 +4978,7 @@ static void HandleEndTurn_BattleWon(void)
|
||||
gBattleOutcome &= ~(B_OUTCOME_LINK_BATTLE_RAN);
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_TRAINER
|
||||
&& gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_x4000000 | BATTLE_TYPE_EREADER_TRAINER))
|
||||
&& gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_TRAINER_HILL | BATTLE_TYPE_EREADER_TRAINER))
|
||||
{
|
||||
BattleStopLowHpSound();
|
||||
gBattlescriptCurrInstr = BattleScript_FrontierTrainerBattleWon;
|
||||
@ -5069,7 +5069,7 @@ static void HandleEndTurn_RanFromBattle(void)
|
||||
gBattleOutcome = B_OUTCOME_FORFEITED;
|
||||
gSaveBlock2Ptr->frontier.field_CA9_b = 1;
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_x4000000)
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_TRAINER_HILL)
|
||||
{
|
||||
gBattlescriptCurrInstr = BattleScript_PrintPlayerForfeited;
|
||||
gBattleOutcome = B_OUTCOME_FORFEITED;
|
||||
@ -5624,7 +5624,7 @@ bool8 TryRunFromBattle(u8 battler)
|
||||
effect++;
|
||||
}
|
||||
}
|
||||
else if (gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_x4000000) && gBattleTypeFlags & BATTLE_TYPE_TRAINER)
|
||||
else if (gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_TRAINER_HILL) && gBattleTypeFlags & BATTLE_TYPE_TRAINER)
|
||||
{
|
||||
effect++;
|
||||
}
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "menu.h"
|
||||
#include "recorded_battle.h"
|
||||
#include "international_string_util.h"
|
||||
#include "battle_frontier_2.h"
|
||||
|
||||
struct BattleWindowText
|
||||
{
|
||||
@ -46,13 +47,12 @@ extern const u8 gText_PkmnTransferredLanettesPC[];
|
||||
|
||||
extern u8 GetFrontierBrainTrainerClass(void); // battle_frontier_2
|
||||
extern u8 GetFrontierOpponentClass(u16 trainerId); // battle_tower
|
||||
extern u8 sub_81D5530(u16 trainerId); // pokenav
|
||||
extern u8 GetTrainerHillOpponentClass(u16 trainerId); // pokenav
|
||||
extern u8 GetEreaderTrainerClassId(void); // battle_tower
|
||||
extern void CopyFrontierBrainTrainerName(u8 *txtPtr); // battle_frontier_2
|
||||
extern void sub_81D5554(u8 *txtPtr, u16 trainerId); // pokenav
|
||||
extern void GetTrainerHillTrainerName(u8 *txtPtr, u16 trainerId); // pokenav
|
||||
extern void GetEreaderTrainerName(u8 *txtPtr);
|
||||
extern void sub_81A36D0(u8 arg0, u16 trainerId); // battle_frontier_2
|
||||
extern void sub_81D572C(u8 arg0, u16 trainerId); // pokenav
|
||||
extern void CopyTrainerHillTrainerText(u8 arg0, u16 trainerId); // pokenav
|
||||
extern void GetFrontierTrainerName(u8 *dst, u16 trainerId);
|
||||
|
||||
// this file's functions
|
||||
@ -334,14 +334,14 @@ static const u8 sText_GotAwaySafely[] = _("{PLAY_SE 0x0011}Got away safely!\p");
|
||||
static const u8 sText_PkmnFledUsingIts[] = _("{PLAY_SE 0x0011}{B_ATK_NAME_WITH_PREFIX} fled\nusing its {B_LAST_ITEM}!\p");
|
||||
static const u8 sText_PkmnFledUsing[] = _("{PLAY_SE 0x0011}{B_ATK_NAME_WITH_PREFIX} fled\nusing {B_ATK_ABILITY}!\p");
|
||||
static const u8 sText_WildPkmnFled[] = _("{PLAY_SE 0x0011}Wild {B_BUFF1} fled!");
|
||||
static const u8 sText_PlayerDefeatedLinkTrainer[] = _("Player defeated\n{B_20}!");
|
||||
static const u8 sText_TwoLinkTrainersDefeated[] = _("Player beat {B_20}\nand {B_21}!");
|
||||
static const u8 sText_PlayerLostAgainstLinkTrainer[] = _("Player lost against\n{B_20}!");
|
||||
static const u8 sText_PlayerLostToTwo[] = _("Player lost to {B_20}\nand {B_21}!");
|
||||
static const u8 sText_PlayerBattledToDrawLinkTrainer[] = _("Player battled to a draw against\n{B_20}!");
|
||||
static const u8 sText_PlayerBattledToDrawVsTwo[] = _("Player battled to a draw against\n{B_20} and {B_21}!");
|
||||
static const u8 sText_WildFled[] = _("{PLAY_SE 0x0011}{B_20} fled!");
|
||||
static const u8 sText_TwoWildFled[] = _("{PLAY_SE 0x0011}{B_20} and\n{B_21} fled!");
|
||||
static const u8 sText_PlayerDefeatedLinkTrainer[] = _("Player defeated\n{B_LINK_OPPONENT1_NAME}!");
|
||||
static const u8 sText_TwoLinkTrainersDefeated[] = _("Player beat {B_LINK_OPPONENT1_NAME}\nand {B_LINK_OPPONENT2_NAME}!");
|
||||
static const u8 sText_PlayerLostAgainstLinkTrainer[] = _("Player lost against\n{B_LINK_OPPONENT1_NAME}!");
|
||||
static const u8 sText_PlayerLostToTwo[] = _("Player lost to {B_LINK_OPPONENT1_NAME}\nand {B_LINK_OPPONENT2_NAME}!");
|
||||
static const u8 sText_PlayerBattledToDrawLinkTrainer[] = _("Player battled to a draw against\n{B_LINK_OPPONENT1_NAME}!");
|
||||
static const u8 sText_PlayerBattledToDrawVsTwo[] = _("Player battled to a draw against\n{B_LINK_OPPONENT1_NAME} and {B_LINK_OPPONENT2_NAME}!");
|
||||
static const u8 sText_WildFled[] = _("{PLAY_SE 0x0011}{B_LINK_OPPONENT1_NAME} fled!");
|
||||
static const u8 sText_TwoWildFled[] = _("{PLAY_SE 0x0011}{B_LINK_OPPONENT1_NAME} and\n{B_LINK_OPPONENT2_NAME} fled!");
|
||||
static const u8 sText_NoRunningFromTrainers[] = _("No! There’s no running\nfrom a TRAINER battle!\p");
|
||||
static const u8 sText_CantEscape[] = _("Can’t escape!\p");
|
||||
static const u8 sText_DontLeaveBirch[] = _("PROF. BIRCH: Don’t leave me like this!\p");
|
||||
@ -398,33 +398,33 @@ static const u8 sText_WildPkmnAppeared2[] = _("Wild {B_OPPONENT_MON1_NAME} appea
|
||||
static const u8 sText_WildPkmnAppearedPause[] = _("Wild {B_OPPONENT_MON1_NAME} appeared!{PAUSE 127}");
|
||||
static const u8 sText_TwoWildPkmnAppeared[] = _("Wild {B_OPPONENT_MON1_NAME} and\n{B_OPPONENT_MON2_NAME} appeared!\p");
|
||||
static const u8 sText_Trainer1WantsToBattle[] = _("{B_TRAINER1_CLASS} {B_TRAINER1_NAME}\nwould like to battle!\p");
|
||||
static const u8 sText_LinkTrainerWantsToBattle[] = _("{B_20}\nwants to battle!");
|
||||
static const u8 sText_TwoLinkTrainersWantToBattle[] = _("{B_20} and {B_21}\nwant to battle!");
|
||||
static const u8 sText_LinkTrainerWantsToBattle[] = _("{B_LINK_OPPONENT1_NAME}\nwants to battle!");
|
||||
static const u8 sText_TwoLinkTrainersWantToBattle[] = _("{B_LINK_OPPONENT1_NAME} and {B_LINK_OPPONENT2_NAME}\nwant to battle!");
|
||||
static const u8 sText_Trainer1SentOutPkmn[] = _("{B_TRAINER1_CLASS} {B_TRAINER1_NAME} sent\nout {B_OPPONENT_MON1_NAME}!");
|
||||
static const u8 sText_Trainer1SentOutTwoPkmn[] = _("{B_TRAINER1_CLASS} {B_TRAINER1_NAME} sent\nout {B_OPPONENT_MON1_NAME} and {B_OPPONENT_MON2_NAME}!");
|
||||
static const u8 sText_Trainer1SentOutPkmn2[] = _("{B_TRAINER1_CLASS} {B_TRAINER1_NAME} sent\nout {B_BUFF1}!");
|
||||
static const u8 sText_LinkTrainerSentOutPkmn[] = _("{B_20} sent out\n{B_OPPONENT_MON1_NAME}!");
|
||||
static const u8 sText_LinkTrainerSentOutTwoPkmn[] = _("{B_20} sent out\n{B_OPPONENT_MON1_NAME} and {B_OPPONENT_MON2_NAME}!");
|
||||
static const u8 sText_TwoLinkTrainersSentOutPkmn[] = _("{B_20} sent out {B_LINK_OPPONENT_MON1_NAME}!\n{B_21} sent out {B_LINK_OPPONENT_MON2_NAME}!");
|
||||
static const u8 sText_LinkTrainerSentOutPkmn2[] = _("{B_20} sent out\n{B_BUFF1}!");
|
||||
static const u8 sText_LinkTrainerMultiSentOutPkmn[] = _("{B_22} sent out\n{B_BUFF1}!");
|
||||
static const u8 sText_LinkTrainerSentOutPkmn[] = _("{B_LINK_OPPONENT1_NAME} sent out\n{B_OPPONENT_MON1_NAME}!");
|
||||
static const u8 sText_LinkTrainerSentOutTwoPkmn[] = _("{B_LINK_OPPONENT1_NAME} sent out\n{B_OPPONENT_MON1_NAME} and {B_OPPONENT_MON2_NAME}!");
|
||||
static const u8 sText_TwoLinkTrainersSentOutPkmn[] = _("{B_LINK_OPPONENT1_NAME} sent out {B_LINK_OPPONENT_MON1_NAME}!\n{B_LINK_OPPONENT2_NAME} sent out {B_LINK_OPPONENT_MON2_NAME}!");
|
||||
static const u8 sText_LinkTrainerSentOutPkmn2[] = _("{B_LINK_OPPONENT1_NAME} sent out\n{B_BUFF1}!");
|
||||
static const u8 sText_LinkTrainerMultiSentOutPkmn[] = _("{B_LINK_SCR_TRAINER_NAME} sent out\n{B_BUFF1}!");
|
||||
static const u8 sText_GoPkmn[] = _("Go! {B_PLAYER_MON1_NAME}!");
|
||||
static const u8 sText_GoTwoPkmn[] = _("Go! {B_PLAYER_MON1_NAME} and\n{B_PLAYER_MON2_NAME}!");
|
||||
static const u8 sText_GoPkmn2[] = _("Go! {B_BUFF1}!");
|
||||
static const u8 sText_DoItPkmn[] = _("Do it! {B_BUFF1}!");
|
||||
static const u8 sText_GoForItPkmn[] = _("Go for it, {B_BUFF1}!");
|
||||
static const u8 sText_YourFoesWeakGetEmPkmn[] = _("Your foe’s weak!\nGet ’em, {B_BUFF1}!");
|
||||
static const u8 sText_LinkPartnerSentOutPkmnGoPkmn[] = _("{B_1F} sent out {B_LINK_PLAYER_MON2_NAME}!\nGo! {B_LINK_PLAYER_MON1_NAME}!");
|
||||
static const u8 sText_LinkPartnerSentOutPkmnGoPkmn[] = _("{B_LINK_PARTNER_NAME} sent out {B_LINK_PLAYER_MON2_NAME}!\nGo! {B_LINK_PLAYER_MON1_NAME}!");
|
||||
static const u8 sText_PkmnThatsEnough[] = _("{B_BUFF1}, that’s enough!\nCome back!");
|
||||
static const u8 sText_PkmnComeBack[] = _("{B_BUFF1}, come back!");
|
||||
static const u8 sText_PkmnOkComeBack[] = _("{B_BUFF1}, OK!\nCome back!");
|
||||
static const u8 sText_PkmnGoodComeBack[] = _("{B_BUFF1}, good!\nCome back!");
|
||||
static const u8 sText_Trainer1WithdrewPkmn[] = _("{B_TRAINER1_CLASS} {B_TRAINER1_NAME}\nwithdrew {B_BUFF1}!");
|
||||
static const u8 sText_LinkTrainer1WithdrewPkmn[] = _("{B_20} withdrew\n{B_BUFF1}!");
|
||||
static const u8 sText_LinkTrainer2WithdrewPkmn[] = _("{B_22} withdrew\n{B_BUFF1}!");
|
||||
static const u8 sText_LinkTrainer1WithdrewPkmn[] = _("{B_LINK_OPPONENT1_NAME} withdrew\n{B_BUFF1}!");
|
||||
static const u8 sText_LinkTrainer2WithdrewPkmn[] = _("{B_LINK_SCR_TRAINER_NAME} withdrew\n{B_BUFF1}!");
|
||||
static const u8 sText_WildPkmnPrefix[] = _("Wild ");
|
||||
static const u8 sText_FoePkmnPrefix[] = _("Foe ");
|
||||
static const u8 sText_EmptyString8[] = _( "");
|
||||
static const u8 sText_EmptyString8[] = _("");
|
||||
static const u8 sText_FoePkmnPrefix2[] = _("Foe");
|
||||
static const u8 sText_AllyPkmnPrefix[] = _("Ally");
|
||||
static const u8 sText_FoePkmnPrefix3[] = _("Foe");
|
||||
@ -1321,8 +1321,8 @@ static const u8 sText_PlayerLostAgainstTrainer1[] = _("Player lost against\n{B_T
|
||||
static const u8 sText_PlayerBattledToDrawTrainer1[] = _("Player battled to a draw against\n{B_TRAINER1_CLASS} {B_TRAINER1_NAME}!");
|
||||
const u8 gText_RecordBattleToPass[] = _("Would you like to record your battle\non your FRONTIER PASS?");
|
||||
const u8 gText_BattleRecordedOnPass[] = _("{B_PLAYER_NAME}’s battle result was recorded\non the FRONTIER PASS.");
|
||||
static const u8 sText_LinkTrainerWantsToBattlePause[] = _("{B_20}\nwants to battle!{PAUSE 49}");
|
||||
static const u8 sText_TwoLinkTrainersWantToBattlePause[] = _("{B_20} and {B_21}\nwant to battle!{PAUSE 49}");
|
||||
static const u8 sText_LinkTrainerWantsToBattlePause[] = _("{B_LINK_OPPONENT1_NAME}\nwants to battle!{PAUSE 49}");
|
||||
static const u8 sText_TwoLinkTrainersWantToBattlePause[] = _("{B_LINK_OPPONENT1_NAME} and {B_LINK_OPPONENT2_NAME}\nwant to battle!{PAUSE 49}");
|
||||
|
||||
// This is four lists of moves which use a different attack string in Japanese
|
||||
// to the default. See the documentation for ChooseTypeOfMoveUsedString for more detail.
|
||||
@ -2303,13 +2303,13 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
|
||||
u32 dstID = 0; // if they used dstID, why not use srcID as well?
|
||||
const u8 *toCpy = NULL;
|
||||
u8 text[30];
|
||||
u8 multiplayerID;
|
||||
u8 multiplayerId;
|
||||
s32 i;
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x2000000)
|
||||
multiplayerID = gUnknown_0203C7B4;
|
||||
multiplayerId = gUnknown_0203C7B4;
|
||||
else
|
||||
multiplayerID = GetMultiplayerId();
|
||||
multiplayerId = GetMultiplayerId();
|
||||
|
||||
while (*src != EOS)
|
||||
{
|
||||
@ -2383,25 +2383,25 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
|
||||
toCpy = text;
|
||||
break;
|
||||
case B_TXT_LINK_PLAYER_MON1_NAME: // link first player poke name
|
||||
GetMonData(&gPlayerParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerID].id]],
|
||||
GetMonData(&gPlayerParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerId].id]],
|
||||
MON_DATA_NICKNAME, text);
|
||||
StringGetEnd10(text);
|
||||
toCpy = text;
|
||||
break;
|
||||
case B_TXT_LINK_OPPONENT_MON1_NAME: // link first opponent poke name
|
||||
GetMonData(&gEnemyParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerID].id ^ 1]],
|
||||
GetMonData(&gEnemyParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerId].id ^ 1]],
|
||||
MON_DATA_NICKNAME, text);
|
||||
StringGetEnd10(text);
|
||||
toCpy = text;
|
||||
break;
|
||||
case B_TXT_LINK_PLAYER_MON2_NAME: // link second player poke name
|
||||
GetMonData(&gPlayerParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerID].id ^ 2]],
|
||||
GetMonData(&gPlayerParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerId].id ^ 2]],
|
||||
MON_DATA_NICKNAME, text);
|
||||
StringGetEnd10(text);
|
||||
toCpy = text;
|
||||
break;
|
||||
case B_TXT_LINK_OPPONENT_MON2_NAME: // link second opponent poke name
|
||||
GetMonData(&gEnemyParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerID].id ^ 3]],
|
||||
GetMonData(&gEnemyParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerId].id ^ 3]],
|
||||
MON_DATA_NICKNAME, text);
|
||||
StringGetEnd10(text);
|
||||
toCpy = text;
|
||||
@ -2513,8 +2513,8 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
|
||||
toCpy = gTrainerClassNames[GetFrontierBrainTrainerClass()];
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER)
|
||||
toCpy = gTrainerClassNames[GetFrontierOpponentClass(gTrainerBattleOpponent_A)];
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_x4000000)
|
||||
toCpy = gTrainerClassNames[sub_81D5530(gTrainerBattleOpponent_A)];
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_TRAINER_HILL)
|
||||
toCpy = gTrainerClassNames[GetTrainerHillOpponentClass(gTrainerBattleOpponent_A)];
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_EREADER_TRAINER)
|
||||
toCpy = gTrainerClassNames[GetEreaderTrainerClassId()];
|
||||
else
|
||||
@ -2531,7 +2531,7 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
|
||||
}
|
||||
else if (gTrainerBattleOpponent_A == TRAINER_OPPONENT_C00)
|
||||
{
|
||||
toCpy = gLinkPlayers[multiplayerID ^ BIT_SIDE].name;
|
||||
toCpy = gLinkPlayers[multiplayerId ^ BIT_SIDE].name;
|
||||
}
|
||||
else if (gTrainerBattleOpponent_A == TRAINER_FRONTIER_BRAIN)
|
||||
{
|
||||
@ -2543,9 +2543,9 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
|
||||
GetFrontierTrainerName(text, gTrainerBattleOpponent_A);
|
||||
toCpy = text;
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_x4000000)
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_TRAINER_HILL)
|
||||
{
|
||||
sub_81D5554(text, gTrainerBattleOpponent_A);
|
||||
GetTrainerHillTrainerName(text, gTrainerBattleOpponent_A);
|
||||
toCpy = text;
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_EREADER_TRAINER)
|
||||
@ -2558,19 +2558,19 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
|
||||
toCpy = gTrainers[gTrainerBattleOpponent_A].trainerName;
|
||||
}
|
||||
break;
|
||||
case B_TXT_1E: // link player name?
|
||||
toCpy = gLinkPlayers[multiplayerID].name;
|
||||
case B_TXT_LINK_PLAYER_NAME: // link player name
|
||||
toCpy = gLinkPlayers[multiplayerId].name;
|
||||
break;
|
||||
case B_TXT_1F: // link partner name?
|
||||
toCpy = gLinkPlayers[GetBattlerMultiplayerId(2 ^ gLinkPlayers[multiplayerID].id)].name;
|
||||
case B_TXT_LINK_PARTNER_NAME: // link partner name
|
||||
toCpy = gLinkPlayers[GetBattlerMultiplayerId(BATTLE_PARTNER(gLinkPlayers[multiplayerId].id))].name;
|
||||
break;
|
||||
case B_TXT_20: // link opponent 1 name?
|
||||
toCpy = gLinkPlayers[GetBattlerMultiplayerId(1 ^ gLinkPlayers[multiplayerID].id)].name;
|
||||
case B_TXT_LINK_OPPONENT1_NAME: // link opponent 1 name
|
||||
toCpy = gLinkPlayers[GetBattlerMultiplayerId(BATTLE_OPPOSITE(gLinkPlayers[multiplayerId].id))].name;
|
||||
break;
|
||||
case B_TXT_21: // link opponent 2 name?
|
||||
toCpy = gLinkPlayers[GetBattlerMultiplayerId(3 ^ gLinkPlayers[multiplayerID].id)].name;
|
||||
case B_TXT_LINK_OPPONENT2_NAME: // link opponent 2 name
|
||||
toCpy = gLinkPlayers[GetBattlerMultiplayerId(BATTLE_PARTNER(BATTLE_OPPOSITE(gLinkPlayers[multiplayerId].id)))].name;
|
||||
break;
|
||||
case B_TXT_22: // link scripting active name
|
||||
case B_TXT_LINK_SCR_TRAINER_NAME: // link scripting active name
|
||||
toCpy = gLinkPlayers[GetBattlerMultiplayerId(gBattleScripting.battler)].name;
|
||||
break;
|
||||
case B_TXT_PLAYER_NAME: // player name
|
||||
@ -2582,12 +2582,12 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
|
||||
case B_TXT_TRAINER1_LOSE_TEXT: // trainerA lose text
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER)
|
||||
{
|
||||
sub_81A36D0(2, gTrainerBattleOpponent_A);
|
||||
CopyFrontierTrainerText(FRONTIER_LOSE_TEXT, gTrainerBattleOpponent_A);
|
||||
toCpy = gStringVar4;
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_x4000000)
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_TRAINER_HILL)
|
||||
{
|
||||
sub_81D572C(4, gTrainerBattleOpponent_A);
|
||||
CopyTrainerHillTrainerText(4, gTrainerBattleOpponent_A);
|
||||
toCpy = gStringVar4;
|
||||
}
|
||||
else
|
||||
@ -2598,12 +2598,12 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
|
||||
case B_TXT_TRAINER1_WIN_TEXT: // trainerA win text
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER)
|
||||
{
|
||||
sub_81A36D0(1, gTrainerBattleOpponent_A);
|
||||
CopyFrontierTrainerText(FRONTIER_WIN_TEXT, gTrainerBattleOpponent_A);
|
||||
toCpy = gStringVar4;
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_x4000000)
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_TRAINER_HILL)
|
||||
{
|
||||
sub_81D572C(3, gTrainerBattleOpponent_A);
|
||||
CopyTrainerHillTrainerText(3, gTrainerBattleOpponent_A);
|
||||
toCpy = gStringVar4;
|
||||
}
|
||||
break;
|
||||
@ -2655,8 +2655,8 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
|
||||
case B_TXT_TRAINER2_CLASS:
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER)
|
||||
toCpy = gTrainerClassNames[GetFrontierOpponentClass(gTrainerBattleOpponent_B)];
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_x4000000)
|
||||
toCpy = gTrainerClassNames[sub_81D5530(gTrainerBattleOpponent_B)];
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_TRAINER_HILL)
|
||||
toCpy = gTrainerClassNames[GetTrainerHillOpponentClass(gTrainerBattleOpponent_B)];
|
||||
else
|
||||
toCpy = gTrainerClassNames[gTrainers[gTrainerBattleOpponent_B].trainerClass];
|
||||
break;
|
||||
@ -2666,9 +2666,9 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
|
||||
GetFrontierTrainerName(text, gTrainerBattleOpponent_B);
|
||||
toCpy = text;
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_x4000000)
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_TRAINER_HILL)
|
||||
{
|
||||
sub_81D5554(text, gTrainerBattleOpponent_B);
|
||||
GetTrainerHillTrainerName(text, gTrainerBattleOpponent_B);
|
||||
toCpy = text;
|
||||
}
|
||||
else
|
||||
@ -2679,12 +2679,12 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
|
||||
case B_TXT_TRAINER2_LOSE_TEXT:
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER)
|
||||
{
|
||||
sub_81A36D0(2, gTrainerBattleOpponent_B);
|
||||
CopyFrontierTrainerText(FRONTIER_LOSE_TEXT, gTrainerBattleOpponent_B);
|
||||
toCpy = gStringVar4;
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_x4000000)
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_TRAINER_HILL)
|
||||
{
|
||||
sub_81D572C(4, gTrainerBattleOpponent_B);
|
||||
CopyTrainerHillTrainerText(4, gTrainerBattleOpponent_B);
|
||||
toCpy = gStringVar4;
|
||||
}
|
||||
else
|
||||
@ -2695,12 +2695,12 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
|
||||
case B_TXT_TRAINER2_WIN_TEXT:
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER)
|
||||
{
|
||||
sub_81A36D0(1, gTrainerBattleOpponent_B);
|
||||
CopyFrontierTrainerText(FRONTIER_WIN_TEXT, gTrainerBattleOpponent_B);
|
||||
toCpy = gStringVar4;
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_x4000000)
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_TRAINER_HILL)
|
||||
{
|
||||
sub_81D572C(3, gTrainerBattleOpponent_B);
|
||||
CopyTrainerHillTrainerText(3, gTrainerBattleOpponent_B);
|
||||
toCpy = gStringVar4;
|
||||
}
|
||||
break;
|
||||
|
@ -2739,7 +2739,7 @@ void SetMoveEffect(bool8 primary, u8 certain)
|
||||
break;
|
||||
case MOVE_EFFECT_STEAL_ITEM:
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x4000000)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_TRAINER_HILL)
|
||||
{
|
||||
gBattlescriptCurrInstr++;
|
||||
break;
|
||||
@ -3268,7 +3268,7 @@ static void atk23_getexp(void)
|
||||
if (GetBattlerSide(gBattlerFainted) != B_SIDE_OPPONENT || (gBattleTypeFlags &
|
||||
(BATTLE_TYPE_LINK
|
||||
| BATTLE_TYPE_x2000000
|
||||
| BATTLE_TYPE_x4000000
|
||||
| BATTLE_TYPE_TRAINER_HILL
|
||||
| BATTLE_TYPE_FRONTIER
|
||||
| BATTLE_TYPE_SAFARI
|
||||
| BATTLE_TYPE_BATTLE_TOWER
|
||||
@ -4987,7 +4987,7 @@ static void atk4E_switchinanim(void)
|
||||
&& !(gBattleTypeFlags & (BATTLE_TYPE_LINK
|
||||
| BATTLE_TYPE_EREADER_TRAINER
|
||||
| BATTLE_TYPE_x2000000
|
||||
| BATTLE_TYPE_x4000000
|
||||
| BATTLE_TYPE_TRAINER_HILL
|
||||
| BATTLE_TYPE_FRONTIER)))
|
||||
HandleSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBattler].species), FLAG_SET_SEEN, gBattleMons[gActiveBattler].personality);
|
||||
|
||||
@ -9405,7 +9405,7 @@ static void atkD1_trysethelpinghand(void)
|
||||
static void atkD2_tryswapitems(void) // trick
|
||||
{
|
||||
// opponent can't swap items with player in regular battles
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x4000000
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_TRAINER_HILL
|
||||
|| (GetBattlerSide(gBattlerAttacker) == B_SIDE_OPPONENT
|
||||
&& !(gBattleTypeFlags & (BATTLE_TYPE_LINK
|
||||
| BATTLE_TYPE_EREADER_TRAINER
|
||||
|
@ -75,7 +75,7 @@ extern void sub_81D6384(void);
|
||||
extern void sub_81D61E8(void);
|
||||
extern void sub_80982B8(void);
|
||||
extern void sub_81A9EDC(u16 a0);
|
||||
extern void sub_81D572C(u8 a0, u16 arg1);
|
||||
extern void CopyTrainerHillTrainerText(u8 a0, u16 arg1);
|
||||
|
||||
// this file's functions
|
||||
static void DoBattlePikeWildBattle(void);
|
||||
@ -1281,7 +1281,7 @@ void BattleSetup_StartTrainerBattle(void)
|
||||
}
|
||||
else if (sub_81D5C18())
|
||||
{
|
||||
gBattleTypeFlags |= BATTLE_TYPE_x4000000;
|
||||
gBattleTypeFlags |= BATTLE_TYPE_TRAINER_HILL;
|
||||
|
||||
if (gNoOfApproachingTrainers == 2)
|
||||
sub_81D639C();
|
||||
@ -1370,9 +1370,9 @@ void ShowTrainerIntroSpeech(void)
|
||||
else if (sub_81D5C18())
|
||||
{
|
||||
if (gNoOfApproachingTrainers == 0 || gNoOfApproachingTrainers == 1)
|
||||
sub_81D572C(2, sub_81D6180(gSpecialVar_LastTalked));
|
||||
CopyTrainerHillTrainerText(2, sub_81D6180(gSpecialVar_LastTalked));
|
||||
else
|
||||
sub_81D572C(2, sub_81D6180(gEventObjects[gApproachingTrainers[gApproachingTrainerId].eventObjectId].localId));
|
||||
CopyTrainerHillTrainerText(2, sub_81D6180(gEventObjects[gApproachingTrainers[gApproachingTrainerId].eventObjectId].localId));
|
||||
|
||||
sub_80982B8();
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ void AllocateBattleResources(void)
|
||||
{
|
||||
gBattleResources = gBattleResources; // something dumb needed to match
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x4000000)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_TRAINER_HILL)
|
||||
sub_81D55D0();
|
||||
|
||||
gBattleStruct = AllocZeroed(sizeof(*gBattleStruct));
|
||||
@ -49,7 +49,7 @@ void AllocateBattleResources(void)
|
||||
|
||||
void FreeBattleResources(void)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x4000000)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_TRAINER_HILL)
|
||||
sub_81D5694();
|
||||
|
||||
if (gBattleResources != NULL)
|
||||
|
@ -643,11 +643,11 @@ const u8 gBattleAnimSpritePalette_187[] = INCBIN_U8("graphics/battle_anims/sprit
|
||||
const u8 gBattleAnimSpriteSheet_186[] = INCBIN_U8("graphics/battle_anims/sprites/186.4bpp.lz");
|
||||
const u8 gBattleAnimSpritePalette_186[] = INCBIN_U8("graphics/battle_anims/sprites/186.gbapal.lz");
|
||||
|
||||
const u8 gUnknown_08C1F1C8[] = INCBIN_U8("graphics/battle_interface/window.4bpp.lz");
|
||||
const u8 gUnknown_08C1F46C[] = INCBIN_U8("graphics/battle_interface/window2.4bpp.lz");
|
||||
const u8 gUnknown_08C1F5E8[] = INCBIN_U8( "graphics/battle_interface/window3.4bpp.lz");
|
||||
const u8 gUnknown_08C1F76C[] = INCBIN_U8("graphics/battle_interface/window4.4bpp.lz");
|
||||
const u8 gUnknown_08C1F8E8[] = INCBIN_U8("graphics/battle_interface/window5.4bpp.lz");
|
||||
const u8 gHealthboxSinglesPlayerGfx[] = INCBIN_U8("graphics/battle_interface/healthbox_singles_player.4bpp.lz");
|
||||
const u8 gHealthboxSinglesOpponentGfx[] = INCBIN_U8("graphics/battle_interface/healthbox_singles_opponent.4bpp.lz");
|
||||
const u8 gHealthboxDoublesPlayerGfx[] = INCBIN_U8( "graphics/battle_interface/healthbox_doubles_player.4bpp.lz");
|
||||
const u8 gHealthboxDoublesOpponentGfx[] = INCBIN_U8("graphics/battle_interface/healthbox_doubles_opponent.4bpp.lz");
|
||||
const u8 gHealthboxSafariGfx[] = INCBIN_U8("graphics/battle_interface/healthbox_safari.4bpp.lz");
|
||||
|
||||
const u8 gUnusedGfx_Shadow[] = INCBIN_U8("graphics/unused/shadow.4bpp.lz");
|
||||
const u8 gUnusedPal_Shadow[] = INCBIN_U8("graphics/unused/shadow.gbapal.lz");
|
||||
|
@ -5307,7 +5307,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
||||
// I have to re-use this variable to match.
|
||||
r5 = gActiveBattler;
|
||||
gActiveBattler = battlerId;
|
||||
BtlController_EmitGetMonData(0, 0, 0);
|
||||
BtlController_EmitGetMonData(0, REQUEST_ALL_BATTLE, 0);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
gActiveBattler = r5;
|
||||
}
|
||||
@ -6621,7 +6621,7 @@ u16 GetBattleBGM(void)
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER)
|
||||
trainerClass = GetFrontierOpponentClass(gTrainerBattleOpponent_A);
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_x4000000)
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_TRAINER_HILL)
|
||||
trainerClass = TRAINER_CLASS_EXPERT;
|
||||
else
|
||||
trainerClass = gTrainers[gTrainerBattleOpponent_A].trainerClass;
|
||||
|
@ -19,7 +19,7 @@
|
||||
#define ILLEGAL_BATTLE_TYPES ((BATTLE_TYPE_LINK | BATTLE_TYPE_SAFARI | BATTLE_TYPE_FIRST_BATTLE \
|
||||
| BATTLE_TYPE_WALLY_TUTORIAL | BATTLE_TYPE_ROAMER | BATTLE_TYPE_EREADER_TRAINER \
|
||||
| BATTLE_TYPE_KYOGRE_GROUDON | BATTLE_TYPE_LEGENDARY | BATTLE_TYPE_REGI \
|
||||
| BATTLE_TYPE_RECORDED | BATTLE_TYPE_x4000000 | BATTLE_TYPE_SECRET_BASE \
|
||||
| BATTLE_TYPE_RECORDED | BATTLE_TYPE_TRAINER_HILL | BATTLE_TYPE_SECRET_BASE \
|
||||
| BATTLE_TYPE_GROUDON | BATTLE_TYPE_KYOGRE | BATTLE_TYPE_RAYQUAZA))
|
||||
|
||||
extern u8 gUnknown_03001278;
|
||||
@ -273,7 +273,7 @@ void sub_81851A8(u8 *arg0)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_WILD))
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_IS_MASTER))
|
||||
{
|
||||
for (var2 = *arg0; var2 != 0;)
|
||||
{
|
||||
@ -360,7 +360,7 @@ u32 MoveRecordedBattleToSaveData(void)
|
||||
battleSave->battleFlags = (sBattleFlags & ~(BATTLE_TYPE_LINK | BATTLE_TYPE_20));
|
||||
battleSave->battleFlags |= BATTLE_TYPE_x2000000;
|
||||
|
||||
if (sBattleFlags & BATTLE_TYPE_WILD)
|
||||
if (sBattleFlags & BATTLE_TYPE_IS_MASTER)
|
||||
{
|
||||
battleSave->battleFlags |= BATTLE_TYPE_x80000000;
|
||||
}
|
||||
|