From 2503ca78d3e583cb1291cb9a99a6e79526a348ee Mon Sep 17 00:00:00 2001 From: TrueDoctor Date: Mon, 9 Jul 2018 15:15:35 +0200 Subject: Created DSALib Created ZooBOTanica --- DiscoBot/DSA_Game/Characters/Being.cs | 23 ----------------------- DiscoBot/DSA_Game/Characters/Character.cs | 28 ++++++++++++++-------------- DiscoBot/DSA_Game/Characters/Combatant.cs | 26 -------------------------- DiscoBot/DSA_Game/Characters/Entity.cs | 18 ------------------ DiscoBot/DSA_Game/Characters/ICharacter.cs | 13 ------------- 5 files changed, 14 insertions(+), 94 deletions(-) delete mode 100644 DiscoBot/DSA_Game/Characters/Being.cs delete mode 100644 DiscoBot/DSA_Game/Characters/Combatant.cs delete mode 100644 DiscoBot/DSA_Game/Characters/Entity.cs delete mode 100644 DiscoBot/DSA_Game/Characters/ICharacter.cs (limited to 'DiscoBot/DSA_Game/Characters') diff --git a/DiscoBot/DSA_Game/Characters/Being.cs b/DiscoBot/DSA_Game/Characters/Being.cs deleted file mode 100644 index 154e69e..0000000 --- a/DiscoBot/DSA_Game/Characters/Being.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace DiscoBot.DSA_Game.Characters -{ - public class Being : Entity - { - public int Lebenspunkte_Basis { get; set; } = 30; - - public int Lebenspunkte_Aktuell { get; set; } = 30; - - public int Ausdauer_Basis { get; set; } = 30; - - public int Ausdauer_Aktuell { get; set; } = 30; - - public int Astralpunkte_Basis { get; set; } = 0; - - public int Astralpunkte_Aktuell { get; set; } = 0; - } -} diff --git a/DiscoBot/DSA_Game/Characters/Character.cs b/DiscoBot/DSA_Game/Characters/Character.cs index c2d14eb..d14f28e 100644 --- a/DiscoBot/DSA_Game/Characters/Character.cs +++ b/DiscoBot/DSA_Game/Characters/Character.cs @@ -72,7 +72,7 @@ public List Vorteile { get; set; } = new List(); public Dictionary PropTable { get; set; } = new Dictionary(); // -> Körperkraft - + public string TestTalent(string talent, int erschwernis = 0) // Talentprobe { return this.Talente.ProbenTest(this, talent, erschwernis); @@ -89,8 +89,8 @@ var prop = this.PropTable[eigenschaft.ToUpper()]; int tap = this.Eigenschaften[prop]; output.AppendFormat( - "{0}-Eigenschaftsprobe ew:{1} {2} \n", - prop, + "{0}-Eigenschaftsprobe ew:{1} {2} \n", + prop, tap, erschwernis.Equals(0) ? string.Empty : "Erschwernis: " + erschwernis); int roll = Dice.Roll(); @@ -144,9 +144,9 @@ int tap = attack.Pa; output.AppendFormat( - "{0}-Parade taw:{1} {2}\n", - attack.Name, - tap, + "{0}-Parade taw:{1} {2}\n", + attack.Name, + tap, erschwernis.Equals(0) ? string.Empty : "Erschwernis: " + erschwernis); int temp = Dice.Roll(); @@ -172,8 +172,8 @@ int tap = attack.Value; output.AppendFormat( - "{0} taw:{1} {2} \n", - attack.Name, + "{0} taw:{1} {2} \n", + attack.Name, tap, erschwernis.Equals(0) ? string.Empty : "Erschwernis: " + erschwernis); tap -= erschwernis; @@ -199,7 +199,7 @@ this.Ausdauer_Basis = 0; - this.Lebenspunkte_Basis = LE_Wert + (int)(KO__Wert + (KK_Wert/2.0) + 0.5); + this.Lebenspunkte_Basis = LE_Wert + (int)(KO__Wert + (KK_Wert / 2.0) + 0.5); if (this.Vorteile.Exists(x => x.Name.ToLower().Contains("zauberer"))) { @@ -209,11 +209,11 @@ this.Lebenspunkte_Aktuell = this.Lebenspunkte_Basis; this.Astralpunkte_Aktuell = this.Astralpunkte_Basis; this.Ausdauer_Aktuell = this.Ausdauer_Basis; - + } - - private void Load(string path) + + private void Load(string path) { var reader = new XmlTextReader(path); while (reader.Read()) @@ -245,7 +245,7 @@ { this.Vorteile.Add(new Vorteil( reader.GetAttribute("name"), - // Convert.ToInt32(reader.GetAttribute("value")))); + // Convert.ToInt32(reader.GetAttribute("value")))); reader.GetAttribute("value"))); } catch @@ -297,4 +297,4 @@ } } } -} +} \ No newline at end of file diff --git a/DiscoBot/DSA_Game/Characters/Combatant.cs b/DiscoBot/DSA_Game/Characters/Combatant.cs deleted file mode 100644 index a99bff9..0000000 --- a/DiscoBot/DSA_Game/Characters/Combatant.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace DiscoBot.DSA_Game.Characters -{ - public interface ICombatant - { - string Name { get; set; } - - int Lebenspunkte_Basis { get; set; } - int Lebenspunkte_Aktuell { get; set; } - - int Ausdauer_Basis { get; set; } - int Ausdauer_Aktuell { get; set; } - - int Astralpunkte_Basis { get; set; } - int Astralpunkte_Aktuell { get; set; } - - string Angriff(string talent, int erschwernis = 0); - - string Parade(string talent, int erschwernis = 0); - } -} diff --git a/DiscoBot/DSA_Game/Characters/Entity.cs b/DiscoBot/DSA_Game/Characters/Entity.cs deleted file mode 100644 index f8e7a12..0000000 --- a/DiscoBot/DSA_Game/Characters/Entity.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace DiscoBot.DSA_Game.Characters -{ - public class Entity - { - public string Name { get; set; } - - public override string ToString() - { - return this.Name; - } - } -} diff --git a/DiscoBot/DSA_Game/Characters/ICharacter.cs b/DiscoBot/DSA_Game/Characters/ICharacter.cs deleted file mode 100644 index aabebe6..0000000 --- a/DiscoBot/DSA_Game/Characters/ICharacter.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace DiscoBot.DSA_Game.Characters -{ - public interface ICharacter : ICombatant - { - string TestTalent(string talent, int erschwernis = 0); - - string TestEigenschaft(string eigenschaft, int erschwernis = 0); - - string Fernkampf(string talent, int erschwernis = 0); - - string TestZauber(string waffe, int erschwernis); - } -} -- cgit v1.2.3-54-g00ecf