summaryrefslogtreecommitdiff
path: root/DiscoBot/Characters
diff options
context:
space:
mode:
Diffstat (limited to 'DiscoBot/Characters')
-rw-r--r--DiscoBot/Characters/Character.cs27
-rw-r--r--DiscoBot/Characters/ICharacter.cs2
-rw-r--r--DiscoBot/Characters/NPC.cs2
3 files changed, 29 insertions, 2 deletions
diff --git a/DiscoBot/Characters/Character.cs b/DiscoBot/Characters/Character.cs
index 86e8b3a..c3674c4 100644
--- a/DiscoBot/Characters/Character.cs
+++ b/DiscoBot/Characters/Character.cs
@@ -60,6 +60,8 @@
public int Lebenspunkte { get; set; }
+ public int Astralpunkte { get; set; }
+
public Dictionary<string, int> Eigenschaften { get; set; } = new Dictionary<string, int>(); // char properties
public List<Talent> Talente { get; set; } = new List<Talent>(); // list of talent objects (talents and spells)
@@ -240,11 +242,34 @@
private void Post_process()
{
var LE_Wert = this.Eigenschaften.First(s => s.Key.Contains("Leben")).Value;
+ var AE_Wert = this.Eigenschaften.First(s => s.Key.Contains("Astralenergie")).Value;
+
+ //var KL_Wert = this.Eigenschaften.First(s => s.Key.Contains("Klugheit")).Value;
+ var MU_Wert = this.Eigenschaften.First(s => s.Key.Contains("Mut")).Value;
+ var IN_Wert = this.Eigenschaften.First(s => s.Key.Contains("Intuition")).Value;
+ var CH_Wert = this.Eigenschaften.First(s => s.Key.Contains("Charisma")).Value;
var KK_Wert = this.Eigenschaften.First(s => s.Key.Contains("Körper")).Value;
var KO__Wert = this.Eigenschaften.First(s => s.Key.Contains("Konst")).Value;
+ this.Astralpunkte = 0;
this.Lebenspunkte = LE_Wert + (int)(KO__Wert + (KK_Wert/2.0) + 0.5);
-
+
+ if(this.Vorteile.Exists(x => x.Name.ToLower().Contains("zauberer")))
+ {
+ this.Astralpunkte = AE_Wert + (int)((MU_Wert + IN_Wert + CH_Wert)/2.0 + 0.5);
+ }
+
+ // if (this.Vorteile.Exists(x => x.Name.Contains("Hohe Lebenskraft")))
+ // {
+ // var temp = this.Vorteile.Find(x => x.Name.Contains("Hohe Lebenskraft"));
+ // this.Lebenspunkte += Convert.ToInt32(temp.Value) ;
+ // }
+ // if (this.Vorteile.Exists(x => x.Name.Contains("Niedrige Lebenskraft")))
+ // {
+ // var temp = this.Vorteile.Find(x => x.Name.Contains("Niedrige Lebenskraft"));
+ // this.Lebenspunkte -= Convert.ToInt32(temp.Value);
+ //
+ // }
}
private void Load(string path)
diff --git a/DiscoBot/Characters/ICharacter.cs b/DiscoBot/Characters/ICharacter.cs
index e8bc653..cb1f5bc 100644
--- a/DiscoBot/Characters/ICharacter.cs
+++ b/DiscoBot/Characters/ICharacter.cs
@@ -8,7 +8,7 @@
//int Ausdauer { get; set; }
- //int Astralpunkte { get; set; }
+ int Astralpunkte { get; set; }
//int Karmapunkte { get; set; }
diff --git a/DiscoBot/Characters/NPC.cs b/DiscoBot/Characters/NPC.cs
index 341f775..80c24e6 100644
--- a/DiscoBot/Characters/NPC.cs
+++ b/DiscoBot/Characters/NPC.cs
@@ -19,6 +19,8 @@
public int Lebenspunkte { get; set; }
+ public int Astralpunkte { get; set; }
+
public string TestTalent(string talent, int tap = 3)
{
for (int i = 0; i <= 2; i++)