summaryrefslogtreecommitdiff
path: root/DSALib/Characters
diff options
context:
space:
mode:
authornatrixaeria <janng@gmx.de>2019-05-19 17:40:59 +0200
committernatrixaeria <janng@gmx.de>2019-05-19 17:40:59 +0200
commit1509b5ef3d7e9e71d9294e234ec0e39f2d831998 (patch)
tree78300ffff230958101b422a4e6026925b287822f /DSALib/Characters
parentc3bb858bb54dc8c64bbd48054c2c58dc0073f09c (diff)
parentc4d046858e0822b7c2c540ac2368b2c0e88e7a26 (diff)
Merge branch 'scribble' of https://github.com/TrueDoctor/DiscoBot into scribble
Diffstat (limited to 'DSALib/Characters')
-rw-r--r--DSALib/Characters/Being.cs6
-rw-r--r--DSALib/Characters/Critter.cs63
-rw-r--r--DSALib/Characters/Entity.cs4
-rw-r--r--DSALib/Characters/ICharacter.cs2
-rw-r--r--DSALib/Characters/ICombatant.cs12
5 files changed, 40 insertions, 47 deletions
diff --git a/DSALib/Characters/Being.cs b/DSALib/Characters/Being.cs
index 7ac7341..27879a1 100644
--- a/DSALib/Characters/Being.cs
+++ b/DSALib/Characters/Being.cs
@@ -1,6 +1,4 @@
-using DiscoBot.DSA_Game.Characters;
-
-namespace DSALib.Characters
+namespace DSALib.Characters
{
public class Being : Entity
{
@@ -16,4 +14,4 @@ namespace DSALib.Characters
public int Astralpunkte_Aktuell { get; set; } = 0;
}
-}
+} \ No newline at end of file
diff --git a/DSALib/Characters/Critter.cs b/DSALib/Characters/Critter.cs
index 8092101..d9f8b53 100644
--- a/DSALib/Characters/Critter.cs
+++ b/DSALib/Characters/Critter.cs
@@ -1,16 +1,32 @@
using System;
using System.Collections.Generic;
+using System.IO;
+using DiscoBot.DSA_Game.Characters;
+using Newtonsoft.Json;
namespace DSALib.Characters
{
- using System.IO;
+ public class Critter : Being, ICombatant
+ {
+ public CritterAttack lastAttack;
- using DiscoBot.DSA_Game.Characters;
+ public Critter(int gw, int gs, int rs, int mr, int ko, int pa, string ini, List<CritterAttack> critterAttacks)
+ {
+ Gw = gw;
+ Gs = gs;
+ Rs = rs;
+ Mr = mr;
+ Ko = ko;
+ Pa = pa;
+ Ini = ini;
+ CritterAttacks = critterAttacks;
+ lastAttack = CritterAttacks[new Random().Next(critterAttacks.Count)];
+ }
- using Newtonsoft.Json;
+ public Critter()
+ {
+ }
- public class Critter : Being, ICombatant
- {
public int Rs { get; set; }
public int Mr { get; set; }
@@ -29,30 +45,23 @@ namespace DSALib.Characters
public List<CritterAttack> CritterAttacks { get; set; }
- public CritterAttack lastAttack;
-
- public Critter(int gw, int gs, int rs, int mr, int ko, int pa, string ini, List<CritterAttack> critterAttacks)
+ public string Angriff(string talent, int erschwernis = 0)
{
- this.Gw = gw;
- this.Gs = gs;
- this.Rs = rs;
- this.Mr = mr;
- this.Ko = ko;
- this.Pa = pa;
- this.Ini = ini;
- this.CritterAttacks = critterAttacks;
- this.lastAttack = this.CritterAttacks[new Random().Next(critterAttacks.Count)];
+ throw new NotImplementedException();
}
- public Critter()
+ public string Parade(string talent, int erschwernis = 0)
{
+ throw new NotImplementedException();
}
public static Critter Load(string path)
{
try
{
- return JsonConvert.DeserializeObject<Critter>(File.ReadAllText(path)); // Deserialize Data and create Session Object
+ return
+ JsonConvert.DeserializeObject<Critter>(
+ File.ReadAllText(path)); // Deserialize Data and create Session Object
}
catch (Exception e)
{
@@ -61,21 +70,13 @@ namespace DSALib.Characters
}
}
- public string Angriff(string talent, int erschwernis = 0)
- {
- throw new NotImplementedException();
- }
-
- public string Parade(string talent, int erschwernis = 0)
- {
- throw new NotImplementedException();
- }
-
public void Save(string path = @"..\..\Critters\")
{
try
{
- File.WriteAllText(path + this.Name + ".json", JsonConvert.SerializeObject(this, Formatting.Indented)); // Deserialize Data and create CommandInfo Struct
+ File.WriteAllText(path + Name + ".json",
+ JsonConvert.SerializeObject(this,
+ Formatting.Indented)); // Deserialize Data and create CommandInfo Struct
}
catch (Exception e)
{
@@ -83,4 +84,4 @@ namespace DSALib.Characters
}
}
}
-}
+} \ No newline at end of file
diff --git a/DSALib/Characters/Entity.cs b/DSALib/Characters/Entity.cs
index 6b03e50..a8a5e81 100644
--- a/DSALib/Characters/Entity.cs
+++ b/DSALib/Characters/Entity.cs
@@ -6,7 +6,7 @@
public override string ToString()
{
- return this.Name;
+ return Name;
}
}
-}
+} \ No newline at end of file
diff --git a/DSALib/Characters/ICharacter.cs b/DSALib/Characters/ICharacter.cs
index 83b53bf..256fecd 100644
--- a/DSALib/Characters/ICharacter.cs
+++ b/DSALib/Characters/ICharacter.cs
@@ -12,4 +12,4 @@ namespace DSALib.Characters
string TestZauber(string waffe, int erschwernis);
}
-}
+} \ No newline at end of file
diff --git a/DSALib/Characters/ICombatant.cs b/DSALib/Characters/ICombatant.cs
index a99bff9..a4ce601 100644
--- a/DSALib/Characters/ICombatant.cs
+++ b/DSALib/Characters/ICombatant.cs
@@ -1,10 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace DiscoBot.DSA_Game.Characters
+namespace DiscoBot.DSA_Game.Characters
{
public interface ICombatant
{
@@ -18,9 +12,9 @@ namespace DiscoBot.DSA_Game.Characters
int Astralpunkte_Basis { get; set; }
int Astralpunkte_Aktuell { get; set; }
-
+
string Angriff(string talent, int erschwernis = 0);
string Parade(string talent, int erschwernis = 0);
}
-}
+} \ No newline at end of file