mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-06 05:27:14 -05:00
Update wild/egg generators for totem cases
so wonky edge cases
This commit is contained in:
parent
c5cd6728fe
commit
5e6b2f43c2
|
|
@ -626,7 +626,7 @@ private static IEnumerable<EncounterSlot> GetFilteredSlots67(PKM pkm, IReadOnlyC
|
|||
|
||||
if (AlolanVariantEvolutions12.Contains(species)) // match form if same species, else form 0.
|
||||
slotdata = encounterSlots.Where(slot => species == slot.Species ? slot.Form == form : slot.Form == 0);
|
||||
else if (WildForms.Contains(species) || AlolanOriginForms.Contains(species)) // match slot form
|
||||
else if (ShouldMatchSlotForm()) // match slot form
|
||||
slotdata = encounterSlots.Where(slot => slot.Form == form);
|
||||
else
|
||||
slotdata = encounterSlots; // no form checking
|
||||
|
|
@ -645,13 +645,15 @@ private static IEnumerable<EncounterSlot> GetFilteredSlots67(PKM pkm, IReadOnlyC
|
|||
if (species == slotMax.Species ? slotMax.Form == form : slotMax.Form == 0)
|
||||
yield return GetPressureSlot(slotMax, pkm);
|
||||
}
|
||||
else if (WildForms.Contains(species) || AlolanOriginForms.Contains(species)) // match slot form
|
||||
else if (ShouldMatchSlotForm()) // match slot form
|
||||
{
|
||||
if (slotMax.Form == form)
|
||||
yield return GetPressureSlot(slotMax, pkm);
|
||||
}
|
||||
else
|
||||
yield return GetPressureSlot(slotMax, pkm);
|
||||
|
||||
bool ShouldMatchSlotForm() => WildForms.Contains(species) || AlolanOriginForms.Contains(species) || FormConverter.IsTotemForm(species, form);
|
||||
}
|
||||
private static IEnumerable<EncounterSlot> GetFilteredSlots6DexNav(PKM pkm, int lvl, IReadOnlyCollection<EncounterSlot> encounterSlots, int fluteBoost)
|
||||
{
|
||||
|
|
@ -1351,6 +1353,8 @@ private static IEnumerable<EncounterEgg> GenerateEggs(PKM pkm)
|
|||
{
|
||||
if (NoHatchFromEgg.Contains(pkm.Species))
|
||||
yield break;
|
||||
if (FormConverter.IsTotemForm(pkm.Species, pkm.AltForm, pkm.GenNumber))
|
||||
yield break; // no totem eggs
|
||||
|
||||
int gen = pkm.GenNumber;
|
||||
// version is a true indicator for all generation 3-5 origins
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user