Overworld effects (#245)
* Snow Cloak's overworld effect. (reduces the chance of encountering wild Pokémon on Snow by 50%) * Quick Feet's overworld effect. (reduces the chance of encountering wild Pokémon by 50%) * No Guard's overworld effect. (raises the chance of encountering wild Pokémon by 50%) * Honey Gather. * Checks if honey is defined. * Applied review changes. * Fixed pointer reference * Applied requested changes. * Using weather constants.
This commit is contained in:
parent
4c473d057e
commit
81617eb577
2 changed files with 32 additions and 0 deletions
|
@ -11030,6 +11030,19 @@ static void Cmd_pickup(void)
|
|||
heldItem = GetBattlePyramidPickupItemId();
|
||||
SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &heldItem);
|
||||
}
|
||||
#if (defined ITEM_HONEY)
|
||||
else if (ability == ABILITY_HONEY_GATHER
|
||||
&& species != 0
|
||||
&& species != SPECIES_EGG
|
||||
&& heldItem == ITEM_NONE)
|
||||
{
|
||||
if ((lvlDivBy10 + 1 ) * 5 > Random() % 100)
|
||||
{
|
||||
heldItem = ITEM_HONEY;
|
||||
SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &heldItem);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -11070,6 +11083,19 @@ static void Cmd_pickup(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
#if (defined ITEM_HONEY)
|
||||
else if (ability == ABILITY_HONEY_GATHER
|
||||
&& species != 0
|
||||
&& species != SPECIES_EGG
|
||||
&& heldItem == ITEM_NONE)
|
||||
{
|
||||
if ((lvlDivBy10 + 1 ) * 5 > Random() % 100)
|
||||
{
|
||||
heldItem = ITEM_HONEY;
|
||||
SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &heldItem);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -496,6 +496,12 @@ static bool8 DoWildEncounterRateTest(u32 encounterRate, bool8 ignoreAbility)
|
|||
encounterRate *= 2;
|
||||
else if (ability == ABILITY_SAND_VEIL && gSaveBlock1Ptr->weather == WEATHER_SANDSTORM)
|
||||
encounterRate /= 2;
|
||||
else if (ability == ABILITY_SNOW_CLOAK && gSaveBlock1Ptr->weather == WEATHER_SNOW)
|
||||
encounterRate /= 2;
|
||||
else if (ability == ABILITY_QUICK_FEET)
|
||||
encounterRate /= 2;
|
||||
else if (ability == ABILITY_NO_GUARD)
|
||||
encounterRate = encounterRate * 3 / 2;
|
||||
}
|
||||
if (encounterRate > 2880)
|
||||
encounterRate = 2880;
|
||||
|
|
Loading…
Reference in a new issue