From f89f308c525e9deebc6d2cf6416e27dfe1a299dc Mon Sep 17 00:00:00 2001 From: Dennis Kobert Date: Sun, 19 May 2019 16:03:38 +0200 Subject: Cleanup DiscoBot Project --- DSALib/Characters/Being.cs | 2 +- DSALib/Characters/Critter.cs | 30 ++++++++++++++++-------------- DSALib/Characters/Entity.cs | 4 ++-- DSALib/Characters/ICharacter.cs | 2 +- DSALib/Characters/ICombatant.cs | 4 ++-- 5 files changed, 22 insertions(+), 20 deletions(-) (limited to 'DSALib/Characters') diff --git a/DSALib/Characters/Being.cs b/DSALib/Characters/Being.cs index 7ac7341..cf338f9 100644 --- a/DSALib/Characters/Being.cs +++ b/DSALib/Characters/Being.cs @@ -16,4 +16,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..c511090 100644 --- a/DSALib/Characters/Critter.cs +++ b/DSALib/Characters/Critter.cs @@ -4,9 +4,7 @@ using System.Collections.Generic; namespace DSALib.Characters { using System.IO; - using DiscoBot.DSA_Game.Characters; - using Newtonsoft.Json; public class Critter : Being, ICombatant @@ -33,15 +31,15 @@ namespace DSALib.Characters public Critter(int gw, int gs, int rs, int mr, int ko, int pa, string ini, List critterAttacks) { - 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)]; + Gw = gw; + Gs = gs; + Rs = rs; + Mr = mr; + Ko = ko; + Pa = pa; + Ini = ini; + CritterAttacks = critterAttacks; + lastAttack = CritterAttacks[new Random().Next(critterAttacks.Count)]; } public Critter() @@ -52,7 +50,9 @@ namespace DSALib.Characters { try { - return JsonConvert.DeserializeObject(File.ReadAllText(path)); // Deserialize Data and create Session Object + return + JsonConvert.DeserializeObject( + File.ReadAllText(path)); // Deserialize Data and create Session Object } catch (Exception e) { @@ -75,7 +75,9 @@ namespace DSALib.Characters { 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 +85,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..887893c 100644 --- a/DSALib/Characters/ICombatant.cs +++ b/DSALib/Characters/ICombatant.cs @@ -18,9 +18,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 -- cgit v1.2.3-54-g00ecf