summaryrefslogtreecommitdiff
path: root/DSALib
diff options
context:
space:
mode:
Diffstat (limited to 'DSALib')
-rw-r--r--DSALib/Characters/Being.cs23
-rw-r--r--DSALib/Characters/Critter.cs36
-rw-r--r--DSALib/Characters/Entity.cs18
-rw-r--r--DSALib/Characters/ICharacter.cs13
-rw-r--r--DSALib/Characters/ICombatant.cs26
-rw-r--r--DSALib/DSALib.csproj55
-rw-r--r--DSALib/KampfTalent.cs18
-rw-r--r--DSALib/Properties/AssemblyInfo.cs36
-rw-r--r--DSALib/Talent.cs51
-rw-r--r--DSALib/Vorteil.cs18
-rw-r--r--DSALib/Zauber.cs22
11 files changed, 316 insertions, 0 deletions
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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{33281E45-1D5C-4645-8D2B-DD05B40FDFD5}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>DSALib</RootNamespace>
+ <AssemblyName>DSALib</AssemblyName>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Net.Http" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Characters\Being.cs" />
+ <Compile Include="Characters\Critter.cs" />
+ <Compile Include="Characters\ICombatant.cs" />
+ <Compile Include="Characters\Entity.cs" />
+ <Compile Include="Characters\ICharacter.cs" />
+ <Compile Include="KampfTalent.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Talent.cs" />
+ <Compile Include="Vorteil.cs" />
+ <Compile Include="Zauber.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project> \ 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; }
+ }
+}