Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UBFix: SetMonData #1964

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b23c016
Create new macros SetMonData16 and SetMonData32
AreaZeroArven Dec 2, 2023
db28ae1
Use SetMonData macros
AreaZeroArven Dec 2, 2023
e8a72d7
Use SetMonData macros
AreaZeroArven Dec 2, 2023
ef5a758
Use SetMonData macros
AreaZeroArven Dec 2, 2023
b20fc0f
Use SetMonData macros
AreaZeroArven Dec 2, 2023
cab1648
Use SetMonData macro
AreaZeroArven Dec 2, 2023
af79bea
SetMonData macro
AreaZeroArven Dec 2, 2023
8391f3e
SetMonData
AreaZeroArven Dec 2, 2023
8f34ded
SetMonData
AreaZeroArven Dec 2, 2023
aca28d8
Update battle_controller_recorded_opponent.c
AreaZeroArven Dec 2, 2023
4380b8b
Update battle_controller_recorded_player.c
AreaZeroArven Dec 2, 2023
e1c5e9e
Update battle_controller_wally.c
AreaZeroArven Dec 2, 2023
b0da7b7
Update evolution_scene.c
AreaZeroArven Dec 2, 2023
9819bff
Update field_specials.c
AreaZeroArven Dec 2, 2023
a676e36
Update mail_data.c
AreaZeroArven Dec 2, 2023
d665488
Update party_menu.c
AreaZeroArven Dec 2, 2023
e171119
Update pokemon.c
AreaZeroArven Dec 2, 2023
d8e97a1
Update script_pokemon_util.c
AreaZeroArven Dec 2, 2023
c7e3330
Update battle_controller_link_opponent.c
AreaZeroArven Dec 2, 2023
c6aa413
Update evolution_scene.c
AreaZeroArven Dec 2, 2023
3b1cd92
Update evolution_scene.c
AreaZeroArven Dec 2, 2023
918ea90
Update script_pokemon_util.c
AreaZeroArven Dec 3, 2023
f715755
Update pokemon.c
AreaZeroArven Dec 3, 2023
342846e
Fix formatting
AreaZeroArven Dec 3, 2023
c20b2f1
Fix error
AreaZeroArven Dec 3, 2023
8d8abd8
UBFix ZeroMonData
AreaZeroArven Dec 3, 2023
f3f6962
Fix script_pokemon_util.c
AreaZeroArven Dec 3, 2023
143e758
Fix u16 Typo
AreaZeroArven Dec 8, 2023
86382d3
Use TI_READ Macros
AreaZeroArven Dec 8, 2023
a61f7f0
Fix assigning to checksum
AreaZeroArven Dec 8, 2023
738e1cf
Update battle_controller_link_partner.c
AreaZeroArven Dec 8, 2023
6fc7c4e
Update battle_controller_opponent.c
AreaZeroArven Dec 8, 2023
2ef40f2
Update battle_controller_player.c
AreaZeroArven Dec 8, 2023
f595b82
Update battle_controller_player_partner.c
AreaZeroArven Dec 8, 2023
24b5901
Update battle_controller_recorded_opponent.c
AreaZeroArven Dec 8, 2023
0f26750
Update battle_controller_recorded_player.c
AreaZeroArven Dec 8, 2023
3fc3058
Update battle_controller_wally.c
AreaZeroArven Dec 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions include/battle_controllers.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,23 @@ enum {
// Special return values in gBattleBufferB from Battle Controller functions.
#define RET_VALUE_LEVELED_UP 11

#ifndef UBFIX
#define SetMonData16(mon, type, arg) SetMonData(mon, type, arg)
#define SetMonData32(mon, type, arg) SetMonData(mon, type, arg)
#else
#define SetMonData16(mon, type, arg) \
{ \
u16 value = T1_READ_16(arg); \
SetMonData(mon, type, &value); \
}

#define SetMonData32(mon, type, arg) \
{ \
u32 value = T1_READ_32(arg); \
SetMonData(mon, type, &value); \
}
#endif

struct UnusedControllerStruct
{
u8 unk:7;
Expand Down
30 changes: 15 additions & 15 deletions src/battle_controller_link_opponent.c
Original file line number Diff line number Diff line change
Expand Up @@ -932,10 +932,10 @@ static void SetLinkOpponentMonData(u8 monId)
}
break;
case REQUEST_SPECIES_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_SPECIES, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gEnemyParty[monId], MON_DATA_SPECIES, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_HELDITEM_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_HELD_ITEM, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gEnemyParty[monId], MON_DATA_HELD_ITEM, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_MOVES_PP_BATTLE:
for (i = 0; i < MAX_MON_MOVES; i++)
Expand All @@ -949,7 +949,7 @@ static void SetLinkOpponentMonData(u8 monId)
case REQUEST_MOVE2_BATTLE:
case REQUEST_MOVE3_BATTLE:
case REQUEST_MOVE4_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_MOVE1 + gBattleBufferA[gActiveBattler][1] - REQUEST_MOVE1_BATTLE, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gEnemyParty[monId], MON_DATA_MOVE1 + gBattleBufferA[gActiveBattler][1] - REQUEST_MOVE1_BATTLE, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_PP_DATA_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_PP1, &gBattleBufferA[gActiveBattler][3]);
Expand All @@ -965,10 +965,10 @@ static void SetLinkOpponentMonData(u8 monId)
SetMonData(&gEnemyParty[monId], MON_DATA_PP1 + gBattleBufferA[gActiveBattler][1] - REQUEST_PPMOVE1_BATTLE, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_OTID_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_OT_ID, &gBattleBufferA[gActiveBattler][3]);
SetMonData32(&gEnemyParty[monId], MON_DATA_OT_ID, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_EXP_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_EXP, &gBattleBufferA[gActiveBattler][3]);
SetMonData32(&gEnemyParty[monId], MON_DATA_EXP, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_HP_EV_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_HP_EV, &gBattleBufferA[gActiveBattler][3]);
Expand Down Expand Up @@ -1033,37 +1033,37 @@ static void SetLinkOpponentMonData(u8 monId)
SetMonData(&gEnemyParty[monId], MON_DATA_SPDEF_IV, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_PERSONALITY_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_PERSONALITY, &gBattleBufferA[gActiveBattler][3]);
SetMonData32(&gEnemyParty[monId], MON_DATA_PERSONALITY, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_CHECKSUM_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_CHECKSUM, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gEnemyParty[monId], MON_DATA_CHECKSUM, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_STATUS_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_STATUS, &gBattleBufferA[gActiveBattler][3]);
SetMonData32(&gEnemyParty[monId], MON_DATA_STATUS, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_LEVEL_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_LEVEL, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_HP_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_HP, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gEnemyParty[monId], MON_DATA_HP, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_MAX_HP_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_MAX_HP, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gEnemyParty[monId], MON_DATA_MAX_HP, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_ATK_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_ATK, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gEnemyParty[monId], MON_DATA_ATK, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_DEF_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_DEF, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gEnemyParty[monId], MON_DATA_DEF, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_SPEED_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_SPEED, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gEnemyParty[monId], MON_DATA_SPEED, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_SPATK_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_SPATK, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gEnemyParty[monId], MON_DATA_SPATK, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_SPDEF_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_SPDEF, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gEnemyParty[monId], MON_DATA_SPDEF, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_COOL_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_COOL, &gBattleBufferA[gActiveBattler][3]);
Expand Down
27 changes: 14 additions & 13 deletions src/battle_controller_link_partner.c
Original file line number Diff line number Diff line change
Expand Up @@ -826,10 +826,10 @@ static void SetLinkPartnerMonData(u8 monId)
}
break;
case REQUEST_SPECIES_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_SPECIES, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gPlayerParty[monId], MON_DATA_SPECIES, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_HELDITEM_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_HELD_ITEM, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gPlayerParty[monId], MON_DATA_HELD_ITEM, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_MOVES_PP_BATTLE:
for (i = 0; i < MAX_MON_MOVES; i++)
Expand All @@ -843,7 +843,7 @@ static void SetLinkPartnerMonData(u8 monId)
case REQUEST_MOVE2_BATTLE:
case REQUEST_MOVE3_BATTLE:
case REQUEST_MOVE4_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + gBattleBufferA[gActiveBattler][1] - REQUEST_MOVE1_BATTLE, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gPlayerParty[monId], MON_DATA_MOVE1 + gBattleBufferA[gActiveBattler][1] - REQUEST_MOVE1_BATTLE, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_PP_DATA_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_PP1, &gBattleBufferA[gActiveBattler][3]);
Expand Down Expand Up @@ -927,37 +927,37 @@ static void SetLinkPartnerMonData(u8 monId)
SetMonData(&gPlayerParty[monId], MON_DATA_SPDEF_IV, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_PERSONALITY_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_PERSONALITY, &gBattleBufferA[gActiveBattler][3]);
SetMonData32(&gPlayerParty[monId], MON_DATA_PERSONALITY, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_CHECKSUM_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_CHECKSUM, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gPlayerParty[monId], MON_DATA_CHECKSUM, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_STATUS_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_STATUS, &gBattleBufferA[gActiveBattler][3]);
SetMonData32(&gPlayerParty[monId], MON_DATA_STATUS, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_LEVEL_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_LEVEL, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_HP_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_HP, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gPlayerParty[monId], MON_DATA_HP, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_MAX_HP_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_MAX_HP, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gPlayerParty[monId], MON_DATA_MAX_HP, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_ATK_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_ATK, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gPlayerParty[monId], MON_DATA_ATK, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_DEF_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_DEF, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gPlayerParty[monId], MON_DATA_DEF, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_SPEED_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_SPEED, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gPlayerParty[monId], MON_DATA_SPEED, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_SPATK_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_SPATK, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gPlayerParty[monId], MON_DATA_SPATK, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_SPDEF_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_SPDEF, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gPlayerParty[monId], MON_DATA_SPDEF, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_COOL_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_COOL, &gBattleBufferA[gActiveBattler][3]);
Expand Down Expand Up @@ -1695,3 +1695,4 @@ static void LinkPartnerHandleEndLinkBattle(void)
static void LinkPartnerCmdEnd(void)
{
}

