Party Size and Num Stats

This commit is contained in:
DizzyEggg
2018-11-18 20:00:36 +01:00
parent 032dd251e6
commit 1b0cfb0757
23 changed files with 84 additions and 85 deletions
+11 -11
View File
@@ -2052,26 +2052,26 @@ _08139D7C:\n\
void sub_8139D98(void)
{
u8 i;
u32 ivStorage[6];
u32 ivStorage[NUM_STATS];
ivStorage[0] = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_HP_IV);
ivStorage[1] = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_ATK_IV);
ivStorage[2] = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_DEF_IV);
ivStorage[3] = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPEED_IV);
ivStorage[4] = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPATK_IV);
ivStorage[5] = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPDEF_IV);
ivStorage[STAT_HP] = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_HP_IV);
ivStorage[STAT_ATK] = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_ATK_IV);
ivStorage[STAT_DEF] = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_DEF_IV);
ivStorage[STAT_SPEED] = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPEED_IV);
ivStorage[STAT_SPATK] = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPATK_IV);
ivStorage[STAT_SPDEF] = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPDEF_IV);
gSpecialVar_0x8005 = 0;
for (i = 0; i < ARRAY_COUNT(ivStorage); i++)
for (i = 0; i < NUM_STATS; i++)
{
gSpecialVar_0x8005 += ivStorage[i];
}
gSpecialVar_0x8006 = 0;
gSpecialVar_0x8007 = ivStorage[0]; // HP IV
gSpecialVar_0x8007 = ivStorage[STAT_HP];
for (i = 1; i < 6; i++)
for (i = 1; i < NUM_STATS; i++)
{
if (ivStorage[gSpecialVar_0x8006] < ivStorage[i])
{
@@ -2081,7 +2081,7 @@ void sub_8139D98(void)
else if (ivStorage[gSpecialVar_0x8006] == ivStorage[i])
{
u16 randomNumber = Random();
if ((randomNumber & 1) != 0)
if (randomNumber & 1)
{
gSpecialVar_0x8006 = i;
gSpecialVar_0x8007 = ivStorage[i];