summaryrefslogtreecommitdiff
path: root/DSALib/Characters/Critter.cs
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 /DSALib/Characters/Critter.cs
parentec991104f56e90d7bb2878da2fe6ed4e585dfc46 (diff)
parentaf74efccf8d21e6151022b71f3cacd3fa83024ee (diff)
Merge branch 'rework-backend'
Diffstat (limited to 'DSALib/Characters/Critter.cs')
-rw-r--r--DSALib/Characters/Critter.cs86
1 files changed, 0 insertions, 86 deletions
diff --git a/DSALib/Characters/Critter.cs b/DSALib/Characters/Critter.cs
deleted file mode 100644
index 8092101..0000000
--- a/DSALib/Characters/Critter.cs
+++ /dev/null
@@ -1,86 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace DSALib.Characters
-{
- using System.IO;
-
- using DiscoBot.DSA_Game.Characters;
-
- using Newtonsoft.Json;
-
- public class Critter : Being, ICombatant
- {
- 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<CritterAttack> CritterAttacks { get; set; }
-
- public CritterAttack lastAttack;
-
- public Critter(int gw, int gs, int rs, int mr, int ko, int pa, string ini, List<CritterAttack> critterAttacks)
- {
- this.Gw = gw;
- this.Gs = gs;
- this.Rs = rs;
- this.Mr = mr;
- this.Ko = ko;
- this.Pa = pa;
- this.Ini = ini;
- this.CritterAttacks = critterAttacks;
- this.lastAttack = this.CritterAttacks[new Random().Next(critterAttacks.Count)];
- }
-
- public Critter()
- {
- }
-
- public static Critter Load(string path)
- {
- try
- {
- return JsonConvert.DeserializeObject<Critter>(File.ReadAllText(path)); // Deserialize Data and create Session Object
- }
- catch (Exception e)
- {
- Console.WriteLine($"Laden von Save-File {path} fehlgeschlagen." + e);
- return null;
- }
- }
-
- public string Angriff(string talent, int erschwernis = 0)
- {
- throw new NotImplementedException();
- }
-
- public string Parade(string talent, int erschwernis = 0)
- {
- throw new NotImplementedException();
- }
-
- public void Save(string path = @"..\..\Critters\")
- {
- try
- {
- File.WriteAllText(path + this.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);
- }
- }
- }
-}