mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Document some not labeled battle things
This commit is contained in:
parent
25e469b664
commit
e4b7ba0977
12
charmap.txt
12
charmap.txt
@ -360,7 +360,7 @@ B_ATK_NAME_WITH_PREFIX_MON1 = FD 0D
|
|||||||
B_ATK_PARTNER_NAME = FD 0E
|
B_ATK_PARTNER_NAME = FD 0E
|
||||||
B_ATK_NAME_WITH_PREFIX = FD 0F
|
B_ATK_NAME_WITH_PREFIX = FD 0F
|
||||||
B_DEF_NAME_WITH_PREFIX = FD 10
|
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_ACTIVE_NAME_WITH_PREFIX = FD 12
|
||||||
B_SCR_ACTIVE_NAME_WITH_PREFIX = FD 13
|
B_SCR_ACTIVE_NAME_WITH_PREFIX = FD 13
|
||||||
B_CURRENT_MOVE = FD 14
|
B_CURRENT_MOVE = FD 14
|
||||||
@ -373,11 +373,11 @@ B_SCR_ACTIVE_ABILITY = FD 1A
|
|||||||
B_EFF_ABILITY = FD 1B
|
B_EFF_ABILITY = FD 1B
|
||||||
B_TRAINER1_CLASS = FD 1C
|
B_TRAINER1_CLASS = FD 1C
|
||||||
B_TRAINER1_NAME = FD 1D
|
B_TRAINER1_NAME = FD 1D
|
||||||
B_1E = FD 1E @ trainer name for a link player
|
B_LINK_PLAYER_NAME = FD 1E
|
||||||
B_1F = FD 1F @ trainer name for a link player
|
B_LINK_PARTNER_NAME = FD 1F
|
||||||
B_20 = FD 20 @ trainer name for a link player
|
B_LINK_OPPONENT1_NAME = FD 20
|
||||||
B_21 = FD 21 @ trainer name for a link player
|
B_LINK_OPPONENT2_NAME = FD 21
|
||||||
B_22 = FD 22 @ trainer name for a link player
|
B_LINK_SCR_TRAINER_NAME = FD 22
|
||||||
B_PLAYER_NAME = FD 23
|
B_PLAYER_NAME = FD 23
|
||||||
B_TRAINER1_LOSE_TEXT = FD 24
|
B_TRAINER1_LOSE_TEXT = FD 24
|
||||||
B_TRAINER1_WIN_TEXT = FD 25
|
B_TRAINER1_WIN_TEXT = FD 25
|
||||||
|
@ -34,11 +34,11 @@
|
|||||||
#define B_TXT_EFF_ABILITY 0x1B
|
#define B_TXT_EFF_ABILITY 0x1B
|
||||||
#define B_TXT_TRAINER1_CLASS 0x1C
|
#define B_TXT_TRAINER1_CLASS 0x1C
|
||||||
#define B_TXT_TRAINER1_NAME 0x1D
|
#define B_TXT_TRAINER1_NAME 0x1D
|
||||||
#define B_TXT_1E 0x1E // trainer name for a link player
|
#define B_TXT_LINK_PLAYER_NAME 0x1E
|
||||||
#define B_TXT_1F 0x1F // trainer name for a link player
|
#define B_TXT_LINK_PARTNER_NAME 0x1F
|
||||||
#define B_TXT_20 0x20 // trainer name for a link player
|
#define B_TXT_LINK_OPPONENT1_NAME 0x20
|
||||||
#define B_TXT_21 0x21 // trainer name for a link player
|
#define B_TXT_LINK_OPPONENT2_NAME 0x21
|
||||||
#define B_TXT_22 0x22 // trainer name for a link player
|
#define B_TXT_LINK_SCR_TRAINER_NAME 0x22
|
||||||
#define B_TXT_PLAYER_NAME 0x23
|
#define B_TXT_PLAYER_NAME 0x23
|
||||||
#define B_TXT_TRAINER1_LOSE_TEXT 0x24
|
#define B_TXT_TRAINER1_LOSE_TEXT 0x24
|
||||||
#define B_TXT_TRAINER1_WIN_TEXT 0x25
|
#define B_TXT_TRAINER1_WIN_TEXT 0x25
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
// Battle Type Flags
|
// Battle Type Flags
|
||||||
#define BATTLE_TYPE_DOUBLE 0x0001
|
#define BATTLE_TYPE_DOUBLE 0x0001
|
||||||
#define BATTLE_TYPE_LINK 0x0002
|
#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_TRAINER 0x0008
|
||||||
#define BATTLE_TYPE_FIRST_BATTLE 0x0010
|
#define BATTLE_TYPE_FIRST_BATTLE 0x0010
|
||||||
#define BATTLE_TYPE_20 0x0020
|
#define BATTLE_TYPE_20 0x0020
|
||||||
|
@ -1998,7 +1998,7 @@ static void OpponentHandleResetActionMoveSelection(void)
|
|||||||
|
|
||||||
static void OpponentHandleCmd55(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.inBattle = 0;
|
||||||
gMain.callback1 = gPreBattleCallback1;
|
gMain.callback1 = gPreBattleCallback1;
|
||||||
|
@ -687,7 +687,7 @@ static void SafariHandleCmd55(void)
|
|||||||
FadeOutMapMusic(5);
|
FadeOutMapMusic(5);
|
||||||
BeginFastPaletteFade(3);
|
BeginFastPaletteFade(3);
|
||||||
SafariBufferExecCompleted();
|
SafariBufferExecCompleted();
|
||||||
if ((gBattleTypeFlags & BATTLE_TYPE_LINK) && !(gBattleTypeFlags & BATTLE_TYPE_WILD))
|
if ((gBattleTypeFlags & BATTLE_TYPE_LINK) && !(gBattleTypeFlags & BATTLE_TYPE_IS_MASTER))
|
||||||
gBattlerControllerFuncs[gActiveBattler] = sub_81595E4;
|
gBattlerControllerFuncs[gActiveBattler] = sub_81595E4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1560,7 +1560,7 @@ static void WallyHandleCmd55(void)
|
|||||||
BeginFastPaletteFade(3);
|
BeginFastPaletteFade(3);
|
||||||
WallyBufferExecCompleted();
|
WallyBufferExecCompleted();
|
||||||
|
|
||||||
if (!(gBattleTypeFlags & BATTLE_TYPE_WILD) && gBattleTypeFlags & BATTLE_TYPE_LINK)
|
if (!(gBattleTypeFlags & BATTLE_TYPE_IS_MASTER) && gBattleTypeFlags & BATTLE_TYPE_LINK)
|
||||||
gBattlerControllerFuncs[gActiveBattler] = sub_80587B0;
|
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;
|
gBattlerControllerFuncs[0] = SetControllerToRecordedPlayer;
|
||||||
gBattlerPositions[0] = B_POSITION_PLAYER_LEFT;
|
gBattlerPositions[0] = B_POSITION_PLAYER_LEFT;
|
||||||
@ -391,7 +391,7 @@ static void InitLinkBtlControllers(void)
|
|||||||
|
|
||||||
if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE))
|
if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE))
|
||||||
{
|
{
|
||||||
if (gBattleTypeFlags & BATTLE_TYPE_WILD)
|
if (gBattleTypeFlags & BATTLE_TYPE_IS_MASTER)
|
||||||
{
|
{
|
||||||
gBattleMainFunc = BeginBattleIntro;
|
gBattleMainFunc = BeginBattleIntro;
|
||||||
|
|
||||||
@ -416,7 +416,7 @@ static void InitLinkBtlControllers(void)
|
|||||||
}
|
}
|
||||||
else if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI) && gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
|
else if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI) && gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
|
||||||
{
|
{
|
||||||
if (gBattleTypeFlags & BATTLE_TYPE_WILD)
|
if (gBattleTypeFlags & BATTLE_TYPE_IS_MASTER)
|
||||||
{
|
{
|
||||||
gBattleMainFunc = BeginBattleIntro;
|
gBattleMainFunc = BeginBattleIntro;
|
||||||
|
|
||||||
@ -453,7 +453,7 @@ static void InitLinkBtlControllers(void)
|
|||||||
}
|
}
|
||||||
else if (gBattleTypeFlags & BATTLE_TYPE_BATTLE_TOWER)
|
else if (gBattleTypeFlags & BATTLE_TYPE_BATTLE_TOWER)
|
||||||
{
|
{
|
||||||
if (gBattleTypeFlags & BATTLE_TYPE_WILD)
|
if (gBattleTypeFlags & BATTLE_TYPE_IS_MASTER)
|
||||||
{
|
{
|
||||||
gBattleMainFunc = BeginBattleIntro;
|
gBattleMainFunc = BeginBattleIntro;
|
||||||
|
|
||||||
@ -501,7 +501,7 @@ static void InitLinkBtlControllers(void)
|
|||||||
{
|
{
|
||||||
multiplayerId = GetMultiplayerId();
|
multiplayerId = GetMultiplayerId();
|
||||||
|
|
||||||
if (gBattleTypeFlags & BATTLE_TYPE_WILD)
|
if (gBattleTypeFlags & BATTLE_TYPE_IS_MASTER)
|
||||||
gBattleMainFunc = BeginBattleIntro;
|
gBattleMainFunc = BeginBattleIntro;
|
||||||
|
|
||||||
for (i = 0; i < MAX_BATTLERS_COUNT; i++)
|
for (i = 0; i < MAX_BATTLERS_COUNT; i++)
|
||||||
@ -700,14 +700,14 @@ static void CreateTasksForSendRecvLinkBuffers(void)
|
|||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
LINK_BUFF_BUFFER_ID,
|
LINK_BUFF_BUFFER_ID,
|
||||||
LINK_BUFF_ACTIVE_BANK,
|
LINK_BUFF_ACTIVE_BATTLER,
|
||||||
LINK_BUFF_ATTACKER,
|
LINK_BUFF_ATTACKER,
|
||||||
LINK_BUFF_TARGET,
|
LINK_BUFF_TARGET,
|
||||||
LINK_BUFF_SIZE_LO,
|
LINK_BUFF_SIZE_LO,
|
||||||
LINK_BUFF_SIZE_HI,
|
LINK_BUFF_SIZE_HI,
|
||||||
LINK_BUFF_ABSENT_BANK_FLAGS,
|
LINK_BUFF_ABSENT_BATTLER_FLAGS,
|
||||||
LINK_BUFF_EFFECT_BANK,
|
LINK_BUFF_EFFECT_BATTLER,
|
||||||
LINK_BUFF_DATA
|
LINK_BUFF_DATA,
|
||||||
};
|
};
|
||||||
|
|
||||||
void PrepareBufferDataTransferLink(u8 bufferId, u16 size, u8 *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;
|
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_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_ATTACKER] = gBattlerAttacker;
|
||||||
gLinkBattleSendBuffer[gTasks[gUnknown_02022D08].data[14] + LINK_BUFF_TARGET] = gBattlerTarget;
|
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_LO] = alignedSize;
|
||||||
gLinkBattleSendBuffer[gTasks[gUnknown_02022D08].data[14] + LINK_BUFF_SIZE_HI] = (alignedSize & 0x0000FF00) >> 8;
|
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_ABSENT_BATTLER_FLAGS] = gAbsentBattlerFlags;
|
||||||
gLinkBattleSendBuffer[gTasks[gUnknown_02022D08].data[14] + LINK_BUFF_EFFECT_BANK] = gEffectBattler;
|
gLinkBattleSendBuffer[gTasks[gUnknown_02022D08].data[14] + LINK_BUFF_EFFECT_BATTLER] = gEffectBattler;
|
||||||
|
|
||||||
for (i = 0; i < size; i++)
|
for (i = 0; i < size; i++)
|
||||||
gLinkBattleSendBuffer[gTasks[gUnknown_02022D08].data[14] + LINK_BUFF_DATA + i] = data[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[12] = 0;
|
||||||
gTasks[taskId].data[15] = 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);
|
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])
|
switch (gLinkBattleRecvBuffer[gTasks[taskId].data[15] + 0])
|
||||||
@ -886,19 +886,19 @@ static void Task_HandleCopyReceivedLinkBuffersData(u8 taskId)
|
|||||||
if (gBattleControllerExecFlags & gBitTable[battlerId])
|
if (gBattleControllerExecFlags & gBitTable[battlerId])
|
||||||
return;
|
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);
|
sub_803F850(battlerId);
|
||||||
|
|
||||||
if (!(gBattleTypeFlags & BATTLE_TYPE_WILD))
|
if (!(gBattleTypeFlags & BATTLE_TYPE_IS_MASTER))
|
||||||
{
|
{
|
||||||
gBattlerAttacker = gLinkBattleRecvBuffer[gTasks[taskId].data[15] + 2];
|
gBattlerAttacker = gLinkBattleRecvBuffer[gTasks[taskId].data[15] + LINK_BUFF_ATTACKER];
|
||||||
gBattlerTarget = gLinkBattleRecvBuffer[gTasks[taskId].data[15] + 3];
|
gBattlerTarget = gLinkBattleRecvBuffer[gTasks[taskId].data[15] + LINK_BUFF_TARGET];
|
||||||
gAbsentBattlerFlags = gLinkBattleRecvBuffer[gTasks[taskId].data[15] + 6];
|
gAbsentBattlerFlags = gLinkBattleRecvBuffer[gTasks[taskId].data[15] + LINK_BUFF_ABSENT_BATTLER_FLAGS];
|
||||||
gEffectBattler = gLinkBattleRecvBuffer[gTasks[taskId].data[15] + 7];
|
gEffectBattler = gLinkBattleRecvBuffer[gTasks[taskId].data[15] + LINK_BUFF_EFFECT_BATTLER];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
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;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
var = gLinkBattleRecvBuffer[gTasks[taskId].data[15] + LINK_BUFF_DATA];
|
var = gLinkBattleRecvBuffer[gTasks[taskId].data[15] + LINK_BUFF_DATA];
|
||||||
|
@ -877,7 +877,7 @@ static void sub_8036EB8(u8 arg0, u8 arg1)
|
|||||||
if (gBlockRecvBuffer[0][0] == 256)
|
if (gBlockRecvBuffer[0][0] == 256)
|
||||||
{
|
{
|
||||||
if (arg1 == 0)
|
if (arg1 == 0)
|
||||||
gBattleTypeFlags |= BATTLE_TYPE_WILD | BATTLE_TYPE_TRAINER;
|
gBattleTypeFlags |= BATTLE_TYPE_IS_MASTER | BATTLE_TYPE_TRAINER;
|
||||||
else
|
else
|
||||||
gBattleTypeFlags |= BATTLE_TYPE_TRAINER;
|
gBattleTypeFlags |= BATTLE_TYPE_TRAINER;
|
||||||
var++;
|
var++;
|
||||||
@ -896,7 +896,7 @@ static void sub_8036EB8(u8 arg0, u8 arg1)
|
|||||||
if (i == arg0)
|
if (i == arg0)
|
||||||
{
|
{
|
||||||
if (arg1 == 0)
|
if (arg1 == 0)
|
||||||
gBattleTypeFlags |= BATTLE_TYPE_WILD | BATTLE_TYPE_TRAINER;
|
gBattleTypeFlags |= BATTLE_TYPE_IS_MASTER | BATTLE_TYPE_TRAINER;
|
||||||
else
|
else
|
||||||
gBattleTypeFlags |= BATTLE_TYPE_TRAINER;
|
gBattleTypeFlags |= BATTLE_TYPE_TRAINER;
|
||||||
var++;
|
var++;
|
||||||
@ -916,7 +916,7 @@ static void sub_8036EB8(u8 arg0, u8 arg1)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (i == arg0)
|
if (i == arg0)
|
||||||
gBattleTypeFlags |= BATTLE_TYPE_WILD | BATTLE_TYPE_TRAINER;
|
gBattleTypeFlags |= BATTLE_TYPE_IS_MASTER | BATTLE_TYPE_TRAINER;
|
||||||
else
|
else
|
||||||
gBattleTypeFlags |= BATTLE_TYPE_TRAINER;
|
gBattleTypeFlags |= BATTLE_TYPE_TRAINER;
|
||||||
}
|
}
|
||||||
@ -979,7 +979,7 @@ static void CB2_HandleStartBattle(void)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED))
|
if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED))
|
||||||
gBattleTypeFlags |= BATTLE_TYPE_WILD;
|
gBattleTypeFlags |= BATTLE_TYPE_IS_MASTER;
|
||||||
gBattleCommunication[MULTIUSE_STATE] = 15;
|
gBattleCommunication[MULTIUSE_STATE] = 15;
|
||||||
SetAllPlayersBerryData();
|
SetAllPlayersBerryData();
|
||||||
}
|
}
|
||||||
@ -1087,7 +1087,7 @@ static void CB2_HandleStartBattle(void)
|
|||||||
if ((GetBlockReceivedStatus() & 3) == 3)
|
if ((GetBlockReceivedStatus() & 3) == 3)
|
||||||
{
|
{
|
||||||
ResetBlockReceivedFlags();
|
ResetBlockReceivedFlags();
|
||||||
if (!(gBattleTypeFlags & BATTLE_TYPE_WILD))
|
if (!(gBattleTypeFlags & BATTLE_TYPE_IS_MASTER))
|
||||||
memcpy(&gRecordedBattleRngSeed, gBlockRecvBuffer[enemyMultiplayerId], sizeof(gRecordedBattleRngSeed));
|
memcpy(&gRecordedBattleRngSeed, gBlockRecvBuffer[enemyMultiplayerId], sizeof(gRecordedBattleRngSeed));
|
||||||
gBattleCommunication[MULTIUSE_STATE]++;
|
gBattleCommunication[MULTIUSE_STATE]++;
|
||||||
}
|
}
|
||||||
@ -1181,7 +1181,7 @@ static void CB2_HandleStartMultiPartnerBattle(void)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED))
|
if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED))
|
||||||
gBattleTypeFlags |= BATTLE_TYPE_WILD;
|
gBattleTypeFlags |= BATTLE_TYPE_IS_MASTER;
|
||||||
gBattleCommunication[MULTIUSE_STATE] = 13;
|
gBattleCommunication[MULTIUSE_STATE] = 13;
|
||||||
SetAllPlayersBerryData();
|
SetAllPlayersBerryData();
|
||||||
}
|
}
|
||||||
@ -1340,7 +1340,7 @@ static void CB2_HandleStartMultiPartnerBattle(void)
|
|||||||
if ((GetBlockReceivedStatus() & 3) == 3)
|
if ((GetBlockReceivedStatus() & 3) == 3)
|
||||||
{
|
{
|
||||||
ResetBlockReceivedFlags();
|
ResetBlockReceivedFlags();
|
||||||
if (!(gBattleTypeFlags & BATTLE_TYPE_WILD))
|
if (!(gBattleTypeFlags & BATTLE_TYPE_IS_MASTER))
|
||||||
memcpy(&gRecordedBattleRngSeed, gBlockRecvBuffer[enemyMultiplayerId], sizeof(gRecordedBattleRngSeed));
|
memcpy(&gRecordedBattleRngSeed, gBlockRecvBuffer[enemyMultiplayerId], sizeof(gRecordedBattleRngSeed));
|
||||||
gBattleCommunication[MULTIUSE_STATE]++;
|
gBattleCommunication[MULTIUSE_STATE]++;
|
||||||
}
|
}
|
||||||
@ -1568,7 +1568,7 @@ static void CB2_HandleStartMultiBattle(void)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED))
|
if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED))
|
||||||
gBattleTypeFlags |= BATTLE_TYPE_WILD;
|
gBattleTypeFlags |= BATTLE_TYPE_IS_MASTER;
|
||||||
gBattleCommunication[MULTIUSE_STATE] = 7;
|
gBattleCommunication[MULTIUSE_STATE] = 7;
|
||||||
SetAllPlayersBerryData();
|
SetAllPlayersBerryData();
|
||||||
}
|
}
|
||||||
@ -3302,7 +3302,7 @@ static void BattleIntroGetMonsData(void)
|
|||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
gActiveBattler = gBattleCommunication[1];
|
gActiveBattler = gBattleCommunication[1];
|
||||||
BtlController_EmitGetMonData(0, 0, 0);
|
BtlController_EmitGetMonData(0, REQUEST_ALL_BATTLE, 0);
|
||||||
MarkBattlerForControllerExec(gActiveBattler);
|
MarkBattlerForControllerExec(gActiveBattler);
|
||||||
gBattleCommunication[MULTIUSE_STATE]++;
|
gBattleCommunication[MULTIUSE_STATE]++;
|
||||||
break;
|
break;
|
||||||
|
@ -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_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_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_WildPkmnFled[] = _("{PLAY_SE 0x0011}Wild {B_BUFF1} fled!");
|
||||||
static const u8 sText_PlayerDefeatedLinkTrainer[] = _("Player defeated\n{B_20}!");
|
static const u8 sText_PlayerDefeatedLinkTrainer[] = _("Player defeated\n{B_LINK_OPPONENT1_NAME}!");
|
||||||
static const u8 sText_TwoLinkTrainersDefeated[] = _("Player beat {B_20}\nand {B_21}!");
|
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_20}!");
|
static const u8 sText_PlayerLostAgainstLinkTrainer[] = _("Player lost against\n{B_LINK_OPPONENT1_NAME}!");
|
||||||
static const u8 sText_PlayerLostToTwo[] = _("Player lost to {B_20}\nand {B_21}!");
|
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_20}!");
|
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_20} and {B_21}!");
|
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_20} fled!");
|
static const u8 sText_WildFled[] = _("{PLAY_SE 0x0011}{B_LINK_OPPONENT1_NAME} fled!");
|
||||||
static const u8 sText_TwoWildFled[] = _("{PLAY_SE 0x0011}{B_20} and\n{B_21} 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_NoRunningFromTrainers[] = _("No! There’s no running\nfrom a TRAINER battle!\p");
|
||||||
static const u8 sText_CantEscape[] = _("Can’t escape!\p");
|
static const u8 sText_CantEscape[] = _("Can’t escape!\p");
|
||||||
static const u8 sText_DontLeaveBirch[] = _("PROF. BIRCH: Don’t leave me like this!\p");
|
static const u8 sText_DontLeaveBirch[] = _("PROF. BIRCH: Don’t leave me like this!\p");
|
||||||
@ -398,30 +398,30 @@ 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_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_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_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_LinkTrainerWantsToBattle[] = _("{B_LINK_OPPONENT1_NAME}\nwants to battle!");
|
||||||
static const u8 sText_TwoLinkTrainersWantToBattle[] = _("{B_20} and {B_21}\nwant 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_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_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_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_LinkTrainerSentOutPkmn[] = _("{B_LINK_OPPONENT1_NAME} 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_LinkTrainerSentOutTwoPkmn[] = _("{B_LINK_OPPONENT1_NAME} 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_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_20} sent out\n{B_BUFF1}!");
|
static const u8 sText_LinkTrainerSentOutPkmn2[] = _("{B_LINK_OPPONENT1_NAME} sent out\n{B_BUFF1}!");
|
||||||
static const u8 sText_LinkTrainerMultiSentOutPkmn[] = _("{B_22} 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_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_GoTwoPkmn[] = _("Go! {B_PLAYER_MON1_NAME} and\n{B_PLAYER_MON2_NAME}!");
|
||||||
static const u8 sText_GoPkmn2[] = _("Go! {B_BUFF1}!");
|
static const u8 sText_GoPkmn2[] = _("Go! {B_BUFF1}!");
|
||||||
static const u8 sText_DoItPkmn[] = _("Do it! {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_GoForItPkmn[] = _("Go for it, {B_BUFF1}!");
|
||||||
static const u8 sText_YourFoesWeakGetEmPkmn[] = _("Your foe’s weak!\nGet ’em, {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_PkmnThatsEnough[] = _("{B_BUFF1}, that’s enough!\nCome back!");
|
||||||
static const u8 sText_PkmnComeBack[] = _("{B_BUFF1}, come back!");
|
static const u8 sText_PkmnComeBack[] = _("{B_BUFF1}, come back!");
|
||||||
static const u8 sText_PkmnOkComeBack[] = _("{B_BUFF1}, OK!\nCome 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_PkmnGoodComeBack[] = _("{B_BUFF1}, good!\nCome back!");
|
||||||
static const u8 sText_Trainer1WithdrewPkmn[] = _("{B_TRAINER1_CLASS} {B_TRAINER1_NAME}\nwithdrew {B_BUFF1}!");
|
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_LinkTrainer1WithdrewPkmn[] = _("{B_LINK_OPPONENT1_NAME} withdrew\n{B_BUFF1}!");
|
||||||
static const u8 sText_LinkTrainer2WithdrewPkmn[] = _("{B_22} 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_WildPkmnPrefix[] = _("Wild ");
|
||||||
static const u8 sText_FoePkmnPrefix[] = _("Foe ");
|
static const u8 sText_FoePkmnPrefix[] = _("Foe ");
|
||||||
static const u8 sText_EmptyString8[] = _("");
|
static const u8 sText_EmptyString8[] = _("");
|
||||||
@ -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}!");
|
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_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.");
|
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_LinkTrainerWantsToBattlePause[] = _("{B_LINK_OPPONENT1_NAME}\nwants to battle!{PAUSE 49}");
|
||||||
static const u8 sText_TwoLinkTrainersWantToBattlePause[] = _("{B_20} and {B_21}\nwant 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
|
// 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.
|
// 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?
|
u32 dstID = 0; // if they used dstID, why not use srcID as well?
|
||||||
const u8 *toCpy = NULL;
|
const u8 *toCpy = NULL;
|
||||||
u8 text[30];
|
u8 text[30];
|
||||||
u8 multiplayerID;
|
u8 multiplayerId;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
if (gBattleTypeFlags & BATTLE_TYPE_x2000000)
|
if (gBattleTypeFlags & BATTLE_TYPE_x2000000)
|
||||||
multiplayerID = gUnknown_0203C7B4;
|
multiplayerId = gUnknown_0203C7B4;
|
||||||
else
|
else
|
||||||
multiplayerID = GetMultiplayerId();
|
multiplayerId = GetMultiplayerId();
|
||||||
|
|
||||||
while (*src != EOS)
|
while (*src != EOS)
|
||||||
{
|
{
|
||||||
@ -2383,25 +2383,25 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
|
|||||||
toCpy = text;
|
toCpy = text;
|
||||||
break;
|
break;
|
||||||
case B_TXT_LINK_PLAYER_MON1_NAME: // link first player poke name
|
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);
|
MON_DATA_NICKNAME, text);
|
||||||
StringGetEnd10(text);
|
StringGetEnd10(text);
|
||||||
toCpy = text;
|
toCpy = text;
|
||||||
break;
|
break;
|
||||||
case B_TXT_LINK_OPPONENT_MON1_NAME: // link first opponent poke name
|
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);
|
MON_DATA_NICKNAME, text);
|
||||||
StringGetEnd10(text);
|
StringGetEnd10(text);
|
||||||
toCpy = text;
|
toCpy = text;
|
||||||
break;
|
break;
|
||||||
case B_TXT_LINK_PLAYER_MON2_NAME: // link second player poke name
|
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);
|
MON_DATA_NICKNAME, text);
|
||||||
StringGetEnd10(text);
|
StringGetEnd10(text);
|
||||||
toCpy = text;
|
toCpy = text;
|
||||||
break;
|
break;
|
||||||
case B_TXT_LINK_OPPONENT_MON2_NAME: // link second opponent poke name
|
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);
|
MON_DATA_NICKNAME, text);
|
||||||
StringGetEnd10(text);
|
StringGetEnd10(text);
|
||||||
toCpy = text;
|
toCpy = text;
|
||||||
@ -2531,7 +2531,7 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
|
|||||||
}
|
}
|
||||||
else if (gTrainerBattleOpponent_A == TRAINER_OPPONENT_C00)
|
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)
|
else if (gTrainerBattleOpponent_A == TRAINER_FRONTIER_BRAIN)
|
||||||
{
|
{
|
||||||
@ -2558,19 +2558,19 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
|
|||||||
toCpy = gTrainers[gTrainerBattleOpponent_A].trainerName;
|
toCpy = gTrainers[gTrainerBattleOpponent_A].trainerName;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case B_TXT_1E: // link player name?
|
case B_TXT_LINK_PLAYER_NAME: // link player name
|
||||||
toCpy = gLinkPlayers[multiplayerID].name;
|
toCpy = gLinkPlayers[multiplayerId].name;
|
||||||
break;
|
break;
|
||||||
case B_TXT_1F: // link partner name?
|
case B_TXT_LINK_PARTNER_NAME: // link partner name
|
||||||
toCpy = gLinkPlayers[GetBattlerMultiplayerId(2 ^ gLinkPlayers[multiplayerID].id)].name;
|
toCpy = gLinkPlayers[GetBattlerMultiplayerId(BATTLE_PARTNER(gLinkPlayers[multiplayerId].id))].name;
|
||||||
break;
|
break;
|
||||||
case B_TXT_20: // link opponent 1 name?
|
case B_TXT_LINK_OPPONENT1_NAME: // link opponent 1 name
|
||||||
toCpy = gLinkPlayers[GetBattlerMultiplayerId(1 ^ gLinkPlayers[multiplayerID].id)].name;
|
toCpy = gLinkPlayers[GetBattlerMultiplayerId(BATTLE_OPPOSITE(gLinkPlayers[multiplayerId].id))].name;
|
||||||
break;
|
break;
|
||||||
case B_TXT_21: // link opponent 2 name?
|
case B_TXT_LINK_OPPONENT2_NAME: // link opponent 2 name
|
||||||
toCpy = gLinkPlayers[GetBattlerMultiplayerId(3 ^ gLinkPlayers[multiplayerID].id)].name;
|
toCpy = gLinkPlayers[GetBattlerMultiplayerId(BATTLE_PARTNER(BATTLE_OPPOSITE(gLinkPlayers[multiplayerId].id)))].name;
|
||||||
break;
|
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;
|
toCpy = gLinkPlayers[GetBattlerMultiplayerId(gBattleScripting.battler)].name;
|
||||||
break;
|
break;
|
||||||
case B_TXT_PLAYER_NAME: // player name
|
case B_TXT_PLAYER_NAME: // player name
|
||||||
|
@ -5307,7 +5307,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
|||||||
// I have to re-use this variable to match.
|
// I have to re-use this variable to match.
|
||||||
r5 = gActiveBattler;
|
r5 = gActiveBattler;
|
||||||
gActiveBattler = battlerId;
|
gActiveBattler = battlerId;
|
||||||
BtlController_EmitGetMonData(0, 0, 0);
|
BtlController_EmitGetMonData(0, REQUEST_ALL_BATTLE, 0);
|
||||||
MarkBattlerForControllerExec(gActiveBattler);
|
MarkBattlerForControllerExec(gActiveBattler);
|
||||||
gActiveBattler = r5;
|
gActiveBattler = r5;
|
||||||
}
|
}
|
||||||
|
@ -273,7 +273,7 @@ void sub_81851A8(u8 *arg0)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(gBattleTypeFlags & BATTLE_TYPE_WILD))
|
if (!(gBattleTypeFlags & BATTLE_TYPE_IS_MASTER))
|
||||||
{
|
{
|
||||||
for (var2 = *arg0; var2 != 0;)
|
for (var2 = *arg0; var2 != 0;)
|
||||||
{
|
{
|
||||||
@ -360,7 +360,7 @@ u32 MoveRecordedBattleToSaveData(void)
|
|||||||
battleSave->battleFlags = (sBattleFlags & ~(BATTLE_TYPE_LINK | BATTLE_TYPE_20));
|
battleSave->battleFlags = (sBattleFlags & ~(BATTLE_TYPE_LINK | BATTLE_TYPE_20));
|
||||||
battleSave->battleFlags |= BATTLE_TYPE_x2000000;
|
battleSave->battleFlags |= BATTLE_TYPE_x2000000;
|
||||||
|
|
||||||
if (sBattleFlags & BATTLE_TYPE_WILD)
|
if (sBattleFlags & BATTLE_TYPE_IS_MASTER)
|
||||||
{
|
{
|
||||||
battleSave->battleFlags |= BATTLE_TYPE_x80000000;
|
battleSave->battleFlags |= BATTLE_TYPE_x80000000;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user