mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-14 16:10:36 -05:00
Inline form changeable species lists
This commit is contained in:
parent
1d00e17217
commit
91c7c28c6f
|
|
@ -77,8 +77,12 @@ private IEnumerable<EncounterSlot4> GetSlotsMatching(IReadOnlyList<EvoCriteria>
|
|||
if (slot.Species != evo.Species)
|
||||
continue;
|
||||
|
||||
if (slot.Form != evo.Form && !FormInfo.WildChangeFormAfter.Contains(slot.Species) && slot.Species != (int)Species.Unown)
|
||||
break;
|
||||
if (slot.Form != evo.Form && slot.Species is not (int)Species.Burmy)
|
||||
{
|
||||
// Unown forms are random, not specific form IDs
|
||||
if (!slot.IsRandomUnspecificForm)
|
||||
break;
|
||||
}
|
||||
if (!slot.IsLevelWithinRange(lvl))
|
||||
break;
|
||||
|
||||
|
|
@ -88,6 +92,7 @@ private IEnumerable<EncounterSlot4> GetSlotsMatching(IReadOnlyList<EvoCriteria>
|
|||
}
|
||||
}
|
||||
|
||||
// original met level cannot be inferred
|
||||
private IEnumerable<EncounterSlot4> GetSlotsFuzzy(IReadOnlyList<EvoCriteria> chain)
|
||||
{
|
||||
foreach (var slot in Slots)
|
||||
|
|
@ -97,8 +102,12 @@ private IEnumerable<EncounterSlot4> GetSlotsFuzzy(IReadOnlyList<EvoCriteria> cha
|
|||
if (slot.Species != evo.Species)
|
||||
continue;
|
||||
|
||||
if (slot.Form != evo.Form && !FormInfo.WildChangeFormAfter.Contains(slot.Species) && slot.Species != (int)Species.Unown)
|
||||
break;
|
||||
if (slot.Form != evo.Form && slot.Species is not (int)Species.Burmy)
|
||||
{
|
||||
// Unown forms are random, not specific form IDs
|
||||
if (!slot.IsRandomUnspecificForm)
|
||||
break;
|
||||
}
|
||||
if (slot.LevelMin > evo.Level)
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public override IEnumerable<EncounterSlot> GetMatchingSlots(PKM pkm, IReadOnlyLi
|
|||
if (!slot.IsLevelWithinRange(pkm.Met_Level))
|
||||
break;
|
||||
|
||||
if (slot.Form != evo.Form && !FormInfo.WildChangeFormAfter.Contains(slot.Species))
|
||||
if (slot.Form != evo.Form) // no wild forms can change
|
||||
break;
|
||||
|
||||
yield return slot;
|
||||
|
|
|
|||
|
|
@ -113,8 +113,9 @@ public override IEnumerable<EncounterSlot> GetMatchingSlots(PKM pkm, IReadOnlyLi
|
|||
if (!slot.IsLevelWithinRange(pkm.Met_Level))
|
||||
break;
|
||||
|
||||
if (slot.Form != evo.Form && !slot.IsRandomUnspecificForm && !FormInfo.WildChangeFormAfter.Contains(slot.Species))
|
||||
if (slot.Form != evo.Form && !slot.IsRandomUnspecificForm && slot.Species is not ((int)Species.Burmy or (int)Species.Furfrou))
|
||||
{
|
||||
// Only slot that can be form-mismatched via Pressure is Flabébé
|
||||
if (slot.Species != (int)Species.Flabébé)
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public override IEnumerable<EncounterSlot> GetMatchingSlots(PKM pkm, IReadOnlyLi
|
|||
if (!slot.IsLevelWithinRange(pkm.Met_Level))
|
||||
break;
|
||||
|
||||
if (slot.Form != evo.Form && !FormInfo.WildChangeFormAfter.Contains(slot.Species))
|
||||
if (slot.Form != evo.Form && slot.Species is not ((int)Species.Furfrou or (int)Species.Oricorio))
|
||||
{
|
||||
if (!slot.IsRandomUnspecificForm) // Minior, etc
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ private IEnumerable<EncounterSlot8> GetUnboostedMatches(IReadOnlyList<EvoCriteri
|
|||
if (!slot.IsLevelWithinRange(metLevel))
|
||||
break;
|
||||
|
||||
if (slot.Form != evo.Form && !FormInfo.WildChangeFormAfter.Contains(evo.Species))
|
||||
if (slot.Form != evo.Form && slot.Species is not (int)Species.Rotom)
|
||||
break;
|
||||
|
||||
if (slot.Weather is Heavy_Fog && IsWildArea8(Location))
|
||||
|
|
@ -90,7 +90,7 @@ private IEnumerable<EncounterSlot8> GetBoostedMatches(IReadOnlyList<EvoCriteria>
|
|||
if (slot.LevelMin > BoostLevel)
|
||||
break; // Can't downlevel, only boost to 60.
|
||||
|
||||
if (slot.Form != evo.Form && !FormInfo.WildChangeFormAfter.Contains(evo.Species))
|
||||
if (slot.Form != evo.Form && slot.Species is not (int)Species.Rotom)
|
||||
break;
|
||||
|
||||
if (Location != metLocation && !CanCrossoverTo(Location, metLocation, slot.SlotType))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user