コード例 #1
0
ファイル: Pokemon.cs プロジェクト: kaiwen1007/PKRentalViewer
        public string getMovesString()
        {
            string[] format =
            {
                " - " + DataFetch.getMove(Moves[0], this),
                " - " + DataFetch.getMove(Moves[1], this),
                " - " + DataFetch.getMove(Moves[2], this),
                " - " + DataFetch.getMove(Moves[3], this)
            };

            return(string.Join("\n", format));
        }
コード例 #2
0
ファイル: Pokemon.cs プロジェクト: kaiwen1007/PKRentalViewer
        public string ToShowdownFormat(bool HT)
        {
            /* TODO:
             *  - Add the ability to remove the IVs.
             *  - Add the Hidden Power type.
             * */

            string HTFlags = Convert.ToString(HyperTrainingFlags, 2);

            string[] IVString = new string[6];
            for (int i = 0; i < 30 - HTFlags.Length; i++)
            {
                HTFlags = "0" + HTFlags;
            }

            char[] chars = HTFlags.Reverse().ToArray();

            for (int i = 0; i < 6; i++)
            {
                if (chars[i] == '1')
                {
                    if (HT)
                    {
                        IVString[i] = IVs[i].ToString() + "(HT)";
                    }
                    else
                    {
                        IVString[i] = "31";
                    }
                }
                else
                {
                    IVString[i] = IVs[i].ToString();
                }
            }

            string[] format =
            {
                DataFetch.getSpecies(MonsNo,                                                                                                                                                                                                                                                                                                       formID) + /*" ("  +")" +*/ " @ " + DataFetch.getItem(HoldItem),
                "Ability: " + DataFetch.getAbility(MonsNo,                                                                                                                                                                                                                                                                                         formID,                                                        AbilityFlags),
                "Level: " + Level,
                "EVs: " + ((EffortHp == 0)?"":EffortHp + " HP / ") + ((EffortAtk == 0)?"":EffortAtk + " Atk / ") + ((EffortDef == 0)?"":EffortDef + " Def / ") + ((EffortSpAtk == 0)?"":EffortSpAtk + " SpA / ") + ((EffortSpDef == 0)?"":EffortSpDef + " SpD / ") + ((EffortSpeed == 0)?"":EffortSpeed + " Spe"),
                DataFetch.getNature(Nature) + " Nature",
                "IVs: " + ((IVString[0] == "31")?"":IVString[0] + " HP / ") + ((IVString[1] == "31")?"":IVString[1] + " Atk / ") + ((IVString[2] == "31")?"":IVString[2] + " Def / ") + ((IVString[3] == "31")?"":IVString[3] + " SpA / ") + ((IVString[4] == "31")?"":IVString[4] + " SpD / ") + ((IVString[5] == "31")?"":IVString[5] + " Spe"),
                " - " + DataFetch.getMove(Moves[0],                                                                                                                                                                                                                                                                                                this),
                " - " + DataFetch.getMove(Moves[1],                                                                                                                                                                                                                                                                                                this),
                " - " + DataFetch.getMove(Moves[2],                                                                                                                                                                                                                                                                                                this),
                " - " + DataFetch.getMove(Moves[3],                                                                                                                                                                                                                                                                                                this)
            };

            return(string.Join("\n", format));
        }
コード例 #3
0
ファイル: Pokemon.cs プロジェクト: kaiwen1007/PKRentalViewer
        public string getStatsData()
        {
            string HTFlags = Convert.ToString(HyperTrainingFlags, 2);

            for (int i = 0; i < 30 - HTFlags.Length; i++)
            {
                HTFlags = "0" + HTFlags;
            }

            char[] chars = HTFlags.Reverse().ToArray();
            string HT    = "HT: ";

            for (int i = 0; i < 6; i++)
            {
                if (i != 0)
                {
                    HT += "/";
                }
                if (chars[i] == '1')
                {
                    HT += "HT";
                }
                else
                {
                    HT += "X";
                }
            }

            string[] format =
            {
                "Item: " + DataFetch.getItem(HoldItem),
                HT,
                "EVs: " + EffortHp + "H " + EffortAtk + "A " + EffortDef + "B " + EffortSpAtk + "C " + EffortSpDef + "D " + EffortSpeed + "S",
                "IVs: " + IVs[0] + "/" + IVs[1] + "/" + IVs[2] + "/" + IVs[3] + "/" + IVs[4] + "/" + IVs[5],
                "Nature: " + DataFetch.getNature(Nature)
            };

            return(string.Join("\n", format));
        }
コード例 #4
0
ファイル: Pokemon.cs プロジェクト: kaiwen1007/PKRentalViewer
 public String getPokemonName()
 {
     return(DataFetch.getSpecies(MonsNo, formID));
 }
コード例 #5
0
ファイル: Pokemon.cs プロジェクト: kaiwen1007/PKRentalViewer
 public Image getPokemonSprite()
 {
     return(DataFetch.getSprite(MonsNo, formID));
 }