diff options
Diffstat (limited to 'DiscoBot/Characters')
-rw-r--r-- | DiscoBot/Characters/Character.cs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/DiscoBot/Characters/Character.cs b/DiscoBot/Characters/Character.cs index a78e613..249c6f5 100644 --- a/DiscoBot/Characters/Character.cs +++ b/DiscoBot/Characters/Character.cs @@ -71,8 +71,9 @@ var sc = new SpellCorrect(); var tTalent = this.Talente.OrderBy(x => sc.Compare(talent, x.Name)).First(); - if (sc.Compare(talent, tTalent.Name) > 94100) + if (sc.Compare(talent, tTalent.Name) > SpellCorrect.ErrorThreshold) { + SoundEffects.Play(Sound.Wrong); return $"{this.Name} kann nicht {talent}..."; } @@ -164,8 +165,9 @@ var output = new StringBuilder(); var sc = new SpellCorrect(); var attack = this.Kampftalente.OrderBy(x => sc.Compare(talent, x.Name)).First(); - if (sc.Compare(talent, attack.Name) > 94) + if (sc.Compare(talent, attack.Name) > SpellCorrect.ErrorThreshold) { + SoundEffects.Play(Sound.Wrong); return $"{this.Name} kann nicht mit der Waffenart {talent} umgehen..."; } @@ -187,8 +189,9 @@ var sc = new SpellCorrect(); var attack = this.Kampftalente.OrderBy(x => sc.Compare(talent, x.Name)).First(); - if (sc.Compare(talent, attack.Name) > 94) + if (sc.Compare(talent, attack.Name) > SpellCorrect.ErrorThreshold) { + SoundEffects.Play(Sound.Wrong); return $"{this.Name} kann nicht mit der Waffenart {talent} umgehen..."; } @@ -210,8 +213,9 @@ var sc = new SpellCorrect(); int fk = this.Eigenschaften["fk"]; var attack = this.Talente.OrderBy(x => sc.Compare(talent, x.Name)).First(); - if (sc.Compare(talent, attack.Name) > 94) + if (sc.Compare(talent, attack.Name) > SpellCorrect.ErrorThreshold) { + SoundEffects.Play(Sound.Wrong); return $"{this.Name} kann nicht mit der Waffenart {talent} umgehen..."; } |