summaryrefslogtreecommitdiff
path: root/DiscoBot
diff options
context:
space:
mode:
authorDennis Kobert <d-kobert@web.de>2019-06-11 23:38:13 +0200
committerDennis Kobert <d-kobert@web.de>2019-06-11 23:38:13 +0200
commit2fa4a0e50ebfc97059c8b84dbd17e79f9afc8a8d (patch)
treec3b34ccb2737e347a73768536895cbbaab13cc01 /DiscoBot
parentec991104f56e90d7bb2878da2fe6ed4e585dfc46 (diff)
parentaf74efccf8d21e6151022b71f3cacd3fa83024ee (diff)
Merge branch 'rework-backend'
Diffstat (limited to 'DiscoBot')
-rw-r--r--DiscoBot/App.config42
-rw-r--r--DiscoBot/Audio/AudioModule.cs77
-rw-r--r--DiscoBot/Audio/AudioService.cs101
-rw-r--r--DiscoBot/Audio/Sound.cs24
-rw-r--r--DiscoBot/Audio/Soundeffects.cs93
-rw-r--r--DiscoBot/Audio/Voice.cs117
-rw-r--r--DiscoBot/Auxiliary/Calculator/Argument.cs38
-rw-r--r--DiscoBot/Auxiliary/Calculator/ISolvable.cs10
-rw-r--r--DiscoBot/Auxiliary/Calculator/Operator.cs50
-rw-r--r--DiscoBot/Auxiliary/Calculator/Ops.cs13
-rw-r--r--DiscoBot/Auxiliary/Calculator/StringSolver.cs207
-rw-r--r--DiscoBot/Auxiliary/CommandInfo.cs32
-rw-r--r--DiscoBot/Auxiliary/Dice.cs50
-rw-r--r--DiscoBot/Auxiliary/Extensions.cs33
-rw-r--r--DiscoBot/Auxiliary/RandomMisc.cs52
-rw-r--r--DiscoBot/Auxiliary/SpellCorrect.cs147
-rw-r--r--DiscoBot/Auxiliary/TalentEnumerableExtension.cs102
-rw-r--r--DiscoBot/Commands/CommandExtension.cs119
-rw-r--r--DiscoBot/Commands/CommandTypes.cs13
-rw-r--r--DiscoBot/Commands/FileHandler.cs45
-rw-r--r--DiscoBot/Commands/Gm.cs187
-rw-r--r--DiscoBot/Commands/HeldList.cs191
-rw-r--r--DiscoBot/Commands/Help.cs99
-rw-r--r--DiscoBot/Commands/LebenUndAstral.cs198
-rw-r--r--DiscoBot/Commands/List.cs62
-rw-r--r--DiscoBot/Commands/MiscCommands.cs247
-rw-r--r--DiscoBot/Commands/NpcCommands.cs39
-rw-r--r--DiscoBot/Commands/ProbenTest.cs91
-rw-r--r--DiscoBot/DSA_Game/Characters/Character.cs303
-rw-r--r--DiscoBot/DSA_Game/Characters/NPC.cs112
-rw-r--r--DiscoBot/DSA_Game/Characters/SaveChar.cs45
-rw-r--r--DiscoBot/DSA_Game/Dsa.cs72
-rw-r--r--DiscoBot/DSA_Game/Save/Properties.cs88
-rw-r--r--DiscoBot/DSA_Game/Save/SaveCommand.cs82
-rw-r--r--DiscoBot/DSA_Game/Save/Session.cs60
-rw-r--r--DiscoBot/DiscoBot.csproj163
-rw-r--r--DiscoBot/Help.json120
-rw-r--r--DiscoBot/Program.cs133
-rw-r--r--DiscoBot/Properties.json129
-rw-r--r--DiscoBot/Properties/AssemblyInfo.cs36
-rw-r--r--DiscoBot/Properties/DiscoBot-Audio-Sound.json7
-rw-r--r--DiscoBot/Properties/DiscoBot-Auxiliary-CommandInfo.json101
-rw-r--r--DiscoBot/Properties/DiscoBot-DSA_Game-Characters-Character.json290
-rw-r--r--DiscoBot/Properties/Settings.Designer.cs38
-rw-r--r--DiscoBot/Properties/Settings.settings9
-rw-r--r--DiscoBot/Rework/Permissions.cs43
-rw-r--r--DiscoBot/ToRework/CommandExtension.cs119
-rw-r--r--DiscoBot/ToRework/Permissions.cs43
-rw-r--r--DiscoBot/packages.config63
-rw-r--r--DiscoBot/session.json6
-rw-r--r--DiscoBot/sessions/TheCrew/TheCrew-0.json83
-rw-r--r--DiscoBot/sessions/copy/copy-0.json79
-rw-r--r--DiscoBot/sessions/test/test-0.json79
-rw-r--r--DiscoBot/sessions/test/test-1.json79
-rw-r--r--DiscoBot/sessions/test/test-2.json81
-rw-r--r--DiscoBot/sessions/test/test-3.json81
-rw-r--r--DiscoBot/sessions/test/test-4.json81
57 files changed, 0 insertions, 5104 deletions
diff --git a/DiscoBot/App.config b/DiscoBot/App.config
deleted file mode 100644
index e99cd82..0000000
--- a/DiscoBot/App.config
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<configuration>
- <configSections>
- <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <section name="DiscoBot.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
- </sectionGroup>
- </configSections>
- <startup>
- <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
- </startup>
- <runtime>
- <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
- <dependentAssembly>
- <assemblyIdentity name="System.Interactive.Async" publicKeyToken="94bc3704cddfc263" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-3.2.0.0" newVersion="3.2.0.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-1.2.3.0" newVersion="1.2.3.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
- </dependentAssembly>
- </assemblyBinding>
- </runtime>
- <userSettings>
- <DiscoBot.Properties.Settings>
- <setting name="Token" serializeAs="String">
- <value>Mjk0NTU0MDU4Nzg4NzAwMTYx.DOzDcQ.J-nCikbZdZtdrug0E8TwwV_2ITw</value>
- </setting>
- </DiscoBot.Properties.Settings>
- </userSettings>
-</configuration>
diff --git a/DiscoBot/Audio/AudioModule.cs b/DiscoBot/Audio/AudioModule.cs
deleted file mode 100644
index f8834f3..0000000
--- a/DiscoBot/Audio/AudioModule.cs
+++ /dev/null
@@ -1,77 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Security.Cryptography;
-using System.Threading.Tasks;
-
-using DiscoBot;
-using DiscoBot.Audio;
-using DiscoBot.Auxiliary;
-using DiscoBot.Commands;
-
-using Discord;
-using Discord.Commands;
-
-namespace DiscoBot.Audio
-{
- using DiscoBot.DSA_Game;
-
- public class AudioModule : ModuleBase
- {
- // Scroll down further for the AudioService.
- // Like, way down
- private readonly AudioService _service;
-
- // Remember to add an instance of the AudioService
- // to your IServiceCollection when you initialize your bot
- public AudioModule(AudioService service)
- {
- _service = service;
- Dsa.Service = service;
- }
-
- // You *MUST* mark these commands with 'RunMode.Async'
- // otherwise the bot will not respond until the Task times out.
- [Command("_join", RunMode = RunMode.Async)]
- public async Task JoinCmd()
- {
- await _service.JoinAudio(Context.Guild, (Context.User as IVoiceState).VoiceChannel);
- }
-
- // Remember to add preconditions to your commands,
- // this is merely the minimal amount necessary.
- // Adding more commands of your own is also encouraged.
- [Command("_leave", RunMode = RunMode.Async)]
- public async Task LeaveCmd()
- {
- await _service.LeaveAudio(Context.Guild);
- }
-
- [Command("_play", RunMode = RunMode.Async)]
- public async Task PlayCmd([Remainder] string song)
- {
- if (Dsa.GeneralContext == null)
- {
- Dsa.GeneralContext = this.Context;
- }
-
- var sounds = Enum.GetValues(typeof(Sound));
- var soundList = new List<Sound>();
- foreach (var sound in sounds)
- {
- soundList.Add((Sound)sound);
- }
-
- var sc = new SpellCorrect();
-
- var tSound = soundList.OrderBy(x => sc.Compare(song, x.ToString())).First();
-
- if (sc.Compare(song, tSound.ToString()) > SpellCorrect.ErrorThreshold)
- {
- await _service.SendAudioAsync(Context.Guild, Context.Channel, song);
- }
-
- SoundEffects.Play(song);
- }
- }
-} \ No newline at end of file
diff --git a/DiscoBot/Audio/AudioService.cs b/DiscoBot/Audio/AudioService.cs
deleted file mode 100644
index 6e01980..0000000
--- a/DiscoBot/Audio/AudioService.cs
+++ /dev/null
@@ -1,101 +0,0 @@
-namespace DiscoBot.Audio
-{
- using System.Collections.Concurrent;
- using System.Diagnostics;
- using System.IO;
- using System.Threading.Tasks;
-
- using DiscoBot.DSA_Game;
-
- using Discord;
- using Discord.Audio;
-
- public class AudioService
- {
- private readonly ConcurrentDictionary<ulong, IAudioClient> connectedChannels = new ConcurrentDictionary<ulong, IAudioClient>();
-
- public async Task JoinAudio(IGuild guild, IVoiceChannel target)
- {
- if (this.connectedChannels.TryGetValue(guild.Id, out var client))
- {
- return;
- }
-
- if (target.Guild.Id != guild.Id)
- {
- return;
- }
-
- var audioClient = await target.ConnectAsync();
-
- if (this.connectedChannels.TryAdd(guild.Id, audioClient))
- {
- // If you add a method to log happenings from this service,
- // you can uncomment these commented lines to make use of that.
- //await Log(LogSeverity.Info, $"Connected to voice on {guild.Name}.");
- }
- }
-
- public async Task LeaveAudio(IGuild guild)
- {
- if (this.connectedChannels.TryRemove(guild.Id, out var client))
- {
- await client.StopAsync();
- //await Log(LogSeverity.Info, $"Disconnected from voice on {guild.Name}.");
- }
- }
-
- public async Task SendAudioAsync(IGuild guild, IMessageChannel channel, string path)
- {
- // Your task: Get a full path to the file if the value of 'path' is only a filename.
- if (!File.Exists(path) && false)
- {
- await channel.SendMessageAsync("File does not exist.");
- return;
- }
-
- if (this.connectedChannels.TryGetValue(guild.Id, out var client))
- {
- //await Log(LogSeverity.Debug, $"Starting playback of {path} in {guild.Name}");
- using (var ffmpeg = this.CreateStream(path))
- using (var stream = client.CreatePCMStream(AudioApplication.Music))
- {
- try { await ffmpeg.StandardOutput.BaseStream.CopyToAsync(stream); }
- finally { await stream.FlushAsync(); }
- }
- }
- }
-
- public async Task SendAudioAsync(string path, int Volume)
- {
- // Your task: Get a full path to the file if the value of 'path' is only a filename.
- if (!File.Exists(path) && false)
- {
- //await channel.SendMessageAsync("File does not exist.");
- return;
- }
-
- if (this.connectedChannels.TryGetValue(Dsa.GeneralContext.Guild.Id, out var client))
- {
- //await Log(LogSeverity.Debug, $"Starting playback of {path} in {guild.Name}");
- using (var ffmpeg = this.CreateStream(path))
- using (var stream = client.CreatePCMStream(AudioApplication.Voice))
- {
- try { await ffmpeg.StandardOutput.BaseStream.CopyToAsync(stream); }
- finally { await stream.FlushAsync(); }
- }
- }
- }
-
- private Process CreateStream(string path)
- {
- return Process.Start(new ProcessStartInfo
- {
- FileName = "ffmpeg.exe",
- Arguments = $"-hide_banner -loglevel panic -i \"{path}\" -ac 2 -f s16le -ar 48000 pipe:1",
- UseShellExecute = false,
- RedirectStandardOutput = true
- });
- }
- }
-}
diff --git a/DiscoBot/Audio/Sound.cs b/DiscoBot/Audio/Sound.cs
deleted file mode 100644
index a9a2768..0000000
--- a/DiscoBot/Audio/Sound.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace DiscoBot.Audio
-{
- public class Sound
- {
- public Sound(string name, string url, int volume)
- {
- this.Name = name;
- this.Url = url;
- this.Volume = volume;
- }
-
- public string Name { get; }
-
- public string Url { get; }
-
- public int Volume { get; }
- }
-}
diff --git a/DiscoBot/Audio/Soundeffects.cs b/DiscoBot/Audio/Soundeffects.cs
deleted file mode 100644
index f3a014c..0000000
--- a/DiscoBot/Audio/Soundeffects.cs
+++ /dev/null
@@ -1,93 +0,0 @@
-namespace DiscoBot.Audio
-{
- using System;
- using System.Linq;
- using System.Threading.Tasks;
-
- using DiscoBot.Auxiliary;
- using DiscoBot.Commands;
- using DiscoBot.DSA_Game;
-
- /*public enum Sound
- {
- Bell,
- Ding,
- Nooo,
- Monsterkill,
- Finish,
- Wrong,
- Magic,
- Stupid,
- Police,
- Roblox
- }*/
-
- public static class SoundEffects
- {
- public static int MaxVolume { get; set; } = 50;
-
- public static void Play(string s)
- {
- string url = string.Empty;
- int volume = 255;
-
- var tSound = DSA_Game.Save.Properties.Sounds.OrderBy(x => SpellCorrect.CompareEasy(s, x.Name)).First();
-
- url = s;
-
- switch (s)
- {
- case "Bell":
- case "Ding":
- url = "https://www.myinstants.com/media/sounds/boxing-bell.mp3";
- break;
- case "Finish":
- url = "https://www.myinstants.com/media/sounds/finishhim.swf.mp3";
- break;
- case "Magic":
- url = "https://www.myinstants.com/media/sounds/dream-harp-sound-effect.mp3";
- break;
- case "Monsterkill":
- url = "https://www.myinstants.com/media/sounds/announcer_kill_monster_01.mp3";
- break;
- case "Nooo":
- url = "https://www.myinstants.com/media/sounds/nooo.swf.mp3";
- break;
- case "Roblox":
- url = "https://www.myinstants.com/media/sounds/roblox-death-sound_ytkBL7X.mp3";
- break;
- case "Stupid":
- url = "https://www.myinstants.com/media/sounds/stupid_dum_03.mp3";
- volume = 10;
- break;
- case "Police":
- url = "https://www.myinstants.com/media/sounds/sound-of-the-police.mp3";
- break;
- case "Wrong":
- url = "https://www.myinstants.com/media/sounds/wrong-answer-sound-effect.mp3";
- volume = 50;
- break;
- }
-
-
-
- if (SpellCorrect.CompareEasy(s, tSound.Name) < SpellCorrect.ErrorThreshold)
- {
- url = tSound.Url;
- volume = tSound.Volume;
- }
-
- volume = (int)(volume * (MaxVolume / 100.0));
-
-
- if (url != string.Empty)
- {
- // await Dsa.Service.SendAudioAsync(url, vol);
- Voice.Send(url, volume);
- return;
- }
-
- throw new Exception("Ton Existiert nicht");
- }
- }
-}
diff --git a/DiscoBot/Audio/Voice.cs b/DiscoBot/Audio/Voice.cs
deleted file mode 100644
index 379f65b..0000000
--- a/DiscoBot/Audio/Voice.cs
+++ /dev/null
@@ -1,117 +0,0 @@
-namespace DiscoBot.Audio
-{
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Diagnostics;
- using System.Linq;
- using System.Threading.Tasks;
-
- using DiscoBot.Auxiliary;
- using DiscoBot.DSA_Game;
-
- using Discord;
- using Discord.Audio;
- using Discord.Commands;
- using Discord.WebSocket;
-
- public class Voice : ModuleBase
- {
- public static IAudioClient Client { get; set; }
-
- public static void Send(string path, int volume = 256)
- {
- if (Client == null)
- {
- throw new NullReferenceException("Bot befindet sich nicht in einem Sprachchannel");
- }
-
- // Create FFmpeg using the previous example
- var ffmpeg = CreateStream(path, volume);
- var output = ffmpeg.StandardOutput.BaseStream;
- var barInvoker = new BackgroundWorker();
- barInvoker.DoWork += delegate
- {
- var discord = Client.CreatePCMStream(AudioApplication.Music);
- output.CopyToAsync(discord);
-
- discord.FlushAsync();
- };
-
- barInvoker.RunWorkerAsync();
- }
-
- [Command("join", RunMode = RunMode.Async)]
- public async Task JoinChannelAsync(IVoiceChannel channel = null)
- {
- var msg = this.Context.Message;
-
- // Get the audio channel
- channel = channel ?? (msg.Author as IGuildUser)?.VoiceChannel;
- if (channel == null)
- {
- await msg.Channel.SendMessageAsync(
- "User must be in a voice channel, or a voice channel must be passed as an argument.");
- return;
- }
-
- // For the next step with transmitting audio, you would want to pass this Audio Client in to a service.
- var audioClient = await channel.ConnectAsync();
- Client = audioClient;
- }
-
- [Command("leave", RunMode = RunMode.Async)]
- public async Task LeaveChannelAsync(IVoiceChannel channel = null)
- {
-// Permissions.Test(this.Context, "Meister");
-
- if (Client != null)
- {
- SoundEffects.Play("Nooo");
- await Client.StopAsync();
- Client = null;
- }
- }
-
- [Command("volume")]
- public void SetVolume(int volume)
- {
- if (volume <= 100 && volume >= 0)
- {
- SoundEffects.MaxVolume = volume;
- }
- }
-
- [Command("play", RunMode = RunMode.Async)]
- public async Task PlayAudioAsync(string path)
- {
- if (Client == null)
- {
- await this.Context.Channel.SendMessageAsync("Erst Joinen!");
- }
-
- SoundEffects.Play(path);
-
- var sounds = Enum.GetValues(typeof(Sound));
- var soundList = new List<Sound>();
- foreach (var sound in sounds)
- {
- soundList.Add((Sound)sound);
- }
-
- var sc = new SpellCorrect();
- }
-
- private static Process CreateStream(string path, int vol = 256)
- {
- var ffmpeg = new ProcessStartInfo
- {
- FileName = "ffmpeg",
- Arguments = $"-i {path} -ac 2 -f s16le -ar 48000 -ab 620000 -vol {vol} pipe:1",
- UseShellExecute = false,
- RedirectStandardOutput = true,
- };
- return Process.Start(ffmpeg);
- }
- }
-}
diff --git a/DiscoBot/Auxiliary/Calculator/Argument.cs b/DiscoBot/Auxiliary/Calculator/Argument.cs
deleted file mode 100644
index 2379bfe..0000000
--- a/DiscoBot/Auxiliary/Calculator/Argument.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-namespace DiscoBot.Auxiliary.Calculator
-{
- using System;
-
- /// <summary>
- /// Provides an ISolvable class to save numbers. The class handles Argument checking and conversion from string to int.
- /// </summary>
- public class Argument : ISolvable
- {
- private readonly int value;
-
- public Argument(string value)
- {
- // check whether the value given is an empty string
- if (string.IsNullOrEmpty(value))
- {
- throw new ArgumentException("Argument kann nicht mit einem leeren string instanziert werden. ", nameof(value));
- }
-
- if (!int.TryParse(value, out int result))
- {
- throw new ArgumentException($"Kann {value} nicht in Integer konvertieren");
- }
-
- this.value = result;
- }
-
- public int Solve()
- {
- return this.value;
- }
-
- public override string ToString()
- {
- return this.value.ToString();
- }
- }
-} \ No newline at end of file
diff --git a/DiscoBot/Auxiliary/Calculator/ISolvable.cs b/DiscoBot/Auxiliary/Calculator/ISolvable.cs
deleted file mode 100644
index a869bdb..0000000
--- a/DiscoBot/Auxiliary/Calculator/ISolvable.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace DiscoBot.Auxiliary.Calculator
-{
- /// <summary>
- /// Object has to be able to return an integer as it's value
- /// </summary>
- public interface ISolvable
- {
- int Solve();
- }
-}
diff --git a/DiscoBot/Auxiliary/Calculator/Operator.cs b/DiscoBot/Auxiliary/Calculator/Operator.cs
deleted file mode 100644
index 0928ec2..0000000
--- a/DiscoBot/Auxiliary/Calculator/Operator.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-using System;
-
-namespace DiscoBot.Auxiliary.Calculator
-{
- /// <summary>
- /// The Operator Class represents a binary operator with tow Arguments and an Operation type
- /// </summary>
- public class Operator : ISolvable
- {
- private readonly ISolvable arg1, arg2;
-
- public Operator(ISolvable arg1, ISolvable arg2, Ops operatorType)
- {
- this.arg1 = arg1;
- this.arg2 = arg2;
- this.OperatorType = operatorType;
- }
-
- public Ops OperatorType { get; set; }
-
- public int Solve()
- {
- int result;
- switch (this.OperatorType)
- {
- case Ops.Dice:
- result = Dice.Roll(this.arg1.Solve(), this.arg2.Solve());
- break;
- case Ops.Multiply:
- result = this.arg1.Solve() * this.arg2.Solve();
- break;
- case Ops.Add:
- result = this.arg1.Solve() + this.arg2.Solve();
- break;
- case Ops.Subtract:
- result = this.arg1.Solve() - this.arg2.Solve();
- break;
- default:
- throw new ArgumentOutOfRangeException();
- }
-
- return result;
- }
-
- public override string ToString()
- {
- return $"({this.arg1} {this.OperatorType} {this.arg2})";
- }
- }
-}
diff --git a/DiscoBot/Auxiliary/Calculator/Ops.cs b/DiscoBot/Auxiliary/Calculator/Ops.cs
deleted file mode 100644
index 62c1309..0000000
--- a/DiscoBot/Auxiliary/Calculator/Ops.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-namespace DiscoBot.Auxiliary.Calculator
-{
- /// <summary>
- /// The Different Operations, witch can be performed in execution-order
- /// </summary>
- public enum Ops
- {
- Dice,
- Multiply,
- Subtract,
- Add
- }
-}
diff --git a/DiscoBot/Auxiliary/Calculator/StringSolver.cs b/DiscoBot/Auxiliary/Calculator/StringSolver.cs
deleted file mode 100644
index 6e5b3a9..0000000
--- a/DiscoBot/Auxiliary/Calculator/StringSolver.cs
+++ /dev/null
@@ -1,207 +0,0 @@
-namespace DiscoBot.Auxiliary.Calculator
-{
- using System;
- using System.Collections.Generic;
- using System.Linq;
-
- /// <summary>
- /// The StringSolver divides the calculation string into operations and SubStringSolvers if the string contains parentheses
- /// </summary>
- public class StringSolver : ISolvable
- {
- public readonly string input;
- public readonly List<object> arguments = new List<object>();
-
- public StringSolver(string input)
- {
- this.input = input;
- }
-
- public override string ToString()
- {
- return "(0+" + this.input.Replace(" ", string.Empty).ToLower() + ")";
- }
-
- public int Solve()
- {
- string workInput = "0+" + this.input.Replace(" ", string.Empty).ToLower();
- workInput = ExpandParentheses(workInput);
-
- // Create a List of the different parts of the calculation, e.g.:{"0", "+", "(5+6)", "d", "3"}.
- this.AtomizeOperations(workInput);
-
- // traverse the List in order of Operation to Create the binary operation tree .
- this.NestOperations();
-
- // the List now contains only the top operation node, witch can be solved recursively,
- return ((ISolvable)this.arguments.First()).Solve();
- }
-
- public static string GetInner(ref string input) // extract the inner bracket an remove the section from the input string
- {
- int depth = 0;
- for (var index = 1; index < input.Length; index++)
- {
- char c = input[index];
- switch (c)
- {
- case '(':
- depth++;
- break;
- case ')':
- if (depth == 0)
- {
- var split = input.Substring(1, index - 1);
- input = input.Substring(index + 1);
- return split.Equals(string.Empty) ? "0" : split;
- }
- else
- {
- depth--;
- }
-
- break;
- }
- }
-
- return string.Empty;
- }
-
- public static Ops GetOps(char c)
- {
- switch (c)
- {
- case 'd':
- case 'w':
- return Ops.Dice;
- case '+':
- return Ops.Add;
- case '-':
- return Ops.Subtract;
- case '*':
- return Ops.Multiply;
- default:
- return Ops.Multiply;
- }
- }
-
- public static string ExpandParentheses(string input) // insert * between Parentheses and digits
- {
- for (int i = 0; i < input.Length - 1; i++)
- {
- if (input[i + 1] == '(' && char.IsNumber(input[i]))
- {
- input = input.Insert(i + 1, "*");
- }
- }
-
- for (int i = 1; i < input.Length; i++)
- {
- if (input[i - 1] == ')' && char.IsNumber(input[i]))
- {
- input = input.Insert(i, "*");
- }
- }
-
- return input;
- }
-
- public void AtomizeOperations(string workInput)
- {
- for (var index = 0; index < workInput.Length; index++)
- {
- char c = workInput[index];
-
- if (char.IsNumber(c))
- {
- // if char number, check if at end of string, else continue looping
- if (index == workInput.Length - 1)
- {
- // if at end of string; add remaining number to arguments
- this.arguments.Add(new Argument(workInput.Substring(0, index + 1)));
- }
-
- continue;
- }
-
- switch (c)
- {
- case ')':
- throw new ArgumentException($"Unmögliche Anordnung von Klammern");
- case '(':
- this.arguments.Add(new StringSolver(GetInner(ref workInput)));
- index = -1;
- break;
- default:
- if (index > 0)
- {
- this.arguments.Add(new Argument(workInput.Substring(0, index)));
- }
-
- this.arguments.Add(GetOps(c));
- workInput = workInput.Remove(0, index + 1);
- index = -1;
- break;
- }
- }
- }
-
- public void NestOperations()
- {
- foreach (Ops currentOp in Enum.GetValues(typeof(Ops)))
- {
- // cycle through operators in operational order
- for (var index = 0; index < this.arguments.Count; index++)
- {
- var arg = this.arguments[index];
-
- if (arg.GetType() != typeof(Ops))
- {
- continue;
- }
-
- // arg is of type Ops
- var op = (Ops)arg;
-
- if (op != currentOp)
- {
- continue;
- }
-
- // arg describes the current operation
- this.HandleSpecialFormatting(ref index, op); // Deal with special needs...
-
- // replace the previous current and next Element in the List with one Operation object
- var temp = new Operator((ISolvable)this.arguments[index - 1], (ISolvable)this.arguments[index + 1], op);
- this.arguments[index - 1] = temp;
- this.arguments.RemoveRange(index, 2);
- index--;
- }
- }
- }
-
- public void HandleSpecialFormatting(ref int index, Ops op)
- {
- var arg1 = this.arguments[index - 1];
- if (arg1.GetType() == typeof(Ops))
- {
- if (op == Ops.Dice)
- {
- this.arguments.Insert(index++, new Argument("1")); // w6 -> 1w6
- }
-
- if (op == Ops.Subtract)
- {
- this.arguments.Insert(index++, new Argument("0")); // +-3 -> +0-3
- }
- }
-
- var arg2 = this.arguments[index + 1]; // 3+-5 -> 3+(0-5)
- if (arg2.GetType() == typeof(Ops))
- {
- this.arguments[index + 1] = new Operator(new Argument("0"), (ISolvable)this.arguments[index + 2], (Ops)arg2);
- this.arguments.RemoveAt(index + 2);
- }
- }
- }
-} \ No newline at end of file
diff --git a/DiscoBot/Auxiliary/CommandInfo.cs b/DiscoBot/Auxiliary/CommandInfo.cs
deleted file mode 100644
index dfed417..0000000
--- a/DiscoBot/Auxiliary/CommandInfo.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace DiscoBot.Auxiliary
-{
- public struct CommandInfo
- {
- public CommandInfo(string name, string brief, string[] description, string scope)
- {
- this.Name = name;
- this.Scope = scope;
- this.Brief = brief;
- this.Description = description;
- }
-
- public string Name { get; }
-
- public string Scope { get; }
-
- public string Brief { get; }
-
- public string[] Description { get; }
-
- public string GetDescription()
- {
- return this.Description.Aggregate((s, c) => s + c);
- }
- }
-}
diff --git a/DiscoBot/Auxiliary/Dice.cs b/DiscoBot/Auxiliary/Dice.cs
deleted file mode 100644
index 0cd9656..0000000
--- a/DiscoBot/Auxiliary/Dice.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-namespace DiscoBot.Auxiliary
-{
- using System;
- using System.Linq;
-
- using Discord.Commands;
-
- public static class Dice // roll it!
- {
- private static readonly System.Random Rnd = new System.Random();
-
- public static int Roll(int d = 20)
- {
- return Rnd.Next(d) + 1;
- }
-
- public static int Roll(string input)
- {
- var strings = input.ToLower().Split(new[] { 'w', 'd' }, 2, StringSplitOptions.RemoveEmptyEntries).ToList();
- int count = Convert.ToInt32(strings[0]);
- int d = Convert.ToInt32(strings[0]);
-
- if (strings.Count != 2)
- {
- throw new ArgumentException($"{input}: erfüllt nicht die Formatvogaben( Anzahl d Augenzahl)");
- }
-
- return Roll(count, d);
- }
-
- public static int Roll(int count, int d)
- {
- if (d <= 0)
- {
- return 0;
- }
-
- int sum = 0;
- for (int i = 0; i < Math.Abs(count); i++)
- {
- var roll = Dice.Roll(d);
- sum += roll;
- }
-
- sum *= Math.Abs(count) / count;
-
- return sum;
- }
- }
-}
diff --git a/DiscoBot/Auxiliary/Extensions.cs b/DiscoBot/Auxiliary/Extensions.cs
deleted file mode 100644
index fad5dd8..0000000
--- a/DiscoBot/Auxiliary/Extensions.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-namespace DiscoBot.Auxiliary
-{
- public static class StringExtension
- {
- //This mehod extends string. It adds spaces until a fixed length is reached.
- //If the original string is already longer, it is returner unmodified.
- public static string AddSpaces(this string str, int length)
- {
- string temp = str;
- for(int i = str.Length; i < length; i++)
- {
- temp += " ";
- }
- return temp;
- }
-
-
-
- //This mehod extends string.
- //It adds spaces at the HEAD of a string until a fixed length is reached.
- //If the original string is already longer, it is returner unmodified.
- public static string AddSpacesAtHead(this string str, int length)
- {
- string temp = "";
- for (int i = str.Length; i < length; i++)
- {
- temp += " ";
- }
- return temp + str;
- }
- }
-
-}
diff --git a/DiscoBot/Auxiliary/RandomMisc.cs b/DiscoBot/Auxiliary/RandomMisc.cs
deleted file mode 100644
index 7ba625e..0000000
--- a/DiscoBot/Auxiliary/RandomMisc.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-namespace DiscoBot.Auxiliary
-{
- using System;
- using System.Linq;
- using System.Text;
-
- public static class RandomMisc
- {
- private static readonly Random Rand = new Random();
-
- // use: 4w6 +4
- public static string Roll(string input)
- {
- var output = new StringBuilder();
- var strings = input.Split('w', 'd').ToList();
- int count = Convert.ToInt32(strings[0]);
- strings = strings[1].Split(' ').ToList();
- int d = Convert.ToInt32(strings[0]);
-
- if (strings.Count > 0)
- {
- }
-
- int sum = 0;
- for (int i = 0; i < count; i++)
- {
- var roll = Dice.Roll(d);
- sum += roll;
- output.Append("[" + roll + "] ");
- }
-
- if (strings.Count > 1)
- {
- sum += Convert.ToInt32(strings[1]);
- output.Append("sum: " + sum);
- }
-
- return output.ToString();
- }
-
- public static double Random(double stdDev = 1, double mean = 0)
- {
- double u1 = Rand.NextDouble(); // uniform(0,1) random doubles
- double u2 = Rand.NextDouble();
- double randStdNormal = Math.Sqrt(-2.0 * Math.Log(u1)) *
- Math.Sin(2.0 * Math.PI * u2); // random normal(0,1)
- double randNormal =
- mean + stdDev * randStdNormal; // random normal(mean,stdDev^2)
- return randNormal;
- }
- }
-}
diff --git a/DiscoBot/Auxiliary/SpellCorrect.cs b/DiscoBot/Auxiliary/SpellCorrect.cs
deleted file mode 100644
index 01cce62..0000000
--- a/DiscoBot/Auxiliary/SpellCorrect.cs
+++ /dev/null
@@ -1,147 +0,0 @@
-namespace DiscoBot.Auxiliary
-{
- using System;
- using System.Diagnostics;
- using System.Linq;
-
- public class SpellCorrect : StringComparer
- {
- public const int ErrorThreshold = 94100;
-
- public override int Compare(string x, string y)
- {
- return CompareEasy(x, y);
- }
-
- public static int CompareEasy(string x, string y)
- {
- if (string.IsNullOrEmpty(x))
- {
- throw new ArgumentException("message", nameof(x));
- }
-
- if (string.IsNullOrEmpty(y))
- {
- throw new ArgumentException("message", nameof(y));
- }
-
- if (x.Equals(y))
- {
- return 0;
- }
-
- x = x.ToLower();
- y = y.ToLower();
- if (x.Equals(y))
- {
- return 1;
- }
-
- var subs = y.Split(' ', '/');
- int score = subs.Count();
- foreach (string s in subs)
- {
- if (s.Equals(x))
- {
- score--;
- }
- }
-
- if (score < subs.Count())
- {
- return score + 1;
- }
-
- return 100000 - (int)(CompareExact(x, y) * 1000.0);
- /*if (y.Contains(x))
- return 6;*/
- }
-
- public override bool Equals(string x, string y)
- {
- Debug.Assert(x != null, nameof(x) + " != null");
- return x.Equals(y);
- }
-
- public override int GetHashCode(string obj)
- {
- throw new NotImplementedException();
- }
-
- public static double CompareExact(string s, string q)
- {
-
- s = s.ToLower();
- q = q.ToLower();
-
- int i, j;
- const double Match = 3.0;
- const double Gap = -2.0;
- const double Mismatch = -2.0;
-
- double decay;
-
- double[,] matrix = new double[s.Length + 1, q.Length + 1];
- double max = 0.0;
- matrix[0, 0] = 0.0;
-
- for (i = 1; i < s.Length; i++)
- {
- // matrix[i, 0] = 0.0;
- matrix[i, 0] = i * Gap;
- }
-
- for (i = 1; i < q.Length; i++)
- {
- matrix[0, i] = 0.0;
- }
-
-
- for (i = 1; i <= s.Length; i++)
- {
- for (j = 1; j <= q.Length; j++)
- {
- decay = j / (double)(s.Length * 1000);
- double add = s[i - 1] == q[j - 1] ? (Match - decay) : Mismatch;
- double score = matrix[i - 1, j - 1] + add;
-
- if (score < (matrix[i - 1, j] + Gap))
- {
- score = matrix[i - 1, j] + Gap;
- }
-
- if (score < (matrix[i, j - 1] + Gap))
- {
- score = matrix[i, j - 1] + Gap;
- }
-
- if (i > 1 && j > 1)
- {
- if (s[i - 1] == q[j - 2] && s[i - 2] == q[j - 1])
- {
- add = (3 / 2.0) * Match - decay;
- if (score < matrix[i - 2, j - 2] + add)
- {
- score = matrix[i - 2, j - 2] + add;
- }
- }
- }
-
- // if (score < 0)
- // {
- // score = 0;
- // }
-
- if (max < score && i == s.Length)
- {
- max = score;
- }
-
- matrix[i, j] = score;
- }
- }
-
- return max;
- }
- }
-}
diff --git a/DiscoBot/Auxiliary/TalentEnumerableExtension.cs b/DiscoBot/Auxiliary/TalentEnumerableExtension.cs
deleted file mode 100644
index df01de3..0000000
--- a/DiscoBot/Auxiliary/TalentEnumerableExtension.cs
+++ /dev/null
@@ -1,102 +0,0 @@
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using DSALib;
-
-
-namespace DiscoBot.Auxiliary
-{
- using DiscoBot.Audio;
- using DiscoBot.DSA_Game.Characters;
-
-
- public static class TalentEnumerableExtension
- {
- public static string ProbenTest(this IEnumerable<Talent> 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)
- {
- try
- {
- SoundEffects.Play("Stupid");
- }
- catch { }
- 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)
- {
- try
- {
- SoundEffects.Play("Wrong");
- }
- catch { }
- }
-
- output.AppendFormat(" tap: {0,2}", tap);
-
- return output.ToString(); // return output
- }
- }
-}
diff --git a/DiscoBot/Commands/CommandExtension.cs b/DiscoBot/Commands/CommandExtension.cs
deleted file mode 100644
index 098e35f..0000000
--- a/DiscoBot/Commands/CommandExtension.cs
+++ /dev/null
@@ -1,119 +0,0 @@
-namespace DiscoBot.Auxiliary
-{
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.IO;
- using System.Linq;
- using System.Net;
- using System.Text;
- using System.Threading;
- using System.Threading.Tasks;
-
- using Discord;
- using Discord.Commands;
-
- public static class CommandExtension
- {
- private static WebClient client;
-
- public static async Task ReplyTimedAsync(this ModuleBase m, string message, TimeSpan time)
- {
- var token = message.GetHashCode();
- var send = m.Context.Channel.SendMessageAsync($"#{token}\n```xl\n{message}```", false);
-
- var barInvoker = new BackgroundWorker();
- barInvoker.DoWork += delegate
- {
- Thread.Sleep(time);
- Delete(token, m);
- };
-
- await send;
- barInvoker.RunWorkerAsync();
- }
-
- private static void Delete(int token, ModuleBase m)
- {
- var messagesAsync = m.Context.Channel.GetMessagesAsync();
- Task.WaitAll(messagesAsync.ToArray());
- var list = messagesAsync.ToEnumerable().ToList();
- var messages = new List<IMessage>();
- foreach (var task in list)
- {
- messages.AddRange(task.ToList());
- }
-
- var test = messages.Where(x => x.Content.StartsWith($"#{token}\n") && x.Author.IsBot).Select(c=>c );
- var waiters = new List<Task>();
- foreach (var message in test)
- {
- waiters.Add((message as IUserMessage).DeleteAsync());
- }
- Task.WaitAll(waiters.ToArray());
- }
-
- public static async Task ReplyAsync(this ModuleBase m, IEnumerable<string> message, bool directMessage = false)
- {
- var sb = new StringBuilder();
- foreach (string re in message)
- {
- if (sb.Length + re.Length > 1798)
- {
- if (directMessage)
- {
- await m.Context.User.SendMessageAsync("```xl\n" + sb + "\n```");
- }
- else
- {
- await m.Context.Channel.SendMessageAsync("```xl\n" + sb + "\n```");
- }
-
- sb.Clear();
- }
-
- sb.AppendLine(re);
- }
-
- if (directMessage)
- {
- await m.Context.User.SendMessageAsync("```xl\n" + sb + "\n```");
- }
- else
- {
- await m.Context.Channel.SendMessageAsync("```xl\n" + sb + "\n```");
- }
- }
-
- public static async Task ReplyAsync(this ModuleBase m, IEnumerable<string> message, TimeSpan time)
- {
- var sb = new StringBuilder();
- foreach (string re in message)
- {
- if (sb.Length + re.Length > 1798)
- {
-
- await m.ReplyTimedAsync(sb.ToString(), time);
-
-
- sb.Clear();
- }
-
- sb.AppendLine(re);
- }
-
- await m.ReplyTimedAsync(sb.ToString(), TimeSpan.FromSeconds(90));
- }
-
- public static async Task SendWebFile(this IMessageChannel channel, string url = "https://i.imgur.com/0iHEycJ.png")
- {
- if (client == null)
- {
- client = new WebClient();
- }
-
- Stream stream = client.OpenRead(url);
- await channel.SendFileAsync(stream, url.Split('/').Last());
- }
- }
-}
diff --git a/DiscoBot/Commands/CommandTypes.cs b/DiscoBot/Commands/CommandTypes.cs
deleted file mode 100644
index c1d0954..0000000
--- a/DiscoBot/Commands/CommandTypes.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-namespace DiscoBot.Commands
-{
- public enum CommandTypes
- {
- Talent,
- Eigenschaft,
- Angriff,
- Parade,
- Fernkampf,
- KeinChar,
- Zauber
- }
-}
diff --git a/DiscoBot/Commands/FileHandler.cs b/DiscoBot/Commands/FileHandler.cs
deleted file mode 100644
index 0b87b15..0000000
--- a/DiscoBot/Commands/FileHandler.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-namespace DiscoBot.Commands
-{
- using System;
- using System.Linq;
- using System.Net;
- using System.Threading.Tasks;
-
- using DiscoBot.DSA_Game;
- using DiscoBot.DSA_Game.Characters;
-
- using Discord.Commands;
- using DSALib;
-
- public class FileHandler : ModuleBase
- {
- //[Command("send"), Summary("fügt Helden hinzu")]
- public async Task AddChar()
- {
- var msg = this.Context.Message;
- if (msg.Attachments == null)
- {
- throw new ArgumentException("Es wurde keine Datei angehängt");
- }
-
- var attachments = msg.Attachments.ToList();
-
- if (!attachments.Any(x => x.Filename.EndsWith(".xml")))
- {
- throw new ArgumentException("Es wurde kein xml Held mitgeschickt");
- }
-
- foreach (var attachment in attachments.Where(x => x.Filename.EndsWith(".xml")))
- {
- using (var client = new WebClient())
- {
- client.DownloadFile(attachment.Url, "helden\\" + attachment.Filename);
- }
-
- Dsa.Chars.Add(new Character("helden\\" + attachment.Filename));
- (Dsa.Chars.Last() as Character)?.Talente.Select(x => new Talent(x.Name, x.Probe, 0))
- .Where(c => !Dsa.Talente.Exists(v => v.Name.Equals(c.Name))).ToList().ForEach(v => Dsa.Talente.Add(v));
- }
- }
- }
-} \ No newline at end of file
diff --git a/DiscoBot/Commands/Gm.cs b/DiscoBot/Commands/Gm.cs
deleted file mode 100644
index 483e9d2..0000000
--- a/DiscoBot/Commands/Gm.cs
+++ /dev/null
@@ -1,187 +0,0 @@
-using DiscoBot.DSA_Game.Characters;
-
-namespace DiscoBot.Commands
-{
- using System.Linq;
- using System.Threading.Tasks;
-
- using DiscoBot.Auxiliary;
- using DiscoBot.DSA_Game;
-
- using Discord.Commands;
- using DSALib.Characters;
-
- public class Iam : ModuleBase
- {
-
- //[Command("Iam"), Summary("Wechselt den Character")]
- [Alias("iam", "I_am", "i_am", "IchBin", "ichbin", "Ichbin", "Ich_bin", "ich_bin", "Ich", "ich", "I", "i")]
- public Task Change_Character(params string[] givenName) // use fancy parameters
- {
- string res;
- string name;
-
- if (givenName.Length == 0 || (givenName.Length == 1 && (givenName[0].ToLower().Equals("bin") || givenName[0].ToLower().Equals("am"))))
- {
- res = " \nDu bist " + Dsa.Session.Relation[this.Context.User.Username] + "!\n \n";
-
- return this.ReplyAsync("```xl\n" + res + "\n```");
- }
-
- if (givenName.Length > 1 && (givenName[0].ToLower().Equals("bin") || givenName[0].ToLower().Equals("am")) )
- {
- name = givenName.Skip(1).Aggregate((s, c) => s + c); // (Skip(1)) don't use the first element; Aggregate: take source s and do operation s = s+c for all elements
- }
- else
- {
- name = givenName.Aggregate((s, c) => s + c);
- }
-
- if (name.ToLower().Equals("man") || name.ToLower().Equals("help"))
- {
- return this.ReplyAsync("```xl\n" + Help.Get_Specific_Help("ich bin") + "\n```");
-
- }
-
- var character = Dsa.Chars.OrderBy(x => SpellCorrect.CompareEasy(name, x.Name)).First(); // usage of compareEasy
-
- Dsa.Session.Relation[this.Context.User.Username] = character.Name;
- res = " \nWillkommen " + character.Name + "!\n \n";
-
-
- return this.ReplyAsync("```xl\n" + res + "\n```");
- }
- }
-
-
- public class Gm : ModuleBase
- {
- public static string CheckCommand(string name, CommandTypes command, string waffe, int erschwernis = 0)
- {
- var comp = new SpellCorrect();
- var chr = Dsa.Chars.OrderBy(x => comp.Compare(name, x.Name)).First();
-
- switch (command)
- {
- case CommandTypes.Talent:
- return chr.TestTalent(waffe, erschwernis);
- case CommandTypes.Eigenschaft:
- return chr.TestEigenschaft(waffe, erschwernis);
- case CommandTypes.Angriff:
- return chr.Angriff(waffe, erschwernis);
- case CommandTypes.Parade:
- 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}";
- }
-
- //[Command("gm"), Summary("Führt eine probe aus")]
- [Alias("GM", "as", "As", "als")]
- public async Task ProbeAsync([Summary("Fernkampfwaffe")] string name, string command, string cmdText = "", int modifier = 0)
- {
- if (!Permissions.Test(this.Context, "Meister")) return;
-
- command = command.ToLower();
-
- string res;
- string temp = string.Empty;
- ICharacter cha = Dsa.Chars.OrderBy(x =>
- SpellCorrect.CompareEasy(name, x.Name)).First();
- switch (command)
- {
- case "le":
- case "leben":
- case "lp":
- LE le = new LE();
- temp = string.Empty;
-
- if (modifier != 0)
- {
- temp = modifier.ToString();
- }
-
- res = cha.get_LE_Text(cmdText.Trim() + temp);
-
- break;
- case "ae":
- case "asp":
- case "astral":
- AE ae = new AE();
- temp = string.Empty;
-
- if (modifier != 0)
- {
- temp = modifier.ToString();
- }
-
- res = cha.get_AE_Text(cmdText.Trim() + temp);
-
- break;
- default:
- res = this.Test(name, command, cmdText, modifier);
- break;
- }
-
-
- if (Dsa.GeneralContext != null && Dsa.GeneralContext.Channel.Id != this.Context.Channel.Id)
- {
- await Dsa.GeneralContext.Channel.SendMessageAsync("```xl\n" + res + "\n```");
- }
-
- await this.ReplyAsync("```xl\n" + res + "\n```");
- }
-
- private string Test(string name, string command, string waffe, int erschwernis = 0)
- {
- string res;
- switch (command.ToLower())
- {
- case "f":
- case "fern":
- case "fernkampf":
- res = CheckCommand(name, CommandTypes.Fernkampf, waffe, erschwernis);
- break;
- case "t":
- case "ta":
- case "talent":
- case "talente":
- res = CheckCommand(name, CommandTypes.Talent, waffe, erschwernis);
- break;
- case "e":
- case "ei":
- case "eigenschaft":
- res = CheckCommand(name, CommandTypes.Eigenschaft, waffe, erschwernis);
- break;
- case "z":
- case "za":
- case "zauber":
- case "magie":
- case "m":
- res = CheckCommand(name, CommandTypes.Talent, waffe, erschwernis);
- break;
- case "a":
- case "at":
- case "an":
- case "angrif":
- case "angriff":
- res = CheckCommand(name, CommandTypes.Angriff, waffe, erschwernis);
- break;
- case "p":
- case "pa":
- case "parade":
- res = CheckCommand(name, CommandTypes.Parade, waffe, erschwernis);
- break;
- default:
- res = $"Kommando {command} nicht gefunden";
- break;
- }
-
- return res;
- }
- }
-}
diff --git a/DiscoBot/Commands/HeldList.cs b/DiscoBot/Commands/HeldList.cs
deleted file mode 100644
index a8f26e0..0000000
--- a/DiscoBot/Commands/HeldList.cs
+++ /dev/null
@@ -1,191 +0,0 @@
-namespace DiscoBot.Commands
-{
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- using DiscoBot.Audio;
- using DiscoBot.Auxiliary;
- using DiscoBot.DSA_Game;
- using DiscoBot.DSA_Game.Characters;
-
- using Discord.Commands;
-
- public class Held : ModuleBase
- {
- //[Command("held"), Summary("gibt Heldenwerte aus")]
- [Alias("Held", "Wert", "Werte", "werte", "char", "Char")]
- public async Task ListAsync([Summary("Werte")] params string[] prop_list)
- {
- var res = new List<string>();
-
- var character = ((Character)Dsa.Chars.Find(x => x.Name.Equals(Dsa.Session.Relation[this.Context.User.Username])));
-
- int first_column_width = 18;
-
- int persist = 0;
-
- if (prop_list.Length == 0 || prop_list[0].ToLower().StartsWith("all") || prop_list[0].ToLower().StartsWith("brief") || prop_list[0].ToLower().StartsWith("zettel"))
- {
- persist = 1;
-
- res.Add(character.Name + ":\n");
- //Eigenschaften
- res.AddRange(
- character.Eigenschaften.Take(9).Select(s => s.Key + ":\t " + s.Value));
- res.Add("");
- //LE/AE
- res.Add("LE:\t " + character.Lebenspunkte_Aktuell + "/" + character.Lebenspunkte_Basis);
- if (character.Astralpunkte_Basis > 0)
- {
- res.Add("AE:\t " + character.Astralpunkte_Aktuell + "/" + character.Astralpunkte_Basis);
- }
- res.Add("");
- //Kampfwerte
- res.Add("".AddSpaces(first_column_width) + " AT/PA");
- 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
- .Select(s => s.Name + "\t " + s.Value));
- res.Add("");
- //Talente
- res.AddRange(
- character.Talente.Select(s => (s.Name.AddSpaces(first_column_width) + " " + s.Value).AddSpaces(first_column_width + 5) + " " + s.Probe));
- res.Add("");
- //evtl Zauber
- if (character.Zauber.Count > 0)
- {
- res.AddRange(
- character.Zauber.Select(s => (s.Name.AddSpaces(first_column_width) + " " + s.Value).AddSpaces(first_column_width + 5) + " " + s.Probe));
- }
-
- }
- else if (prop_list[0].ToLower().StartsWith("man") || prop_list[0].ToLower().StartsWith("help") || prop_list[0].ToLower().StartsWith("hilf"))
- {
- await this.ReplyAsync("```xl\n" + Help.Get_Specific_Help("Held") + "\n```");
- return;
- }
- else
- {
-
- res.Add(character.Name + ":\n");
-
- foreach (string prop in prop_list)
- {
-
- switch (prop.ToLower())
- {
- case "e":
- case "eig":
- case "eigenschaft":
- case "eigenschaften":
- res.AddRange(
- character.Eigenschaften.Take(8).Select(s => s.Key + ":\t " + s.Value));
- break;
- case "stat":
- case "stats":
- res.AddRange(
- character.Eigenschaften.Take(9).Select(s => s.Key + ":\t " + s.Value));
- res.Add("");
- res.Add("LE:\t " + character.Lebenspunkte_Aktuell + "/" + character.Lebenspunkte_Basis);
- if (character.Astralpunkte_Basis > 0)
- {
- res.Add("AE:\t " + character.Astralpunkte_Aktuell + "/" + character.Astralpunkte_Basis);
- }
- break;
- case "le":
- res.Add("LE:\t " + character.Lebenspunkte_Aktuell + "/" + character.Lebenspunkte_Basis);
- break;
- case "ae":
- res.Add("AE:\t " + character.Astralpunkte_Aktuell + "/" + character.Astralpunkte_Basis);
- break;
- case "t":
- case "ta":
- case "talent":
- case "talente":
- res.AddRange(
- character.Talente.Select(s => (s.Name.AddSpaces(first_column_width) + " " + s.Value).AddSpaces(first_column_width + 5) + " " + s.Probe));
- break;
- case "zauber":
- case "z":
- res.AddRange(
- character.Zauber.Select(s => (s.Name.AddSpaces(first_column_width) + " " + s.Value).AddSpaces(first_column_width + 5) + " " + s.Probe));
- break;
- case "w":
- case "waffe":
- case "waffen":
- case "kampf":
- case "kampfwert":
- case "kampfwerte":
- res.Add("".AddSpaces(first_column_width) + " AT/PA");
- 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.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":
- case "vor":
- case "vorteil":
- case "vorteile":
- case "nachteil":
- case "nachteile":
- res.AddRange(
- character.Vorteile
- .Select(s => s.Name + "\t " + s.Value));
- break;
-
- default:
- res.Add($"Kommando {prop} nicht gefunden");
- break;
- }
-
- res.Add("");
- }
-
- }
-
-
- //var sb = new StringBuilder();
- //foreach (string re in res)
- //{
- // if (sb.Length + re.Length > 1798)
- // {
- // if (persist == 1)
- // {
- // await this.ReplyAsync("```xl\n" + sb.ToString() + "\n```");
- // }
- // else
- // {
- // await this.ReplyTimedAsync(sb.ToString(), TimeSpan.FromSeconds(90));
- // }
- // sb.Clear();
- //}
-
- //sb.AppendLine(re);
- //}
- if (persist == 1)
- {
- await this.ReplyAsync(res, true);
- }
- else
- {
- await this.ReplyAsync(res, TimeSpan.FromSeconds(90));
- }
- }
- }
-}
diff --git a/DiscoBot/Commands/Help.cs b/DiscoBot/Commands/Help.cs
deleted file mode 100644
index 4c378c9..0000000
--- a/DiscoBot/Commands/Help.cs
+++ /dev/null
@@ -1,99 +0,0 @@
-using System.Linq;
-
-namespace DiscoBot.Commands
-{
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Security.Cryptography;
- using System.Threading.Tasks;
-
- using DiscoBot.Auxiliary;
- using DiscoBot.DSA_Game;
-
- using Discord.Commands;
-
- using Newtonsoft.Json;
-
- using CommandInfo = DiscoBot.Auxiliary.CommandInfo;
-
- public class Help : ModuleBase
- {
- static Help()
- {
- /*TextReader stream = new StreamReader(@"..\..\Help.json"); // Load command-description file
- var reader = new JsonTextReader(stream); // create stream reader
-
- reader.Read(); // step into structure, until the array starts
- reader.Read();
- reader.Read();
-
- try
- {
- var test = new JsonSerializer().Deserialize<List<CommandInfo>>(reader); // Deserialize Data and create CommandInfo Struct
-
- Commands.AddRange(test); // Add new CommandInfos to List
- }
- catch (Exception e)
- {
- // ignored
- }*/
- }
-
- //public static List<CommandInfo> Commands { get; } = new List<CommandInfo>();
-
-
- public static string Get_Specific_Help(string command)
- {
- // return command specific help
- var com = DSA_Game.Save.Properties.CommandInfos.OrderBy(x => SpellCorrect.CompareEasy(x.Name, command.ToLower())).First(); // get best fit command
- return com.GetDescription();
- }
-
- public static string Get_Generic_Help()
- {
- string res = "";
- foreach (var com in DSA_Game.Save.Properties.CommandInfos)
- {
- int first_column_width = 8;
- res += ("!" + com.Name + ": ").AddSpaces(first_column_width) + com.Brief;
-
- if (com.Description.Length > 1)
- {
- res += "\n" + "".AddSpaces(first_column_width) + "(\"!man " + com.Name + "\" gibt genauere Informationen)";
- }
-
- res += "\n\n";
- }
- return res;
- }
-/*
-
- //[Command("help"), Summary("prints the help menu.")]
- [Alias("Help", "man", "Man", "Hilfe", "hilfe", "h")]
- public async Task ShowHelpAsync(params string[] command_list)
- {
- var command = "";
- if (command_list.Length > 0) {
- command = command_list.Aggregate((s, c) => s + " " + c);
- }
-
- if (command.Equals(string.Empty)) // return generic Help
- {
- string res = Get_Generic_Help();
-
- //await this.ReplyAsync("```\n[hilfreiche Erklärungen]\nAuflistung aller Commands mit !list commands\n```");
- await this.ReplyAsync("```xl\n" + res +"\n```");
- return;
- }
-
-
-
- // return command specific help
- //var com = Commands.OrderBy(x => SpellCorrect.CompareEasy(x.Name, command.ToLower())).First(); // get best fit command
-
- //await this.ReplyAsync("```xl\n" + com.GetDescription() + "\n```");
- await this.ReplyAsync("```xl\n" + Get_Specific_Help(command) + "\n```");
- }*/
- }
-}
diff --git a/DiscoBot/Commands/LebenUndAstral.cs b/DiscoBot/Commands/LebenUndAstral.cs
deleted file mode 100644
index 2406c70..0000000
--- a/DiscoBot/Commands/LebenUndAstral.cs
+++ /dev/null
@@ -1,198 +0,0 @@
-namespace DiscoBot.Commands
-{
- using System;
- using System.Linq;
- using System.Threading.Tasks;
-
- using DiscoBot.Auxiliary;
- using DiscoBot.DSA_Game;
- using DiscoBot.DSA_Game.Characters;
-
- using Discord.Commands;
- using DSALib.Characters;
-
- public class LE : ModuleBase
- {
- //[Command("LE"), Summary("Ändert aktuellen Lebenspunktestand")]
- [Alias("le", "leben", "LP", "lp", "Le", "Lp")]
-
- public async Task LEAsync([Summary("LE Modifier")] string prop = "", string s = "")
- {
- //This is the string that will be printed
- string res = "";
-
- if (prop.ToLower().Equals("help") || prop.ToLower().Equals("man"))
- {
- await this.ReplyAsync("```xl\n" + Help.Get_Specific_Help("LE") + "\n```");
- return;
- }
-
- //In case the input is badly formated
- prop = prop.Trim() + s.Trim();
-
-
- //Get the actual text
- res += Dsa.Chars.OrderBy(x => SpellCorrect.CompareEasy(Dsa.Session.Relation[this.Context.User.Username], x.Name)).First().get_LE_Text(prop);
-
-
- await this.ReplyAsync("```xl\n" + res + "\n```");
- }
- }
-
- public class AE : ModuleBase
- {
- //[Command("AE"), Summary("Ändert aktuellen Astralpunktestand")]
- [Alias("ae", "astral", "ASP", "Asp", "asp", "Astral")]
-
- public async Task AEAsync([Summary("AE Modifier")] string prop = "", string s = "")
- {
- //This is the string that will be printed
- string res = "";
-
- if (prop.ToLower().Equals("help") || prop.ToLower().Equals("man"))
- {
- await this.ReplyAsync("```xl\n" + Help.Get_Specific_Help("AE") + "\n```");
- return;
- }
-
- //Incase the input is badly formated
- prop = prop.Trim() + s.Trim();
-
-
- //Get the actual text
- res += Dsa.Chars.OrderBy(x => SpellCorrect.CompareEasy(Dsa.Session.Relation[this.Context.User.Username], x.Name)).First().get_AE_Text(prop);
-
-
-
- await this.ReplyAsync("```xl\n" + res + "\n```");
- }
- }
-
- public static class StatExtension
- {
- public static string get_LE_Text(this ICharacter c, string prop)
- {
- string res = "";
- var comp = new SpellCorrect();
- var character = c;
-
- res += (character.Name + ":\n");
-
- //If there is actual input we process it
- if (prop.Length > 0)
- {
- res += "LE: ";
- res += character.Lebenspunkte_Aktuell + "/" + character.Lebenspunkte_Basis + " -> ";
-
- // Apply a change to current value
- if (prop.StartsWith("+") || prop.StartsWith("-"))
- {
- //Allow overflowing the max
- if (prop.StartsWith("++"))
- {
- character.Lebenspunkte_Aktuell = character.Lebenspunkte_Aktuell + Convert.ToInt32(prop.Substring(1, prop.Length - 1));
- }
- else
- {
- int temp = character.Lebenspunkte_Aktuell + Convert.ToInt32(prop) - character.Lebenspunkte_Basis;
- //Stop from overflow overflow
- if (temp > 0 && prop.StartsWith("+"))
- {
- character.Lebenspunkte_Aktuell = (character.Lebenspunkte_Basis > character.Lebenspunkte_Aktuell) ? character.Lebenspunkte_Basis : character.Lebenspunkte_Aktuell;
- res += " Maximale Lebenspunkte sind erreicht ";
- }
- //Simply apply change
- else
- {
- character.Lebenspunkte_Aktuell = character.Lebenspunkte_Aktuell + Convert.ToInt32(prop);
- }
- }
-
- res += character.Lebenspunkte_Aktuell + "/" + character.Lebenspunkte_Basis;
- }
- else
- {
- // Set to new value regardless of original
- character.Lebenspunkte_Aktuell = Convert.ToInt32(prop);
-
- res += character.Lebenspunkte_Aktuell + "/" + character.Lebenspunkte_Basis;
- }
- }
- //If no value is passed, the curent value is displayed
- else
- {
- res += ("LE: " + character.Lebenspunkte_Aktuell + "/" + character.Lebenspunkte_Basis);
- }
-
- return res;
- }
- public static string get_AE_Text(this ICharacter c, string prop)
- {
- string res = "";
- var comp = new SpellCorrect();
- var character = c;
-
- res += (character.Name + ":\n");
-
- //If there is actual input we process it
- if (prop.Length > 0)
- {
-
- res += "AE: ";
- res += character.Astralpunkte_Aktuell + "/" + character.Astralpunkte_Basis + " -> ";
-
- // Apply a change to current value
- if (prop.StartsWith("+") || prop.StartsWith("-"))
- {
- //Allow overflowing the max
- if (prop.StartsWith("++"))
- {
- character.Astralpunkte_Aktuell = character.Astralpunkte_Aktuell + Convert.ToInt32(prop.Substring(1, prop.Length - 1));
- }
- else
- {
- int temp = character.Astralpunkte_Aktuell + Convert.ToInt32(prop) - character.Astralpunkte_Basis;
- //Stop from overflow overflow
- if (temp > 0 && prop.StartsWith("+"))
- {
- character.Astralpunkte_Aktuell = (character.Astralpunkte_Basis > character.Astralpunkte_Aktuell) ? character.Astralpunkte_Basis : character.Astralpunkte_Aktuell;
- res += " Maximale Astralpunkte sind erreicht ";
- }
- //Simply apply change
- else
- {
- character.Astralpunkte_Aktuell = character.Astralpunkte_Aktuell + Convert.ToInt32(prop);
- }
- }
-
- if (character.Astralpunkte_Aktuell < 0)
- {
- res += "Nicht genügend Astralpunkte! ";
- character.Astralpunkte_Aktuell = 0;
- }
-
- res += character.Astralpunkte_Aktuell + "/" + character.Astralpunkte_Basis;
-
- }
- //Set to new value regardless of original
- else
- {
- character.Astralpunkte_Aktuell = Convert.ToInt32(prop);
-
- res += character.Astralpunkte_Aktuell + "/" + character.Astralpunkte_Basis;
- }
- }
- //If no value is passed, the curent value is displayed
- else
- {
- res += ("AE: " + character.Astralpunkte_Aktuell + "/" + character.Astralpunkte_Basis);
- }
-
-
- return res;
- }
- }
-}
-
-
-
diff --git a/DiscoBot/Commands/List.cs b/DiscoBot/Commands/List.cs
deleted file mode 100644
index e77362e..0000000
--- a/DiscoBot/Commands/List.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-namespace DiscoBot.Commands
-{
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- using DiscoBot.Audio;
- using DiscoBot.Auxiliary;
- using DiscoBot.DSA_Game;
- using DiscoBot.DSA_Game.Characters;
-
- using Discord.Commands;
-
- public class List : ModuleBase
- {
- //[Command("list"), Summary("gibt eine Auflistung aus")]
- public async Task ListAsync([Summary("Aktion")] string prop)
- {
- var res = new List<string>();
-
- int persist = 0;
-
- switch (prop.ToLower())
- {
- case "man":
- case "help":
- await this.ReplyAsync("```xl\n" + Help.Get_Specific_Help("List") + "\n```");
- return;
- // break;
- case "chars":
- res.AddRange(Dsa.Chars.Select(x => x.Name));
- break;
- case "commands":
- // res.AddRange(Help.Commands.Select(x => x.Name));
- res.Add(Help.Get_Generic_Help());
- break;
- case "play":
- case "sound":
- case "sounds":
- res.AddRange(
- Enum.GetNames(typeof(Sound)));
- break;
-
- default:
- res.Add($"Kommando {prop} nicht gefunden");
- break;
- }
-
-
- if (persist == 1)
- {
- await this.ReplyAsync(res);
- }
- else
- {
- await this.ReplyAsync(res, TimeSpan.FromSeconds(90));
- }
- }
- }
-}
diff --git a/DiscoBot/Commands/MiscCommands.cs b/DiscoBot/Commands/MiscCommands.cs
deleted file mode 100644
index 53bc42c..0000000
--- a/DiscoBot/Commands/MiscCommands.cs
+++ /dev/null
@@ -1,247 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Runtime.Remoting.Contexts;
-using System.Text;
-
-using DiscoBot.Auxiliary;
-
-using Discord;
-using Discord.Commands;
-using Discord.WebSocket;
-
-namespace DiscoBot.Commands
-{
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.IO;
- using System.Linq;
- using System.Net;
- using System.Net.Http;
- using System.Net.Mime;
- using System.Text;
- using System.Threading;
- using System.Threading.Tasks;
-
- using DiscoBot.Auxiliary;
- using DiscoBot.DSA_Game;
-
- using Discord;
- using Discord.Commands;
-
- public class MiscCommands : ModuleBase
- {
- [Command("r"), Summary("Würfelt ")]
- [Alias("R", "Roll", "roll", "Würfle")]
- public Task RollAsync([Remainder, Summary("Weapon")] string roll)
- {
- //return this.ReplyAsync("```xl\n" + new Auxiliary.Calculator.StringSolver(roll).Solve() + "\n```");
- return this.ReplyAsync("```xl\n" + RandomMisc.Roll(roll) + "\n```");
- }
-
- [Command("rd"), Summary("Würfel Dennis ")]
- public Task RollDennisAsync([Remainder, Summary("Weapon")] string roll)
- {
- return this.ReplyAsync("```xl\n" + new Auxiliary.Calculator.StringSolver(roll).Solve() + "\n```");
- }
-
- [Command("general"), Summary("Set General ")]
- public Task SetGeneralAsync([Remainder, Summary("Set General")] int i = 0)
- {
- Dsa.GeneralContext = this.Context;
- return this.Context.Channel.SendMessageAsync($"```xl\n Der Dachs hat in '{this.Context.Channel.Name}' ein Zuhause gefunden. Gm Nachrichten werden nun auch in diesem Channel gepostet. \n```");
- }
-
- [Command("say"), Summary("Echos a message.")]
- [Alias("s")]
- public Task SayAsync([Remainder, Summary("The text to echo")] string echo)
- {
- return this.ReplyAsync(echo);
- }
-
- [Command("liebe"), Summary("Echos a message.")]
- [Alias("Liebe", "<3", "love")]
- public async Task LoveAsync()
- {
- Random rand = new Random();
- var user = Context.Channel.GetUsersAsync().ToList().Result.ToList().First().Where(x=>x.Status!= UserStatus.Offline).OrderBy(x => rand.Next()).First();
- await this.ReplyAsync(":heart: :heart: :heart: Verteilt die Liebe! :heart: :heart: :heart: \n Besondere Liebe geht an " + user.Username);
- //await this.ReplyAsync("!liebe");
- }
-
- [Command("maul"), Summary("Echos a message.")]
- public Task MaulAsync()
- {
- return this.ReplyAsync("Maul...? Du meintest doch sicher Maulwürfe oder? \n:heart: :heart: :heart: \nGanz viel Liebe für Maulwürfe !\n:heart: :heart: :heart:");
-
- }
-
- [Command("report"), Summary("Report a Tweet")]
- public async Task ReportAsync([Remainder, Summary("Link")] string link)
- {
- var content = new System.Net.Http.StringContent(link);
-
- using (HttpClient client = new HttpClient())
- {
- var response = await client.PostAsync("http://www.example.com/recepticle.aspx", content);
- }
-
- await this.ReplyAsync($"Dein report wurde hinzugefügt");
- }
-
- [Command("match"), Summary("Tinder.")]
- [Alias("mach","pass", "passt")]
- public Task TinderAsync(string s1, string s2)
- {
-
- var sc = new SpellCorrect();
- var rand = new System.Random((s1+s2).GetHashCode());
-
- var wert = Math.Log10(Math.Floor(1000.0 * (SpellCorrect.CompareExact(s1, s2) + rand.NextDouble() * 10.0)) / 1000.0);
- wert = ((wert * 100.0) < 100.0 ? wert * 100.0 : 100.0 - wert);
- wert = wert < 0 ? -wert : wert;
- return this.ReplyAsync($"Ihr passt zu {Math.Floor(100.0 * wert )/ 100.0}% zusammen");
-
- }
-
- [Command("reddit"), Summary("Reddit.")]
- public Task RedditAsync()
- {
- return this.ReplyAsync($"Ein Archiv der Vergangenen Aktionen findet man hier: https://www.reddit.com/r/ReconquistaInternet/");
-
- }
-
- [Command("compare"), Summary("Echos a message.")]
- public async Task KickAsync()
- {
- //await this.Context.Guild.DownloadUsersAsync();
- var users = Context.Guild.GetUsersAsync(CacheMode.AllowDownload);
- var test = File.ReadAllLines("RG.txt");
- await users;
- var us = users.Result.Select(x => x.Username);
-
- var lines = test.Where(x => !x.Equals(string.Empty)).ToList();
-
-
- var sc = new SpellCorrect();
-
- var res = new List<string>();
-
- foreach (string line in lines)
- {
- var best = us.OrderBy(user => sc.Compare(user, line)).First();
-
- double fit = sc.Compare(best, line);
-
- if (fit < SpellCorrect.ErrorThreshold - 20000)
- {
- if (fit.Equals(0))
- {
- res.Add($"@\t{best} !!! => {line}");
- }
- else
- {
- res.Add($"-\t{best} hat Ähnlichkeit mit: {line}");
- }
- }
- }
-
- var sb = new StringBuilder();
- foreach (string re in res)
- {
- if (sb.Length + re.Length > 1798)
- {
- await this.ReplyTimedAsync(sb.ToString(), TimeSpan.FromSeconds(90));
- sb.Clear();
- }
-
- sb.AppendLine(re);
- }
-
- if(Permissions.Check(this.Context, new []{"Admin", "Mod"}))
- await this.ReplyTimedAsync(sb.ToString(), TimeSpan.FromSeconds(90));
-
- //await this.ReplyAsync($"{count} Duplikate gefunden");
-
- }
-
-
- [Command("clear"), Summary("Cleans up messages.")]
- public async Task DeleteAsync(int count)
- {
- var messagesAsync = Context.Channel.GetMessagesAsync(count);
- Task.WaitAll(messagesAsync.ToArray());
- var list = messagesAsync.ToEnumerable().ToList();
- var messages = new List<IMessage>();
- foreach (var task in list)
- {
- messages.AddRange(task.ToList());
- }
-
- if (Permissions.Check(Context, new[] { "Admin", "Mod", "Meister" }))
- {
-
- var waiters = new List<Task>();
- foreach (var message in messages)
- {
- waiters.Add((message as IUserMessage).DeleteAsync());
- }
-
- Task.WaitAll(waiters.ToArray());
- }
-
- }
-
- [Command("check"), Summary("Echos a message.")]
- [Alias("Check")]
- public async Task CheckAsync(string quarry)
- {
- var perm = new List<string> { "Admin", "Mod", "Privatpolizei" };
-
- Permissions.Test(this.Context, perm.ToArray());
-
- var test = File.ReadAllLines("RG.txt");
-
- var lines = test.Where(x => !x.Equals(string.Empty)).ToList();
-
-
- var sc = new SpellCorrect();
- var count = lines.OrderBy(line => sc.Compare(quarry, line)).First();
-
- var fit = sc.Compare(count, quarry);
-
- string Antwort;
-
- if (fit < SpellCorrect.ErrorThreshold - 20000)
- {
- Antwort= $"```xl\nAuf anderem Server Match gefunden: {count}";
- }
- else
- {
- Antwort = $"```xl\nAuf anderem Server Kein Match gefunden: {quarry}";
- }
-
-
- var users = Context.Guild.GetUsersAsync(CacheMode.AllowDownload);
- await users;
- var us = users.Result.Select(x => x.Username);
-
- sc = new SpellCorrect();
- count = us.OrderBy(line => sc.Compare(quarry, line)).First();
-
- fit = sc.Compare(count, quarry);
-
- if (fit < SpellCorrect.ErrorThreshold - 20000)
- {
- Antwort = Antwort + $"\nAuf unserem Server Match gefunden: {count}\n```";
- }
- else
- {
- Antwort = Antwort + $"\nAuf unserem Server Kein Match gefunden: {quarry} \n```";
- }
-
- await ReplyAsync(Antwort);
-
- }
- }
-}
diff --git a/DiscoBot/Commands/NpcCommands.cs b/DiscoBot/Commands/NpcCommands.cs
deleted file mode 100644
index b314494..0000000
--- a/DiscoBot/Commands/NpcCommands.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-namespace DiscoBot.Commands
-{
- using System;
- using System.Linq;
- using System.Threading.Tasks;
-
- using DiscoBot.Auxiliary;
- using DiscoBot.Characters;
- using DiscoBot.DSA_Game;
- using DiscoBot.DSA_Game.Characters;
-
- using Discord.Commands;
-
- public class NpcCommands : ModuleBase
- {
- //[Command("npc"), Summary("Erstellt ein NPC")]
- [Alias("Npc", "NPc", "NPC", "nPC")]
- public Task RandomAsync([Summary("Create Random")] string npcName, int mean = 9, int stDv = 1)
- {
- Dsa.Chars.Add(new Npc(npcName, mean, stDv));
- return this.ReplyAsync($"{npcName} wurde zufällig generiert");
- }
-
- //[Command("npc"), Summary("Erstellt ein NPC")]
- [Alias("Npc", "NPc", "NPC", "nPC")]
- public Task CopyAsync([Summary("Create Copy")] string npcName, string source, int stDv = 1)
- {
- if (Dsa.Chars.Exists(x => x.Name.Equals(npcName)))
- {
- throw new Exception("Char gibt es schon");
- }
-
- var comp = new SpellCorrect();
- var chr = Dsa.Chars.OrderBy(x => comp.Compare(x.Name, source)).First();
- Dsa.Chars.Add(new Character(chr as Character, npcName, stDv));
- 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
deleted file mode 100644
index 77a10ad..0000000
--- a/DiscoBot/Commands/ProbenTest.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-namespace DiscoBot.Commands
-{
- using System.Threading.Tasks;
-
- using DiscoBot.DSA_Game;
-
- using Discord.Commands;
-
- public class ProbenTest : ModuleBase
- {
- //[Command("t"), Summary("Würfelt ein Talent-/Zauberprobe")]
- [Alias("T", "Talent", "talent", "versuche")]
- public Task TalentAsync([Summary("Talent oder Zaubername")] string talent, int erschwernis = 0)
- {
- string res;
- try
- {
- res = Gm.CheckCommand(
- Dsa.Session.Relation[this.Context.User.Username],
- CommandTypes.Talent,
- talent,
- erschwernis);
- }
- catch
- {
- res = Gm.CheckCommand(
- Dsa.Session.Relation["Tardis"],
- CommandTypes.Talent,
- talent,
- erschwernis);
- }
-
- 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.Session.Relation[this.Context.User.Username],
- CommandTypes.Zauber,
- zauber,
- erschwernis);
- }
- catch
- {
- res = Gm.CheckCommand(
- Dsa.Session.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)
- {
- var chr = Dsa.Chars.Find(x => x.Name.Equals(Dsa.Session.Relation[this.Context.User.Username]));
- string res = chr.TestEigenschaft(talent, erschwernis);
- return this.ReplyAsync("```xl\n" + res + "\n```");
- }
-
- //[Command("a"), Summary("Würfelt ein Angriff")]
- [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.Session.Relation[this.Context.User.Username])).Angriff(weapon, erschwernis) + "\n```");
- }
-
- //[Command("p"), Summary("Würfelt eine Parade Probe")]
- [Alias("P", "Parade", "parade", "pariere_mit")]
- public Task ParadeAsync([Summary("Parade Weapon")] string talent, int erschwernis = 0)
- {
- return this.ReplyAsync("```xl\n" + Dsa.Chars.Find(x => x.Name.Equals(Dsa.Session.Relation[this.Context.User.Username])).Parade(talent, erschwernis) + "\n```");
- }
-
- //[Command("f"), Summary("Führt eine Fernkampfprobe aus")]
- [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.Session.Relation[this.Context.User.Username])).Fernkampf(waffe, erschwernis) + "\n```");
- }
- }
-}
diff --git a/DiscoBot/DSA_Game/Characters/Character.cs b/DiscoBot/DSA_Game/Characters/Character.cs
deleted file mode 100644
index 81c11fc..0000000
--- a/DiscoBot/DSA_Game/Characters/Character.cs
+++ /dev/null
@@ -1,303 +0,0 @@
-using DSALib;
-using DSALib.Characters;
-
-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 : Being, 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 Dictionary<string, int> Eigenschaften { get; set; } = new Dictionary<string, int>(); // char properties
-
- public List<Talent> Talente { get; set; } = new List<Talent>(); // list of talent objects (talents)
-
- public List<Zauber> Zauber { get; set; } = new List<Zauber>(); // list of spell objects
-
- public List<KampfTalent> Kampftalente { get; set; } = new List<KampfTalent>(); // list of combat objects
-
- public List<Vorteil> Vorteile { get; set; } = new List<Vorteil>();
-
- public Dictionary<string, string> PropTable { get; set; } = new Dictionary<string, string>(); // -> 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)
- {
- try
- {
- SoundEffects.Play("Wrong");
- }
- catch { }
-
- 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)
- {
- try
- {
- SoundEffects.Play("Wrong");
- }
- catch { }
- 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)
- {
- try
- {
- SoundEffects.Play("Wrong");
- }
- catch { }
- 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["Lebensenergie"];
- var AE_Wert = this.Eigenschaften.First(s => s.Key.Contains("Astralenergie")).Value;
-
- //var KL_Wert = this.Eigenschaften.First(s => s.Key.Contains("Klugheit")).Value;
- var MU_Wert = this.Eigenschaften.First(s => s.Key.Contains("Mut")).Value;
- var IN_Wert = this.Eigenschaften.First(s => s.Key.Contains("Intuition")).Value;
- var CH_Wert = this.Eigenschaften.First(s => s.Key.Contains("Charisma")).Value;
- var KK_Wert = this.Eigenschaften["Körperkraft"];
- var KO__Wert = this.Eigenschaften["Konstitution"];
-
- this.Astralpunkte_Basis = 0;
-
- this.Ausdauer_Basis = 0;
-
- this.Lebenspunkte_Basis = LE_Wert + (int)(KO__Wert + (KK_Wert / 2.0) + 0.5);
-
- if (this.Vorteile.Exists(x => x.Name.ToLower().Contains("zauberer")))
- {
- this.Astralpunkte_Basis = AE_Wert + (int)((MU_Wert + IN_Wert + CH_Wert) / 2.0 + 0.5);
- }
-
- this.Lebenspunkte_Aktuell = this.Lebenspunkte_Basis;
- this.Astralpunkte_Aktuell = this.Astralpunkte_Basis;
- this.Ausdauer_Aktuell = this.Ausdauer_Basis;
-
- }
-
-
- 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;
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/DiscoBot/DSA_Game/Characters/NPC.cs b/DiscoBot/DSA_Game/Characters/NPC.cs
deleted file mode 100644
index b1b8e82..0000000
--- a/DiscoBot/DSA_Game/Characters/NPC.cs
+++ /dev/null
@@ -1,112 +0,0 @@
-namespace DiscoBot.Characters
-{
- using System;
-
- using DiscoBot.Auxiliary;
- using DiscoBot.DSA_Game.Characters;
- using DSALib.Characters;
-
- public class Npc : Being, 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 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/Characters/SaveChar.cs b/DiscoBot/DSA_Game/Characters/SaveChar.cs
deleted file mode 100644
index 272f516..0000000
--- a/DiscoBot/DSA_Game/Characters/SaveChar.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace DiscoBot.DSA_Game.Characters
-{
- using Discord;
- using DSALib.Characters;
-
- public class SaveChar
- {
- public string Name { get; set; }
-
- public int Lebenspunkte_Aktuell { get; set; }
-
- public int Ausdauer_Aktuell { get; set; }
-
- public int Astralpunkte_Aktuell { get; set; }
-
- public static SaveChar FromICharacter(ICharacter c)
- {
- return new SaveChar
- {
- Astralpunkte_Aktuell = c.Astralpunkte_Aktuell,
- Ausdauer_Aktuell = c.Ausdauer_Aktuell,
- Lebenspunkte_Aktuell = c.Lebenspunkte_Aktuell,
- Name = c.Name
- };
- }
- }
-
-
- public static class ICharExtension
- {
- public static void Update(this ICharacter c, SaveChar s)
- {
- c.Astralpunkte_Aktuell = s.Astralpunkte_Aktuell;
- c.Ausdauer_Aktuell = s.Ausdauer_Aktuell;
- c.Lebenspunkte_Aktuell = s.Lebenspunkte_Aktuell;
- c.Name = s.Name;
- }
- }
-}
diff --git a/DiscoBot/DSA_Game/Dsa.cs b/DiscoBot/DSA_Game/Dsa.cs
deleted file mode 100644
index fd60c9a..0000000
--- a/DiscoBot/DSA_Game/Dsa.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-using DSALib;
-using DSALib.Characters;
-
-namespace DiscoBot.DSA_Game
-{
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
-
- using DiscoBot.Audio;
- using DiscoBot.Commands;
- using DiscoBot.DSA_Game.Characters;
- using DiscoBot.DSA_Game.Save;
-
- using Discord.Commands;
-
- public static class Dsa
- {
- private static Session s_session;
-
- public static ICommandContext GeneralContext { get; set; }
-
- public static AudioService Service { get; set; }
-
- 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 Session Session
- {
- get
- {
- s_session.Chars = Chars.Select(x => SaveChar.FromICharacter(x)).ToList();
- return s_session;
- }
-
- set
- {
- s_session = value;
- foreach (var x in value.Chars)
- {
- Chars.Find(c => c.Name.Equals(x.Name)).Update(x);
- }
- }
- }
-
- public static void Startup()
- {
- //new DiscoBot.Auxiliary.Calculator.StringSolver("1d100 - (1d200 + 1) * -50000").Solve();
- /*Session = new Session();*/
- // 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));
- }
-
- Properties.Deserialize();
- Properties.Serialize();
-
- Talente = Talente.OrderBy(x => x.Name).ToList();
- Session = new Session
- {
- Chars = Chars.Select(x => SaveChar.FromICharacter(x)).ToList(),
- GeneralContext = GeneralContext
- };
- Session.Save();
- }
- }
-} \ No newline at end of file
diff --git a/DiscoBot/DSA_Game/Save/Properties.cs b/DiscoBot/DSA_Game/Save/Properties.cs
deleted file mode 100644
index 67d30b0..0000000
--- a/DiscoBot/DSA_Game/Save/Properties.cs
+++ /dev/null
@@ -1,88 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace DiscoBot.DSA_Game.Save
-{
- using System.Collections;
- using System.IO;
- using System.Reflection;
- using System.Runtime.CompilerServices;
-
- using DiscoBot.Audio;
- using DiscoBot.Auxiliary;
- using DiscoBot.Commands;
-
- using Discord;
-
- using Newtonsoft.Json;
-
- public static class Properties
- {
- private static Dictionary<string, object> objects;
-
- static Properties()
- {
- objects = new Dictionary<string, object>();
- /*this.objects.Add("Sounds", new List<Sound>());
- this.objects.Add("CommandInfos", new List<CommandInfo>());*/
- }
-
- public static List<CommandInfo> CommandInfos { get => objects["CommandInfo"] as List<CommandInfo>; set => objects["CommandInfo"] = value; } // use Properties.Commandinfos to access the abstract Object array
-
- public static List<Sound> Sounds { get => objects["Sound"] as List<Sound>; set => objects["Sound"] = value; }
-
- public static void Deserialize(string path = @"..\..\Properties")
- {
-
- var files = Directory.GetFiles(path, "*.json");
-
- foreach (string file in files)
- {
- try
- {
- string name = file.Split('\\').Last().Split('.')[0].Replace('-', '.');
- string data = File.ReadAllText(file);
- Type type = Type.GetType(name);
- if (data.StartsWith("["))
- {
- type = typeof(List<>).MakeGenericType(type);
- }
-
- var o = JsonConvert.DeserializeObject(data, type);
- objects.Add(name.Split('.').Last(), o);
- }
- catch (Exception e)
- {
- // ignored
- var log = new LogMessage(LogSeverity.Warning, "Properties", $"Laden von Save-File {file} fehlgeschlagen.", e);
- Console.WriteLine(log);
- }
-
- }
-
- }
-
- public static void Serialize(string path = @"..\..\Properties\")
- {
- try
- {
- foreach (var o in objects)
- {
- string assembly = o.Value is IList list ? ((IList)list)[0]?.GetType().FullName : o.Value.GetType().FullName;
-
- var name = path + assembly.Replace('.', '-') + ".json";
- File.WriteAllText(name, JsonConvert.SerializeObject(o.Value, Formatting.Indented)); // Deserialize Data and create CommandInfo Struct
- }
- }
- catch (Exception e)
- {
- // ignored
- var log = new LogMessage(LogSeverity.Warning, "Properties", $"Speichern von Save-File fehlgeschlagen.", e);
- Console.WriteLine(log);
- }
- }
- }
-}
diff --git a/DiscoBot/DSA_Game/Save/SaveCommand.cs b/DiscoBot/DSA_Game/Save/SaveCommand.cs
deleted file mode 100644
index 1f160ec..0000000
--- a/DiscoBot/DSA_Game/Save/SaveCommand.cs
+++ /dev/null
@@ -1,82 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace DiscoBot.DSA_Game.Save
-{
- using System.Diagnostics;
- using System.IO;
- using System.Net;
- using System.Net.Http;
-
- using DiscoBot.Auxiliary;
-
- using Discord.Commands;
-
- public class SaveCommand : ModuleBase
- {
- [Command("load"), Summary("Load Session")]
- [Alias("session")]
- public async Task LoadSessionAsync([Remainder, Summary("Session Name")] string name = "")
- {
- if (name.Equals("?") || name.Equals(string.Empty))
- {
- await this.ReplyAsync($"Gespeicherte Sessions:");
- await this.ReplyAsync(this.ListSessions());
- return;
- }
-
- var path = DSA_Game.Save.Session.DirectoryPath + @"\" + name;
-
- var files = Directory.GetFiles(path);
- var session = files.OrderByDescending(x => Convert.ToInt32(x.Split('-').Last().Split('.').First())).First();
- Dsa.Session = Session.Load(session);
-
- await this.ReplyAsync($"{name} wurde geladen");
- }
-
- [Command("save", RunMode = RunMode.Async), Summary("Save Session")]
- public async Task SessionSaveAsync([Remainder, Summary("Session Name")] string name = "")
- {
- //var sendFile = this.Context.Channel.SendWebFile("https://cdn.discordapp.com/attachments/377123019673567232/465615882048110603/giphy.gif");
-
- if (name.Equals("?") || name.Equals(string.Empty))
- {
- await this.ReplyAsync($"Gespeicherte Sessions:");
- await this.ReplyAsync(this.ListSessions());
- return;
- }
-
- var path = DSA_Game.Save.Session.DirectoryPath + @"\" + name;
- if (Directory.Exists(path))
- {
- var files = Directory.GetFiles(path);
- int current = files.Max(x => Convert.ToInt32(x.Split('-').Last().Split('.').First()));
- Dsa.Session.SessionName = name;
- Dsa.Session.Save(path + "\\" + name + $"-{++current}.json");
- }
- else
- {
- Directory.CreateDirectory(path);
- Dsa.Session.SessionName = name;
- Dsa.Session.Save(path + "\\" + name + $"-0.json");
- }
-
- await this.ReplyAsync($"{name} wurde gespeichert");
- //await sendFile;
- }
-
- private string[] ListSessions()
- {
- string[] dirs = Directory.GetDirectories(Session.DirectoryPath).OrderByDescending(x => new DirectoryInfo(x).LastAccessTime.Ticks).ToArray();
- for (int i = 0; i < dirs.Length; i++)
- {
- dirs[i] += "; " + new DirectoryInfo(dirs[i]).LastAccessTime;
- }
-
- return dirs;
- }
- }
-}
diff --git a/DiscoBot/DSA_Game/Save/Session.cs b/DiscoBot/DSA_Game/Save/Session.cs
deleted file mode 100644
index 578fa50..0000000
--- a/DiscoBot/DSA_Game/Save/Session.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace DiscoBot.DSA_Game.Save
-{
- using System.IO;
- using System.Runtime.CompilerServices;
-
- using DiscoBot.DSA_Game.Characters;
-
- using Discord;
- using Discord.Commands;
-
- using Newtonsoft.Json;
-
- public class Session
- {
- public static string DirectoryPath { get; set; } = @"..\..\sessions";
-
- public ICommandContext GeneralContext { get; set; }
-
- public Dictionary<string, string> Relation { get; set; } = new Dictionary<string, string>(); // dictionary to match the char
-
- public List<SaveChar> Chars { get; set; } = new List<SaveChar>(); // list of all characters
-
- public string SessionName { get; set; }
-
- public static Session Load(string path = @"..\..\session.json")
- {
- try
- {
- return JsonConvert.DeserializeObject<Session>(File.ReadAllText(path)); // Deserialize Data and create Session Object
- }
- catch (Exception e)
- {
- // ignored
- var log = new LogMessage(LogSeverity.Warning, "Properties", $"Laden von Save-File {path} fehlgeschlagen.", e);
- Console.WriteLine(log);
- return null;
- }
- }
-
- public void Save(string path = @"..\..\session.json")
- {
- try
- {
- File.WriteAllText(path, JsonConvert.SerializeObject(this, Formatting.Indented)); // Deserialize Data and create CommandInfo Struct
- }
- catch (Exception e)
- {
- var log = new LogMessage(LogSeverity.Warning, "Properties", $"Speichern von Save-File {path} fehlgeschlagen.", e);
- Console.WriteLine(log);
- // ignored
- }
- }
- }
-}
diff --git a/DiscoBot/DiscoBot.csproj b/DiscoBot/DiscoBot.csproj
deleted file mode 100644
index d25a5e9..0000000
--- a/DiscoBot/DiscoBot.csproj
+++ /dev/null
@@ -1,163 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{1186AF1C-BC46-4B3D-BEE0-CE478B8AEAC7}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <RootNamespace>DiscoBot</RootNamespace>
- <AssemblyName>DiscoBot</AssemblyName>
- <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
- <TargetFrameworkProfile />
- <NuGetPackageImportStamp>
- </NuGetPackageImportStamp>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Discord.Net.Commands, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>..\packages\Discord.Net.Commands.2.0.0-beta\lib\netstandard1.1\Discord.Net.Commands.dll</HintPath>
- </Reference>
- <Reference Include="Discord.Net.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>..\packages\Discord.Net.Core.2.0.0-beta\lib\net45\Discord.Net.Core.dll</HintPath>
- </Reference>
- <Reference Include="Discord.Net.Rest, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>..\packages\Discord.Net.Rest.2.0.0-beta\lib\net45\Discord.Net.Rest.dll</HintPath>
- </Reference>
- <Reference Include="Discord.Net.Rpc, Version=1.0.2.0, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>..\packages\Discord.Net.Rpc.1.0.2\lib\net45\Discord.Net.Rpc.dll</HintPath>
- </Reference>
- <Reference Include="Discord.Net.Webhook, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>..\packages\Discord.Net.Webhook.2.0.0-beta\lib\netstandard1.1\Discord.Net.Webhook.dll</HintPath>
- </Reference>
- <Reference Include="Discord.Net.WebSocket, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>..\packages\Discord.Net.WebSocket.2.0.0-beta\lib\net45\Discord.Net.WebSocket.dll</HintPath>
- </Reference>
- <Reference Include="FSharp.Core, Version=4.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>..\packages\FSharp.Core.4.5.2\lib\net45\FSharp.Core.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Extensions.DependencyInjection, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
- <HintPath>..\packages\Microsoft.Extensions.DependencyInjection.2.2.0-preview2-35157\lib\net461\Microsoft.Extensions.DependencyInjection.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
- <HintPath>..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.2.0-preview2-35157\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
- </Reference>
- <Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
- <HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Collections.Immutable.1.5.0\lib\netstandard2.0\System.Collections.Immutable.dll</HintPath>
- </Reference>
- <Reference Include="System.Core" />
- <Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Diagnostics.DiagnosticSource.4.5.0\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
- </Reference>
- <Reference Include="System.Interactive.Async, Version=3.2.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Interactive.Async.3.2.0\lib\net46\System.Interactive.Async.dll</HintPath>
- </Reference>
- <Reference Include="System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
- <HintPath>..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll</HintPath>
- </Reference>
- <Reference Include="System.Net.Http, Version=4.1.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Net.Http.4.3.3\lib\net46\System.Net.Http.dll</HintPath>
- <Private>True</Private>
- </Reference>
- <Reference Include="System.Net.Sockets, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Net.Sockets.4.3.0\lib\net46\System.Net.Sockets.dll</HintPath>
- </Reference>
- <Reference Include="System.Security.Cryptography.Algorithms, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net461\System.Security.Cryptography.Algorithms.dll</HintPath>
- <Private>True</Private>
- </Reference>
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Audio\AudioModule.cs" />
- <Compile Include="Audio\AudioService.cs" />
- <Compile Include="Audio\Sound.cs" />
- <Compile Include="Auxiliary\Calculator\Argument.cs" />
- <Compile Include="Auxiliary\Calculator\ISolvable.cs" />
- <Compile Include="Auxiliary\Calculator\Operator.cs" />
- <Compile Include="Auxiliary\Calculator\Ops.cs" />
- <Compile Include="Auxiliary\Calculator\StringSolver.cs" />
- <Compile Include="Auxiliary\CommandInfo.cs" />
- <Compile Include="Auxiliary\Extensions.cs" />
- <Compile Include="DSA_Game\Characters\Character.cs" />
- <Compile Include="DSA_Game\Characters\NPC.cs" />
- <Compile Include="DSA_Game\Characters\SaveChar.cs" />
- <Compile Include="Commands\Help.cs" />
- <Compile Include="Auxiliary\Dice.cs" />
- <Compile Include="Auxiliary\TalentEnumerableExtension.cs" />
- <Compile Include="Commands\LebenUndAstral.cs" />
- <Compile Include="Commands\HeldList.cs" />
- <Compile Include="Audio\Soundeffects.cs" />
- <Compile Include="ToRework\Permissions.cs" />
- <Compile Include="Commands\MiscCommands.cs" />
- <Compile Include="Auxiliary\SpellCorrect.cs" />
- <Compile Include="DSA_Game\Save\Properties.cs" />
- <Compile Include="DSA_Game\Save\SaveCommand.cs" />
- <Compile Include="DSA_Game\Save\Session.cs" />
- <Compile Include="ToRework\CommandExtension.cs" />
- <Compile Include="Commands\CommandTypes.cs" />
- <Compile Include="Commands\FileHandler.cs" />
- <Compile Include="Commands\Gm.cs" />
- <Compile Include="Commands\List.cs" />
- <Compile Include="Commands\NpcCommands.cs" />
- <Compile Include="Commands\ProbenTest.cs" />
- <Compile Include="Audio\Voice.cs" />
- <Compile Include="Auxiliary\RandomMisc.cs" />
- <Compile Include="DSA_Game\Dsa.cs" />
- <Compile Include="Program.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="Properties\Settings.Designer.cs">
- <AutoGen>True</AutoGen>
- <DesignTimeSharedInput>True</DesignTimeSharedInput>
- <DependentUpon>Settings.settings</DependentUpon>
- </Compile>
- </ItemGroup>
- <ItemGroup>
- <None Include="App.config" />
- <None Include="Help.json" />
- <None Include="packages.config" />
- <None Include="Properties\Settings.settings">
- <Generator>SettingsSingleFileGenerator</Generator>
- <LastGenOutput>Settings.Designer.cs</LastGenOutput>
- </None>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\DSALib\DSALib.csproj">
- <Project>{388dd4ed-29c4-4127-ac8f-34dd3fe9f9b0}</Project>
- <Name>DSALib</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <Import Project="..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets')" />
- <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
- <PropertyGroup>
- <ErrorText>Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".</ErrorText>
- </PropertyGroup>
- <Error Condition="!Exists('..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets'))" />
- </Target>
-</Project> \ No newline at end of file
diff --git a/DiscoBot/Help.json b/DiscoBot/Help.json
deleted file mode 100644
index 44ce054..0000000
--- a/DiscoBot/Help.json
+++ /dev/null
@@ -1,120 +0,0 @@
-{
- "CommandInfos": [
- {
- "Name": "ich bin",
- "Scope": "All",
- "Brief": "Setzt den gespielten Charakter fest",
- "Description": [
- "Mit \"!Ich bin\" kann der gespielte Charakter definiert, bzw. gewechselt werden.\n",
- " Die Charaktere müssen als *.xml Dateien hinterlegt sein.\n\n",
- " !ich Zeigt an welcher Charakter zur Zeit gespielt wird\n",
- " !ich bin Zalibius Wechsel zum Helden Zalibius\n",
- " !ich Rhoktar Orkische Variante von !ich bin.\n",
- " Wechselt zu Rhoktar.\n\n",
- " !list chars Zeigt die Liste verfügbarer Charaktere.\n",
- " \n"
- ]
- },
- {
- "Name": "List",
- "Scope": "All",
- "Brief": "Anzeige vonSpielrelevanten Listen",
- "Description": [
- "Mit \"!list\" lassen sich spielrelevante Listen ausgeben. Die Angezeigte Liste wird nach einiger Zeit wieder gelöscht.\n",
- "\n",
- " !list chars Liste aller verfügbaren Helden (eingelesen per *.xml)\n",
- " und NSCs.\n",
- " (Mit \"!ich bin\" kann der Held ausgewählt werden.)\n",
- " !list commands Liste aller verwendbaren Bot-Kommandos.\n",
- " !list sounds Liste der Soundeffekte." ]
- },
- {
- "Name": "Held",
- "Scope": "All",
- "Brief": "Anzeige von Heldenwerten",
- "Description": [
- "Mit \"!Held\" lassen sich Heldenwerte ausgeben. Mehrere Werte können gleichzeitig angefordert werde. \"!Held LE Waffen\" liefert so z.B. Informationen zur Lebensenergie und den Kampfwerten.\n Bis auf wenige Ausnahmen wird die Angezeigte Liste nach einiger Zeit wieder gelöscht.\n",
- "\n",
- " !Held Zeigt den Heldenbrief an.\n",
- " (Diese Liste wird nicht automatisch gelöscht)\n",
- " !Held Eigenschaften Zeigt die Eigenschaften MU/KL/CH/IN/KK/GE/FF/KO.\n",
- " !Held e Kurzform von \"!Held Eigenschaften\".\n",
- " !Held LE Zeigt LE an.\n",
- " !Held AE Zeigt AE an.\n",
- " !Held stats Zeigt Eigenschaften und zusätzlich SO/LE/AE.\n",
- " !Held Kampfwerte Zeigt AT/PA für aktivierte Waffentalente.\n",
- " !Held Waffe/!list w Kurzformen von \"!Held Kampfwerte\".\n",
- " !Held Vorteile Zeigt Vor- und Nachteile an.\n",
- " !Held v Kurzform von \"!Held Vorteile\".\n",
- " !Held Talente Zeigt die Liste aller aktivierten Talente, deren TaW,\n",
- " sowie die Probe.\n",
- " !Held t Kurzform von \"!Held Talente\".\n",
- " !Held Zauber Zeigt die Liste aller aktivierten Zauber, deren ZaW,\n",
- " sowie die Probe.\n",
- " !Held z Kurzform von \"!Held Zauber\".\n"
- ]
- },
- {
- "Name": "LE",
- "Scope": "All",
- "Brief": "Ändert dein Leben - im wahrsten Sinne des Wortes",
- "Description": [
- "Mit !LE zeigt man die Lebensenergie an, ändert sie, oder setzt sie auf einen neuen Wert\n\n",
- " !LE Zeigt Lebensenergie an\n",
- " !LE 30 Setzt LE auf 30\n",
- " !LE +5 Erhöht LE um 5 (bis zum Maximum)\n",
- " !LE ++5 Erhöht LE um 5 (ignoriert Maximum)\n",
- " !LE -5 Verringert LE um 5\n \n"
- ]
- },
- {
- "Name": "AE",
- "Scope": "All",
- "Brief": "Ändert Astralenergie",
- "Description": [
- "Mit !AE (oder !Asp) zeigt man die Astralenergie an, ändert sie, oder setzt sie auf einen neuen Wert\n\n",
- " !AE Zeigt Astralenergie an\n",
- " !AE 30 Setzt Asp auf 30\n",
- " !AE +5 Erhöht Asp um 5 (bis zum Maximum)\n",
- " !AE ++5 Erhöht Asp um 5 (ignoriert Maximum)\n",
- " !AE -5 Verringert Asp um 5 (Minimum 0)\n"
- ]
- },
- {
- "Name": "Gm",
- "Scope": "Meister",
- "Brief": "Kontrolliere andere Charaktere",
- "Description": [
- "Mit !GM fürhrt man commands als eine andere Person aus.",
- " !GM [charaktername] [command] [commandattribut] [mofifier]",
- " Unterstützte [commands]'s:",
- " !GM [name] LE",
- " !GM [name] AE",
- " !GM [name] Talent",
- " !GM [name] Fernkampf",
- " !GM [name] Eigenschaft",
- " !GM [name] Zauber",
- " !GM [name] Angriff",
- " !GM [name] Parade"
- ]
- },
- {
- "Name": "ich bin",
- "Scope": "All",
- "Brief": "Kontrolliere andere Charaktere",
- "Description": [
- "Mit !GM fürhrt man commands als eine andere Person aus.",
- " !GM [charaktername] [command] [commandattribut] [mofifier]",
- " Unterstützte [commands]'s:",
- " !GM [name] LE",
- " !GM [name] AE",
- " !GM [name] Talent",
- " !GM [name] Fernkampf",
- " !GM [name] Eigenschaft",
- " !GM [name] Zauber",
- " !GM [name] Angriff",
- " !GM [name] Parade"
- ]
- }
- ]
-}
diff --git a/DiscoBot/Program.cs b/DiscoBot/Program.cs
deleted file mode 100644
index 5dc69c1..0000000
--- a/DiscoBot/Program.cs
+++ /dev/null
@@ -1,133 +0,0 @@
-using System;
-using System.Linq;
-using System.Net;
-using System.Reflection;
-using System.Threading.Tasks;
-
-using Discord;
-using Discord.Commands;
-using Discord.WebSocket;
-
-using Microsoft.Extensions.DependencyInjection;
-
-namespace DiscoBot
-{
- using System.IO;
-
- using DiscoBot.Audio;
- using DiscoBot.DSA_Game;
-
- public class Program
- {
- private CommandService commands;
- private DiscordSocketClient client;
- private IServiceProvider services;
-
- public static void Main(string[] args) => new Program().StartAsync().GetAwaiter().GetResult();
-
- public async Task StartAsync()
- {
- Dsa.Startup();
-
- this.client = new DiscordSocketClient();
- this.commands = new CommandService();
-
-
-
- string token = File.ReadAllText("Token");
- //Properties.Settings.Default.Token;
-
- AppDomain.CurrentDomain.ProcessExit += OnProcessExit;
-
- await this.InstallCommandsAsync();
-
- await this.client.LoginAsync(TokenType.Bot, token);
- await this.client.StartAsync();
-
- await Task.Delay(-1);
- }
-
- public Task InstallCommandsAsync()
- {
- // Hook the MessageReceived Event into our Command Handler
- this.client.MessageReceived += this.HandleCommandAsync;
-
- // Discover all of the commands in this assembly and load them.
- return this.commands.AddModulesAsync(Assembly.GetEntryAssembly());
- }
-
- public async Task HandleCommandAsync(SocketMessage messageParam)
- {
- // Don't process the command if it was a System Message
- if (!(messageParam is SocketUserMessage message))
- {
- return;
- }
-
- // Create a number to track where the prefix ends and the command begins
- int argPos = 0;
-
- // Determine if the message is a command, based on if it starts with '!' or a mention prefix
- if (!(message.HasCharPrefix('!', ref argPos) || message.HasMentionPrefix(this.client.CurrentUser, ref argPos)))
- {
- return;
- }
-
-
- // Create a Command Context
- var context = new CommandContext(this.client, message);
-
- // Execute the command. (result does not indicate a return value,
- // rather an object stating if the command executed successfully)
- var result = await this.commands.ExecuteAsync(context, argPos, this.services);
- if (result.Error == CommandError.UnknownCommand)
- {
- await context.Channel.SendMessageAsync(SendCommand(message.Author.Username, message.Content, "https://localhost:44365/api/Commands"));
- }
- else if (!result.IsSuccess)
- {
- await context.Channel.SendMessageAsync(result.ErrorReason);
- }
- }
-
- private string SendCommand(string name, string command, string url)
- {
- var httpWebRequest = (HttpWebRequest)WebRequest.Create(url);
- httpWebRequest.ContentType = "application/json";
- httpWebRequest.Method = "POST";
-
- using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
- {
- command = command.Remove(0,1);
- var args = command.Split(new []{' '}, StringSplitOptions.RemoveEmptyEntries);
-
- string content = string.Empty;
- if (args.Length > 1)
- {
- content = "\"" + args.Skip(1).Aggregate((s, n) => ( s + "\", \"" + n)) + "\"";
- }
-
- string json = "{\"Name\":\"" + name + "\"," +
- "\"CmdIdentifier\":\"" + args.First() + "\"," +
- "\"CmdTexts\": ["+ content+"] }";
-
-
- streamWriter.Write(json);
- streamWriter.Flush();
- streamWriter.Close();
- }
-
- var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
- using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
- {
- return streamReader.ReadToEnd();
- }
- }
-
- private static void OnProcessExit(object sender, EventArgs e)
- {
- Console.WriteLine("I'm out of here");
- Voice.Client.StopAsync();
- }
- }
-}
diff --git a/DiscoBot/Properties.json b/DiscoBot/Properties.json
deleted file mode 100644
index 8808dbf..0000000
--- a/DiscoBot/Properties.json
+++ /dev/null
@@ -1,129 +0,0 @@
-{
- "CommandInfos": [
- {
- "Name": "ich bin",
- "Scope": "All",
- "Brief": "Setzt den gespielten Charakter fest",
- "Description": [
- "Mit \"!Ich bin\" kann der gespielte Charakter definiert, bzw. gewechselt werden.\n",
- " Die Charaktere müssen als *.xml Dateien hinterlegt sein.\n\n",
- " !ich Zeigt an welcher Charakter zur Zeit gespielt wird\n",
- " !ich bin Zalibius Wechsel zum Helden Zalibius\n",
- " !ich Rhoktar Orkische Variante von !ich bin.\n",
- " Wechselt zu Rhoktar.\n\n",
- " !list chars Zeigt die Liste verfügbarer Charaktere.\n",
- " \n"
- ]
- },
- {
- "Name": "List",
- "Scope": "All",
- "Brief": "Anzeige vonSpielrelevanten Listen",
- "Description": [
- "Mit \"!list\" lassen sich spielrelevante Listen ausgeben. Die Angezeigte Liste wird nach einiger Zeit wieder gelöscht.\n",
- "\n",
- " !list chars Liste aller verfügbaren Helden (eingelesen per *.xml)\n",
- " und NSCs.\n",
- " (Mit \"!ich bin\" kann der Held ausgewählt werden.)\n",
- " !list commands Liste aller verwendbaren Bot-Kommandos.\n",
- " !list sounds Liste der Soundeffekte."
- ]
- },
- {
- "Name": "Held",
- "Scope": "All",
- "Brief": "Anzeige von Heldenwerten",
- "Description": [
- "Mit \"!Held\" lassen sich Heldenwerte ausgeben. Mehrere Werte können gleichzeitig angefordert werde. \"!Held LE Waffen\" liefert so z.B. Informationen zur Lebensenergie und den Kampfwerten.\n Bis auf wenige Ausnahmen wird die Angezeigte Liste nach einiger Zeit wieder gelöscht.\n",
- "\n",
- " !Held Zeigt den Heldenbrief an.\n",
- " (Diese Liste wird nicht automatisch gelöscht)\n",
- " !Held Eigenschaften Zeigt die Eigenschaften MU/KL/CH/IN/KK/GE/FF/KO.\n",
- " !Held e Kurzform von \"!Held Eigenschaften\".\n",
- " !Held LE Zeigt LE an.\n",
- " !Held AE Zeigt AE an.\n",
- " !Held stats Zeigt Eigenschaften und zusätzlich SO/LE/AE.\n",
- " !Held Kampfwerte Zeigt AT/PA für aktivierte Waffentalente.\n",
- " !Held Waffe/!list w Kurzformen von \"!Held Kampfwerte\".\n",
- " !Held Vorteile Zeigt Vor- und Nachteile an.\n",
- " !Held v Kurzform von \"!Held Vorteile\".\n",
- " !Held Talente Zeigt die Liste aller aktivierten Talente, deren TaW,\n",
- " sowie die Probe.\n",
- " !Held t Kurzform von \"!Held Talente\".\n",
- " !Held Zauber Zeigt die Liste aller aktivierten Zauber, deren ZaW,\n",
- " sowie die Probe.\n",
- " !Held z Kurzform von \"!Held Zauber\".\n"
- ]
- },
- {
- "Name": "LE",
- "Scope": "All",
- "Brief": "Ändert dein Leben - im wahrsten Sinne des Wortes",
- "Description": [
- "Mit !LE zeigt man die Lebensenergie an, ändert sie, oder setzt sie auf einen neuen Wert\n\n",
- " !LE Zeigt Lebensenergie an\n",
- " !LE 30 Setzt LE auf 30\n",
- " !LE +5 Erhöht LE um 5 (bis zum Maximum)\n",
- " !LE ++5 Erhöht LE um 5 (ignoriert Maximum)\n",
- " !LE -5 Verringert LE um 5\n \n"
- ]
- },
- {
- "Name": "AE",
- "Scope": "All",
- "Brief": "Ändert Astralenergie",
- "Description": [
- "Mit !AE (oder !Asp) zeigt man die Astralenergie an, ändert sie, oder setzt sie auf einen neuen Wert\n\n",
- " !AE Zeigt Astralenergie an\n",
- " !AE 30 Setzt Asp auf 30\n",
- " !AE +5 Erhöht Asp um 5 (bis zum Maximum)\n",
- " !AE ++5 Erhöht Asp um 5 (ignoriert Maximum)\n",
- " !AE -5 Verringert Asp um 5 (Minimum 0)\n"
- ]
- },
- {
- "Name": "Gm",
- "Scope": "Meister",
- "Brief": "Kontrolliere andere Charaktere",
- "Description": [
- "Mit !GM fürhrt man commands als eine andere Person aus.",
- " !GM [charaktername] [command] [commandattribut] [mofifier]",
- " Unterstützte [commands]'s:",
- " !GM [name] LE",
- " !GM [name] AE",
- " !GM [name] Talent",
- " !GM [name] Fernkampf",
- " !GM [name] Eigenschaft",
- " !GM [name] Zauber",
- " !GM [name] Angriff",
- " !GM [name] Parade"
- ]
- },
- {
- "Name": "ich bin",
- "Scope": "All",
- "Brief": "Kontrolliere andere Charaktere",
- "Description": [
- "Mit !GM fürhrt man commands als eine andere Person aus.",
- " !GM [charaktername] [command] [commandattribut] [mofifier]",
- " Unterstützte [commands]'s:",
- " !GM [name] LE",
- " !GM [name] AE",
- " !GM [name] Talent",
- " !GM [name] Fernkampf",
- " !GM [name] Eigenschaft",
- " !GM [name] Zauber",
- " !GM [name] Angriff",
- " !GM [name] Parade"
- ]
- }
- ],
- "Sounds": [
- {
- "Name": "Test",
- "Url": "http",
- "Volume": 100
- }
-
- ]
-} \ No newline at end of file
diff --git a/DiscoBot/Properties/AssemblyInfo.cs b/DiscoBot/Properties/AssemblyInfo.cs
deleted file mode 100644
index 1ff6b8f..0000000
--- a/DiscoBot/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// Allgemeine Informationen über eine Assembly werden über die folgenden
-// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
-// die einer Assembly zugeordnet sind.
-[assembly: AssemblyTitle("DiscoBot")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("DiscoBot")]
-[assembly: AssemblyCopyright("Copyright © 2017")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
-// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
-// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
-[assembly: ComVisible(false)]
-
-// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
-[assembly: Guid("1186af1c-bc46-4b3d-bee0-ce478b8aeac7")]
-
-// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
-//
-// Hauptversion
-// Nebenversion
-// Buildnummer
-// Revision
-//
-// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
-// übernehmen, indem Sie "*" eingeben:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/DiscoBot/Properties/DiscoBot-Audio-Sound.json b/DiscoBot/Properties/DiscoBot-Audio-Sound.json
deleted file mode 100644
index 87a0e6b..0000000
--- a/DiscoBot/Properties/DiscoBot-Audio-Sound.json
+++ /dev/null
@@ -1,7 +0,0 @@
-[
- {
- "Name": "Test",
- "Url": "http",
- "Volume": 100
- }
-] \ No newline at end of file
diff --git a/DiscoBot/Properties/DiscoBot-Auxiliary-CommandInfo.json b/DiscoBot/Properties/DiscoBot-Auxiliary-CommandInfo.json
deleted file mode 100644
index b9941f2..0000000
--- a/DiscoBot/Properties/DiscoBot-Auxiliary-CommandInfo.json
+++ /dev/null
@@ -1,101 +0,0 @@
-[
- {
- "Name": "ich bin",
- "Scope": "All",
- "Brief": "Setzt den gespielten Charakter fest",
- "Description": [
- "Mit \"!Ich bin\" kann der gespielte Charakter definiert, bzw. gewechselt werden.\n",
- " Die Charaktere müssen als *.xml Dateien hinterlegt sein.\n\n",
- " !ich Zeigt an welcher Charakter zur Zeit gespielt wird\n",
- " !ich bin Zalibius Wechsel zum Helden Zalibius\n",
- " !ich Rhoktar Orkische Variante von !ich bin.\n",
- " Wechselt zu Rhoktar.\n\n",
- " !list chars Zeigt die Liste verfügbarer Charaktere.\n",
- " \n"
- ]
- },
- {
- "Name": "List",
- "Scope": "All",
- "Brief": "Anzeige vonSpielrelevanten Listen",
- "Description": [
- "Mit \"!list\" lassen sich spielrelevante Listen ausgeben. Die Angezeigte Liste wird nach einiger Zeit wieder gelöscht.\n",
- "\n",
- " !list chars Liste aller verfügbaren Helden (eingelesen per *.xml)\n",
- " und NSCs.\n",
- " (Mit \"!ich bin\" kann der Held ausgewählt werden.)\n",
- " !list commands Liste aller verwendbaren Bot-Kommandos.\n",
- " !list sounds Liste der Soundeffekte."
- ]
- },
- {
- "Name": "Held",
- "Scope": "All",
- "Brief": "Anzeige von Heldenwerten",
- "Description": [
- "Mit \"!Held\" lassen sich Heldenwerte ausgeben. Mehrere Werte können gleichzeitig angefordert werde. \"!Held LE Waffen\" liefert so z.B. Informationen zur Lebensenergie und den Kampfwerten.\n Bis auf wenige Ausnahmen wird die Angezeigte Liste nach einiger Zeit wieder gelöscht.\n",
- "\n",
- " !Held Zeigt den Heldenbrief an.\n",
- " (Diese Liste wird nicht automatisch gelöscht)\n",
- " !Held Eigenschaften Zeigt die Eigenschaften MU/KL/CH/IN/KK/GE/FF/KO.\n",
- " !Held e Kurzform von \"!Held Eigenschaften\".\n",
- " !Held LE Zeigt LE an.\n",
- " !Held AE Zeigt AE an.\n",
- " !Held stats Zeigt Eigenschaften und zusätzlich SO/LE/AE.\n",
- " !Held Kampfwerte Zeigt AT/PA für aktivierte Waffentalente.\n",
- " !Held Waffe/!list w Kurzformen von \"!Held Kampfwerte\".\n",
- " !Held Vorteile Zeigt Vor- und Nachteile an.\n",
- " !Held v Kurzform von \"!Held Vorteile\".\n",
- " !Held Talente Zeigt die Liste aller aktivierten Talente, deren TaW,\n",
- " sowie die Probe.\n",
- " !Held t Kurzform von \"!Held Talente\".\n",
- " !Held Zauber Zeigt die Liste aller aktivierten Zauber, deren ZaW,\n",
- " sowie die Probe.\n",
- " !Held z Kurzform von \"!Held Zauber\".\n"
- ]
- },
- {
- "Name": "LE",
- "Scope": "All",
- "Brief": "Ändert dein Leben - im wahrsten Sinne des Wortes",
- "Description": [
- "Mit !LE zeigt man die Lebensenergie an, ändert sie, oder setzt sie auf einen neuen Wert\n\n",
- " !LE Zeigt Lebensenergie an\n",
- " !LE 30 Setzt LE auf 30\n",
- " !LE +5 Erhöht LE um 5 (bis zum Maximum)\n",
- " !LE ++5 Erhöht LE um 5 (ignoriert Maximum)\n",
- " !LE -5 Verringert LE um 5\n \n"
- ]
- },
- {
- "Name": "AE",
- "Scope": "All",
- "Brief": "Ändert Astralenergie",
- "Description": [
- "Mit !AE (oder !Asp) zeigt man die Astralenergie an, ändert sie, oder setzt sie auf einen neuen Wert\n\n",
- " !AE Zeigt Astralenergie an\n",
- " !AE 30 Setzt Asp auf 30\n",
- " !AE +5 Erhöht Asp um 5 (bis zum Maximum)\n",
- " !AE ++5 Erhöht Asp um 5 (ignoriert Maximum)\n",
- " !AE -5 Verringert Asp um 5 (Minimum 0)\n"
- ]
- },
- {
- "Name": "Gm",
- "Scope": "Meister",
- "Brief": "Kontrolliere andere Charaktere",
- "Description": [
- "Mit !GM fürhrt man commands als eine andere Person aus.",
- " !GM [charaktername] [command] [commandattribut] [mofifier]",
- " Unterstützte [commands]'s:",
- " !GM [name] LE",
- " !GM [name] AE",
- " !GM [name] Talent",
- " !GM [name] Fernkampf",
- " !GM [name] Eigenschaft",
- " !GM [name] Zauber",
- " !GM [name] Angriff",
- " !GM [name] Parade"
- ]
- }
-] \ No newline at end of file
diff --git a/DiscoBot/Properties/DiscoBot-DSA_Game-Characters-Character.json b/DiscoBot/Properties/DiscoBot-DSA_Game-Characters-Character.json
deleted file mode 100644
index fd387f5..0000000
--- a/DiscoBot/Properties/DiscoBot-DSA_Game-Characters-Character.json
+++ /dev/null
@@ -1,290 +0,0 @@
-[
- {
- "Eigenschaften": {},
- "Talente": [],
- "Zauber": [],
- "Kampftalente": [],
- "Vorteile": [],
- "PropTable": {
- "MU": "Mut",
- "KL": "Klugheit",
- "IN": "Intuition",
- "CH": "Charisma",
- "FF": "Fingerfertigkeit",
- "GE": "Gewandtheit",
- "KO": "Konstitution",
- "KK": "Körperkraft"
- },
- "Lebenspunkte_Basis": 30,
- "Lebenspunkte_Aktuell": 30,
- "Ausdauer_Basis": 0,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Basis": 20,
- "Astralpunkte_Aktuell": 20,
- "Name": "Felis Exodus Schattenwald"
- },
- {
- "Eigenschaften": {},
- "Talente": [],
- "Zauber": [],
- "Kampftalente": [],
- "Vorteile": [],
- "PropTable": {
- "MU": "Mut",
- "KL": "Klugheit",
- "IN": "Intuition",
- "CH": "Charisma",
- "FF": "Fingerfertigkeit",
- "GE": "Gewandtheit",
- "KO": "Konstitution",
- "KK": "Körperkraft"
- },
- "Lebenspunkte_Basis": 29,
- "Lebenspunkte_Aktuell": 29,
- "Ausdauer_Basis": 0,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Basis": 0,
- "Astralpunkte_Aktuell": 0,
- "Name": "Gardist"
- },
- {
- "Eigenschaften": {},
- "Talente": [],
- "Zauber": [],
- "Kampftalente": [],
- "Vorteile": [],
- "PropTable": {
- "MU": "Mut",
- "KL": "Klugheit",
- "IN": "Intuition",
- "CH": "Charisma",
- "FF": "Fingerfertigkeit",
- "GE": "Gewandtheit",
- "KO": "Konstitution",
- "KK": "Körperkraft"
- },
- "Lebenspunkte_Basis": 31,
- "Lebenspunkte_Aktuell": 31,
- "Ausdauer_Basis": 0,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Basis": 0,
- "Astralpunkte_Aktuell": 0,
- "Name": "Hartmut Reiher"
- },
- {
- "Eigenschaften": {},
- "Talente": [],
- "Zauber": [],
- "Kampftalente": [],
- "Vorteile": [],
- "PropTable": {
- "MU": "Mut",
- "KL": "Klugheit",
- "IN": "Intuition",
- "CH": "Charisma",
- "FF": "Fingerfertigkeit",
- "GE": "Gewandtheit",
- "KO": "Konstitution",
- "KK": "Körperkraft"
- },
- "Lebenspunkte_Basis": 21,
- "Lebenspunkte_Aktuell": 21,
- "Ausdauer_Basis": 0,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Basis": 35,
- "Astralpunkte_Aktuell": 35,
- "Name": "Helga vom Drachenei, Tausendsasserin"
- },
- {
- "Eigenschaften": {},
- "Talente": [],
- "Zauber": [],
- "Kampftalente": [],
- "Vorteile": [],
- "PropTable": {
- "MU": "Mut",
- "KL": "Klugheit",
- "IN": "Intuition",
- "CH": "Charisma",
- "FF": "Fingerfertigkeit",
- "GE": "Gewandtheit",
- "KO": "Konstitution",
- "KK": "Körperkraft"
- },
- "Lebenspunkte_Basis": 25,
- "Lebenspunkte_Aktuell": 25,
- "Ausdauer_Basis": 0,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Basis": 0,
- "Astralpunkte_Aktuell": 0,
- "Name": "Krenko"
- },
- {
- "Eigenschaften": {},
- "Talente": [],
- "Zauber": [],
- "Kampftalente": [],
- "Vorteile": [],
- "PropTable": {
- "MU": "Mut",
- "KL": "Klugheit",
- "IN": "Intuition",
- "CH": "Charisma",
- "FF": "Fingerfertigkeit",
- "GE": "Gewandtheit",
- "KO": "Konstitution",
- "KK": "Körperkraft"
- },
- "Lebenspunkte_Basis": 39,
- "Lebenspunkte_Aktuell": 39,
- "Ausdauer_Basis": 0,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Basis": 0,
- "Astralpunkte_Aktuell": 0,
- "Name": "Ledur Torfinson"
- },
- {
- "Eigenschaften": {},
- "Talente": [],
- "Zauber": [],
- "Kampftalente": [],
- "Vorteile": [],
- "PropTable": {
- "MU": "Mut",
- "KL": "Klugheit",
- "IN": "Intuition",
- "CH": "Charisma",
- "FF": "Fingerfertigkeit",
- "GE": "Gewandtheit",
- "KO": "Konstitution",
- "KK": "Körperkraft"
- },
- "Lebenspunkte_Basis": 26,
- "Lebenspunkte_Aktuell": 26,
- "Ausdauer_Basis": 0,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Basis": 13,
- "Astralpunkte_Aktuell": 13,
- "Name": "Morla"
- },
- {
- "Eigenschaften": {},
- "Talente": [],
- "Zauber": [],
- "Kampftalente": [],
- "Vorteile": [],
- "PropTable": {
- "MU": "Mut",
- "KL": "Klugheit",
- "IN": "Intuition",
- "CH": "Charisma",
- "FF": "Fingerfertigkeit",
- "GE": "Gewandtheit",
- "KO": "Konstitution",
- "KK": "Körperkraft"
- },
- "Lebenspunkte_Basis": 28,
- "Lebenspunkte_Aktuell": 28,
- "Ausdauer_Basis": 0,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Basis": 40,
- "Astralpunkte_Aktuell": 40,
- "Name": "Numeri Illuminus"
- },
- {
- "Eigenschaften": {},
- "Talente": [],
- "Zauber": [],
- "Kampftalente": [],
- "Vorteile": [],
- "PropTable": {
- "MU": "Mut",
- "KL": "Klugheit",
- "IN": "Intuition",
- "CH": "Charisma",
- "FF": "Fingerfertigkeit",
- "GE": "Gewandtheit",
- "KO": "Konstitution",
- "KK": "Körperkraft"
- },
- "Lebenspunkte_Basis": 39,
- "Lebenspunkte_Aktuell": 39,
- "Ausdauer_Basis": 0,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Basis": 16,
- "Astralpunkte_Aktuell": 16,
- "Name": "Potus"
- },
- {
- "Eigenschaften": {},
- "Talente": [],
- "Zauber": [],
- "Kampftalente": [],
- "Vorteile": [],
- "PropTable": {
- "MU": "Mut",
- "KL": "Klugheit",
- "IN": "Intuition",
- "CH": "Charisma",
- "FF": "Fingerfertigkeit",
- "GE": "Gewandtheit",
- "KO": "Konstitution",
- "KK": "Körperkraft"
- },
- "Lebenspunkte_Basis": 18,
- "Lebenspunkte_Aktuell": 18,
- "Ausdauer_Basis": 0,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Basis": 13,
- "Astralpunkte_Aktuell": 13,
- "Name": "Pump aus der Gosse"
- },
- {
- "Eigenschaften": {},
- "Talente": [],
- "Zauber": [],
- "Kampftalente": [],
- "Vorteile": [],
- "PropTable": {
- "MU": "Mut",
- "KL": "Klugheit",
- "IN": "Intuition",
- "CH": "Charisma",
- "FF": "Fingerfertigkeit",
- "GE": "Gewandtheit",
- "KO": "Konstitution",
- "KK": "Körperkraft"
- },
- "Lebenspunkte_Basis": 34,
- "Lebenspunkte_Aktuell": 34,
- "Ausdauer_Basis": 0,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Basis": 17,
- "Astralpunkte_Aktuell": 17,
- "Name": "Rhoktar4"
- },
- {
- "Eigenschaften": {},
- "Talente": [],
- "Zauber": [],
- "Kampftalente": [],
- "Vorteile": [],
- "PropTable": {
- "MU": "Mut",
- "KL": "Klugheit",
- "IN": "Intuition",
- "CH": "Charisma",
- "FF": "Fingerfertigkeit",
- "GE": "Gewandtheit",
- "KO": "Konstitution",
- "KK": "Körperkraft"
- },
- "Lebenspunkte_Basis": 28,
- "Lebenspunkte_Aktuell": 28,
- "Ausdauer_Basis": 0,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Basis": 43,
- "Astralpunkte_Aktuell": 43,
- "Name": "Volant"
- }
-] \ No newline at end of file
diff --git a/DiscoBot/Properties/Settings.Designer.cs b/DiscoBot/Properties/Settings.Designer.cs
deleted file mode 100644
index 9813b8a..0000000
--- a/DiscoBot/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// Dieser Code wurde von einem Tool generiert.
-// Laufzeitversion:4.0.30319.42000
-//
-// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
-// der Code erneut generiert wird.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace DiscoBot.Properties {
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.6.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default {
- get {
- return defaultInstance;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("Mjk0NTU0MDU4Nzg4NzAwMTYx.DOzDcQ.J-nCikbZdZtdrug0E8TwwV_2ITw")]
- public string Token {
- get {
- return ((string)(this["Token"]));
- }
- set {
- this["Token"] = value;
- }
- }
- }
-}
diff --git a/DiscoBot/Properties/Settings.settings b/DiscoBot/Properties/Settings.settings
deleted file mode 100644
index f3be2b7..0000000
--- a/DiscoBot/Properties/Settings.settings
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="DiscoBot.Properties" GeneratedClassName="Settings">
- <Profiles />
- <Settings>
- <Setting Name="Token" Type="System.String" Scope="User">
- <Value Profile="(Default)">Mjk0NTU0MDU4Nzg4NzAwMTYx.DOzDcQ.J-nCikbZdZtdrug0E8TwwV_2ITw</Value>
- </Setting>
- </Settings>
-</SettingsFile> \ No newline at end of file
diff --git a/DiscoBot/Rework/Permissions.cs b/DiscoBot/Rework/Permissions.cs
deleted file mode 100644
index 4d73146..0000000
--- a/DiscoBot/Rework/Permissions.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace DiscoBot.Auxiliary
-{
- using Discord.Commands;
- using Discord.WebSocket;
-
- public static class Permissions
- {
- public static bool Check(ICommandContext c, string role)
- {
- return ((SocketGuildUser)c.User).Roles.ToList().Exists(v => v.Name.Equals(role));
- }
-
- public static bool Check(ICommandContext c, string[] roles)
- {
- return roles.Any(role => ((SocketGuildUser)c.User).Roles.ToList().Exists(v => v.Name.Equals(role)));
- }
-
- public static bool Test(ICommandContext c, string role)
- {
- if (!Check(c, role))
- {
- c.Channel.SendMessageAsync("```xl\n Keine ausreichenden Berechtigungen\n```").Wait();
- return false;
- }
-
- return true;
- }
-
- public static void Test(ICommandContext c, string[] roles)
- {
- if (!Check(c, roles))
- {
- c.Channel.SendMessageAsync("```xl\n Keine ausreichenden Berechtigungen\n```").Wait();
- }
- }
- }
-}
diff --git a/DiscoBot/ToRework/CommandExtension.cs b/DiscoBot/ToRework/CommandExtension.cs
deleted file mode 100644
index 098e35f..0000000
--- a/DiscoBot/ToRework/CommandExtension.cs
+++ /dev/null
@@ -1,119 +0,0 @@
-namespace DiscoBot.Auxiliary
-{
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.IO;
- using System.Linq;
- using System.Net;
- using System.Text;
- using System.Threading;
- using System.Threading.Tasks;
-
- using Discord;
- using Discord.Commands;
-
- public static class CommandExtension
- {
- private static WebClient client;
-
- public static async Task ReplyTimedAsync(this ModuleBase m, string message, TimeSpan time)
- {
- var token = message.GetHashCode();
- var send = m.Context.Channel.SendMessageAsync($"#{token}\n```xl\n{message}```", false);
-
- var barInvoker = new BackgroundWorker();
- barInvoker.DoWork += delegate
- {
- Thread.Sleep(time);
- Delete(token, m);
- };
-
- await send;
- barInvoker.RunWorkerAsync();
- }
-
- private static void Delete(int token, ModuleBase m)
- {
- var messagesAsync = m.Context.Channel.GetMessagesAsync();
- Task.WaitAll(messagesAsync.ToArray());
- var list = messagesAsync.ToEnumerable().ToList();
- var messages = new List<IMessage>();
- foreach (var task in list)
- {
- messages.AddRange(task.ToList());
- }
-
- var test = messages.Where(x => x.Content.StartsWith($"#{token}\n") && x.Author.IsBot).Select(c=>c );
- var waiters = new List<Task>();
- foreach (var message in test)
- {
- waiters.Add((message as IUserMessage).DeleteAsync());
- }
- Task.WaitAll(waiters.ToArray());
- }
-
- public static async Task ReplyAsync(this ModuleBase m, IEnumerable<string> message, bool directMessage = false)
- {
- var sb = new StringBuilder();
- foreach (string re in message)
- {
- if (sb.Length + re.Length > 1798)
- {
- if (directMessage)
- {
- await m.Context.User.SendMessageAsync("```xl\n" + sb + "\n```");
- }
- else
- {
- await m.Context.Channel.SendMessageAsync("```xl\n" + sb + "\n```");
- }
-
- sb.Clear();
- }
-
- sb.AppendLine(re);
- }
-
- if (directMessage)
- {
- await m.Context.User.SendMessageAsync("```xl\n" + sb + "\n```");
- }
- else
- {
- await m.Context.Channel.SendMessageAsync("```xl\n" + sb + "\n```");
- }
- }
-
- public static async Task ReplyAsync(this ModuleBase m, IEnumerable<string> message, TimeSpan time)
- {
- var sb = new StringBuilder();
- foreach (string re in message)
- {
- if (sb.Length + re.Length > 1798)
- {
-
- await m.ReplyTimedAsync(sb.ToString(), time);
-
-
- sb.Clear();
- }
-
- sb.AppendLine(re);
- }
-
- await m.ReplyTimedAsync(sb.ToString(), TimeSpan.FromSeconds(90));
- }
-
- public static async Task SendWebFile(this IMessageChannel channel, string url = "https://i.imgur.com/0iHEycJ.png")
- {
- if (client == null)
- {
- client = new WebClient();
- }
-
- Stream stream = client.OpenRead(url);
- await channel.SendFileAsync(stream, url.Split('/').Last());
- }
- }
-}
diff --git a/DiscoBot/ToRework/Permissions.cs b/DiscoBot/ToRework/Permissions.cs
deleted file mode 100644
index 4d73146..0000000
--- a/DiscoBot/ToRework/Permissions.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace DiscoBot.Auxiliary
-{
- using Discord.Commands;
- using Discord.WebSocket;
-
- public static class Permissions
- {
- public static bool Check(ICommandContext c, string role)
- {
- return ((SocketGuildUser)c.User).Roles.ToList().Exists(v => v.Name.Equals(role));
- }
-
- public static bool Check(ICommandContext c, string[] roles)
- {
- return roles.Any(role => ((SocketGuildUser)c.User).Roles.ToList().Exists(v => v.Name.Equals(role)));
- }
-
- public static bool Test(ICommandContext c, string role)
- {
- if (!Check(c, role))
- {
- c.Channel.SendMessageAsync("```xl\n Keine ausreichenden Berechtigungen\n```").Wait();
- return false;
- }
-
- return true;
- }
-
- public static void Test(ICommandContext c, string[] roles)
- {
- if (!Check(c, roles))
- {
- c.Channel.SendMessageAsync("```xl\n Keine ausreichenden Berechtigungen\n```").Wait();
- }
- }
- }
-}
diff --git a/DiscoBot/packages.config b/DiscoBot/packages.config
deleted file mode 100644
index 4aa29aa..0000000
--- a/DiscoBot/packages.config
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="Discord.Net" version="2.0.0-beta" targetFramework="net461" />
- <package id="Discord.Net.Commands" version="2.0.0-beta" targetFramework="net461" />
- <package id="Discord.Net.Core" version="2.0.0-beta" targetFramework="net461" />
- <package id="Discord.Net.Rest" version="2.0.0-beta" targetFramework="net461" />
- <package id="Discord.Net.Rpc" version="1.0.2" targetFramework="net461" />
- <package id="Discord.Net.Webhook" version="2.0.0-beta" targetFramework="net461" />
- <package id="Discord.Net.WebSocket" version="2.0.0-beta" targetFramework="net461" />
- <package id="FSharp.Core" version="4.5.2" targetFramework="net461" />
- <package id="Microsoft.Extensions.DependencyInjection" version="2.2.0-preview2-35157" targetFramework="net461" />
- <package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="2.2.0-preview2-35157" targetFramework="net461" />
- <package id="Microsoft.NETCore.Platforms" version="2.2.0-preview2-26905-02" targetFramework="net461" />
- <package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net461" />
- <package id="NETStandard.Library" version="2.0.3" targetFramework="net461" />
- <package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
- <package id="System.AppContext" version="4.3.0" targetFramework="net461" />
- <package id="System.Collections" version="4.3.0" targetFramework="net461" />
- <package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net461" />
- <package id="System.Collections.Immutable" version="1.5.0" targetFramework="net461" />
- <package id="System.ComponentModel" version="4.3.0" targetFramework="net461" />
- <package id="System.Console" version="4.3.1" targetFramework="net461" />
- <package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net461" />
- <package id="System.Diagnostics.DiagnosticSource" version="4.5.0" targetFramework="net461" />
- <package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net461" />
- <package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net461" />
- <package id="System.Globalization" version="4.3.0" targetFramework="net461" />
- <package id="System.Globalization.Calendars" version="4.3.0" targetFramework="net461" />
- <package id="System.Interactive.Async" version="3.2.0" targetFramework="net461" />
- <package id="System.IO" version="4.3.0" targetFramework="net461" />
- <package id="System.IO.Compression" version="4.3.0" targetFramework="net461" />
- <package id="System.IO.Compression.ZipFile" version="4.3.0" targetFramework="net461" />
- <package id="System.IO.FileSystem" version="4.3.0" targetFramework="net461" />
- <package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net461" />
- <package id="System.Linq" version="4.3.0" targetFramework="net461" />
- <package id="System.Linq.Expressions" version="4.3.0" targetFramework="net461" />
- <package id="System.Net.Http" version="4.3.3" targetFramework="net461" />
- <package id="System.Net.Primitives" version="4.3.0" targetFramework="net461" />
- <package id="System.Net.Sockets" version="4.3.0" targetFramework="net461" />
- <package id="System.ObjectModel" version="4.3.0" targetFramework="net461" />
- <package id="System.Reflection" version="4.3.0" targetFramework="net461" />
- <package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net461" />
- <package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net461" />
- <package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net461" />
- <package id="System.Runtime" version="4.3.0" targetFramework="net461" />
- <package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net461" />
- <package id="System.Runtime.Handles" version="4.3.0" targetFramework="net461" />
- <package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net461" />
- <package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net461" />
- <package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net461" />
- <package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net461" />
- <package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net461" />
- <package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net461" />
- <package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="net461" />
- <package id="System.Text.Encoding" version="4.3.0" targetFramework="net461" />
- <package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net461" />
- <package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net461" />
- <package id="System.Threading" version="4.3.0" targetFramework="net461" />
- <package id="System.Threading.Tasks" version="4.3.0" targetFramework="net461" />
- <package id="System.Threading.Timer" version="4.3.0" targetFramework="net461" />
- <package id="System.Xml.ReaderWriter" version="4.3.1" targetFramework="net461" />
- <package id="System.Xml.XDocument" version="4.3.0" targetFramework="net461" />
-</packages> \ No newline at end of file
diff --git a/DiscoBot/session.json b/DiscoBot/session.json
deleted file mode 100644
index c81cbf9..0000000
--- a/DiscoBot/session.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "GeneralContext": null,
- "Relation": {},
- "Chars": [],
- "SessionName": null
-} \ No newline at end of file
diff --git a/DiscoBot/sessions/TheCrew/TheCrew-0.json b/DiscoBot/sessions/TheCrew/TheCrew-0.json
deleted file mode 100644
index 575cd54..0000000
--- a/DiscoBot/sessions/TheCrew/TheCrew-0.json
+++ /dev/null
@@ -1,83 +0,0 @@
-{
- "GeneralContext": null,
- "Relation": {
- "Nicolas": "Hartmut Reiher",
- "MagicBro5": "Krenko",
- "TrueKuehli": "Ledur Torfinson"
- },
- "Chars": [
- {
- "Name": "Felis Exodus Schattenwald",
- "Lebenspunkte_Aktuell": 30,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 20
- },
- {
- "Name": "Gardist",
- "Lebenspunkte_Aktuell": 29,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Hartmut Reiher",
- "Lebenspunkte_Aktuell": 29,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Helga vom Drachenei, Tausendsasserin",
- "Lebenspunkte_Aktuell": 21,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 35
- },
- {
- "Name": "Krenko",
- "Lebenspunkte_Aktuell": 22,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Ledur Torfinson",
- "Lebenspunkte_Aktuell": 39,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Morla",
- "Lebenspunkte_Aktuell": 26,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 13
- },
- {
- "Name": "Numeri Illuminus",
- "Lebenspunkte_Aktuell": 28,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 40
- },
- {
- "Name": "Potus",
- "Lebenspunkte_Aktuell": 39,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 16
- },
- {
- "Name": "Pump aus der Gosse",
- "Lebenspunkte_Aktuell": 18,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 13
- },
- {
- "Name": "Rhoktar4",
- "Lebenspunkte_Aktuell": 34,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 17
- },
- {
- "Name": "Volant",
- "Lebenspunkte_Aktuell": 28,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 43
- }
- ],
- "SessionName": "TheCrew"
-} \ No newline at end of file
diff --git a/DiscoBot/sessions/copy/copy-0.json b/DiscoBot/sessions/copy/copy-0.json
deleted file mode 100644
index 03c46f3..0000000
--- a/DiscoBot/sessions/copy/copy-0.json
+++ /dev/null
@@ -1,79 +0,0 @@
-{
- "GeneralContext": null,
- "Relation": {},
- "Chars": [
- {
- "Name": "Felis Exodus Schattenwald",
- "Lebenspunkte_Aktuell": 30,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 20
- },
- {
- "Name": "Gardist",
- "Lebenspunkte_Aktuell": 29,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Hartmut Reiher",
- "Lebenspunkte_Aktuell": 31,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Helga vom Drachenei, Tausendsasserin",
- "Lebenspunkte_Aktuell": 21,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 35
- },
- {
- "Name": "Krenko",
- "Lebenspunkte_Aktuell": 25,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Ledur Torfinson",
- "Lebenspunkte_Aktuell": 39,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Morla",
- "Lebenspunkte_Aktuell": 26,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 13
- },
- {
- "Name": "Numeri Illuminus",
- "Lebenspunkte_Aktuell": 28,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 40
- },
- {
- "Name": "Potus",
- "Lebenspunkte_Aktuell": 39,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 16
- },
- {
- "Name": "Pump aus der Gosse",
- "Lebenspunkte_Aktuell": 18,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 13
- },
- {
- "Name": "Rhoktar4",
- "Lebenspunkte_Aktuell": 34,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 17
- },
- {
- "Name": "Volant",
- "Lebenspunkte_Aktuell": 28,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 43
- }
- ],
- "SessionName": null
-} \ No newline at end of file
diff --git a/DiscoBot/sessions/test/test-0.json b/DiscoBot/sessions/test/test-0.json
deleted file mode 100644
index 03c46f3..0000000
--- a/DiscoBot/sessions/test/test-0.json
+++ /dev/null
@@ -1,79 +0,0 @@
-{
- "GeneralContext": null,
- "Relation": {},
- "Chars": [
- {
- "Name": "Felis Exodus Schattenwald",
- "Lebenspunkte_Aktuell": 30,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 20
- },
- {
- "Name": "Gardist",
- "Lebenspunkte_Aktuell": 29,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Hartmut Reiher",
- "Lebenspunkte_Aktuell": 31,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Helga vom Drachenei, Tausendsasserin",
- "Lebenspunkte_Aktuell": 21,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 35
- },
- {
- "Name": "Krenko",
- "Lebenspunkte_Aktuell": 25,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Ledur Torfinson",
- "Lebenspunkte_Aktuell": 39,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Morla",
- "Lebenspunkte_Aktuell": 26,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 13
- },
- {
- "Name": "Numeri Illuminus",
- "Lebenspunkte_Aktuell": 28,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 40
- },
- {
- "Name": "Potus",
- "Lebenspunkte_Aktuell": 39,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 16
- },
- {
- "Name": "Pump aus der Gosse",
- "Lebenspunkte_Aktuell": 18,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 13
- },
- {
- "Name": "Rhoktar4",
- "Lebenspunkte_Aktuell": 34,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 17
- },
- {
- "Name": "Volant",
- "Lebenspunkte_Aktuell": 28,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 43
- }
- ],
- "SessionName": null
-} \ No newline at end of file
diff --git a/DiscoBot/sessions/test/test-1.json b/DiscoBot/sessions/test/test-1.json
deleted file mode 100644
index 03c46f3..0000000
--- a/DiscoBot/sessions/test/test-1.json
+++ /dev/null
@@ -1,79 +0,0 @@
-{
- "GeneralContext": null,
- "Relation": {},
- "Chars": [
- {
- "Name": "Felis Exodus Schattenwald",
- "Lebenspunkte_Aktuell": 30,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 20
- },
- {
- "Name": "Gardist",
- "Lebenspunkte_Aktuell": 29,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Hartmut Reiher",
- "Lebenspunkte_Aktuell": 31,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Helga vom Drachenei, Tausendsasserin",
- "Lebenspunkte_Aktuell": 21,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 35
- },
- {
- "Name": "Krenko",
- "Lebenspunkte_Aktuell": 25,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Ledur Torfinson",
- "Lebenspunkte_Aktuell": 39,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Morla",
- "Lebenspunkte_Aktuell": 26,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 13
- },
- {
- "Name": "Numeri Illuminus",
- "Lebenspunkte_Aktuell": 28,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 40
- },
- {
- "Name": "Potus",
- "Lebenspunkte_Aktuell": 39,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 16
- },
- {
- "Name": "Pump aus der Gosse",
- "Lebenspunkte_Aktuell": 18,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 13
- },
- {
- "Name": "Rhoktar4",
- "Lebenspunkte_Aktuell": 34,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 17
- },
- {
- "Name": "Volant",
- "Lebenspunkte_Aktuell": 28,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 43
- }
- ],
- "SessionName": null
-} \ No newline at end of file
diff --git a/DiscoBot/sessions/test/test-2.json b/DiscoBot/sessions/test/test-2.json
deleted file mode 100644
index 3458c52..0000000
--- a/DiscoBot/sessions/test/test-2.json
+++ /dev/null
@@ -1,81 +0,0 @@
-{
- "GeneralContext": null,
- "Relation": {
- "The Doctor": "Felis Exodus Schattenwald"
- },
- "Chars": [
- {
- "Name": "Felis Exodus Schattenwald",
- "Lebenspunkte_Aktuell": 30,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 20
- },
- {
- "Name": "Gardist",
- "Lebenspunkte_Aktuell": 29,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Hartmut Reiher",
- "Lebenspunkte_Aktuell": 31,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Helga vom Drachenei, Tausendsasserin",
- "Lebenspunkte_Aktuell": 21,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 35
- },
- {
- "Name": "Krenko",
- "Lebenspunkte_Aktuell": 25,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Ledur Torfinson",
- "Lebenspunkte_Aktuell": 39,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Morla",
- "Lebenspunkte_Aktuell": 26,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 13
- },
- {
- "Name": "Numeri Illuminus",
- "Lebenspunkte_Aktuell": 28,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 40
- },
- {
- "Name": "Potus",
- "Lebenspunkte_Aktuell": 39,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 16
- },
- {
- "Name": "Pump aus der Gosse",
- "Lebenspunkte_Aktuell": 18,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 13
- },
- {
- "Name": "Rhoktar4",
- "Lebenspunkte_Aktuell": 34,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 17
- },
- {
- "Name": "Volant",
- "Lebenspunkte_Aktuell": 28,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 43
- }
- ],
- "SessionName": null
-} \ No newline at end of file
diff --git a/DiscoBot/sessions/test/test-3.json b/DiscoBot/sessions/test/test-3.json
deleted file mode 100644
index 3458c52..0000000
--- a/DiscoBot/sessions/test/test-3.json
+++ /dev/null
@@ -1,81 +0,0 @@
-{
- "GeneralContext": null,
- "Relation": {
- "The Doctor": "Felis Exodus Schattenwald"
- },
- "Chars": [
- {
- "Name": "Felis Exodus Schattenwald",
- "Lebenspunkte_Aktuell": 30,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 20
- },
- {
- "Name": "Gardist",
- "Lebenspunkte_Aktuell": 29,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Hartmut Reiher",
- "Lebenspunkte_Aktuell": 31,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Helga vom Drachenei, Tausendsasserin",
- "Lebenspunkte_Aktuell": 21,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 35
- },
- {
- "Name": "Krenko",
- "Lebenspunkte_Aktuell": 25,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Ledur Torfinson",
- "Lebenspunkte_Aktuell": 39,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Morla",
- "Lebenspunkte_Aktuell": 26,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 13
- },
- {
- "Name": "Numeri Illuminus",
- "Lebenspunkte_Aktuell": 28,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 40
- },
- {
- "Name": "Potus",
- "Lebenspunkte_Aktuell": 39,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 16
- },
- {
- "Name": "Pump aus der Gosse",
- "Lebenspunkte_Aktuell": 18,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 13
- },
- {
- "Name": "Rhoktar4",
- "Lebenspunkte_Aktuell": 34,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 17
- },
- {
- "Name": "Volant",
- "Lebenspunkte_Aktuell": 28,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 43
- }
- ],
- "SessionName": null
-} \ No newline at end of file
diff --git a/DiscoBot/sessions/test/test-4.json b/DiscoBot/sessions/test/test-4.json
deleted file mode 100644
index 46853cf..0000000
--- a/DiscoBot/sessions/test/test-4.json
+++ /dev/null
@@ -1,81 +0,0 @@
-{
- "GeneralContext": null,
- "Relation": {
- "The Doctor": "Felis Exodus Schattenwald"
- },
- "Chars": [
- {
- "Name": "Felis Exodus Schattenwald",
- "Lebenspunkte_Aktuell": 20,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 20
- },
- {
- "Name": "Gardist",
- "Lebenspunkte_Aktuell": 29,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Hartmut Reiher",
- "Lebenspunkte_Aktuell": 31,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Helga vom Drachenei, Tausendsasserin",
- "Lebenspunkte_Aktuell": 21,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 35
- },
- {
- "Name": "Krenko",
- "Lebenspunkte_Aktuell": 25,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Ledur Torfinson",
- "Lebenspunkte_Aktuell": 39,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 0
- },
- {
- "Name": "Morla",
- "Lebenspunkte_Aktuell": 26,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 13
- },
- {
- "Name": "Numeri Illuminus",
- "Lebenspunkte_Aktuell": 28,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 40
- },
- {
- "Name": "Potus",
- "Lebenspunkte_Aktuell": 39,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 16
- },
- {
- "Name": "Pump aus der Gosse",
- "Lebenspunkte_Aktuell": 18,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 13
- },
- {
- "Name": "Rhoktar4",
- "Lebenspunkte_Aktuell": 34,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 17
- },
- {
- "Name": "Volant",
- "Lebenspunkte_Aktuell": 28,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Aktuell": 43
- }
- ],
- "SessionName": null
-} \ No newline at end of file