summaryrefslogtreecommitdiff
path: root/DiscoBot/DSA_Game
diff options
context:
space:
mode:
authorTrueDoctor <d-kobert@web.de>2018-06-18 11:46:48 +0200
committerTrueDoctor <d-kobert@web.de>2018-06-18 11:46:48 +0200
commitde22a0719079c5ba23e6ae9a39c921940c4bebed (patch)
treee3a757b0b72d91c1770e7a54800daf12a066c79a /DiscoBot/DSA_Game
parent68e49d3b0936101deba1251e95b9788716c0722a (diff)
simplifyed Savechar class
Diffstat (limited to 'DiscoBot/DSA_Game')
-rw-r--r--DiscoBot/DSA_Game/Characters/SaveChar.cs41
-rw-r--r--DiscoBot/DSA_Game/Dsa.cs2
-rw-r--r--DiscoBot/DSA_Game/Save/Session.cs2
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<string, string> Relation { get; set; } = new Dictionary<string, string>(); // dictionary to match the char
- public List<ICharacter> Chars { get; set; } = new List<ICharacter>(); // list of all characters
+ public List<SaveChar> Chars { get; set; } = new List<SaveChar>(); // list of all characters
public string SessionName { get; set; }