mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-03-06 07:27:47 +01:00
chanceCommon to chanceNotRare
This commit is contained in:
parent
0fb4163f20
commit
c316b11739
@ -6587,12 +6587,12 @@ void SetWildMonHeldItem(void)
|
||||
u16 rnd = Random() % 100;
|
||||
u16 species = GetMonData(&gEnemyParty[0], MON_DATA_SPECIES, 0);
|
||||
u16 chanceNoItem = 45;
|
||||
u16 chanceCommon = 95;
|
||||
u16 chanceNotRare = 95;
|
||||
if (!GetMonData(&gPlayerParty[0], MON_DATA_SANITY_IS_EGG, 0)
|
||||
&& GetMonAbility(&gPlayerParty[0]) == ABILITY_COMPOUND_EYES)
|
||||
{
|
||||
chanceNoItem = 20;
|
||||
chanceCommon = 80;
|
||||
chanceNotRare = 80;
|
||||
}
|
||||
if (gMapHeader.mapLayoutId == LAYOUT_ALTERING_CAVE)
|
||||
{
|
||||
@ -6600,7 +6600,7 @@ void SetWildMonHeldItem(void)
|
||||
if (alteringCaveId != 0)
|
||||
{
|
||||
// In active Altering Cave, use special item list
|
||||
if (rnd < chanceCommon)
|
||||
if (rnd < chanceNotRare)
|
||||
return;
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &sAlteringCaveWildMonHeldItems[alteringCaveId].item);
|
||||
}
|
||||
@ -6609,7 +6609,7 @@ void SetWildMonHeldItem(void)
|
||||
// In inactive Altering Cave, use normal items
|
||||
if (rnd < chanceNoItem)
|
||||
return;
|
||||
if (rnd < chanceCommon)
|
||||
if (rnd < chanceNotRare)
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].itemCommon);
|
||||
else
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].itemRare);
|
||||
@ -6626,7 +6626,7 @@ void SetWildMonHeldItem(void)
|
||||
{
|
||||
if (rnd < chanceNoItem)
|
||||
return;
|
||||
if (rnd < chanceCommon)
|
||||
if (rnd < chanceNotRare)
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].itemCommon);
|
||||
else
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].itemRare);
|
||||
|
Loading…
x
Reference in New Issue
Block a user