Beispiel #1
0
        private static void VerifyCXDStarterCorrelation(LegalityAnalysis data)
        {
            var pidiv = data.Info.PIDIV;

            if (pidiv.Type != PIDType.CXD)
            {
                return;
            }

            bool valid;
            var  EncounterMatch = data.EncounterMatch;
            var  pkm            = data.pkm;

            switch (EncounterMatch.Species)
            {
            case (int)Species.Eevee:
                valid = LockFinder.IsXDStarterValid(pidiv.OriginSeed, pkm.TID, pkm.SID); break;

            case (int)Species.Espeon:
            case (int)Species.Umbreon:
                valid = pidiv.Type == PIDType.CXD_ColoStarter; break;

            default:
                return;
            }
            if (!valid)
            {
                data.AddLine(GetInvalid(LEncConditionBadRNGFrame, CheckIdentifier.PID));
            }
        }
Beispiel #2
0
 private static void VerifyCXDStarterCorrelation(LegalityAnalysis data, EncounterStatic3 enc)
 {
     var(type, seed) = data.Info.PIDIV;
     if (type is not(PIDType.CXD or PIDType.CXDAnti or PIDType.CXD_ColoStarter))
     {
         return; // already flagged as invalid
     }
     var  pkm   = data.pkm;
     bool valid = enc.Species switch
     {
         (int)Species.Eevee => LockFinder.IsXDStarterValid(seed, pkm.TID, pkm.SID),
         (int)Species.Espeon or(int) Species.Umbreon => type == PIDType.CXD_ColoStarter,
         _ => true,
     };
Beispiel #3
0
        private static void VerifyCXDStarterCorrelation(LegalityAnalysis data)
        {
            var pidiv = data.Info.PIDIV;

            if (pidiv.Type is not(PIDType.CXD or PIDType.CXDAnti))
            {
                return; // already flagged as invalid
            }
            var  pkm   = data.pkm;
            bool valid = data.EncounterMatch.Species switch
            {
                (int)Species.Eevee => LockFinder.IsXDStarterValid(pidiv.OriginSeed, pkm.TID, pkm.SID),
                (int)Species.Espeon or(int) Species.Umbreon => pidiv.Type == PIDType.CXD_ColoStarter,
                _ => true,
            };