summaryrefslogtreecommitdiff |
diff options
author | nsensfel <SpamShield0@noot-noot.org> | 2019-09-16 17:44:51 +0200 |
---|---|---|
committer | nsensfel <SpamShield0@noot-noot.org> | 2019-09-16 17:44:51 +0200 |
commit | 4f4987582ee41e2c68aad3b467b40eaed2ae9111 (patch) | |
tree | a7d33297d40327529184d02155a44d1439f9a45b /src | |
parent | 81bc9e28ed8569bfab3c8c3ac3ec07009986b261 (diff) |
Changes to the omnimods scale function.
Diffstat (limited to 'src')
-rw-r--r-- | src/shared/struct/shr_omnimods.erl | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/shared/struct/shr_omnimods.erl b/src/shared/struct/shr_omnimods.erl index c31e372..a913799 100644 --- a/src/shared/struct/shr_omnimods.erl +++ b/src/shared/struct/shr_omnimods.erl @@ -94,7 +94,17 @@ (float(), attribute_mods()) -> attribute_mods(); (float(), damage_type_mods()) -> damage_type_mods(). apply_coefficient_to_mods (Coef, Mods) -> - dict:map(fun (_Name, Val) -> shr_math_util:ceil(Coef * Val) end, Mods). + dict:map + ( + fun (_Name, S0Value) -> + S1Value = (Coef * S0Value), + case S1Value >= 0 of + true -> shr_math_util:ceil(S1Value); + false -> floor(S1Value) + end + end, + Mods + ). -spec merge_mods (attribute_mods(), attribute_mods()) -> attribute_mods(); |