diff options
Diffstat (limited to 'DSALib')
-rw-r--r-- | DSALib/Characters/Being.cs | 6 | ||||
-rw-r--r-- | DSALib/Characters/Critter.cs | 63 | ||||
-rw-r--r-- | DSALib/Characters/Entity.cs | 4 | ||||
-rw-r--r-- | DSALib/Characters/ICharacter.cs | 2 | ||||
-rw-r--r-- | DSALib/Characters/ICombatant.cs | 12 | ||||
-rw-r--r-- | DSALib/CritterAttack.cs | 18 | ||||
-rw-r--r-- | DSALib/KampfTalent.cs | 8 | ||||
-rw-r--r-- | DSALib/Talent.cs | 19 | ||||
-rw-r--r-- | DSALib/Vorteil.cs | 8 | ||||
-rw-r--r-- | DSALib/Zauber.cs | 6 |
10 files changed, 65 insertions, 81 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 diff --git a/DSALib/CritterAttack.cs b/DSALib/CritterAttack.cs index 0ad4a66..3b0a11d 100644 --- a/DSALib/CritterAttack.cs +++ b/DSALib/CritterAttack.cs @@ -1,19 +1,13 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace DSALib +namespace DSALib { public class CritterAttack { public CritterAttack(string name, int at, string tp, string comment = "") { - this.Name = name; - this.At = at; - this.Tp = tp; - this.Comment = comment; + Name = name; + At = at; + Tp = tp; + Comment = comment; } public string Name { get; set; } @@ -24,4 +18,4 @@ namespace DSALib public string Comment { get; set; } } -} +}
\ No newline at end of file diff --git a/DSALib/KampfTalent.cs b/DSALib/KampfTalent.cs index 7e4e9be..7c7eed4 100644 --- a/DSALib/KampfTalent.cs +++ b/DSALib/KampfTalent.cs @@ -4,9 +4,9 @@ { public KampfTalent(string name, int at, int pa) { - this.Name = name; - this.At = at; - this.Pa = pa; + Name = name; + At = at; + Pa = pa; } public string Name { get; set; } @@ -15,4 +15,4 @@ public int Pa { get; set; } } -} +}
\ No newline at end of file diff --git a/DSALib/Talent.cs b/DSALib/Talent.cs index bf1e52d..a39709c 100644 --- a/DSALib/Talent.cs +++ b/DSALib/Talent.cs @@ -4,9 +4,9 @@ { public Talent(string name, string probe, int value) { - this.Name = name; - this.Probe = probe; - this.Value = value; + Name = name; + Probe = probe; + Value = value; } public string Name { get; set; } @@ -14,18 +14,15 @@ 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); - } + var temp = Probe.Split('/'); + for (var index = 0; index < temp.Length; index++) temp[index] = temp[index].Replace("/", string.Empty); return temp; } - + public bool IstFernkampftalent() { switch (Name) @@ -45,4 +42,4 @@ } } } -} +}
\ No newline at end of file diff --git a/DSALib/Vorteil.cs b/DSALib/Vorteil.cs index bf698d8..c239676 100644 --- a/DSALib/Vorteil.cs +++ b/DSALib/Vorteil.cs @@ -4,9 +4,9 @@ { public Vorteil(string name, string value = "") { - this.Name = name; - this.Value = value; - // this.Choice = choice; + Name = name; + Value = value; + // this.Choice = choice; } public string Name { get; set; } @@ -15,4 +15,4 @@ //public string Choice { get; set; } } -} +}
\ No newline at end of file diff --git a/DSALib/Zauber.cs b/DSALib/Zauber.cs index 3c7533f..0f460a1 100644 --- a/DSALib/Zauber.cs +++ b/DSALib/Zauber.cs @@ -5,12 +5,12 @@ 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; + Complexity = complexity; + Representation = Representation; } public char Complexity { get; } public string Representation { get; } } -} +}
\ No newline at end of file |