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 ------- DiscoBot/DSA_Game/KampfTalent.cs | 18 ---------- DiscoBot/DSA_Game/Talent.cs | 58 ------------------------------ DiscoBot/DSA_Game/Vorteil.cs | 18 ---------- DiscoBot/DSA_Game/Zauber.cs | 22 ------------ 9 files changed, 14 insertions(+), 210 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 delete mode 100644 DiscoBot/DSA_Game/KampfTalent.cs delete mode 100644 DiscoBot/DSA_Game/Talent.cs delete mode 100644 DiscoBot/DSA_Game/Vorteil.cs delete mode 100644 DiscoBot/DSA_Game/Zauber.cs (limited to 'DiscoBot/DSA_Game') 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); - } -} diff --git a/DiscoBot/DSA_Game/KampfTalent.cs b/DiscoBot/DSA_Game/KampfTalent.cs deleted file mode 100644 index 79703d5..0000000 --- a/DiscoBot/DSA_Game/KampfTalent.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace DiscoBot.DSA_Game -{ - public class KampfTalent - { - public KampfTalent(string name, int at, int pa) - { - this.Name = name; - this.At = at; - this.Pa = pa; - } - - public string Name { get; set; } - - public int At { get; set; } - - public int Pa { get; set; } - } -} diff --git a/DiscoBot/DSA_Game/Talent.cs b/DiscoBot/DSA_Game/Talent.cs deleted file mode 100644 index ff91742..0000000 --- a/DiscoBot/DSA_Game/Talent.cs +++ /dev/null @@ -1,58 +0,0 @@ -namespace DiscoBot.DSA_Game -{ - using System; - - using DiscoBot.Auxiliary; - - public class Talent // talent objekt - { - public Talent(string name, string probe, int value) - { - this.Name = name; - this.Probe = probe; - this.Value = value; - } - - public string Name { get; set; } - - public string Probe { get; set; } - - public int Value { get; set; } - - public string[] GetEigenschaften() // turn XX/XX/XX into string[]{XX,XX,XX} - { - var temp = this.Probe.Split('/'); - for (var index = 0; index < temp.Length; index++) - { - temp[index] = temp[index].Replace("/", string.Empty); - } - - return temp; - } - - public int CheckName(string quarry) - { - var sc = (StringComparer)new SpellCorrect(); - return sc.Compare(quarry, this.Name); - } - - public bool IstFernkampftalent() - { - switch (Name) - { - case "Armbrust": - case "Belagerungswaffen": - case "Blasrohr": - case "Bogen": - case "Diskus": - case "Schleuder": - case "Wurfbeile": - case "Wurfmesser": - case "Wurfspeere": - return true; - default: - return false; - } - } - } -} diff --git a/DiscoBot/DSA_Game/Vorteil.cs b/DiscoBot/DSA_Game/Vorteil.cs deleted file mode 100644 index 493c4d1..0000000 --- a/DiscoBot/DSA_Game/Vorteil.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace DiscoBot.DSA_Game -{ - public class Vorteil // talent objekt - { - public Vorteil(string name, string value = "") - { - this.Name = name; - this.Value = value; - // this.Choice = choice; - } - - public string Name { get; set; } - - public string Value { get; set; } - - //public string Choice { get; set; } - } -} diff --git a/DiscoBot/DSA_Game/Zauber.cs b/DiscoBot/DSA_Game/Zauber.cs deleted file mode 100644 index bf49a2e..0000000 --- a/DiscoBot/DSA_Game/Zauber.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace DiscoBot.DSA_Game -{ - public class Zauber : Talent - { - public Zauber(string name, string probe, int value, char complexity = 'A', string representation = "Magier") - : base(name, probe, value) - { - this.Complexity = complexity; - this.Representation = this.Representation; - } - - public char Complexity { get; } - - public string Representation { get; } - } -} -- cgit v1.2.3-54-g00ecf