mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
rename item1 and item2 in BaseStats
This commit is contained in:
parent
f756e60455
commit
c8e08edbae
@ -212,8 +212,8 @@ struct BaseStats
|
||||
/* 0x0A */ u16 evYield_Speed:2;
|
||||
/* 0x0B */ u16 evYield_SpAttack:2;
|
||||
/* 0x0B */ u16 evYield_SpDefense:2;
|
||||
/* 0x0C */ u16 item1;
|
||||
/* 0x0E */ u16 item2;
|
||||
/* 0x0C */ u16 itemCommon;
|
||||
/* 0x0E */ u16 itemRare;
|
||||
/* 0x10 */ u8 genderRatio;
|
||||
/* 0x11 */ u8 eggCycles;
|
||||
/* 0x12 */ u8 friendship;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -6610,26 +6610,26 @@ void SetWildMonHeldItem(void)
|
||||
if (rnd < chanceNoItem)
|
||||
return;
|
||||
if (rnd < chanceCommon)
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].item1);
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].itemCommon);
|
||||
else
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].item2);
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].itemRare);
|
||||
}
|
||||
}
|
||||
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
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].item1);
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].itemCommon);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (rnd < chanceNoItem)
|
||||
return;
|
||||
if (rnd < chanceCommon)
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].item1);
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].itemCommon);
|
||||
else
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].item2);
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].itemRare);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user