From 621505c168ec61194f3c495ec8c2d6cbbfdab781 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Thu, 5 Sep 2019 23:35:16 +0200 Subject: Copy/paste error + messed up points calculation. --- src/balancer/struct/blc_glyph.erl | 7 +++---- 1 file 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) -> -- cgit v1.2.3-70-g09d2