summaryrefslogtreecommitdiff
path: root/DiscoBot/DSA_Game
diff options
context:
space:
mode:
authorTrueDoctor <d-kobert@web.de>2018-07-09 15:15:35 +0200
committerTrueDoctor <d-kobert@web.de>2018-07-09 15:15:35 +0200
commit2503ca78d3e583cb1291cb9a99a6e79526a348ee (patch)
tree5be61d23d80c23422f68831b0862918dd4f5616c /DiscoBot/DSA_Game
parent4671e76af27446a74c1015bd76b52e48ea241e74 (diff)
Created DSALib Created ZooBOTanica
Diffstat (limited to 'DiscoBot/DSA_Game')
-rw-r--r--DiscoBot/DSA_Game/Characters/Being.cs23
-rw-r--r--DiscoBot/DSA_Game/Characters/Character.cs28
-rw-r--r--DiscoBot/DSA_Game/Characters/Combatant.cs26
-rw-r--r--DiscoBot/DSA_Game/Characters/Entity.cs18
-rw-r--r--DiscoBot/DSA_Game/Characters/ICharacter.cs13
-rw-r--r--DiscoBot/DSA_Game/KampfTalent.cs18
-rw-r--r--DiscoBot/DSA_Game/Talent.cs58
-rw-r--r--DiscoBot/DSA_Game/Vorteil.cs18
-rw-r--r--DiscoBot/DSA_Game/Zauber.cs22
9 files changed, 14 insertions, 210 deletions
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<Vorteil> Vorteile { get; set; } = new List<Vorteil>();
public Dictionary<string, string> PropTable { get; set; } = new Dictionary<string, string>(); // -> 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; }
- }
-}