summaryrefslogtreecommitdiff
path: root/DiscoBot/Characters/Character.cs
diff options
context:
space:
mode:
authorKobert <Kassian.Kobert@gmail.com>2018-04-09 19:07:05 +0200
committerKobert <Kassian.Kobert@gmail.com>2018-04-09 19:07:05 +0200
commitdad67f269ade9578f9bafd50a9bf57ae19b1676e (patch)
treecf37a5300c72259f1b8c39abaa91c955abcb8f10 /DiscoBot/Characters/Character.cs
parent5975fb9de7bb99103aa6e83f7c13834efaddcc7d (diff)
Negative tap
Diffstat (limited to 'DiscoBot/Characters/Character.cs')
-rw-r--r--DiscoBot/Characters/Character.cs12
1 files changed, 8 insertions, 4 deletions
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