diff options
author | TrueDoctor <d-kobert@web.de> | 2018-06-03 23:16:17 +0200 |
---|---|---|
committer | TrueDoctor <d-kobert@web.de> | 2018-06-03 23:16:17 +0200 |
commit | d63ffc58db0f032cf7573b2a8a7720de2d5050ab (patch) | |
tree | d9a656651251bbd1eec233265ef824bf4b0389f0 /DiscoBot/DSA_Game/Talent.cs | |
parent | 256154e2ab4244e7267ffc21959a4ce65c982783 (diff) |
-General restructuring
-seperated talents and spells
Diffstat (limited to 'DiscoBot/DSA_Game/Talent.cs')
-rw-r--r-- | DiscoBot/DSA_Game/Talent.cs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/DiscoBot/DSA_Game/Talent.cs b/DiscoBot/DSA_Game/Talent.cs new file mode 100644 index 0000000..fe097fa --- /dev/null +++ b/DiscoBot/DSA_Game/Talent.cs @@ -0,0 +1,39 @@ +namespace DiscoBot.DSA_Game +{ + using System; + + using DiscoBot.Auxiliary; + + 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 int CheckName(string quarry) + { + var sc = (StringComparer)new SpellCorrect(); + return sc.Compare(quarry, this.Name); + } + } +} |