Merge pull request #1665 from Sneed69/master
Rename chanceCommon to chanceNotRare in SetWildMonHeldItem
This commit is contained in:
commit
09ea1c84f9
1 changed files with 5 additions and 5 deletions
|
@ -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…
Reference in a new issue