diff options
author | uzvkl <dennis.kobert@student.kit.edu> | 2019-06-11 23:05:52 +0200 |
---|---|---|
committer | uzvkl <dennis.kobert@student.kit.edu> | 2019-06-11 23:05:52 +0200 |
commit | e6181c24124d97f2fbc932b8a68311e625463156 (patch) | |
tree | c1f097c344ca266b7941c9668590b0fd35c7870a /dsa/DSALib/Commands/NpcCommands.cs | |
parent | 2490ad5d31fe2ac778ff9303776f0e91f47a2862 (diff) |
Move dsa related stuff to subfolder
Diffstat (limited to 'dsa/DSALib/Commands/NpcCommands.cs')
-rw-r--r-- | dsa/DSALib/Commands/NpcCommands.cs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/dsa/DSALib/Commands/NpcCommands.cs b/dsa/DSALib/Commands/NpcCommands.cs new file mode 100644 index 0000000..510b78b --- /dev/null +++ b/dsa/DSALib/Commands/NpcCommands.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using DSALib.Characters; +using DSALib.DSA_Game; +using DSALib.DSA_Game.Characters; + +namespace DSALib.Commands +{ + public class NpcCommands + { + public static string CreateNpc(ulong id, IEnumerable<string> 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 |