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 --- DSALib/Characters/Being.cs | 23 ++++++++++++++++ DSALib/Characters/Critter.cs | 36 +++++++++++++++++++++++++ DSALib/Characters/Entity.cs | 18 +++++++++++++ DSALib/Characters/ICharacter.cs | 13 +++++++++ DSALib/Characters/ICombatant.cs | 26 ++++++++++++++++++ DSALib/DSALib.csproj | 55 +++++++++++++++++++++++++++++++++++++++ DSALib/KampfTalent.cs | 18 +++++++++++++ DSALib/Properties/AssemblyInfo.cs | 36 +++++++++++++++++++++++++ DSALib/Talent.cs | 51 ++++++++++++++++++++++++++++++++++++ DSALib/Vorteil.cs | 18 +++++++++++++ DSALib/Zauber.cs | 22 ++++++++++++++++ 11 files changed, 316 insertions(+) create mode 100644 DSALib/Characters/Being.cs create mode 100644 DSALib/Characters/Critter.cs create mode 100644 DSALib/Characters/Entity.cs create mode 100644 DSALib/Characters/ICharacter.cs create mode 100644 DSALib/Characters/ICombatant.cs create mode 100644 DSALib/DSALib.csproj create mode 100644 DSALib/KampfTalent.cs create mode 100644 DSALib/Properties/AssemblyInfo.cs create mode 100644 DSALib/Talent.cs create mode 100644 DSALib/Vorteil.cs create mode 100644 DSALib/Zauber.cs (limited to 'DSALib') diff --git a/DSALib/Characters/Being.cs b/DSALib/Characters/Being.cs new file mode 100644 index 0000000..154e69e --- /dev/null +++ b/DSALib/Characters/Being.cs @@ -0,0 +1,23 @@ +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/DSALib/Characters/Critter.cs b/DSALib/Characters/Critter.cs new file mode 100644 index 0000000..5090b6b --- /dev/null +++ b/DSALib/Characters/Critter.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DSALib.Characters +{ + using DiscoBot.DSA_Game.Characters; + + public class Critter : Being, ICombatant + { + private int rs, mr, ko, pa, gs, gw; + + + public Critter(int gw, int gs, int rs, int mr, int ko, int pa) + { + this.gw = gw; + this.gs = gs; + this.rs = rs; + this.mr = mr; + this.ko = ko; + this.pa = pa; + } + + public string Angriff(string talent, int erschwernis = 0) + { + throw new NotImplementedException(); + } + + public string Parade(string talent, int erschwernis = 0) + { + throw new NotImplementedException(); + } + } +} diff --git a/DSALib/Characters/Entity.cs b/DSALib/Characters/Entity.cs new file mode 100644 index 0000000..f8e7a12 --- /dev/null +++ b/DSALib/Characters/Entity.cs @@ -0,0 +1,18 @@ +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/DSALib/Characters/ICharacter.cs b/DSALib/Characters/ICharacter.cs new file mode 100644 index 0000000..aabebe6 --- /dev/null +++ b/DSALib/Characters/ICharacter.cs @@ -0,0 +1,13 @@ +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/DSALib/Characters/ICombatant.cs b/DSALib/Characters/ICombatant.cs new file mode 100644 index 0000000..a99bff9 --- /dev/null +++ b/DSALib/Characters/ICombatant.cs @@ -0,0 +1,26 @@ +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/DSALib/DSALib.csproj b/DSALib/DSALib.csproj new file mode 100644 index 0000000..db17bf7 --- /dev/null +++ b/DSALib/DSALib.csproj @@ -0,0 +1,55 @@ + + + + + Debug + AnyCPU + {33281E45-1D5C-4645-8D2B-DD05B40FDFD5} + Library + Properties + DSALib + DSALib + v4.6.1 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/DSALib/KampfTalent.cs b/DSALib/KampfTalent.cs new file mode 100644 index 0000000..79703d5 --- /dev/null +++ b/DSALib/KampfTalent.cs @@ -0,0 +1,18 @@ +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/DSALib/Properties/AssemblyInfo.cs b/DSALib/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..e4e18bb --- /dev/null +++ b/DSALib/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Allgemeine Informationen über eine Assembly werden über die folgenden +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die einer Assembly zugeordnet sind. +[assembly: AssemblyTitle("DSALib")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("DSALib")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly +// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von +// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. +[assembly: ComVisible(false)] + +// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird +[assembly: Guid("33281e45-1d5c-4645-8d2b-dd05b40fdfd5")] + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, +// indem Sie "*" wie unten gezeigt eingeben: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/DSALib/Talent.cs b/DSALib/Talent.cs new file mode 100644 index 0000000..7176194 --- /dev/null +++ b/DSALib/Talent.cs @@ -0,0 +1,51 @@ +namespace DiscoBot.DSA_Game +{ + using System; + + + 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 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/DSALib/Vorteil.cs b/DSALib/Vorteil.cs new file mode 100644 index 0000000..493c4d1 --- /dev/null +++ b/DSALib/Vorteil.cs @@ -0,0 +1,18 @@ +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/DSALib/Zauber.cs b/DSALib/Zauber.cs new file mode 100644 index 0000000..bf49a2e --- /dev/null +++ b/DSALib/Zauber.cs @@ -0,0 +1,22 @@ +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.3.1