aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-09-05 23:35:16 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-09-05 23:35:16 +0200
commit621505c168ec61194f3c495ec8c2d6cbbfdab781 (patch)
treeb57e07d804a29e0a3120cc720409779a34fc3169
parent04b46b69436e099e1b05ab4b9371bc070d95aec1 (diff)
downloadtacticians-server-621505c168ec61194f3c495ec8c2d6cbbfdab781.zip
tacticians-server-621505c168ec61194f3c495ec8c2d6cbbfdab781.tar.bz2
Copy/paste error + messed up points calculation.
-rw-r--r--src/balancer/struct/blc_glyph.erl7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/balancer/struct/blc_glyph.erl b/src/balancer/struct/blc_glyph.erl
index 894dd9f..c6b2735 100644
--- a/src/balancer/struct/blc_glyph.erl
+++ b/src/balancer/struct/blc_glyph.erl
@@ -3,8 +3,7 @@
-include("tacticians/attributes.hrl").
-define(SPENDABLE_GLYPH_POINTS, 100).
--define(NEGATIVE_POINTS_MODIFIER, 0.75).
--define(NEGATIVE_POINTS_MULTIPLIER, (2 - ?NEGATIVE_POINTS_MODIFIER)).
+-define(NEGATIVE_POINTS_MULTIPLIER, 1.25).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -440,9 +439,9 @@ increase_attribute_for (Attribute, GivenPoints, Glyph) ->
decrease_attribute_for (Attribute, GivenPoints, Glyph) ->
{_AttMin, _AttDef, _AttMax, AttCost} = blc_attribute:get_info(Attribute),
AmountOfDecrease =
- trunc((GivenPoints * ?NEGATIVE_POINTS_MULTIPLIER) / AttCost),
+ trunc(GivenPoints / (?NEGATIVE_POINTS_MULTIPLIER * AttCost)),
- increase_attribute_by(Attribute, AmountOfDecrease, Glyph).
+ decrease_attribute_by(Attribute, AmountOfDecrease, Glyph).
-spec get_remaining_positive_points (type()) -> non_neg_integer().
get_remaining_positive_points (Glyph) ->