summaryrefslogtreecommitdiff
path: root/DiscoBot
diff options
context:
space:
mode:
authorTrueDoctor <d-kobert@web.de>2017-09-11 21:28:13 +0200
committerTrueDoctor <d-kobert@web.de>2017-09-11 21:28:13 +0200
commit34f5dec6140895a25d01c02526bf6ef584c5e6e4 (patch)
tree2b99b04d1bf4eaa67acab08dae36ea5e60517355 /DiscoBot
parentf92c0340366aa23fca01da98553ef11964106116 (diff)
improved gui
Diffstat (limited to 'DiscoBot')
-rw-r--r--DiscoBot/Char.cs13
-rw-r--r--DiscoBot/Commands.cs9
-rw-r--r--DiscoBot/Misc.cs4
3 files changed, 18 insertions, 8 deletions
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<int> werte = new List<int>();
+ 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<Char> chars = new List<Char>(); //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<string> strings = input.Split('d').ToList();
+ List<string> 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));