| summaryrefslogtreecommitdiff | 
diff options
| author | nsensfel <SpamShield0@noot-noot.org> | 2018-06-08 13:12:16 +0200 | 
|---|---|---|
| committer | nsensfel <SpamShield0@noot-noot.org> | 2018-06-08 13:12:16 +0200 | 
| commit | 0416d506aa9d20f2b65ce0123e9c54798a00411e (patch) | |
| tree | 17aef6e682148d5b3c291a519246e3259bf9d0df /src/shared | |
| parent | 05aae9baa2b61882be578d9660687fb2d0eb1f47 (diff) | |
Equipment penalties should not increase attributes
Diffstat (limited to 'src/shared')
| -rw-r--r-- | src/shared/struct/sh_armor.erl | 2 | ||||
| -rw-r--r-- | src/shared/struct/sh_statistics.erl | 6 | ||||
| -rw-r--r-- | src/shared/struct/sh_weapon.erl | 2 | 
3 files changed, 5 insertions, 5 deletions
| diff --git a/src/shared/struct/sh_armor.erl b/src/shared/struct/sh_armor.erl index 3ff1a61..04b82d6 100644 --- a/src/shared/struct/sh_armor.erl +++ b/src/shared/struct/sh_armor.erl @@ -118,7 +118,7 @@ apply_to_attributes (Ar, Att) ->     Speed = sh_attributes:get_speed(Att),     Strength = sh_attributes:get_strength(Att),     Mind = sh_attributes:get_mind(Att), -   Impact = erlang:ceil(-20.0 * Ar#armor.coef), +   Impact = erlang:ceil(20.0 * Ar#armor.coef),     Category = Ar#armor.category,     case Category of diff --git a/src/shared/struct/sh_statistics.erl b/src/shared/struct/sh_statistics.erl index e2b8543..d2dfb1c 100644 --- a/src/shared/struct/sh_statistics.erl +++ b/src/shared/struct/sh_statistics.erl @@ -72,17 +72,17 @@ average (L) -> lists:sum(L) / length(L).  % V | 010 | 030 | 050 | 070 | 100 |  % F | 004 | 023 | 058 | 104 | 200 |  -spec gentle_squared_growth (number()) -> non_neg_integer(). -gentle_squared_growth (V) -> float_to_int(math:pow(V, 1.8) / 20). +gentle_squared_growth (V) -> float_to_int(math:pow(V, 1.8) / 20.0).  % V | 010 | 030 | 050 | 070 | 100 |  % F | 001 | 005 | 018 | 041 | 100 |  -spec sudden_squared_growth (number()) -> non_neg_integer(). -sudden_squared_growth (V) -> float_to_int(math:pow(V, 2.5) / 1000). +sudden_squared_growth (V) -> float_to_int(math:pow(V, 2.5) / 1000.0).  % V | 010 | 030 | 050 | 070 | 100 |  % F | 002 | 006 | 016 | 049 | 256 |  -spec sudden_exp_growth (number()) -> non_neg_integer(). -sudden_exp_growth (V) -> float_to_int(math:pow(4, V / 25)). +sudden_exp_growth (V) -> float_to_int(math:pow(4.0, V / 25.0)).  % V | 010 | 030 | 050 | 070 | 100 |  % F | 040 | 066 | 079 | 088 | 099 | diff --git a/src/shared/struct/sh_weapon.erl b/src/shared/struct/sh_weapon.erl index 6bd3425..db402af 100644 --- a/src/shared/struct/sh_weapon.erl +++ b/src/shared/struct/sh_weapon.erl @@ -396,7 +396,7 @@ apply_to_attributes (Weapon, Attributes) ->     RangeModifier = Weapon#weapon.range_mod,     DamageModifier = Weapon#weapon.damage_mod, -   Impact = (-20.0 * Weapon#weapon.coef), +   Impact = (20.0 * Weapon#weapon.coef),     FullImpact = erlang:ceil(Impact),     QuarterImpact = erlang:ceil(Impact / 4.0), | 


