From d63ffc58db0f032cf7573b2a8a7720de2d5050ab Mon Sep 17 00:00:00 2001 From: TrueDoctor Date: Sun, 3 Jun 2018 23:16:17 +0200 Subject: -General restructuring -seperated talents and spells --- DiscoBot/Audio/AudioModule.cs | 2 + DiscoBot/Audio/AudioService.cs | 2 + DiscoBot/Auxiliary/KampfTalent.cs | 18 -- DiscoBot/Auxiliary/Talent.cs | 37 --- DiscoBot/Auxiliary/TalentEnumerableExtension.cs | 95 +++++++ DiscoBot/Auxiliary/Vorteil.cs | 18 -- DiscoBot/Characters/Character.cs | 332 ------------------------ DiscoBot/Characters/ICharacter.cs | 25 -- DiscoBot/Characters/NPC.cs | 109 -------- DiscoBot/Commands/CommandTypes.cs | 3 +- DiscoBot/Commands/FileHandler.cs | 3 +- DiscoBot/Commands/Gm.cs | 3 + DiscoBot/Commands/List.cs | 3 +- DiscoBot/Commands/MiscCommands.cs | 36 +-- DiscoBot/Commands/NpcCommands.cs | 4 +- DiscoBot/Commands/ProbenTest.cs | 27 ++ DiscoBot/DSA.cs | 51 ---- DiscoBot/DSA_Game/Characters/Character.cs | 271 +++++++++++++++++++ DiscoBot/DSA_Game/Characters/ICharacter.cs | 27 ++ DiscoBot/DSA_Game/Characters/NPC.cs | 115 ++++++++ DiscoBot/DSA_Game/Dsa.cs | 51 ++++ DiscoBot/DSA_Game/KampfTalent.cs | 18 ++ DiscoBot/DSA_Game/Talent.cs | 39 +++ DiscoBot/DSA_Game/Vorteil.cs | 18 ++ DiscoBot/DSA_Game/Zauber.cs | 22 ++ DiscoBot/DiscoBot.csproj | 16 +- DiscoBot/Program.cs | 1 + 27 files changed, 711 insertions(+), 635 deletions(-) delete mode 100644 DiscoBot/Auxiliary/KampfTalent.cs delete mode 100644 DiscoBot/Auxiliary/Talent.cs create mode 100644 DiscoBot/Auxiliary/TalentEnumerableExtension.cs delete mode 100644 DiscoBot/Auxiliary/Vorteil.cs delete mode 100644 DiscoBot/Characters/Character.cs delete mode 100644 DiscoBot/Characters/ICharacter.cs delete mode 100644 DiscoBot/Characters/NPC.cs delete mode 100644 DiscoBot/DSA.cs create mode 100644 DiscoBot/DSA_Game/Characters/Character.cs create mode 100644 DiscoBot/DSA_Game/Characters/ICharacter.cs create mode 100644 DiscoBot/DSA_Game/Characters/NPC.cs create mode 100644 DiscoBot/DSA_Game/Dsa.cs create mode 100644 DiscoBot/DSA_Game/KampfTalent.cs create mode 100644 DiscoBot/DSA_Game/Talent.cs create mode 100644 DiscoBot/DSA_Game/Vorteil.cs create mode 100644 DiscoBot/DSA_Game/Zauber.cs (limited to 'DiscoBot') diff --git a/DiscoBot/Audio/AudioModule.cs b/DiscoBot/Audio/AudioModule.cs index 9eaf1f2..9cc4823 100644 --- a/DiscoBot/Audio/AudioModule.cs +++ b/DiscoBot/Audio/AudioModule.cs @@ -14,6 +14,8 @@ using Discord.Commands; namespace DiscoBot.Audio { + using DiscoBot.DSA_Game; + public class AudioModule : ModuleBase { // Scroll down further for the AudioService. diff --git a/DiscoBot/Audio/AudioService.cs b/DiscoBot/Audio/AudioService.cs index 25beed0..52caf23 100644 --- a/DiscoBot/Audio/AudioService.cs +++ b/DiscoBot/Audio/AudioService.cs @@ -5,6 +5,8 @@ using System.IO; using System.Threading.Tasks; + using DiscoBot.DSA_Game; + using Discord; using Discord.Audio; diff --git a/DiscoBot/Auxiliary/KampfTalent.cs b/DiscoBot/Auxiliary/KampfTalent.cs deleted file mode 100644 index 05b7c9e..0000000 --- a/DiscoBot/Auxiliary/KampfTalent.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace DiscoBot.Auxiliary -{ - public class KampfTalent - { - public KampfTalent(string name, int at, int pa) - { - this.Name = name; - this.At = at; - this.Pa = pa; - } - - public string Name { get; set; } - - public int At { get; set; } - - public int Pa { get; set; } - } -} diff --git a/DiscoBot/Auxiliary/Talent.cs b/DiscoBot/Auxiliary/Talent.cs deleted file mode 100644 index e93aa18..0000000 --- a/DiscoBot/Auxiliary/Talent.cs +++ /dev/null @@ -1,37 +0,0 @@ -namespace DiscoBot.Auxiliary -{ - using System; - - public class Talent // talent objekt - { - public Talent(string name, string probe, int value) - { - this.Name = name; - this.Probe = probe; - this.Value = value; - } - - public string Name { get; set; } - - public string Probe { get; set; } - - public int Value { get; set; } - - public string[] GetEigenschaften() // turn XX/XX/XX into string[]{XX,XX,XX} - { - var temp = this.Probe.Split('/'); - for (var index = 0; index < temp.Length; index++) - { - temp[index] = temp[index].Replace("/", string.Empty); - } - - return temp; - } - - public int CheckName(string quarry) - { - var sc = (StringComparer)new SpellCorrect(); - return sc.Compare(quarry, this.Name); - } - } -} diff --git a/DiscoBot/Auxiliary/TalentEnumerableExtension.cs b/DiscoBot/Auxiliary/TalentEnumerableExtension.cs new file mode 100644 index 0000000..3c5330b --- /dev/null +++ b/DiscoBot/Auxiliary/TalentEnumerableExtension.cs @@ -0,0 +1,95 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DiscoBot.Auxiliary +{ + using DiscoBot.Audio; + using DiscoBot.Commands; + using DiscoBot.DSA_Game; + using DiscoBot.DSA_Game.Characters; + + public static class TalentEnumerableExtension + { + public static string ProbenTest(this IEnumerable List, Character c, string talent, int erschwernis = 0) + { + var output = new StringBuilder(); + var sc = new SpellCorrect(); + var tTalent = List.OrderBy(x => sc.Compare(talent, x.Name)).First(); + + if (sc.Compare(talent, tTalent.Name) > SpellCorrect.ErrorThreshold) + { + SoundEffects.Play(Sound.Wrong).Wait(); + return $"{c.Name} kann nicht {talent}..."; + } + + var props = tTalent.GetEigenschaften(); // get the required properties + int tap = tTalent.Value; // get taw + var werte = props.Select(p => c.Eigenschaften[c.PropTable[p]]).ToList(); + + output.AppendFormat( + "{0} würfelt: {1} \n{2} - {3} taw:{4} {5} \n", + c.Name, + tTalent.Name, + tTalent.Probe, + string.Join("/", werte), + tTalent.Value, + erschwernis.Equals(0) ? string.Empty : "Erschwernis: " + erschwernis); + + output.Append(" "); + tap -= erschwernis; + int gesamtErschwernis = tap; + if (gesamtErschwernis < 0) + { + tap = 0; + for (int i = 0; i <= 2; i++) + { + // foreach property, dice and tap + int temp = Dice.Roll(); + int eigenschaft = c.Eigenschaften[c.PropTable[props[i]]]; + + if (eigenschaft + gesamtErschwernis < temp) + { + tap -= temp - (eigenschaft + gesamtErschwernis); + } + + output.Append($"[{temp}]"); // add to string + } + + if (tap >= 0) + { + tap = 1; + } + } + else + { + for (int i = 0; i <= 2; i++) + { + // foreach property, dice and tap + int temp = Dice.Roll(); + int eigenschaft = c.Eigenschaften[c.PropTable[props[i]]]; + + if (eigenschaft < temp) + { + tap -= temp - eigenschaft; + } + + output.Append($"[{temp}]"); // add to string + } + } + + tap = (tap == 0) ? 1 : tap; + + if (tap < 0) + { + //SoundEffects.Play(Sound.Wrong).Wait(); + } + + output.AppendFormat(" tap: {0,2}", tap); + + return output.ToString(); // return output + } + } +} diff --git a/DiscoBot/Auxiliary/Vorteil.cs b/DiscoBot/Auxiliary/Vorteil.cs deleted file mode 100644 index 57f2020..0000000 --- a/DiscoBot/Auxiliary/Vorteil.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace DiscoBot.Auxiliary -{ - public class Vorteil // talent objekt - { - public Vorteil(string name, string value = "") - { - this.Name = name; - this.Value = value; - // this.Choice = choice; - } - - public string Name { get; set; } - - public string Value { get; set; } - - //public string Choice { get; set; } - } -} diff --git a/DiscoBot/Characters/Character.cs b/DiscoBot/Characters/Character.cs deleted file mode 100644 index 86e8b3a..0000000 --- a/DiscoBot/Characters/Character.cs +++ /dev/null @@ -1,332 +0,0 @@ -namespace DiscoBot.Characters -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Text; - using System.Xml; - - using DiscoBot.Audio; - using DiscoBot.Auxiliary; - - public class Character : ICharacter - { - public Character() - { - this.PropTable.Add("MU", "Mut"); // routing - this.PropTable.Add("KL", "Klugheit"); - this.PropTable.Add("IN", "Intuition"); - this.PropTable.Add("CH", "Charisma"); - this.PropTable.Add("FF", "Fingerfertigkeit"); - this.PropTable.Add("GE", "Gewandtheit"); - this.PropTable.Add("KO", "Konstitution"); - this.PropTable.Add("KK", "Körperkraft"); - - } - - public Character(string path) : this() - { - this.Load(path); // load - this.Post_process(); // calculate derived values - } - - public Character(Character c, string name, int stDv = 2) : this() - { - this.Name = name; - foreach (var i in c.Eigenschaften) - { - this.Eigenschaften.Add(i.Key, i.Value + (int)Math.Round(RandomMisc.Random(stDv))); - } - - foreach (var i in c.Vorteile) - { - this.Vorteile.Add(new Vorteil(i.Name, i.Value + (int)Math.Round(RandomMisc.Random(stDv)))); - } - - foreach (var i in c.Talente) - { - this.Talente.Add(new Talent(i.Name, i.Probe, i.Value + (int)Math.Round(RandomMisc.Random(stDv)))); - } - - foreach (var i in c.Kampftalente) - { - this.Kampftalente.Add(new KampfTalent(i.Name, i.At + (int)Math.Round(RandomMisc.Random(stDv)), i.Pa + (int)Math.Round(RandomMisc.Random(stDv)))); - } - - this.Post_process(); // calculate derived values - } - - public string Name { get; set; } // char name - - public int Lebenspunkte { get; set; } - - public Dictionary Eigenschaften { get; set; } = new Dictionary(); // char properties - - public List Talente { get; set; } = new List(); // list of talent objects (talents and spells) - - public List Kampftalente { get; set; } = new List(); // list of combat objects - - public List Vorteile { get; set; } = new List(); - - public Dictionary PropTable { get; set; } = new Dictionary(); // -> Körperkraft - - public string TestTalent(string talent, int erschwernis = 0) // Talentprobe - { - var output = new StringBuilder(); - var sc = new SpellCorrect(); - var tTalent = this.Talente.OrderBy(x => sc.Compare(talent, x.Name)).First(); - - if (sc.Compare(talent, tTalent.Name) > SpellCorrect.ErrorThreshold) - { - SoundEffects.Play(Sound.Wrong).Wait(); - return $"{this.Name} kann nicht {talent}..."; - } - - var props = tTalent.GetEigenschaften(); // get the required properties - int tap = tTalent.Value; // get taw - var werte = props.Select(p => this.Eigenschaften[this.PropTable[p]]).ToList(); - - output.AppendFormat( - "{0} würfelt: {1} \n{2} - {3} taw:{4} {5} \n", - this.Name, - tTalent.Name, - tTalent.Probe, - string.Join("/", werte), - tTalent.Value, - erschwernis.Equals(0) ? string.Empty : "Erschwernis: " + erschwernis); - - output.Append(" "); - tap -= erschwernis; - int gesamtErschwernis = tap; - if (gesamtErschwernis < 0) - { - tap = 0; - for (int i = 0; i <= 2; i++) - { - // foreach property, dice and tap - int temp = Dice.Roll(); - int eigenschaft = this.Eigenschaften[this.PropTable[props[i]]]; - - if (eigenschaft + gesamtErschwernis < temp) - { - tap -= temp - (eigenschaft + gesamtErschwernis); - } - - output.Append($"[{temp}]"); // add to string - } - - if (tap >= 0) - { - tap = 1; - } - } - else - { - for (int i = 0; i <= 2; i++) - { - // foreach property, dice and tap - int temp = Dice.Roll(); - int eigenschaft = this.Eigenschaften[this.PropTable[props[i]]]; - - if (eigenschaft < temp) - { - tap -= temp - eigenschaft; - } - - output.Append($"[{temp}]"); // add to string - } - } - - tap = (tap == 0) ? 1 : tap; - - if (tap < 0) - { - //SoundEffects.Play(Sound.Wrong).Wait(); - } - - output.AppendFormat(" tap: {0,2}", tap); - - return output.ToString(); // return output - - } - - public string TestEigenschaft(string eigenschaft, int erschwernis = 0) - { - var output = new StringBuilder(); - var prop = this.PropTable[eigenschaft.ToUpper()]; - int tap = this.Eigenschaften[prop]; - output.AppendFormat( - "{0}-Eigenschaftsprobe ew:{1} {2} \n", - prop, - tap, - erschwernis.Equals(0) ? string.Empty : "Erschwernis: " + erschwernis); - int roll = Dice.Roll(); - output.Append($"Gewürfelt: {roll} übrig: {tap - roll - erschwernis}"); - return output.ToString(); - } - - public string Angriff(string talent, int erschwernis = 0) // pretty self explanatory - { - var output = new StringBuilder(); - var sc = new SpellCorrect(); - var attack = this.Kampftalente.OrderBy(x => sc.Compare(talent, x.Name)).First(); - if (sc.Compare(talent, attack.Name) > SpellCorrect.ErrorThreshold) - { - SoundEffects.Play(Sound.Wrong).Wait(); - return $"{this.Name} kann nicht mit der Waffenart {talent} umgehen..."; - } - - int tap = attack.At; - output.AppendFormat( - "{0}-Angriff taw:{1} {2} \n", - attack.Name, - tap, - erschwernis.Equals(0) ? string.Empty : "Erschwernis: " + erschwernis); - - int temp = Dice.Roll(); - output.Append(temp - erschwernis); - return output.ToString(); - } - - public string Parade(string talent, int erschwernis = 0) - { - var output = new StringBuilder(); - var sc = new SpellCorrect(); - var attack = this.Kampftalente.OrderBy(x => sc.Compare(talent, x.Name)).First(); - - if (sc.Compare(talent, attack.Name) > SpellCorrect.ErrorThreshold) - { - SoundEffects.Play(Sound.Wrong).Wait(); - return $"{this.Name} kann nicht mit der Waffenart {talent} umgehen..."; - } - - int tap = attack.Pa; - output.AppendFormat( - "{0}-Parade taw:{1} {2}\n", - attack.Name, - tap, - erschwernis.Equals(0) ? string.Empty : "Erschwernis: " + erschwernis); - - int temp = Dice.Roll(); - output.Append(temp - erschwernis); - return output.ToString(); - } - - public string Fernkampf(string talent, int erschwernis = 0) - { - var output = new StringBuilder(); - var sc = new SpellCorrect(); - int fk = this.Eigenschaften["fk"]; - var attack = this.Talente.OrderBy(x => sc.Compare(talent, x.Name)).First(); - if (sc.Compare(talent, attack.Name) > SpellCorrect.ErrorThreshold) - { - SoundEffects.Play(Sound.Wrong).Wait(); - return $"{this.Name} kann nicht mit der Waffenart {talent} umgehen..."; - } - - int tap = attack.Value; - output.AppendFormat( - "{0} taw:{1} {2} \n", - attack.Name, - tap, - erschwernis.Equals(0) ? string.Empty : "Erschwernis: " + erschwernis); - tap -= erschwernis; - int temp = Dice.Roll(); - tap -= temp > fk ? temp - fk : 0; - output.Append($"W20: {temp} tap: {tap}"); - return output.ToString(); - } - - private void Post_process() - { - var LE_Wert = this.Eigenschaften.First(s => s.Key.Contains("Leben")).Value; - var KK_Wert = this.Eigenschaften.First(s => s.Key.Contains("Körper")).Value; - var KO__Wert = this.Eigenschaften.First(s => s.Key.Contains("Konst")).Value; - - this.Lebenspunkte = LE_Wert + (int)(KO__Wert + (KK_Wert/2.0) + 0.5); - - } - - private void Load(string path) - { - var reader = new XmlTextReader(path); - while (reader.Read()) - { - // read until he hits keywords - if (reader.NodeType != XmlNodeType.Element) - { - continue; - } - - switch (reader.Name) - { - case "Wesen": - reader.Skip(); - break; - case "held": - this.Name = reader.GetAttribute("name"); // name - break; - case "eigenschaft": - this.Eigenschaften.Add( - reader.GetAttribute("name") ?? throw new InvalidOperationException(), - Convert.ToInt32(reader.GetAttribute("value")) + Convert.ToInt32(reader.GetAttribute("mod"))); - break; - case "vt": - reader.Read(); - while (reader.Name.Equals("vorteil")) - { - try - { - this.Vorteile.Add(new Vorteil( - reader.GetAttribute("name"), - // Convert.ToInt32(reader.GetAttribute("value")))); - reader.GetAttribute("value"))); - } - catch - { - this.Vorteile.Add(new Vorteil(reader.GetAttribute("name"))); - } - - reader.Read(); - } - - break; - case "talentliste": - reader.Read(); - while (reader.Name.Equals("talent")) - { - this.Talente.Add( - new Talent( - reader.GetAttribute("name"), - reader.GetAttribute("probe")?.Remove(0, 2).Trim(')'), - Convert.ToInt32(reader.GetAttribute("value")))); - reader.Read(); - } - - break; - case "zauberliste": - reader.Read(); - while (reader.Name.Equals("zauber")) - { - this.Talente.Add( - new Talent( - reader.GetAttribute("name"), - reader.GetAttribute("probe")?.Remove(0, 2).Trim(')'), - Convert.ToInt32(reader.GetAttribute("value")))); - reader.Read(); - } - - break; - case "kampfwerte": - string atName = reader.GetAttribute("name"); - reader.Read(); - int at = Convert.ToInt32(reader.GetAttribute("value")); - reader.Read(); - int pa = Convert.ToInt32(reader.GetAttribute("value")); - this.Kampftalente.Add(new KampfTalent(atName, at, pa)); - break; - } - } - } - } -} diff --git a/DiscoBot/Characters/ICharacter.cs b/DiscoBot/Characters/ICharacter.cs deleted file mode 100644 index e8bc653..0000000 --- a/DiscoBot/Characters/ICharacter.cs +++ /dev/null @@ -1,25 +0,0 @@ -namespace DiscoBot.Characters -{ - public interface ICharacter - { - string Name { get; set; } - - int Lebenspunkte { get; set; } - - //int Ausdauer { get; set; } - - //int Astralpunkte { get; set; } - - //int Karmapunkte { get; set; } - - string TestTalent(string talent, int erschwernis = 0); - - string TestEigenschaft(string eigenschaft, int erschwernis = 0); - - string Angriff(string talent, int erschwernis = 0); - - string Parade(string talent, int erschwernis = 0); - - string Fernkampf(string talent, int erschwernis = 0); - } -} diff --git a/DiscoBot/Characters/NPC.cs b/DiscoBot/Characters/NPC.cs deleted file mode 100644 index 341f775..0000000 --- a/DiscoBot/Characters/NPC.cs +++ /dev/null @@ -1,109 +0,0 @@ -namespace DiscoBot.Characters -{ - using System; - - using DiscoBot.Auxiliary; - - public class Npc : ICharacter - { - private readonly int mean, stDv; - - public Npc(string name, int mean, int stDv) - { - this.mean = mean; - this.stDv = stDv; - this.Name = name; - } - - public string Name { get; set; } - - public int Lebenspunkte { get; set; } - - public string TestTalent(string talent, int tap = 3) - { - for (int i = 0; i <= 2; i++) - { - // foreach property, dice and tap - int temp = Dice.Roll(); - int eigenschaft = (int)Math.Round(RandomMisc.Random(this.stDv, this.mean)); - - if (eigenschaft < temp) - { - tap -= temp - eigenschaft; - } - } - - if (tap >= 0) - { - return $"{this.Name} vollführt {talent} erfolgreich"; - } - - - return $"{this.Name} scheitert an {talent}"; - } - - public string TestEigenschaft(string eigenschaft, int erschwernis = 0) - { - int temp = Dice.Roll(); - int prop = (int)Math.Round(RandomMisc.Random(this.stDv, this.stDv)); - - if (temp + erschwernis < prop) - { - return $"{this.Name} vollführt {eigenschaft} erfolgreich"; - } - - return $"{this.Name} scheitert an {eigenschaft}"; - } - - public string Angriff(string waffe, int erschwernis = 0) - { - int temp = Dice.Roll(); - - if (temp == 1) - { - return $"{this.Name} greift kritisch mit {waffe} an"; - } - - if (temp < erschwernis) - { - return $"{this.Name} greift mit {waffe} an"; - } - - return $"{this.Name} haut mit {waffe} daneben"; - } - - public string Parade(string waffe, int erschwernis = 0) - { - int temp = Dice.Roll(); - - if (temp == 1) - { - return $"{this.Name} pariert mit {waffe} meisterlich"; - } - - if (temp < erschwernis) - { - return $"{this.Name} pariert mit {waffe} an"; - } - - return $"{this.Name} schafft es nicht mit {waffe} zu parieren"; - } - - public string Fernkampf(string waffe, int erschwernis = 0) - { - int temp = Dice.Roll(); - - if (temp == 1) - { - return $"{this.Name} trifft kritisch mit {waffe}"; - } - - if (temp < erschwernis) - { - return $"{this.Name} greift mit {waffe} an"; - } - - return $"{this.Name} schießt mit {waffe} daneben"; - } - } -} diff --git a/DiscoBot/Commands/CommandTypes.cs b/DiscoBot/Commands/CommandTypes.cs index 4ff0814..c1d0954 100644 --- a/DiscoBot/Commands/CommandTypes.cs +++ b/DiscoBot/Commands/CommandTypes.cs @@ -7,6 +7,7 @@ Angriff, Parade, Fernkampf, - KeinChar + KeinChar, + Zauber } } diff --git a/DiscoBot/Commands/FileHandler.cs b/DiscoBot/Commands/FileHandler.cs index efebe3f..1a82a9c 100644 --- a/DiscoBot/Commands/FileHandler.cs +++ b/DiscoBot/Commands/FileHandler.cs @@ -5,7 +5,8 @@ using System.Net; using DiscoBot.Auxiliary; - using DiscoBot.Characters; + using DiscoBot.DSA_Game; + using DiscoBot.DSA_Game.Characters; using Discord.Commands; diff --git a/DiscoBot/Commands/Gm.cs b/DiscoBot/Commands/Gm.cs index b426655..b92b5b8 100644 --- a/DiscoBot/Commands/Gm.cs +++ b/DiscoBot/Commands/Gm.cs @@ -4,6 +4,7 @@ using System.Threading.Tasks; using DiscoBot.Auxiliary; + using DiscoBot.DSA_Game; using Discord.Commands; using Discord.WebSocket; @@ -27,6 +28,8 @@ return chr.Parade(waffe, erschwernis); case CommandTypes.Fernkampf: return chr.Fernkampf(waffe, erschwernis); + case CommandTypes.Zauber: + return chr.TestZauber(waffe, erschwernis); } return $"{name} verwendet {waffe}"; diff --git a/DiscoBot/Commands/List.cs b/DiscoBot/Commands/List.cs index 41fa3d9..3cd66b9 100644 --- a/DiscoBot/Commands/List.cs +++ b/DiscoBot/Commands/List.cs @@ -8,7 +8,8 @@ using DiscoBot.Audio; using DiscoBot.Auxiliary; - using DiscoBot.Characters; + using DiscoBot.DSA_Game; + using DiscoBot.DSA_Game.Characters; using Discord.Commands; diff --git a/DiscoBot/Commands/MiscCommands.cs b/DiscoBot/Commands/MiscCommands.cs index 8c9417c..158882c 100644 --- a/DiscoBot/Commands/MiscCommands.cs +++ b/DiscoBot/Commands/MiscCommands.cs @@ -24,6 +24,7 @@ namespace DiscoBot.Commands using System.Windows.Forms; using DiscoBot.Auxiliary; + using DiscoBot.DSA_Game; using Discord; using Discord.Commands; @@ -111,40 +112,7 @@ namespace DiscoBot.Commands var us = users.Result.Select(x => x.Username); var lines = test.Where(x => !x.Equals(string.Empty)).ToList(); - - string ls = string.Empty; - using (var client = new WebClient()) - { - ls =client.DownloadString(@"https://discordapp.com/assets/8529401dde4ab112e81d.js"); - } - - /*using (ScriptEngine engine = new ScriptEngine("jscript")) - { - ParsedScript parsed = engine.Parse(ls); - Debug.WriteLine(parsed.CallMethod("t", 3)); - }*/ - /*var task = MessageLoopWorker.Run(WebCrawler.DoWorkAsync, - "https://discordapp.com/widget?id=361270203952136203&theme=dark"); - task.Wait(); - var kl =task.Result; - Console.WriteLine("DoWorkAsync completed."); - - - ls = WebCrawler.Crawl("https://discordapp.com/widget?id=361270203952136203&theme=dark"); -*/ - /* - ScrapingBrowser Browser = new ScrapingBrowser(); - Browser.AllowAutoRedirect = true; // Browser has settings you can access in setup - Browser.AllowMetaRedirect = true; - Browser.UserAgent = new FakeUserAgent("The Doctor", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36"); - Browser.Timeout = TimeSpan.FromMinutes(1); - WebPage PageResult = Browser.NavigateToPage(new Uri("https://discordapp.com/widget?id=361270203952136203&theme=dark")); - //await Task.Delay(TimeSpan.FromSeconds(10)); - - var dom = new ScrapySharp.Html.Parsing.HtmlDomBuilder(new HtmlDeclarationReader(new CodeReader(PageResult.Html.OuterHtml))); - - HtmlNode TitleNode = PageResult.Html.CssSelect(".widget-header").First(); - string PageTitle = TitleNode.InnerText;*/ + var sc = new SpellCorrect(); diff --git a/DiscoBot/Commands/NpcCommands.cs b/DiscoBot/Commands/NpcCommands.cs index f2b17b6..98f4589 100644 --- a/DiscoBot/Commands/NpcCommands.cs +++ b/DiscoBot/Commands/NpcCommands.cs @@ -6,6 +6,8 @@ using DiscoBot.Auxiliary; using DiscoBot.Characters; + using DiscoBot.DSA_Game; + using DiscoBot.DSA_Game.Characters; using Discord.Commands; @@ -34,4 +36,4 @@ return this.ReplyAsync($"{npcName} wurde als variierte Kopie von {source} erstellt"); } } -} +} \ No newline at end of file diff --git a/DiscoBot/Commands/ProbenTest.cs b/DiscoBot/Commands/ProbenTest.cs index bdfaf23..ae98ec2 100644 --- a/DiscoBot/Commands/ProbenTest.cs +++ b/DiscoBot/Commands/ProbenTest.cs @@ -2,6 +2,8 @@ { using System.Threading.Tasks; + using DiscoBot.DSA_Game; + using Discord.Commands; public class ProbenTest : ModuleBase @@ -31,6 +33,31 @@ return this.ReplyAsync("```xl\n" + res + "\n```"); } + [Command("Zauber"), Summary("Würfelt ein Zauberprobe")] + [Alias("Z", "zauber", "z")] + public Task ZauberAsync([Summary("Zaubername")] string zauber, int erschwernis = 0) + { + string res; + try + { + res = Gm.CheckCommand( + Dsa.Relation[this.Context.User.Username], + CommandTypes.Zauber, + zauber, + erschwernis); + } + catch + { + res = Gm.CheckCommand( + Dsa.Relation["Tardis"], + CommandTypes.Zauber, + zauber, + erschwernis); + } + + return this.ReplyAsync("```xl\n" + res + "\n```"); + } + [Command("e"), Summary("Würfelt eine Eigenschaftsprobe")] [Alias("E", "Eigenschaft", "eigenschaft", "eigen")] public Task EigenschaftAsync([Summary("Eigenschaftskürzel und Erschwernis")] string talent, int erschwernis = 0) diff --git a/DiscoBot/DSA.cs b/DiscoBot/DSA.cs deleted file mode 100644 index 0779988..0000000 --- a/DiscoBot/DSA.cs +++ /dev/null @@ -1,51 +0,0 @@ -namespace DiscoBot -{ - using System.Collections.Generic; - using System.IO; - using System.Linq; - - using DiscoBot.Audio; - using DiscoBot.Auxiliary; - using DiscoBot.Characters; - - using Discord.Commands; - - public static class Dsa - { - public static ICommandContext GeneralContext { get; set; } - - public static AudioService Service { get; set; } - - public static Dictionary Relation { get; set; } = new Dictionary(); // dictionary to match the char - - public static List Chars { get; set; } = new List(); // list of all characters - - public static List Talente { get; set; } = new List(); - - public static void Startup() - { - Relation.Add("The Doctor", "Numeri Illuminus"); // Relation - Relation.Add("Tardis", "Helga von Drachenei, Tausendsasserin"); // "Numeri Illuminus"); - Relation.Add("DSA Bot", "Morla"); // "Felis Exodus Schattenwald"); - Relation.Add("Morla", "Morla"); - Relation.Add("Rhoktar", "Rhoktar4"); - Relation.Add("MagicBro5", "Krenko"); - Relation.Add("Nicolas", "Hartmut Reiher"); - Relation.Add("TrueKuehli", "Ledur Torfinson"); - - // 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 diff --git a/DiscoBot/DSA_Game/Characters/Character.cs b/DiscoBot/DSA_Game/Characters/Character.cs new file mode 100644 index 0000000..01b7eeb --- /dev/null +++ b/DiscoBot/DSA_Game/Characters/Character.cs @@ -0,0 +1,271 @@ +namespace DiscoBot.DSA_Game.Characters +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Text; + using System.Xml; + + using DiscoBot.Audio; + using DiscoBot.Auxiliary; + + public class Character : ICharacter + { + public Character() + { + this.PropTable.Add("MU", "Mut"); // routing + this.PropTable.Add("KL", "Klugheit"); + this.PropTable.Add("IN", "Intuition"); + this.PropTable.Add("CH", "Charisma"); + this.PropTable.Add("FF", "Fingerfertigkeit"); + this.PropTable.Add("GE", "Gewandtheit"); + this.PropTable.Add("KO", "Konstitution"); + this.PropTable.Add("KK", "Körperkraft"); + + } + + public Character(string path) : this() + { + this.Load(path); // load + this.Post_process(); // calculate derived values + } + + public Character(Character c, string name, int stDv = 2) : this() + { + this.Name = name; + foreach (var i in c.Eigenschaften) + { + this.Eigenschaften.Add(i.Key, i.Value + (int)Math.Round(RandomMisc.Random(stDv))); + } + + foreach (var i in c.Vorteile) + { + this.Vorteile.Add(new Vorteil(i.Name, i.Value + (int)Math.Round(RandomMisc.Random(stDv)))); + } + + foreach (var i in c.Talente) + { + this.Talente.Add(new Talent(i.Name, i.Probe, i.Value + (int)Math.Round(RandomMisc.Random(stDv)))); + } + + foreach (var i in c.Zauber) + { + this.Zauber.Add(new Zauber(i.Name, i.Probe, i.Value + (int)Math.Round(RandomMisc.Random(stDv)), i.Complexity, i.Representation)); + } + + foreach (var i in c.Kampftalente) + { + this.Kampftalente.Add(new KampfTalent(i.Name, i.At + (int)Math.Round(RandomMisc.Random(stDv)), i.Pa + (int)Math.Round(RandomMisc.Random(stDv)))); + } + + this.Post_process(); // calculate derived values + } + + public string Name { get; set; } // char name + + public int Lebenspunkte { get; set; } + + public Dictionary Eigenschaften { get; set; } = new Dictionary(); // char properties + + public List Talente { get; set; } = new List(); // list of talent objects (talents) + + public List Zauber { get; set; } = new List(); // list of spell objects + + public List Kampftalente { get; set; } = new List(); // list of combat objects + + public List Vorteile { get; set; } = new List(); + + public Dictionary PropTable { get; set; } = new Dictionary(); // -> Körperkraft + + public string TestTalent(string talent, int erschwernis = 0) // Talentprobe + { + return this.Talente.ProbenTest(this, talent, erschwernis); + } + + public string TestZauber(string zauber, int erschwernis = 0) // Talentprobe + { + return this.Zauber.ProbenTest(this, zauber, erschwernis); + } + + public string TestEigenschaft(string eigenschaft, int erschwernis = 0) + { + var output = new StringBuilder(); + var prop = this.PropTable[eigenschaft.ToUpper()]; + int tap = this.Eigenschaften[prop]; + output.AppendFormat( + "{0}-Eigenschaftsprobe ew:{1} {2} \n", + prop, + tap, + erschwernis.Equals(0) ? string.Empty : "Erschwernis: " + erschwernis); + int roll = Dice.Roll(); + output.Append($"Gewürfelt: {roll} übrig: {tap - roll - erschwernis}"); + return output.ToString(); + } + + public string Angriff(string talent, int erschwernis = 0) // pretty self explanatory + { + var output = new StringBuilder(); + var sc = new SpellCorrect(); + var attack = this.Kampftalente.OrderBy(x => sc.Compare(talent, x.Name)).First(); + if (sc.Compare(talent, attack.Name) > SpellCorrect.ErrorThreshold) + { + SoundEffects.Play(Sound.Wrong).Wait(); + return $"{this.Name} kann nicht mit der Waffenart {talent} umgehen..."; + } + + int tap = attack.At; + output.AppendFormat( + "{0}-Angriff taw:{1} {2} \n", + attack.Name, + tap, + erschwernis.Equals(0) ? string.Empty : "Erschwernis: " + erschwernis); + + int temp = Dice.Roll(); + output.Append(temp - erschwernis); + return output.ToString(); + } + + public string Parade(string talent, int erschwernis = 0) + { + var output = new StringBuilder(); + var sc = new SpellCorrect(); + var attack = this.Kampftalente.OrderBy(x => sc.Compare(talent, x.Name)).First(); + + if (sc.Compare(talent, attack.Name) > SpellCorrect.ErrorThreshold) + { + SoundEffects.Play(Sound.Wrong).Wait(); + return $"{this.Name} kann nicht mit der Waffenart {talent} umgehen..."; + } + + int tap = attack.Pa; + output.AppendFormat( + "{0}-Parade taw:{1} {2}\n", + attack.Name, + tap, + erschwernis.Equals(0) ? string.Empty : "Erschwernis: " + erschwernis); + + int temp = Dice.Roll(); + output.Append(temp - erschwernis); + return output.ToString(); + } + + public string Fernkampf(string talent, int erschwernis = 0) + { + var output = new StringBuilder(); + var sc = new SpellCorrect(); + int fk = this.Eigenschaften["fk"]; + var attack = this.Talente.OrderBy(x => sc.Compare(talent, x.Name)).First(); + if (sc.Compare(talent, attack.Name) > SpellCorrect.ErrorThreshold) + { + SoundEffects.Play(Sound.Wrong).Wait(); + return $"{this.Name} kann nicht mit der Waffenart {talent} umgehen..."; + } + + int tap = attack.Value; + output.AppendFormat( + "{0} taw:{1} {2} \n", + attack.Name, + tap, + erschwernis.Equals(0) ? string.Empty : "Erschwernis: " + erschwernis); + tap -= erschwernis; + int temp = Dice.Roll(); + tap -= temp > fk ? temp - fk : 0; + output.Append($"W20: {temp} tap: {tap}"); + return output.ToString(); + } + + private void Post_process() + { + var LE_Wert = this.Eigenschaften.First(s => s.Key.Contains("Leben")).Value; + var KK_Wert = this.Eigenschaften.First(s => s.Key.Contains("Körper")).Value; + var KO__Wert = this.Eigenschaften.First(s => s.Key.Contains("Konst")).Value; + + this.Lebenspunkte = LE_Wert + (int)(KO__Wert + (KK_Wert/2.0) + 0.5); + + } + + private void Load(string path) + { + var reader = new XmlTextReader(path); + while (reader.Read()) + { + // read until he hits keywords + if (reader.NodeType != XmlNodeType.Element) + { + continue; + } + + switch (reader.Name) + { + case "Wesen": + reader.Skip(); + break; + case "held": + this.Name = reader.GetAttribute("name"); // name + break; + case "eigenschaft": + this.Eigenschaften.Add( + reader.GetAttribute("name") ?? throw new InvalidOperationException(), + Convert.ToInt32(reader.GetAttribute("value")) + Convert.ToInt32(reader.GetAttribute("mod"))); + break; + case "vt": + reader.Read(); + while (reader.Name.Equals("vorteil")) + { + try + { + this.Vorteile.Add(new Vorteil( + reader.GetAttribute("name"), + // Convert.ToInt32(reader.GetAttribute("value")))); + reader.GetAttribute("value"))); + } + catch + { + this.Vorteile.Add(new Vorteil(reader.GetAttribute("name"))); + } + + reader.Read(); + } + + break; + case "talentliste": + reader.Read(); + while (reader.Name.Equals("talent")) + { + this.Talente.Add( + new Talent( + reader.GetAttribute("name"), + reader.GetAttribute("probe")?.Remove(0, 2).Trim(')'), + Convert.ToInt32(reader.GetAttribute("value")))); + reader.Read(); + } + + break; + case "zauberliste": + reader.Read(); + while (reader.Name.Equals("zauber")) + { + this.Zauber.Add( + new Zauber( + reader.GetAttribute("name"), + reader.GetAttribute("probe")?.Remove(0, 2).Trim(')'), + Convert.ToInt32(reader.GetAttribute("value")), + reader.GetAttribute("k").ToCharArray()[0], + reader.GetAttribute("repraesentation"))); + reader.Read(); + } + + break; + case "kampfwerte": + string atName = reader.GetAttribute("name"); + reader.Read(); + int at = Convert.ToInt32(reader.GetAttribute("value")); + reader.Read(); + int pa = Convert.ToInt32(reader.GetAttribute("value")); + this.Kampftalente.Add(new KampfTalent(atName, at, pa)); + break; + } + } + } + } +} diff --git a/DiscoBot/DSA_Game/Characters/ICharacter.cs b/DiscoBot/DSA_Game/Characters/ICharacter.cs new file mode 100644 index 0000000..91eee2d --- /dev/null +++ b/DiscoBot/DSA_Game/Characters/ICharacter.cs @@ -0,0 +1,27 @@ +namespace DiscoBot.DSA_Game.Characters +{ + public interface ICharacter + { + string Name { get; set; } + + int Lebenspunkte { get; set; } + + //int Ausdauer { get; set; } + + //int Astralpunkte { get; set; } + + //int Karmapunkte { get; set; } + + string TestTalent(string talent, int erschwernis = 0); + + string TestEigenschaft(string eigenschaft, int erschwernis = 0); + + string Angriff(string talent, int erschwernis = 0); + + string Parade(string talent, int erschwernis = 0); + + string Fernkampf(string talent, int erschwernis = 0); + + string TestZauber(string waffe, int erschwernis); + } +} diff --git a/DiscoBot/DSA_Game/Characters/NPC.cs b/DiscoBot/DSA_Game/Characters/NPC.cs new file mode 100644 index 0000000..dce4381 --- /dev/null +++ b/DiscoBot/DSA_Game/Characters/NPC.cs @@ -0,0 +1,115 @@ +namespace DiscoBot.Characters +{ + using System; + + using DiscoBot.Auxiliary; + using DiscoBot.DSA_Game.Characters; + + public class Npc : ICharacter + { + private readonly int mean, stDv; + + public Npc(string name, int mean, int stDv) + { + this.mean = mean; + this.stDv = stDv; + this.Name = name; + } + + public string Name { get; set; } + + public int Lebenspunkte { get; set; } + + public string TestTalent(string talent, int tap = 3) + { + for (int i = 0; i <= 2; i++) + { + // foreach property, dice and tap + int temp = Dice.Roll(); + int eigenschaft = (int)Math.Round(RandomMisc.Random(this.stDv, this.mean)); + + if (eigenschaft < temp) + { + tap -= temp - eigenschaft; + } + } + + if (tap >= 0) + { + return $"{this.Name} vollführt {talent} erfolgreich"; + } + + + return $"{this.Name} scheitert an {talent}"; + } + + public string TestEigenschaft(string eigenschaft, int erschwernis = 0) + { + int temp = Dice.Roll(); + int prop = (int)Math.Round(RandomMisc.Random(this.stDv, this.stDv)); + + if (temp + erschwernis < prop) + { + return $"{this.Name} vollführt {eigenschaft} erfolgreich"; + } + + return $"{this.Name} scheitert an {eigenschaft}"; + } + + public string Angriff(string waffe, int erschwernis = 0) + { + int temp = Dice.Roll(); + + if (temp == 1) + { + return $"{this.Name} greift kritisch mit {waffe} an"; + } + + if (temp < erschwernis) + { + return $"{this.Name} greift mit {waffe} an"; + } + + return $"{this.Name} haut mit {waffe} daneben"; + } + + public string Parade(string waffe, int erschwernis = 0) + { + int temp = Dice.Roll(); + + if (temp == 1) + { + return $"{this.Name} pariert mit {waffe} meisterlich"; + } + + if (temp < erschwernis) + { + return $"{this.Name} pariert mit {waffe} an"; + } + + return $"{this.Name} schafft es nicht mit {waffe} zu parieren"; + } + + public string Fernkampf(string waffe, int erschwernis = 0) + { + int temp = Dice.Roll(); + + if (temp == 1) + { + return $"{this.Name} trifft kritisch mit {waffe}"; + } + + if (temp < erschwernis) + { + return $"{this.Name} greift mit {waffe} an"; + } + + return $"{this.Name} schießt mit {waffe} daneben"; + } + + public string TestZauber(string zauber, int erschwernis) + { + return TestTalent(zauber, erschwernis); + } + } +} diff --git a/DiscoBot/DSA_Game/Dsa.cs b/DiscoBot/DSA_Game/Dsa.cs new file mode 100644 index 0000000..1bdabb3 --- /dev/null +++ b/DiscoBot/DSA_Game/Dsa.cs @@ -0,0 +1,51 @@ +namespace DiscoBot.DSA_Game +{ + using System.Collections.Generic; + using System.IO; + using System.Linq; + + using DiscoBot.Audio; + using DiscoBot.Auxiliary; + using DiscoBot.DSA_Game.Characters; + + using Discord.Commands; + + public static class Dsa + { + public static ICommandContext GeneralContext { get; set; } + + public static AudioService Service { get; set; } + + public static Dictionary Relation { get; set; } = new Dictionary(); // dictionary to match the char + + public static List Chars { get; set; } = new List(); // list of all characters + + public static List Talente { get; set; } = new List(); + + public static void Startup() + { + Relation.Add("The Doctor", "Numeri Illuminus"); // Relation + Relation.Add("Tardis", "Helga von Drachenei, Tausendsasserin"); // "Numeri Illuminus"); + Relation.Add("DSA Bot", "Morla"); // "Felis Exodus Schattenwald"); + Relation.Add("Morla", "Morla"); + Relation.Add("Rhoktar", "Rhoktar4"); + Relation.Add("MagicBro5", "Krenko"); + Relation.Add("Nicolas", "Hartmut Reiher"); + Relation.Add("TrueKuehli", "Ledur Torfinson"); + + // 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 diff --git a/DiscoBot/DSA_Game/KampfTalent.cs b/DiscoBot/DSA_Game/KampfTalent.cs new file mode 100644 index 0000000..79703d5 --- /dev/null +++ b/DiscoBot/DSA_Game/KampfTalent.cs @@ -0,0 +1,18 @@ +namespace DiscoBot.DSA_Game +{ + public class KampfTalent + { + public KampfTalent(string name, int at, int pa) + { + this.Name = name; + this.At = at; + this.Pa = pa; + } + + public string Name { get; set; } + + public int At { get; set; } + + public int Pa { get; set; } + } +} diff --git a/DiscoBot/DSA_Game/Talent.cs b/DiscoBot/DSA_Game/Talent.cs new file mode 100644 index 0000000..fe097fa --- /dev/null +++ b/DiscoBot/DSA_Game/Talent.cs @@ -0,0 +1,39 @@ +namespace DiscoBot.DSA_Game +{ + using System; + + using DiscoBot.Auxiliary; + + public class Talent // talent objekt + { + public Talent(string name, string probe, int value) + { + this.Name = name; + this.Probe = probe; + this.Value = value; + } + + public string Name { get; set; } + + public string Probe { get; set; } + + public int Value { get; set; } + + public string[] GetEigenschaften() // turn XX/XX/XX into string[]{XX,XX,XX} + { + var temp = this.Probe.Split('/'); + for (var index = 0; index < temp.Length; index++) + { + temp[index] = temp[index].Replace("/", string.Empty); + } + + return temp; + } + + public int CheckName(string quarry) + { + var sc = (StringComparer)new SpellCorrect(); + return sc.Compare(quarry, this.Name); + } + } +} diff --git a/DiscoBot/DSA_Game/Vorteil.cs b/DiscoBot/DSA_Game/Vorteil.cs new file mode 100644 index 0000000..493c4d1 --- /dev/null +++ b/DiscoBot/DSA_Game/Vorteil.cs @@ -0,0 +1,18 @@ +namespace DiscoBot.DSA_Game +{ + public class Vorteil // talent objekt + { + public Vorteil(string name, string value = "") + { + this.Name = name; + this.Value = value; + // this.Choice = choice; + } + + public string Name { get; set; } + + public string Value { get; set; } + + //public string Choice { get; set; } + } +} diff --git a/DiscoBot/DSA_Game/Zauber.cs b/DiscoBot/DSA_Game/Zauber.cs new file mode 100644 index 0000000..bf49a2e --- /dev/null +++ b/DiscoBot/DSA_Game/Zauber.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DiscoBot.DSA_Game +{ + public class Zauber : Talent + { + public Zauber(string name, string probe, int value, char complexity = 'A', string representation = "Magier") + : base(name, probe, value) + { + this.Complexity = complexity; + this.Representation = this.Representation; + } + + public char Complexity { get; } + + public string Representation { get; } + } +} diff --git a/DiscoBot/DiscoBot.csproj b/DiscoBot/DiscoBot.csproj index 044eb45..7ad3e0c 100644 --- a/DiscoBot/DiscoBot.csproj +++ b/DiscoBot/DiscoBot.csproj @@ -150,14 +150,15 @@ - + + - - - + + + @@ -166,10 +167,11 @@ - + - - + + + diff --git a/DiscoBot/Program.cs b/DiscoBot/Program.cs index 96bbd09..3518fa9 100644 --- a/DiscoBot/Program.cs +++ b/DiscoBot/Program.cs @@ -12,6 +12,7 @@ namespace DiscoBot { using DiscoBot.Audio; using DiscoBot.Commands; + using DiscoBot.DSA_Game; public class Program { -- cgit v1.2.3-70-g09d2