summaryrefslogtreecommitdiff
path: root/DiscoBot/DSA.cs
diff options
context:
space:
mode:
authorTrueDoctor <d-kobert@web.de>2018-04-09 14:13:28 +0200
committerTrueDoctor <d-kobert@web.de>2018-04-09 14:13:28 +0200
commit5cb8346a6a3ccc55295c00ac333e410629ff7c42 (patch)
tree1603fdf24f1ead61cf7dd23c09a9784cfb1c780e /DiscoBot/DSA.cs
parente49ac2778bb6d38517f14447c0675df354552528 (diff)
parent4ca7291ebee440d9f3ef2a1643d8d01b29006459 (diff)
Merge branch 'Reset'
Diffstat (limited to 'DiscoBot/DSA.cs')
-rw-r--r--DiscoBot/DSA.cs45
1 files changed, 45 insertions, 0 deletions
diff --git a/DiscoBot/DSA.cs b/DiscoBot/DSA.cs
new file mode 100644
index 0000000..d9cefb2
--- /dev/null
+++ b/DiscoBot/DSA.cs
@@ -0,0 +1,45 @@
+namespace DiscoBot
+{
+ using System.Collections.Generic;
+ using System.IO;
+ using System.Linq;
+
+ using DiscoBot.Auxiliary;
+ using DiscoBot.Characters;
+
+ using Discord.Commands;
+
+ public static class Dsa
+ {
+ public static ICommandContext GeneralContext { get; set; }
+
+ public static Dictionary<string, string> Relation { get; set; } = new Dictionary<string, string>(); // dictionary to match the char
+
+ public static List<ICharacter> Chars { get; set; } = new List<ICharacter>(); // list of all characters
+
+ public static List<Talent> Talente { get; set; } = new List<Talent>();
+
+ public static void Startup()
+ {
+ Relation.Add("The Doctor", "Numeri Illuminus"); // Relation
+ Relation.Add("Tardis", "Morla"); // "Numeri Illuminus");
+ Relation.Add("DSA Bot", "Morla"); // "Felis Exodus Schattenwald");
+ Relation.Add("Morla", "Morla");
+ Relation.Add("Rhoktar", "Rhoktar4");
+
+ // relation.Add("Papo","Gwendelson");
+ Relation.Add("Papo", "Pump aus der Gosse");
+ Relation.Add("Potus", "Potus");
+
+ // relation.Add("Papo", "Pump aus der Gosse");
+ foreach (var filename in Directory.GetFiles("helden", "*.xml"))
+ {
+ Chars.Add(new Character(filename));
+ (Chars.Last() as Character)?.Talente.Select(x => new Talent(x.Name, x.Probe, 0))
+ .Where(c => !Talente.Exists(v => v.Name.Equals(c.Name))).ToList().ForEach(v => Talente.Add(v));
+ }
+
+ Talente = Talente.OrderBy(x => x.Name).ToList();
+ }
+ }
+} \ No newline at end of file