From de22a0719079c5ba23e6ae9a39c921940c4bebed Mon Sep 17 00:00:00 2001 From: TrueDoctor Date: Mon, 18 Jun 2018 11:46:48 +0200 Subject: simplifyed Savechar class --- DiscoBot/DSA_Game/Characters/SaveChar.cs | 41 +------------------------------- DiscoBot/DSA_Game/Dsa.cs | 2 +- DiscoBot/DSA_Game/Save/Session.cs | 2 +- 3 files changed, 3 insertions(+), 42 deletions(-) diff --git a/DiscoBot/DSA_Game/Characters/SaveChar.cs b/DiscoBot/DSA_Game/Characters/SaveChar.cs index 94538bb..89ca98a 100644 --- a/DiscoBot/DSA_Game/Characters/SaveChar.cs +++ b/DiscoBot/DSA_Game/Characters/SaveChar.cs @@ -6,20 +6,14 @@ using System.Threading.Tasks; namespace DiscoBot.DSA_Game.Characters { - public class SaveChar : ICharacter + public class SaveChar { public string Name { get; set; } - public int Lebenspunkte_Basis { get; set; } - public int Lebenspunkte_Aktuell { get; set; } - public int Ausdauer_Basis { get; set; } - public int Ausdauer_Aktuell { get; set; } - public int Astralpunkte_Basis { get; set; } - public int Astralpunkte_Aktuell { get; set; } public static SaveChar FromICharacter(ICharacter c) @@ -27,43 +21,10 @@ namespace DiscoBot.DSA_Game.Characters return new SaveChar { Astralpunkte_Aktuell = c.Astralpunkte_Aktuell, - Astralpunkte_Basis = c.Astralpunkte_Basis, Ausdauer_Aktuell = c.Ausdauer_Aktuell, - Ausdauer_Basis = c.Ausdauer_Basis, Lebenspunkte_Aktuell = c.Lebenspunkte_Aktuell, - Lebenspunkte_Basis = c.Lebenspunkte_Basis, Name = c.Name }; } - - public string TestTalent(string talent, int erschwernis = 0) - { - throw new NotImplementedException(); - } - - public string TestEigenschaft(string eigenschaft, int erschwernis = 0) - { - throw new NotImplementedException(); - } - - public string Angriff(string talent, int erschwernis = 0) - { - throw new NotImplementedException(); - } - - public string Parade(string talent, int erschwernis = 0) - { - throw new NotImplementedException(); - } - - public string Fernkampf(string talent, int erschwernis = 0) - { - throw new NotImplementedException(); - } - - public string TestZauber(string waffe, int erschwernis) - { - throw new NotImplementedException(); - } } } diff --git a/DiscoBot/DSA_Game/Dsa.cs b/DiscoBot/DSA_Game/Dsa.cs index d640df9..5b4833b 100644 --- a/DiscoBot/DSA_Game/Dsa.cs +++ b/DiscoBot/DSA_Game/Dsa.cs @@ -42,7 +42,7 @@ Session = new Session { - Chars = Chars.Select(x => SaveChar.FromICharacter(x) as ICharacter).ToList(), + Chars = Chars.Select(x => SaveChar.FromICharacter(x)).ToList(), GeneralContext = GeneralContext }; Session.Save(); diff --git a/DiscoBot/DSA_Game/Save/Session.cs b/DiscoBot/DSA_Game/Save/Session.cs index 15ccc18..ed9c18d 100644 --- a/DiscoBot/DSA_Game/Save/Session.cs +++ b/DiscoBot/DSA_Game/Save/Session.cs @@ -20,7 +20,7 @@ namespace DiscoBot.DSA_Game.Save public Dictionary Relation { get; set; } = new Dictionary(); // dictionary to match the char - public List Chars { get; set; } = new List(); // list of all characters + public List Chars { get; set; } = new List(); // list of all characters public string SessionName { get; set; } -- cgit v1.2.3-70-g09d2