From e6181c24124d97f2fbc932b8a68311e625463156 Mon Sep 17 00:00:00 2001 From: uzvkl Date: Tue, 11 Jun 2019 23:05:52 +0200 Subject: Move dsa related stuff to subfolder --- DSALib/Characters/Critter.cs | 88 -------------------------------------------- 1 file changed, 88 deletions(-) delete mode 100644 DSALib/Characters/Critter.cs (limited to 'DSALib/Characters/Critter.cs') diff --git a/DSALib/Characters/Critter.cs b/DSALib/Characters/Critter.cs deleted file mode 100644 index dcedccb..0000000 --- a/DSALib/Characters/Critter.cs +++ /dev/null @@ -1,88 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using DiscoBot.DSA_Game.Characters; -using DSALib.Models.Dsa; -using Newtonsoft.Json; - -namespace DSALib.Characters -{ - public class Critter : Being, ICombatant - { - public CritterAttack lastAttack; - - public Critter(int gw, int gs, int rs, int mr, int ko, int pa, string ini, List critterAttacks) - { - Gw = gw; - Gs = gs; - Rs = rs; - Mr = mr; - Ko = ko; - Pa = pa; - Ini = ini; - CritterAttacks = critterAttacks; - lastAttack = CritterAttacks[new Random().Next(critterAttacks.Count)]; - } - - public Critter() - { - } - - public int Rs { get; set; } - - public int Mr { get; set; } - - public int Ko { get; set; } - - public int Pa { get; set; } - - public int Gs { get; set; } - - public int Gw { get; set; } - - public string Ini { get; set; } - - public string Comment { get; set; } - - public List CritterAttacks { get; set; } - - public string Angriff(string talent, int erschwernis = 0) - { - throw new NotImplementedException(); - } - - public string Parade(string talent, int erschwernis = 0) - { - throw new NotImplementedException(); - } - - public static Critter Load(string path) - { - try - { - return - JsonConvert.DeserializeObject( - File.ReadAllText(path)); // Deserialize Data and create Session Object - } - catch (Exception e) - { - Console.WriteLine($"Laden von Save-File {path} fehlgeschlagen." + e); - return null; - } - } - - public void Save(string path = @"..\..\Critters\") - { - try - { - File.WriteAllText(path + Name + ".json", - JsonConvert.SerializeObject(this, - Formatting.Indented)); // Deserialize Data and create CommandInfo Struct - } - catch (Exception e) - { - Console.WriteLine($"Speichern von Save-File {path} fehlgeschlagen." + e); - } - } - } -} \ No newline at end of file -- cgit v1.2.3-70-g09d2