Exemple #1
0
        public override void Verify(LegalityAnalysis data)
        {
            var pkm = data.pkm;
            int originalGeneration = data.Info.Generation;
            int currentLanguage    = pkm.Language;
            int maxLanguageID      = Legal.GetMaxLanguageID(originalGeneration);

            if (!IsValidLanguageID(currentLanguage, maxLanguageID, pkm))
            {
                data.AddLine(GetInvalid(string.Format(V5, $"<={maxLanguageID}", currentLanguage)));
                return;
            }

            // Korean Gen4 games can not trade with other Gen4 languages, but can use Pal Park with any Gen3 game/language.
            if (pkm.Format == 4 && pkm.Gen4 && !IsValidG4Korean(currentLanguage))
            {
                bool kor    = currentLanguage == (int)LanguageID.Korean;
                var  msgpkm = kor ? V611 : V612;
                var  msgsav = kor ? V612 : V611;
                data.AddLine(GetInvalid(string.Format(V610, msgpkm, msgsav)));
                return;
            }

            // Korean Crystal does not exist, neither do VC1
            if (originalGeneration <= 2 && pkm.Korean && !GameVersion.GS.Contains((GameVersion)pkm.Version))
            {
                data.AddLine(GetInvalid(string.Format(V5, $"!={(LanguageID)currentLanguage}", currentLanguage)));
            }
        }
Exemple #2
0
        public override void Verify(LegalityAnalysis data)
        {
            var pkm = data.pkm;
            int originalGeneration = data.Info.Generation;
            int currentLanguage    = pkm.Language;
            int maxLanguageID      = Legal.GetMaxLanguageID(originalGeneration);

            if (!IsValidLanguageID(currentLanguage, maxLanguageID, pkm))
            {
                data.AddLine(GetInvalid(string.Format(LOTLanguage, $"<={(LanguageID)maxLanguageID}", (LanguageID)currentLanguage)));
                return;
            }

            // Korean Gen4 games can not trade with other Gen4 languages, but can use Pal Park with any Gen3 game/language.
            if (pkm.Format == 4 && pkm.Gen4 && !IsValidG4Korean(currentLanguage) &&
                !(data.EncounterMatch is EncounterTrade x && (x.Species == 25 || x.Species == 129))    // ger magikarp / eng pikachu
                )
            {
                bool kor    = currentLanguage == (int)LanguageID.Korean;
                var  msgpkm = kor ? L_XKorean : L_XKoreanNon;
                var  msgsav = kor ? L_XKoreanNon : L_XKorean;
                data.AddLine(GetInvalid(string.Format(LTransferOriginFInvalid0_1, msgpkm, msgsav)));
                return;
            }

            // Korean Crystal does not exist, neither do VC1
            if (originalGeneration <= 2 && pkm.Korean && !GameVersion.GS.Contains((GameVersion)pkm.Version))
            {
                data.AddLine(GetInvalid(string.Format(LOTLanguage, $"!={(LanguageID)currentLanguage}", (LanguageID)currentLanguage)));
            }
        }
Exemple #3
0
        public override void Verify(LegalityAnalysis data)
        {
            var pkm = data.pkm;
            int originalGeneration = data.Info.Generation;
            int currentLanguage    = pkm.Language;
            int maxLanguageID      = Legal.GetMaxLanguageID(originalGeneration);

            if (!IsValidLanguageID(currentLanguage, maxLanguageID, pkm))
            {
                data.AddLine(GetInvalid(string.Format(LOTLanguage, $"<={(LanguageID)maxLanguageID}", (LanguageID)currentLanguage)));
                return;
            }

            // Korean Gen4 games can not trade with other Gen4 languages, but can use Pal Park with any Gen3 game/language.
            if (pkm.Format == 4 && pkm.Gen4 && !IsValidG4Korean(currentLanguage) &&
                !(data.EncounterMatch is EncounterTrade4 {
                Species : (int)Species.Pikachu or(int) Species.Magikarp
            })                                                                                                        // ger magikarp / eng pikachu