summaryrefslogtreecommitdiff |
diff options
author | nsensfel <SpamShield0@noot-noot.org> | 2018-01-19 13:08:22 +0100 |
---|---|---|
committer | nsensfel <SpamShield0@noot-noot.org> | 2018-01-19 13:08:22 +0100 |
commit | 7de35286a319810117e706f26f07ec70ce5b3c54 (patch) | |
tree | 26656c430ee0892ede36fe1f4a26549fc9e88319 /src/type/statistics.erl | |
parent | 661ae8ca55928e5be645c3d3e8f2ecc915ab16a6 (diff) |
...
Diffstat (limited to 'src/type/statistics.erl')
-rw-r--r-- | src/type/statistics.erl | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/src/type/statistics.erl b/src/type/statistics.erl index ad92917..75cab27 100644 --- a/src/type/statistics.erl +++ b/src/type/statistics.erl @@ -67,7 +67,46 @@ calc_for (Att, Wp) -> #statistics { movement_points = - trunc(math:ceil(math:pow(attributes:get_speed(Att), 1.8)/20)), + trunc(math:ceil(math:pow(attributes:get_speed(Att), 1.8) / 20)), health = - trunc(math:ceil(math:pow(attributes:get_constitution(Att), 1.8)/20)) + trunc(math:ceil(math:pow(attributes:get_constitution(Att), 1.8) / 20)), + dodges = + min(75, max(5, trunc(math:ceil(math:pow(4, + ( + lists:sum + ( + [ + attributes:get_dexterity(Att), + attributes:get_mind(Att), + attributes:get_speed(Att) + ] + ) + / 3 + )))))), + parries = + min(75, trunc(math:ceil(math:pow(4, + ( + lists:sum + ( + [ + attributes:get_dexterity(Att), + attributes:get_speed(Att), + attributes:get_strength(Att) + ] + ) + / 3 + ))))), + damage_min = 0, + damage_max = 100, + accuracy = min(75, max(5, trunc(math:ceil(30 * math:log((x + 5) / 4))))), + double_hits = + min(100, trunc(math:ceil( + math:pow(attributes:get_speed(Att), 2.5) + / 1000 + ))), + critical_hits = + min(100, trunc(math:ceil( + math:pow(attributes:get_intelligence(Att), 2.5) + / 1000 + ))) }. |