From 2ab4051c6fe720dc47e99b0c305a0d779ee02d51 Mon Sep 17 00:00:00 2001 From: Dennis Kobert Date: Sun, 19 May 2019 17:58:42 +0200 Subject: Moved Gamelogic to DSALib --- DSACore/Commands/NpcCommands.cs | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 DSACore/Commands/NpcCommands.cs (limited to 'DSACore/Commands/NpcCommands.cs') diff --git a/DSACore/Commands/NpcCommands.cs b/DSACore/Commands/NpcCommands.cs deleted file mode 100644 index 95243ca..0000000 --- a/DSACore/Commands/NpcCommands.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using DSACore.Characters; -using DSACore.DSA_Game; -using DSACore.DSA_Game.Characters; - -namespace DSACore.Commands -{ - public class NpcCommands - { - public static string CreateNpc(ulong id, IEnumerable props, int modifier) - { - if (int.TryParse(props.Last(), out var mean)) return Random(id, props.First(), mean, modifier); - - return Copy(id, props.First(), props.Last(), modifier); - } - - private static string Random(ulong id, string npcName, int mean = 9, int stDv = 1) - { - throw new NotImplementedException(); - Dsa.Chars.Add(new Npc(npcName, mean, stDv)); - return $"{npcName} wurde zufällig generiert"; - } - - private static string Copy(ulong id, string npcName, string source, int stDv = 1) - { - if (Dsa.Chars.Exists(x => x.Name.Equals(npcName))) throw new Exception("Char gibt es schon"); - throw new NotImplementedException(); - var chr = Dsa.GetCharacter(id); - Dsa.Chars.Add(new Character(chr as Character, npcName, stDv)); - return $"{npcName} wurde als variierte Kopie von {source} erstellt"; - } - } -} \ No newline at end of file -- cgit v1.2.3-70-g09d2