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)); }
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, "Happiness: 0", "EVs: " + EffortHp + " HP / " + EffortAtk + " Atk / " + EffortDef + " Def / " + EffortSpAtk + " SpA / " + EffortSpDef + " SpD / " + EffortSpeed + " Spe", DataFetch.getNature(Nature) + " Nature", "IVs: " + IVString[0] + " HP / " + IVString[1] + " Atk / " + IVString[2] + " Def / " + IVString[3] + " SpA / " + IVString[4] + " SpD / " + 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)); }
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] }; return(string.Join("\n", format)); }