rename item1 and item2 in BaseStats

This commit is contained in:
sneed
2022-05-23 19:10:24 +03:00
parent f756e60455
commit c8e08edbae
3 changed files with 782 additions and 782 deletions
+2 -2
View File
@@ -212,8 +212,8 @@ struct BaseStats
/* 0x0A */ u16 evYield_Speed:2; /* 0x0A */ u16 evYield_Speed:2;
/* 0x0B */ u16 evYield_SpAttack:2; /* 0x0B */ u16 evYield_SpAttack:2;
/* 0x0B */ u16 evYield_SpDefense:2; /* 0x0B */ u16 evYield_SpDefense:2;
/* 0x0C */ u16 item1; /* 0x0C */ u16 itemCommon;
/* 0x0E */ u16 item2; /* 0x0E */ u16 itemRare;
/* 0x10 */ u8 genderRatio; /* 0x10 */ u8 genderRatio;
/* 0x11 */ u8 eggCycles; /* 0x11 */ u8 eggCycles;
/* 0x12 */ u8 friendship; /* 0x12 */ u8 friendship;
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -6610,26 +6610,26 @@ void SetWildMonHeldItem(void)
if (rnd < chanceNoItem) if (rnd < chanceNoItem)
return; return;
if (rnd < chanceCommon) if (rnd < chanceCommon)
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].item1); SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].itemCommon);
else else
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].item2); SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].itemRare);
} }
} }
else else
{ {
if (gBaseStats[species].item1 == gBaseStats[species].item2 && gBaseStats[species].item1 != ITEM_NONE) if (gBaseStats[species].itemCommon == gBaseStats[species].itemRare && gBaseStats[species].itemCommon != ITEM_NONE)
{ {
// Both held items are the same, 100% chance to hold item // Both held items are the same, 100% chance to hold item
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].item1); SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].itemCommon);
} }
else else
{ {
if (rnd < chanceNoItem) if (rnd < chanceNoItem)
return; return;
if (rnd < chanceCommon) if (rnd < chanceCommon)
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].item1); SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].itemCommon);
else else
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].item2); SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].itemRare);
} }
} }
} }