From dafc59577d16eac7fb198e36c81bd3fe4b008f18 Mon Sep 17 00:00:00 2001 From: Kobert Date: Fri, 1 Jun 2018 13:36:45 +0200 Subject: Split Eig and Stats (commited for sync) --- DiscoBot/Commands/List.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'DiscoBot') diff --git a/DiscoBot/Commands/List.cs b/DiscoBot/Commands/List.cs index ca92088..57a4273 100644 --- a/DiscoBot/Commands/List.cs +++ b/DiscoBot/Commands/List.cs @@ -29,6 +29,10 @@ 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 + ":"); -- cgit v1.2.3-54-g00ecf From b07b3dcea813f28a9f0f345352d7bd4e60289c5e Mon Sep 17 00:00:00 2001 From: Kobert Date: Mon, 4 Jun 2018 23:30:40 +0200 Subject: AE Anzeige --- DiscoBot/Characters/Character.cs | 27 ++++++++++++++++++++++++++- DiscoBot/Characters/ICharacter.cs | 2 +- DiscoBot/Characters/NPC.cs | 2 ++ DiscoBot/Commands/List.cs | 4 ++++ DiscoBot/DSA.cs | 14 +++++++++++--- 5 files changed, 44 insertions(+), 5 deletions(-) (limited to 'DiscoBot') 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 Eigenschaften { get; set; } = new Dictionary(); // char properties public List Talente { get; set; } = new List(); // 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")) { -- cgit v1.2.3-54-g00ecf From cad4ba7a9f33789179cdee6fa3ac26f40f282f67 Mon Sep 17 00:00:00 2001 From: Kobert Date: Tue, 5 Jun 2018 00:06:37 +0200 Subject: Merge fix --- DiscoBot/DSA_Game/Characters/Character.cs | 14 ++++++++++++-- DiscoBot/DSA_Game/Dsa.cs | 4 ++-- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'DiscoBot') diff --git a/DiscoBot/DSA_Game/Characters/Character.cs b/DiscoBot/DSA_Game/Characters/Character.cs index 2f994f0..9808fd9 100644 --- a/DiscoBot/DSA_Game/Characters/Character.cs +++ b/DiscoBot/DSA_Game/Characters/Character.cs @@ -179,13 +179,23 @@ 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.Astralpunkte = 0; this.Lebenspunkte = LE_Wert + (int)(KO__Wert + (KK_Wert/2.0) + 0.5); - // ToDo: Astralpunkte berrechnen - + 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); + } + } private void Load(string path) diff --git a/DiscoBot/DSA_Game/Dsa.cs b/DiscoBot/DSA_Game/Dsa.cs index c645eb7..d580ed5 100644 --- a/DiscoBot/DSA_Game/Dsa.cs +++ b/DiscoBot/DSA_Game/Dsa.cs @@ -33,7 +33,7 @@ Relation.Add("Nicolas", "Hartmut Reiher"); Relation.Add("TrueKuehli", "Ledur Torfinson"); - relation.Add("Papo","Gwendelson"); + //Relation.Add("Papo","Gwendelson"); //Relation.Add("Papo", "Pump aus der Gosse"); //Nachteile für LE, AE, MR @@ -41,7 +41,7 @@ //Vorteile für LE, AE, MR //Relation.Add("Papo", "Beef"); - //Relation.Add("Papo", "Astrallos"); + Relation.Add("Papo", "Astrallos"); Relation.Add("Potus", "Potus"); -- cgit v1.2.3-54-g00ecf From 3860f7313b4f859acb1feb90016cc3656bc24912 Mon Sep 17 00:00:00 2001 From: Kobert-P Date: Tue, 5 Jun 2018 22:32:00 +0200 Subject: Testcommit --- DiscoBot/DSA_Game/Dsa.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'DiscoBot') diff --git a/DiscoBot/DSA_Game/Dsa.cs b/DiscoBot/DSA_Game/Dsa.cs index d580ed5..e514691 100644 --- a/DiscoBot/DSA_Game/Dsa.cs +++ b/DiscoBot/DSA_Game/Dsa.cs @@ -40,8 +40,8 @@ // Relation.Add("Papo", "Angilbert Arres"); //Vorteile für LE, AE, MR - //Relation.Add("Papo", "Beef"); - Relation.Add("Papo", "Astrallos"); + Relation.Add("Papo", "Beef"); + //Relation.Add("Papo", "Astrallos"); Relation.Add("Potus", "Potus"); -- cgit v1.2.3-54-g00ecf From 58d7568f4818feb111d0c8d929f349514043d4a7 Mon Sep 17 00:00:00 2001 From: Kobert-P Date: Wed, 6 Jun 2018 15:44:41 +0200 Subject: Split of Aktuell/Basis for LE/AE. --- DiscoBot/Commands/List.cs | 6 +++--- DiscoBot/DSA_Game/Characters/Character.cs | 25 ++++++++++++++++++++----- DiscoBot/DSA_Game/Characters/ICharacter.cs | 9 ++++++--- DiscoBot/DSA_Game/Characters/NPC.cs | 9 +++++++-- 4 files changed, 36 insertions(+), 13 deletions(-) (limited to 'DiscoBot') diff --git a/DiscoBot/Commands/List.cs b/DiscoBot/Commands/List.cs index 3bd03eb..3e24ee2 100644 --- a/DiscoBot/Commands/List.cs +++ b/DiscoBot/Commands/List.cs @@ -41,10 +41,10 @@ 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); - if (character.Astralpunkte > 0) + res.Add("LE:\t " + character.Lebenspunkte_Aktuell + "/" + character.Lebenspunkte_Basis); + if (character.Astralpunkte_Basis > 0) { - res.Add("AE:\t " + character.Astralpunkte); + res.Add("AE:\t " + character.Astralpunkte_Aktuell + "/" + character.Astralpunkte_Basis); } break; case "t": diff --git a/DiscoBot/DSA_Game/Characters/Character.cs b/DiscoBot/DSA_Game/Characters/Character.cs index 9808fd9..1e44dc8 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 Eigenschaften { get; set; } = new Dictionary(); // char properties @@ -188,14 +195,22 @@ var KK_Wert = this.Eigenschaften["Körperkraft"]; var KO__Wert = this.Eigenschaften["Konstitution"]; - this.Astralpunkte = 0; - 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 = AE_Wert + (int)((MU_Wert + IN_Wert + CH_Wert) / 2.0 + 0.5); + 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; + + } 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) { -- cgit v1.2.3-54-g00ecf