diff options
author | Dennis Kobert <d-kobert@web.de> | 2019-06-11 23:38:13 +0200 |
---|---|---|
committer | Dennis Kobert <d-kobert@web.de> | 2019-06-11 23:38:13 +0200 |
commit | 2fa4a0e50ebfc97059c8b84dbd17e79f9afc8a8d (patch) | |
tree | c3b34ccb2737e347a73768536895cbbaab13cc01 /DSACore/Commands/NpcCommands.cs | |
parent | ec991104f56e90d7bb2878da2fe6ed4e585dfc46 (diff) | |
parent | af74efccf8d21e6151022b71f3cacd3fa83024ee (diff) |
Merge branch 'rework-backend'
Diffstat (limited to 'DSACore/Commands/NpcCommands.cs')
-rw-r--r-- | DSACore/Commands/NpcCommands.cs | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/DSACore/Commands/NpcCommands.cs b/DSACore/Commands/NpcCommands.cs deleted file mode 100644 index 50ea966..0000000 --- a/DSACore/Commands/NpcCommands.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using DSACore.Characters; -using DSACore.DSA_Game; -using DSACore.DSA_Game.Characters; -using DSACore.Auxiliary; -using Microsoft.AspNetCore.Mvc.Internal; - -namespace DSACore.Commands -{ - public class NpcCommands - { - - public static string CreateNpc(ulong id, IEnumerable<string> props, int modifier) - { - if (int.TryParse(props.Last(), out int 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 |