From 5861eccde04faa9c1584c6705a69040182296f93 Mon Sep 17 00:00:00 2001 From: TrueDoctor Date: Tue, 22 Aug 2017 23:20:23 +0200 Subject: added support for more charackters automated char selection attack parade ranged combat --- DiscoBot/Commands.cs | 55 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 50 insertions(+), 5 deletions(-) (limited to 'DiscoBot/Commands.cs') diff --git a/DiscoBot/Commands.cs b/DiscoBot/Commands.cs index 6984761..8e85daf 100644 --- a/DiscoBot/Commands.cs +++ b/DiscoBot/Commands.cs @@ -10,8 +10,18 @@ using Discord.WebSocket; namespace DiscoBot { - class Commands + public static class DSA { + public static Dictionary relation = new Dictionary(); + public static List chars = new List(); + public static void Startup() + { + relation.Add("The Doctor", "Felis Exodus Schattenwald"); + relation.Add("Tardis", "Numeri Illuminus"); + chars.Add(new Char(@"helden\Felis.xml")); + chars.Add(new Char(@"helden\Numeri.xml")); + + } } public class Info : ModuleBase { @@ -19,7 +29,7 @@ namespace DiscoBot [Command("say"), Summary("Echos a message.")] public async Task Say([Remainder, Summary("The text to echo")] string echo) { - + var a = Context.User.Username; // ReplyAsync is a method on ModuleBase await ReplyAsync(echo); @@ -27,16 +37,51 @@ namespace DiscoBot } } - public class Abfrage : ModuleBase + public class TestTalent : ModuleBase { - Char test = new Char(); // ~say hello -> hello [Command("t"), Summary("tests a talent.")] public async Task Say([Remainder, Summary("The text to echo")] string talent) { // ReplyAsync is a method on ModuleBase - await ReplyAsync("```xl\n" + test.TestTalent(talent) + "\n```"); + await ReplyAsync("```xl\n" + DSA.chars.Find(x=>x.name.Equals(DSA.relation[Context.User.Username])).TestTalent(talent) + "\n```"); + + } + } + public class Angriff : ModuleBase + { + // ~say hello -> hello + [Command("a"), Summary("tests a attack.")] + public async Task Say([Remainder, Summary("The text to echo")] string talent) + { + // ReplyAsync is a method on ModuleBase + + await ReplyAsync("```xl\n" + DSA.chars.Find(x => x.name.Equals(DSA.relation[Context.User.Username])).Angriff(talent) + "\n```"); + + } + } + public class Parade : ModuleBase + { + // ~say hello -> hello + [Command("p"), Summary("tests a parade.")] + public async Task Say([Remainder, Summary("The text to echo")] string talent) + { + // ReplyAsync is a method on ModuleBase + + await ReplyAsync("```xl\n" + DSA.chars.Find(x => x.name.Equals(DSA.relation[Context.User.Username])).Parade(talent) + "\n```"); + + } + } + public class Fernkampf : ModuleBase + { + // ~say hello -> hello + [Command("f"), Summary("tests a shot.")] + public async Task Say([Remainder, Summary("The text to echo")] string talent) + { + // ReplyAsync is a method on ModuleBase + + await ReplyAsync("```xl\n" + DSA.chars.Find(x => x.name.Equals(DSA.relation[Context.User.Username])).Fernkampf(talent) + "\n```"); } } -- cgit v1.2.3-70-g09d2