From b1a3afeeea68e72e88f0fd9720035ee7f1541bdb Mon Sep 17 00:00:00 2001 From: nsensfel Date: Wed, 30 Jan 2019 09:39:47 +0100 Subject: Moves Luck decay to the end of the turn. --- src/shared/shr_roll.erl | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/shared') 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)) }. -- cgit v1.2.3-70-g09d2