Fix alpha move flag check

This commit is contained in:
Kurt 2025-10-30 23:48:37 -05:00
parent f4e6520afe
commit 649ba5f1f2
2 changed files with 2 additions and 2 deletions

View File

@ -120,7 +120,7 @@ public bool IsMatchExact(PKM pk, EvoCriteria evo)
public EncounterMatchRating GetMatchRating(PKM pk)
{
if (IsAlpha && pk is IPlusRecord pa9 && !pa9.GetMovePlusFlag(PersonalTable.ZA[Species, Form].AlphaMove))
if (IsAlpha && pk is IPlusRecord pa9 && pk.PersonalInfo is IPermitPlus p && !pa9.GetMovePlusFlag(p.RecordPermitIndexes.IndexOf(PersonalTable.ZA[Species, Form].AlphaMove)))
return EncounterMatchRating.DeferredErrors;
var pidiv = TryGetSeed(pk, out _);

View File

@ -161,7 +161,7 @@ private EncounterMatchRating IsMatchDeferred(PKM pk)
if (Shiny != Shiny.Random && !Shiny.IsValid(pk))
return EncounterMatchRating.DeferredErrors;
if (IsAlpha && pk is IPlusRecord pa9 && !pa9.GetMovePlusFlag(PersonalTable.ZA[Species, Form].AlphaMove))
if (IsAlpha && pk is IPlusRecord pa9 && pk.PersonalInfo is IPermitPlus p && !pa9.GetMovePlusFlag(p.RecordPermitIndexes.IndexOf(PersonalTable.ZA[Species, Form].AlphaMove)))
return EncounterMatchRating.DeferredErrors;
var pidiv = TryGetSeed(pk, out _);