Normalize union room UnkStruct arrays; remove STAT_STAGE_ defines
This commit is contained in:
+25
-25
@@ -3982,49 +3982,49 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
||||
retVal = FALSE;
|
||||
}
|
||||
if ((itemEffect[cmdIndex] & 0xF)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_STAGE_ATK] < 12)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_ATK] < 12)
|
||||
{
|
||||
gBattleMons[gActiveBattler].statStages[STAT_STAGE_ATK] += itemEffect[cmdIndex] & 0xF;
|
||||
if (gBattleMons[gActiveBattler].statStages[STAT_STAGE_ATK] > 12)
|
||||
gBattleMons[gActiveBattler].statStages[STAT_STAGE_ATK] = 12;
|
||||
gBattleMons[gActiveBattler].statStages[STAT_ATK] += itemEffect[cmdIndex] & 0xF;
|
||||
if (gBattleMons[gActiveBattler].statStages[STAT_ATK] > 12)
|
||||
gBattleMons[gActiveBattler].statStages[STAT_ATK] = 12;
|
||||
retVal = FALSE;
|
||||
}
|
||||
break;
|
||||
// in-battle stat boosting effects?
|
||||
case 1:
|
||||
if ((itemEffect[cmdIndex] & 0xF0)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_STAGE_DEF] < 12)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_DEF] < 12)
|
||||
{
|
||||
gBattleMons[gActiveBattler].statStages[STAT_STAGE_DEF] += (itemEffect[cmdIndex] & 0xF0) >> 4;
|
||||
if (gBattleMons[gActiveBattler].statStages[STAT_STAGE_DEF] > 12)
|
||||
gBattleMons[gActiveBattler].statStages[STAT_STAGE_DEF] = 12;
|
||||
gBattleMons[gActiveBattler].statStages[STAT_DEF] += (itemEffect[cmdIndex] & 0xF0) >> 4;
|
||||
if (gBattleMons[gActiveBattler].statStages[STAT_DEF] > 12)
|
||||
gBattleMons[gActiveBattler].statStages[STAT_DEF] = 12;
|
||||
retVal = FALSE;
|
||||
}
|
||||
if ((itemEffect[cmdIndex] & 0xF)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_STAGE_SPEED] < 12)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_SPEED] < 12)
|
||||
{
|
||||
gBattleMons[gActiveBattler].statStages[STAT_STAGE_SPEED] += itemEffect[cmdIndex] & 0xF;
|
||||
if (gBattleMons[gActiveBattler].statStages[STAT_STAGE_SPEED] > 12)
|
||||
gBattleMons[gActiveBattler].statStages[STAT_STAGE_SPEED] = 12;
|
||||
gBattleMons[gActiveBattler].statStages[STAT_SPEED] += itemEffect[cmdIndex] & 0xF;
|
||||
if (gBattleMons[gActiveBattler].statStages[STAT_SPEED] > 12)
|
||||
gBattleMons[gActiveBattler].statStages[STAT_SPEED] = 12;
|
||||
retVal = FALSE;
|
||||
}
|
||||
break;
|
||||
// more stat boosting effects?
|
||||
case 2:
|
||||
if ((itemEffect[cmdIndex] & 0xF0)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_STAGE_ACC] < 12)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_ACC] < 12)
|
||||
{
|
||||
gBattleMons[gActiveBattler].statStages[STAT_STAGE_ACC] += (itemEffect[cmdIndex] & 0xF0) >> 4;
|
||||
if (gBattleMons[gActiveBattler].statStages[STAT_STAGE_ACC] > 12)
|
||||
gBattleMons[gActiveBattler].statStages[STAT_STAGE_ACC] = 12;
|
||||
gBattleMons[gActiveBattler].statStages[STAT_ACC] += (itemEffect[cmdIndex] & 0xF0) >> 4;
|
||||
if (gBattleMons[gActiveBattler].statStages[STAT_ACC] > 12)
|
||||
gBattleMons[gActiveBattler].statStages[STAT_ACC] = 12;
|
||||
retVal = FALSE;
|
||||
}
|
||||
if ((itemEffect[cmdIndex] & 0xF)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_STAGE_SPATK] < 12)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_SPATK] < 12)
|
||||
{
|
||||
gBattleMons[gActiveBattler].statStages[STAT_STAGE_SPATK] += itemEffect[cmdIndex] & 0xF;
|
||||
if (gBattleMons[gActiveBattler].statStages[STAT_STAGE_SPATK] > 12)
|
||||
gBattleMons[gActiveBattler].statStages[STAT_STAGE_SPATK] = 12;
|
||||
gBattleMons[gActiveBattler].statStages[STAT_SPATK] += itemEffect[cmdIndex] & 0xF;
|
||||
if (gBattleMons[gActiveBattler].statStages[STAT_SPATK] > 12)
|
||||
gBattleMons[gActiveBattler].statStages[STAT_SPATK] = 12;
|
||||
retVal = FALSE;
|
||||
}
|
||||
break;
|
||||
@@ -4496,25 +4496,25 @@ bool8 PokemonItemUseNoEffect(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mo
|
||||
&& !(gBattleMons[gActiveBattler].status2 & STATUS2_FOCUS_ENERGY))
|
||||
retVal = FALSE;
|
||||
if ((itemEffect[cmdIndex] & 0xF)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_STAGE_ATK] < 12)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_ATK] < 12)
|
||||
retVal = FALSE;
|
||||
break;
|
||||
// in-battle stat boosting effects?
|
||||
case 1:
|
||||
if ((itemEffect[cmdIndex] & 0xF0)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_STAGE_DEF] < 12)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_DEF] < 12)
|
||||
retVal = FALSE;
|
||||
if ((itemEffect[cmdIndex] & 0xF)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_STAGE_SPEED] < 12)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_SPEED] < 12)
|
||||
retVal = FALSE;
|
||||
break;
|
||||
// more stat boosting effects?
|
||||
case 2:
|
||||
if ((itemEffect[cmdIndex] & 0xF0)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_STAGE_ACC] < 12)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_ACC] < 12)
|
||||
retVal = FALSE;
|
||||
if ((itemEffect[cmdIndex] & 0xF)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_STAGE_SPATK] < 12)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_SPATK] < 12)
|
||||
retVal = FALSE;
|
||||
break;
|
||||
case 3:
|
||||
|
||||
+2
-2
@@ -2526,12 +2526,12 @@ static void sub_811868C(const u8 *src)
|
||||
|
||||
static void sub_81186B0(struct UnkStruct_URoom * data)
|
||||
{
|
||||
memcpy(&gDecompressionBuffer[0x3F00], data->field_0, sizeof(*data->field_0));
|
||||
memcpy(&gDecompressionBuffer[0x3F00], data->field_0, 8 * sizeof(struct UnkStruct_x20));
|
||||
}
|
||||
|
||||
static void sub_81186C8(struct UnkStruct_URoom * data)
|
||||
{
|
||||
memcpy(data->field_0, &gDecompressionBuffer[0x3F00], sizeof(*data->field_0));
|
||||
memcpy(data->field_0, &gDecompressionBuffer[0x3F00], 8 * sizeof(struct UnkStruct_x20));
|
||||
}
|
||||
|
||||
static void sub_81186E0(u8 taskId)
|
||||
|
||||
@@ -10,6 +10,7 @@ ALIGNED(4) const u8 gUnknown_84571E0[] = _("The WIRELESS COMMUNICATION\nSYSTEM s
|
||||
ALIGNED(4) const u8 gUnref_845721C[] = _("ともだちからの れんらくを\nまっています");
|
||||
ALIGNED(4) const u8 gUnknown_8457234[] = _("{STR_VAR_1}! Awaiting\ncommunication from another player.");
|
||||
ALIGNED(4) const u8 gUnknown_8457264[] = _("{STR_VAR_1}! Awaiting link!\nPress START when everyone's ready.");
|
||||
|
||||
ALIGNED(4) const u8 gJPText_SingleBattle[] = _("シングルバトルを かいさいする");
|
||||
ALIGNED(4) const u8 gJPText_DoubleBattle[] = _("ダブルバトルを かいさいする");
|
||||
ALIGNED(4) const u8 gJPText_MultiBattle[] = _("マルチバトルを かいさいする");
|
||||
@@ -82,6 +83,7 @@ ALIGNED(4) const u8 gUnknown_84574EC[] = _("{STR_VAR_2} contacted you.\nAdd to t
|
||||
ALIGNED(4) const u8 gUnknown_8457514[] = _("{STR_VAR_1}!\nAre these members OK?");
|
||||
ALIGNED(4) const u8 gUnknown_8457530[] = _("Cancel {STR_VAR_1} MODE\nwith these members?");
|
||||
ALIGNED(4) const u8 gUnknown_8457554[] = _("An “OK” was sent\nto {STR_VAR_1}.");
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_845756C[] = _("The other TRAINER doesn't appear\nto be available now…\p");
|
||||
ALIGNED(4) const u8 gUnknown_84575A4[] = _("You can't transmit with a TRAINER\nwho is too far away.\p");
|
||||
ALIGNED(4) const u8 gUnknown_84575DC[] = _("The other TRAINER(S) is/are not\nready yet.\p");
|
||||
|
||||
Reference in New Issue
Block a user