Exemplo n.º 1
0
        public void VerifyOTG1(LegalityAnalysis data)
        {
            var    pkm = data.pkm;
            string tr  = pkm.OT_Name;

            VerifyG1OTWithinBounds(data, tr);
            if (data.EncounterOriginal is EncounterStatic s && (s.Version == GameVersion.Stadium || s.Version == GameVersion.Stadium2))
            {
                data.AddLine(VerifyG1OTStadium(pkm, tr, s));
            }

            if (pkm.Species == (int)Species.Mew)
            {
                var OTMatch = (tr == Legal.GetG1OT_GFMew((int)LanguageID.Japanese)) ||
                              (tr == Legal.GetG1OT_GFMew((int)LanguageID.English));
                if (!OTMatch || pkm.TID != 22796)
                {
                    data.AddLine(GetInvalid(LG1OTEvent));
                }
            }

            if (pkm.OT_Gender == 1 && ((pkm.Format == 2 && pkm.Met_Location == 0) || (pkm.Format > 2 && pkm.VC1)))
            {
                data.AddLine(GetInvalid(LG1OTGender));
            }
        }
Exemplo n.º 2
0
        private int GetEdgeCaseLanguage(PKM pk, int lang)
        {
            switch (pk.Format)
            {
            case 1 when Species == (int)Core.Species.Mew && Version == GameVersion.VCEvents:     // VC Mew
                pk.TID     = 22796;
                pk.OT_Name = Legal.GetG1OT_GFMew(lang);
                return(lang);

            case 1 when Version == GameVersion.EventsGBGen1:
            case 2 when Version == GameVersion.EventsGBGen2:
            case 3 when this is EncounterStaticShadow s && s.EReader:
            case 3 when Species == (int)Core.Species.Mew:
                pk.OT_Name = "ゲーフリ";
                return((int)LanguageID.Japanese);    // Old Sea Map was only distributed to Japanese games.

            default:
                return(lang);
            }
        }