diff options
Diffstat (limited to 'DiscoBot')
-rw-r--r-- | DiscoBot/Commands/List.cs | 10 | ||||
-rw-r--r-- | DiscoBot/DSA_Game/Characters/Character.cs | 35 | ||||
-rw-r--r-- | DiscoBot/DSA_Game/Characters/ICharacter.cs | 9 | ||||
-rw-r--r-- | DiscoBot/DSA_Game/Characters/NPC.cs | 9 | ||||
-rw-r--r-- | DiscoBot/DSA_Game/Dsa.cs | 14 |
5 files changed, 63 insertions, 14 deletions
diff --git a/DiscoBot/Commands/List.cs b/DiscoBot/Commands/List.cs index 601178c..9c745b2 100644 --- a/DiscoBot/Commands/List.cs +++ b/DiscoBot/Commands/List.cs @@ -33,13 +33,21 @@ case "eig": case "eigenschaft": case "eigenschaften": + res.Add(character.Name + ":"); + res.AddRange( + character.Eigenschaften.Take(8).Select(s => s.Key + ":\t " + s.Value)); + break; case "stat": case "stats": res.Add(character.Name + ":"); res.AddRange( //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); + res.Add("LE:\t " + character.Lebenspunkte_Aktuell + "/" + character.Lebenspunkte_Basis); + if (character.Astralpunkte_Basis > 0) + { + res.Add("AE:\t " + character.Astralpunkte_Aktuell + "/" + character.Astralpunkte_Basis); + } break; case "t": case "ta": diff --git a/DiscoBot/DSA_Game/Characters/Character.cs b/DiscoBot/DSA_Game/Characters/Character.cs index 86e9831..d92fc63 100644 --- a/DiscoBot/DSA_Game/Characters/Character.cs +++ b/DiscoBot/DSA_Game/Characters/Character.cs @@ -63,9 +63,16 @@ public string Name { get; set; } // char name - public int Lebenspunkte { get; set; } + public int Lebenspunkte_Basis { get; set; } + public int Lebenspunkte_Aktuell { get; set; } - public int Astralpunkte { get; set; } + public int Astralpunkte_Basis { get; set; } + public int Astralpunkte_Aktuell { get; set; } + + public int Ausdauer_Basis { get; set; } + public int Ausdauer_Aktuell { get; set; } + + public Dictionary<string, int> Eigenschaften { get; set; } = new Dictionary<string, int>(); // char properties @@ -179,13 +186,31 @@ private void Post_process() { var LE_Wert = this.Eigenschaften["Lebensenergie"]; + 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["Körperkraft"]; var KO__Wert = this.Eigenschaften["Konstitution"]; - this.Lebenspunkte = LE_Wert + (int)(KO__Wert + (KK_Wert/2.0) + 0.5); + this.Astralpunkte_Basis = 0; + + this.Ausdauer_Basis = 0; + + this.Lebenspunkte_Basis = LE_Wert + (int)(KO__Wert + (KK_Wert/2.0) + 0.5); + + if (this.Vorteile.Exists(x => x.Name.ToLower().Contains("zauberer"))) + { + this.Astralpunkte_Basis = AE_Wert + (int)((MU_Wert + IN_Wert + CH_Wert) / 2.0 + 0.5); + } + + this.Lebenspunkte_Aktuell = this.Lebenspunkte_Basis; + this.Astralpunkte_Aktuell = this.Astralpunkte_Basis; + this.Ausdauer_Aktuell = this.Ausdauer_Basis; + - // ToDo: Astralpunkte berrechnen - } private void Load(string path) diff --git a/DiscoBot/DSA_Game/Characters/ICharacter.cs b/DiscoBot/DSA_Game/Characters/ICharacter.cs index 1dae15d..3ec4258 100644 --- a/DiscoBot/DSA_Game/Characters/ICharacter.cs +++ b/DiscoBot/DSA_Game/Characters/ICharacter.cs @@ -4,11 +4,14 @@ { string Name { get; set; } - int Lebenspunkte { get; set; } + int Lebenspunkte_Basis { get; set; } + int Lebenspunkte_Aktuell { get; set; } - //int Ausdauer { get; set; } + int Ausdauer_Basis { get; set; } + int Ausdauer_Aktuell { get; set; } - int Astralpunkte { get; set; } + int Astralpunkte_Basis { get; set; } + int Astralpunkte_Aktuell { get; set; } //int Karmapunkte { get; set; } diff --git a/DiscoBot/DSA_Game/Characters/NPC.cs b/DiscoBot/DSA_Game/Characters/NPC.cs index 45ff6b0..0894df6 100644 --- a/DiscoBot/DSA_Game/Characters/NPC.cs +++ b/DiscoBot/DSA_Game/Characters/NPC.cs @@ -18,9 +18,14 @@ public string Name { get; set; } - public int Lebenspunkte { get; set; } + public int Lebenspunkte_Basis { get; set; } + public int Lebenspunkte_Aktuell { get; set; } - public int Astralpunkte { get; set; } + public int Astralpunkte_Basis { get; set; } + public int Astralpunkte_Aktuell { get; set; } + + public int Ausdauer_Basis { get; set; } + public int Ausdauer_Aktuell { get; set; } public string TestTalent(string talent, int tap = 3) { diff --git a/DiscoBot/DSA_Game/Dsa.cs b/DiscoBot/DSA_Game/Dsa.cs index 1bdabb3..e514691 100644 --- a/DiscoBot/DSA_Game/Dsa.cs +++ b/DiscoBot/DSA_Game/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")) { |