mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-07-20 00:11:17 -05:00
Add formarg deferral for wild annihilape/kingambit
Closes #4167 Also add form bypass for Gen6 Deerling slot that changed form in SV.
This commit is contained in:
parent
560320e2cc
commit
6d2de333bf
|
|
@ -127,7 +127,14 @@ public bool IsMatchExact(PKM pk, EvoCriteria evo)
|
|||
return false;
|
||||
|
||||
if (evo.Form != Form && !IsRandomUnspecificForm)
|
||||
return false;
|
||||
{
|
||||
if (Species is not ((ushort)Core.Species.Deerling or (ushort)Core.Species.Sawsbuck))
|
||||
return false;
|
||||
|
||||
// Deerling can change between forms if imported to a future Gen8+ game.
|
||||
if (pk.Format < 8 || evo.Form >= 4)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -238,7 +238,17 @@ public EncounterMatchRating GetMatchRating(PKM pk)
|
|||
if (m.RibbonMarkDawn && !CanSpawnAtTime(RibbonIndex.MarkDawn))
|
||||
return EncounterMatchRating.DeferredErrors;
|
||||
}
|
||||
|
||||
if (IsFormArgDeferralRelevant(pk.Species) && pk is IFormArgument f)
|
||||
{
|
||||
bool isFormArg0 = f.FormArgument == 0;
|
||||
bool mustBeZero = IsFormArgDeferralRelevant(Species);
|
||||
if (isFormArg0 != mustBeZero)
|
||||
return EncounterMatchRating.DeferredErrors;
|
||||
}
|
||||
return EncounterMatchRating.Match;
|
||||
|
||||
static bool IsFormArgDeferralRelevant(ushort species) => species is (ushort)Core.Species.Kingambit or (ushort)Core.Species.Annihilape;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user