diff options
author | TrueDoctor <d-kobert@web.de> | 2018-04-09 19:59:34 +0200 |
---|---|---|
committer | TrueDoctor <d-kobert@web.de> | 2018-04-09 19:59:34 +0200 |
commit | bdf2b48e9939c0bcc91608963b610ba26bf3e90e (patch) | |
tree | 9af4c1ead91d79af50698d0cfb8837ddbd6f2e8c | |
parent | 3e65fcf47b116122e10704a26d36ef79c5093c89 (diff) | |
parent | dad67f269ade9578f9bafd50a9bf57ae19b1676e (diff) |
Merge branch 'master' of https://github.com/TrueDoctor/DiscoBot
-rw-r--r-- | DiscoBot/Auxiliary/Soundeffects.cs | 6 | ||||
-rw-r--r-- | DiscoBot/Characters/Character.cs | 12 | ||||
-rw-r--r-- | DiscoBot/Characters/NPC.cs | 1 |
3 files changed, 13 insertions, 6 deletions
diff --git a/DiscoBot/Auxiliary/Soundeffects.cs b/DiscoBot/Auxiliary/Soundeffects.cs index eb79177..d04b1c0 100644 --- a/DiscoBot/Auxiliary/Soundeffects.cs +++ b/DiscoBot/Auxiliary/Soundeffects.cs @@ -44,8 +44,10 @@ namespace DiscoBot.Auxiliary url = "https://www.myinstants.com/media/sounds/nooo.swf.mp3"; break; case Sound.Wrong: - url = "https://www.myinstants.com/media/sounds/stupid_dum_03.mp3"; - vol = 10; + // url = "https://www.myinstants.com/media/sounds/stupid_dum_03.mp3"; + // vol = 10; + url = "https://www.myinstants.com/media/sounds/wrong-answer-sound-effect.mp3"; + vol = 50; break; } diff --git a/DiscoBot/Characters/Character.cs b/DiscoBot/Characters/Character.cs index 249c6f5..86b4bef 100644 --- a/DiscoBot/Characters/Character.cs +++ b/DiscoBot/Characters/Character.cs @@ -78,7 +78,7 @@ } var props = tTalent.Test(); // get the required properties - int tap = tTalent.Value; // get tap + int tap = tTalent.Value; // get taw var werte = props.Select(p => this.Eigenschaften[this.PropTable[p]]).ToList(); output.AppendFormat( @@ -102,9 +102,9 @@ int temp = Dice.Roll(); int eigenschaft = this.Eigenschaften[this.PropTable[props[i]]]; - if (eigenschaft - gesamtErschwernis < temp) + if (eigenschaft + gesamtErschwernis < temp) { - tap -= temp - eigenschaft + gesamtErschwernis; + tap -= temp - (eigenschaft + gesamtErschwernis); } output.Append($"[{temp}]"); // add to string @@ -132,8 +132,12 @@ } } - tap = tap == 0 ? 1 : tap; + tap = (tap == 0) ? 1 : tap; + if(tap < 0) + { + SoundEffects.Play(Sound.Wrong); + } output.AppendFormat(" tap: {0,2}", tap); return output.ToString(); // return output diff --git a/DiscoBot/Characters/NPC.cs b/DiscoBot/Characters/NPC.cs index 470d5ff..1a71e86 100644 --- a/DiscoBot/Characters/NPC.cs +++ b/DiscoBot/Characters/NPC.cs @@ -36,6 +36,7 @@ return $"{this.Name} vollführt {talent} erfolgreich"; } + return $"{this.Name} scheitert an {talent}"; } |