diff options
author | Kobert <Kassian.Kobert@gmail.com> | 2018-06-04 23:30:40 +0200 |
---|---|---|
committer | Kobert <Kassian.Kobert@gmail.com> | 2018-06-04 23:30:40 +0200 |
commit | b07b3dcea813f28a9f0f345352d7bd4e60289c5e (patch) | |
tree | d52a8ff3ddd2ba8bb2968f96c2ba9b4e492ddd17 /DiscoBot/Characters | |
parent | c5d52357f365e2b095f5c430dceadd1f42045880 (diff) |
AE Anzeige
Diffstat (limited to 'DiscoBot/Characters')
-rw-r--r-- | DiscoBot/Characters/Character.cs | 27 | ||||
-rw-r--r-- | DiscoBot/Characters/ICharacter.cs | 2 | ||||
-rw-r--r-- | DiscoBot/Characters/NPC.cs | 2 |
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++) |