mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-10 14:44:24 +00:00
Add XY friend safari sawsbuck form bypass too
See previous commit. AO only has Deerling, so remove Sawsbuck from the Species compare.
This commit is contained in:
parent
6d2de333bf
commit
26e4bf0a6a
2 changed files with 9 additions and 2 deletions
|
@ -128,7 +128,7 @@ public sealed record EncounterSlot6AO(EncounterArea6AO Parent, ushort Species, b
|
|||
|
||||
if (evo.Form != Form && !IsRandomUnspecificForm)
|
||||
{
|
||||
if (Species is not ((ushort)Core.Species.Deerling or (ushort)Core.Species.Sawsbuck))
|
||||
if (Species is not (ushort)Core.Species.Deerling)
|
||||
return false;
|
||||
|
||||
// Deerling can change between forms if imported to a future Gen8+ game.
|
||||
|
|
|
@ -117,12 +117,19 @@ public sealed record EncounterSlot6XY(EncounterArea6XY Parent, ushort Species, b
|
|||
if (!this.IsLevelWithinRange(pk.Met_Level))
|
||||
return false;
|
||||
|
||||
if (Form != evo.Form && !IsRandomUnspecificForm && Species is not ((int)Core.Species.Burmy or (int)Core.Species.Furfrou))
|
||||
if (Form != evo.Form && !IsRandomUnspecificForm && !IsValidOutOfBoundsForm(pk))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool IsValidOutOfBoundsForm(PKM pk) => Species switch
|
||||
{
|
||||
(int)Core.Species.Burmy or (int)Core.Species.Furfrou => true, // Can change forms in-game.
|
||||
(int)Core.Species.Sawsbuck => pk.Format >= 8, // Friend Safari can change between forms if imported to a future Gen8+
|
||||
_ => false,
|
||||
};
|
||||
|
||||
public EncounterMatchRating GetMatchRating(PKM pk)
|
||||
{
|
||||
bool isHidden = pk.AbilityNumber == 4;
|
||||
|
|
Loading…
Reference in a new issue