summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2018-02-21 13:30:20 +0100
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2018-02-21 13:30:20 +0100
commitec050d9e70cca73463ac6dedbba658afa64faea7 (patch)
tree92a19aab690139446b0bf689b254452684522673 /src/type/statistics.erl
parentd7b161da1c502402e0c0063c3ffbaa9042bfb24d (diff)
Fixes Accuracy & Dodge stats.
Diffstat (limited to 'src/type/statistics.erl')
-rw-r--r--src/type/statistics.erl21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/type/statistics.erl b/src/type/statistics.erl
index bced96f..0668fea 100644
--- a/src/type/statistics.erl
+++ b/src/type/statistics.erl
@@ -100,8 +100,8 @@ calc_for (Att, _Wp) ->
dodges =
min_max
(
- 5,
- 75,
+ 0,
+ 100,
sudden_exp_growth
(
average
@@ -134,7 +134,22 @@ calc_for (Att, _Wp) ->
damage_min = 0,
damage_max = 100,
accuracy =
- already_high_slow_growth(attributes:get_dexterity(Att)),
+ % Hitting should involve this stat (not with this formula though), but
+ % also the target's dodge stat, with three possible results:
+ % - Missed
+ % - Grazed (Halved damage)
+ % - Hit
+ % Stat = (target.dodge - char.accuracy)
+ % Roll = RAND(0, 100)
+ % if (Roll >= (Stat * 2)): Hit
+ % else if (Roll >= Stat): Grazed
+ % else: Missed.
+ min_max
+ (
+ 0,
+ 100,
+ sudden_squared_growth(attributes:get_dexterity(Att))
+ ),
double_hits =
min_max(0, 100, sudden_squared_growth(attributes:get_speed(Att))),
critical_hits =