summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2019-01-30 09:39:47 +0100
committernsensfel <SpamShield0@noot-noot.org>2019-01-30 09:39:47 +0100
commitb1a3afeeea68e72e88f0fd9720035ee7f1541bdb (patch)
tree9145863fa0d270f4f60b36ff21a80910bfedf6e5 /src/shared/shr_roll.erl
parenta78b67db4dfbed793b3b62ce5c47a1afaaa6c6d1 (diff)
Moves Luck decay to the end of the turn.
Diffstat (limited to 'src/shared/shr_roll.erl')
-rw-r--r--src/shared/shr_roll.erl8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/shared/shr_roll.erl b/src/shared/shr_roll.erl
index b2aca29..eb0f21e 100644
--- a/src/shared/shr_roll.erl
+++ b/src/shared/shr_roll.erl
@@ -61,15 +61,9 @@ percentage_with_luck (Chance, Luck) ->
ModedRoll = max(0, min((Roll - Luck), 100)),
IsSuccess = (Roll =< ModedChance),
- BadLuckBonus =
- case (Luck < 0) of
- true -> 1;
- false -> 0
- end,
-
{
ModedRoll,
IsSuccess,
- (BadLuckBonus + calculate_costs(IsSuccess, Roll, Chance)),
+ calculate_costs(IsSuccess, Roll, Chance),
calculate_costs((not IsSuccess), (100 - Roll), (100 - ModedChance))
}.