diff options
-rw-r--r-- | DiscoBot/Commands/Gm.cs | 2 | ||||
-rw-r--r-- | DiscoBot/Commands/HeldList.cs | 11 | ||||
-rw-r--r-- | DiscoBot/Commands/ProbenTest.cs | 4 | ||||
-rw-r--r-- | DiscoBot/DSA_Game/Talent.cs | 19 |
4 files changed, 31 insertions, 5 deletions
diff --git a/DiscoBot/Commands/Gm.cs b/DiscoBot/Commands/Gm.cs index 212bc83..7fe858c 100644 --- a/DiscoBot/Commands/Gm.cs +++ b/DiscoBot/Commands/Gm.cs @@ -18,7 +18,7 @@ string res; string name; - if (givenName.Length == 0) + if (givenName.Length == 0 || (givenName.Length == 1 && (givenName[0].ToLower().Equals("bin") || givenName[0].ToLower().Equals("am")))) { res = " \nDu bist " + Dsa.Relation[this.Context.User.Username] + "!\n \n"; diff --git a/DiscoBot/Commands/HeldList.cs b/DiscoBot/Commands/HeldList.cs index a7eb920..d1b25be 100644 --- a/DiscoBot/Commands/HeldList.cs +++ b/DiscoBot/Commands/HeldList.cs @@ -48,6 +48,11 @@ res.AddRange( character.Kampftalente.Select(s => s.Name.AddSpaces(first_column_width) + " " + s.At.ToString().AddSpacesAtHead(2) + "/" + s.Pa.ToString().AddSpacesAtHead(2))); res.Add(""); + //Fernkampf + res.Add("".AddSpaces(first_column_width) + " FK"); + res.AddRange( + character.Talente.Where(x => x.IstFernkampftalent()).Select(s => s.Name.AddSpaces(first_column_width) + " " + (character.Eigenschaften["fk"] + s.Value).ToString().AddSpacesAtHead(2))); + res.Add(""); //Vorteile res.AddRange( character.Vorteile @@ -126,9 +131,11 @@ res.AddRange( character.Kampftalente.Select(s => s.Name.AddSpaces(first_column_width) + " " + s.At.ToString().AddSpacesAtHead(2) + "/" + s.Pa.ToString().AddSpacesAtHead(2))); break; + case "f": case "fern": + res.Add("".AddSpaces(first_column_width) + " FK"); res.AddRange( - character.Talente.Select(s => s.Name)); + character.Talente.Where(x => x.IstFernkampftalent()).Select(s => s.Name.AddSpaces(first_column_width) + " " + (character.Eigenschaften["fk"] + s.Value).ToString().AddSpacesAtHead(2))); break; case "v": case "vt": @@ -173,7 +180,7 @@ //} if (persist == 1) { - await this.ReplyAsync(res); + await this.ReplyAsync(res, true); } else { diff --git a/DiscoBot/Commands/ProbenTest.cs b/DiscoBot/Commands/ProbenTest.cs index 1d8f8b0..e14d5a4 100644 --- a/DiscoBot/Commands/ProbenTest.cs +++ b/DiscoBot/Commands/ProbenTest.cs @@ -68,7 +68,7 @@ } [Command("a"), Summary("Würfelt ein Angriff")] - [Alias("At", "at", "Angriff", "angriff", "attackiere_mit", "attacke", "Attacke")] + [Alias("A", "At", "at", "Angriff", "angriff", "attackiere_mit", "attacke", "Attacke")] public Task AngriffAsync([Summary("Weapon")] string weapon, int erschwernis = 0) { return this.ReplyAsync("```xl\n" + Dsa.Chars.Find(x => x.Name.Equals(Dsa.Relation[this.Context.User.Username])).Angriff(weapon, erschwernis) + "\n```"); @@ -82,7 +82,7 @@ } [Command("f"), Summary("Führt eine Fernkampfprobe aus")] - [Alias("F", "fernkampf", "Fernkampf", "schieße", "schieße_mit")] + [Alias("F", "fern", "Fern", "Schuss", "schuss", "fernkampf", "Fernkampf", "schieße", "schieße_mit")] public Task FernkampfAsync([Summary("Fernkampfwaffe")] string waffe, int erschwernis = 0) { return this.ReplyAsync("```xl\n" + Dsa.Chars.Find(x => x.Name.Equals(Dsa.Relation[this.Context.User.Username])).Fernkampf(waffe, erschwernis) + "\n```"); diff --git a/DiscoBot/DSA_Game/Talent.cs b/DiscoBot/DSA_Game/Talent.cs index fe097fa..ff91742 100644 --- a/DiscoBot/DSA_Game/Talent.cs +++ b/DiscoBot/DSA_Game/Talent.cs @@ -35,5 +35,24 @@ var sc = (StringComparer)new SpellCorrect(); return sc.Compare(quarry, this.Name); } + + public bool IstFernkampftalent() + { + switch (Name) + { + case "Armbrust": + case "Belagerungswaffen": + case "Blasrohr": + case "Bogen": + case "Diskus": + case "Schleuder": + case "Wurfbeile": + case "Wurfmesser": + case "Wurfspeere": + return true; + default: + return false; + } + } } } |