From 34f5dec6140895a25d01c02526bf6ef584c5e6e4 Mon Sep 17 00:00:00 2001 From: TrueDoctor Date: Mon, 11 Sep 2017 21:28:13 +0200 Subject: improved gui --- DiscoBot/Char.cs | 13 ++++++++++--- DiscoBot/Commands.cs | 9 ++++++--- DiscoBot/Misc.cs | 4 ++-- 3 files changed, 18 insertions(+), 8 deletions(-) (limited to 'DiscoBot') diff --git a/DiscoBot/Char.cs b/DiscoBot/Char.cs index 352274f..45d975e 100644 --- a/DiscoBot/Char.cs +++ b/DiscoBot/Char.cs @@ -85,16 +85,23 @@ namespace DiscoBot var ttalent = talente[ttalentlist.IndexOf(error)]; var props = ttalent.Test(); //get the required properties int tap = ttalent.value; //get tap - output.AppendFormat("{0} {1} taw:{2} error: \n", ttalent.name,ttalent.probe,ttalent.value,error); + List werte = new List(); + foreach (string p in props) + { + werte.Add(eigenschaften[Proptable[p]]); + } + output.AppendFormat("{0} würfelt: {1} \n{2} - {3} taw:{4} \n", this.name,ttalent.name,ttalent.probe,String.Join("/",werte),ttalent.value); + output.Append(" "); for (int i = 0; i <= 2; i++) //foreach property, dice and tap { int temp = dice.Roll(); int eigenschaft = eigenschaften[Proptable[props[i]]]; if (eigenschaft < temp) tap -= temp - eigenschaft; - output.Append(temp + " "); //add to string + output.Append("["+temp + "]"); //add to string } - output.AppendFormat("tap: {0}",tap); + + output.AppendFormat(" tap: {0,20}",tap); if (error == 100) return talent + " nicht gefunden!"; return output.ToString(); //return output diff --git a/DiscoBot/Commands.cs b/DiscoBot/Commands.cs index f812dfc..7459451 100644 --- a/DiscoBot/Commands.cs +++ b/DiscoBot/Commands.cs @@ -16,11 +16,14 @@ namespace DiscoBot public static List chars = new List(); //list of all charackters public static void Startup() { - relation.Add("The Doctor", "Felis Exodus Schattenwald");//Relation + relation.Add("The Doctor", "Numeri Illuminus");//Relation relation.Add("Tardis", "Numeri Illuminus"); - relation.Add("DSA Bot", "Numeri Illuminus"); + relation.Add("DSA Bot", "Felis Exodus Schattenwald"); + relation.Add("Papo","Gwendelson"); + relation.Add("Potus","Volant"); chars.Add(new Char(@"helden\Felis.xml")); //Savefile chars.Add(new Char(@"helden\Numeri.xml")); + chars.Add(new Char(@"helden\Volant.xml")); } } @@ -43,7 +46,7 @@ namespace DiscoBot public async Task Say([Remainder, Summary("Weapon")] string roll) { - await ReplyAsync("```xl\n**" + Misc.Roll(roll) + "**\n```"); + await ReplyAsync("```xl\n" + Misc.Roll(roll) + "\n```"); } } diff --git a/DiscoBot/Misc.cs b/DiscoBot/Misc.cs index c310148..3876321 100644 --- a/DiscoBot/Misc.cs +++ b/DiscoBot/Misc.cs @@ -12,7 +12,7 @@ namespace DiscoBot { int count = 1, d,mod=0; var Output = new StringBuilder(); - List strings = input.Split('d').ToList(); + List strings = input.Split('w','d').ToList(); count = Convert.ToInt32(strings[0]); strings = strings[1].Split(' ').ToList(); d = Convert.ToInt32(strings[0]); @@ -24,7 +24,7 @@ namespace DiscoBot { var roll = dice.Roll(d); sum += roll; - Output.Append(roll + " "); + Output.Append("["+roll + "] "); } if (count > 1) Output.Append("sum: " + (sum)); -- cgit v1.2.3-54-g00ecf