26 changes: 13 additions & 13 deletions src/battle_controller_opponent.c
Original file line number Diff line number Diff line change
Expand Up @@ -946,10 +946,10 @@ static void SetOpponentMonData(u8 monId)
}
break;
case REQUEST_SPECIES_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_SPECIES, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gEnemyParty[monId], MON_DATA_SPECIES, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_HELDITEM_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_HELD_ITEM, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gEnemyParty[monId], MON_DATA_HELD_ITEM, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_MOVES_PP_BATTLE:
for (i = 0; i < MAX_MON_MOVES; i++)
Expand All @@ -963,7 +963,7 @@ static void SetOpponentMonData(u8 monId)
case REQUEST_MOVE2_BATTLE:
case REQUEST_MOVE3_BATTLE:
case REQUEST_MOVE4_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_MOVE1 + gBattleBufferA[gActiveBattler][1] - REQUEST_MOVE1_BATTLE, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gEnemyParty[monId], MON_DATA_MOVE1 + gBattleBufferA[gActiveBattler][1] - REQUEST_MOVE1_BATTLE, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_PP_DATA_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_PP1, &gBattleBufferA[gActiveBattler][3]);
Expand Down Expand Up @@ -1047,37 +1047,37 @@ static void SetOpponentMonData(u8 monId)
SetMonData(&gEnemyParty[monId], MON_DATA_SPDEF_IV, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_PERSONALITY_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_PERSONALITY, &gBattleBufferA[gActiveBattler][3]);
SetMonData32(&gEnemyParty[monId], MON_DATA_PERSONALITY, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_CHECKSUM_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_CHECKSUM, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gEnemyParty[monId], MON_DATA_CHECKSUM, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_STATUS_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_STATUS, &gBattleBufferA[gActiveBattler][3]);
SetMonData32(&gEnemyParty[monId], MON_DATA_STATUS, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_LEVEL_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_LEVEL, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_HP_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_HP, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gEnemyParty[monId], MON_DATA_HP, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_MAX_HP_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_MAX_HP, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gEnemyParty[monId], MON_DATA_MAX_HP, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_ATK_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_ATK, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gEnemyParty[monId], MON_DATA_ATK, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_DEF_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_DEF, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gEnemyParty[monId], MON_DATA_DEF, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_SPEED_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_SPEED, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gEnemyParty[monId], MON_DATA_SPEED, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_SPATK_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_SPATK, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gEnemyParty[monId], MON_DATA_SPATK, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_SPDEF_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_SPDEF, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gEnemyParty[monId], MON_DATA_SPDEF, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_COOL_BATTLE:
SetMonData(&gEnemyParty[monId], MON_DATA_COOL, &gBattleBufferA[gActiveBattler][3]);
Expand Down
26 changes: 13 additions & 13 deletions src/battle_controller_player.c
Original file line number Diff line number Diff line change
Expand Up @@ -1993,10 +1993,10 @@ static void SetPlayerMonData(u8 monId)
}
break;
case REQUEST_SPECIES_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_SPECIES, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gPlayerParty[monId], MON_DATA_SPECIES, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_HELDITEM_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_HELD_ITEM, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gPlayerParty[monId], MON_DATA_HELD_ITEM, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_MOVES_PP_BATTLE:
for (i = 0; i < MAX_MON_MOVES; i++)
Expand All @@ -2010,7 +2010,7 @@ static void SetPlayerMonData(u8 monId)
case REQUEST_MOVE2_BATTLE:
case REQUEST_MOVE3_BATTLE:
case REQUEST_MOVE4_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + gBattleBufferA[gActiveBattler][1] - REQUEST_MOVE1_BATTLE, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gPlayerParty[monId], MON_DATA_MOVE1 + gBattleBufferA[gActiveBattler][1] - REQUEST_MOVE1_BATTLE, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_PP_DATA_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_PP1, &gBattleBufferA[gActiveBattler][3]);
Expand Down Expand Up @@ -2094,37 +2094,37 @@ static void SetPlayerMonData(u8 monId)
SetMonData(&gPlayerParty[monId], MON_DATA_SPDEF_IV, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_PERSONALITY_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_PERSONALITY, &gBattleBufferA[gActiveBattler][3]);
SetMonData32(&gPlayerParty[monId], MON_DATA_PERSONALITY, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_CHECKSUM_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_CHECKSUM, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gPlayerParty[monId], MON_DATA_CHECKSUM, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_STATUS_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_STATUS, &gBattleBufferA[gActiveBattler][3]);
SetMonData32(&gPlayerParty[monId], MON_DATA_STATUS, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_LEVEL_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_LEVEL, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_HP_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_HP, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gPlayerParty[monId], MON_DATA_HP, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_MAX_HP_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_MAX_HP, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gPlayerParty[monId], MON_DATA_MAX_HP, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_ATK_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_ATK, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gPlayerParty[monId], MON_DATA_ATK, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_DEF_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_DEF, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gPlayerParty[monId], MON_DATA_DEF, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_SPEED_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_SPEED, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gPlayerParty[monId], MON_DATA_SPEED, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_SPATK_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_SPATK, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gPlayerParty[monId], MON_DATA_SPATK, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_SPDEF_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_SPDEF, &gBattleBufferA[gActiveBattler][3]);
SetMonData16(&gPlayerParty[monId], MON_DATA_SPDEF, &gBattleBufferA[gActiveBattler][3]);
break;
case REQUEST_COOL_BATTLE:
SetMonData(&gPlayerParty[monId], MON_DATA_COOL, &gBattleBufferA[gActiveBattler][3]);
Expand Down
Loading