コード例 #1
0
        public static string PokemontoPS_once(PokemonInfo poke)
        {
            string team = Pokemondata.EnglishName[(int)(Pokemondata.PokemonnameID[poke.name])];

            if (poke.Gmax)
            {
                team += "-Gmax";
            }
            if (poke.Item != "")
            {
                team += " @ " + Pokemondata.ItemEngName[Pokemondata.GetItemId(poke.Item)];
            }
            team += "\r\n";
            if (poke.Ability != "")
            {
                team += "Ability: " + Pokemondata.AbilityEngName[Pokemondata.GetAbilityId(poke.Ability)] + "\r\n";
            }
            team += "Level: 50\r\n";
            if (poke.Happiness != 160)
            {
                team += "Happiness: " + poke.Happiness + "\r\n";
            }
            string aa = "";

            string[] orz = { "HP", "Atk", "Def", "SpA", "SpD", "Spe" };
            for (int i = 0; i < 6; ++i)
            {
                if (poke.EVS.Value[i] != 0)
                {
                    aa += " " + (poke.EVS.Value[i]).ToString() + " " + orz[i] + " /";
                }
            }
            if (aa != "")
            {
                team += "EVs:" + aa.Substring(0, aa.Length - 1) + "\r\n";
            }
            if (poke.Nature != null)
            {
                team += Pokemondata.Engnature[poke.Nature.id];
            }
            else
            {
                team += Pokemondata.Engnature[0];
            }
            team += " Nature\r\n";
            aa    = "";
            for (int i = 0; i < 6; ++i)
            {
                if (poke.IVS.Value[i] != 31)
                {
                    aa += " " + (poke.IVS.Value[i]).ToString() + " " + orz[i] + " /";
                }
            }
            if (aa != "")
            {
                team += "IVs:" + aa.Substring(0, aa.Length - 1) + "\r\n";
            }

            foreach (string i in poke.move)
            {
                if (i != "")
                {
                    if (i.Contains("觉醒力量"))
                    {
                        if (i.Contains("-"))
                        {
                            team += string.Format("Hidden Power [{0}]\r\n", Pokemondata.GetEngTypeName(Pokemondata.GetTypeId(i.Substring(i.IndexOf("-") + 1))));
                        }
                        else
                        {
                            team += string.Format("Hidden Power [{0}]\r\n", poke.getHiddenPowerType());
                        }
                    }
                    else
                    {
                        team += "- " + Pokemondata.MoveEngName[Pokemondata.GetMoveId(i)] + "\r\n";
                    }
                }
            }
            return(team);
        }