diff options
-rw-r--r-- | DiscoBot/Characters/Character.cs | 27 | ||||
-rw-r--r-- | DiscoBot/Characters/ICharacter.cs | 2 | ||||
-rw-r--r-- | DiscoBot/Characters/NPC.cs | 2 | ||||
-rw-r--r-- | DiscoBot/Commands/List.cs | 4 | ||||
-rw-r--r-- | DiscoBot/DSA.cs | 14 |
5 files changed, 44 insertions, 5 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++) diff --git a/DiscoBot/Commands/List.cs b/DiscoBot/Commands/List.cs index cce7d52..8b8b907 100644 --- a/DiscoBot/Commands/List.cs +++ b/DiscoBot/Commands/List.cs @@ -41,6 +41,10 @@ //character.Eigenschaften.Select(s => s.Key + ":\t " + s.Value)); character.Eigenschaften.Take(9).Select(s => s.Key + ":\t " + s.Value)); res.Add("LE:\t " + character.Lebenspunkte); + if (character.Astralpunkte > 0) + { + res.Add("AE:\t " + character.Astralpunkte); + } break; case "t": case "ta": diff --git a/DiscoBot/DSA.cs b/DiscoBot/DSA.cs index 0779988..8556b34 100644 --- a/DiscoBot/DSA.cs +++ b/DiscoBot/DSA.cs @@ -33,10 +33,18 @@ Relation.Add("Nicolas", "Hartmut Reiher"); Relation.Add("TrueKuehli", "Ledur Torfinson"); - // relation.Add("Papo","Gwendelson"); - Relation.Add("Papo", "Pump aus der Gosse"); - Relation.Add("Potus", "Potus"); + relation.Add("Papo","Gwendelson"); + //Relation.Add("Papo", "Pump aus der Gosse"); + + //Nachteile für LE, AE, MR + // Relation.Add("Papo", "Angilbert Arres"); + //Vorteile für LE, AE, MR + //Relation.Add("Papo", "Beef"); + //Relation.Add("Papo", "Astrallos"); + + Relation.Add("Potus", "Potus"); + // relation.Add("Papo", "Pump aus der Gosse"); foreach (var filename in Directory.GetFiles("helden", "*.xml")) { |