summaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/battlemap/query/bm_load_state.erl | 15 | ||||
-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 |
4 files changed, 14 insertions, 11 deletions
diff --git a/src/battlemap/query/bm_load_state.erl b/src/battlemap/query/bm_load_state.erl index 9234dff..1406b4e 100644 --- a/src/battlemap/query/bm_load_state.erl +++ b/src/battlemap/query/bm_load_state.erl @@ -102,12 +102,15 @@ generate_reply (QueryState, Input) -> bm_battle:get_used_armor_ids(Battle) ), - jiffy:encode - ( - [SetTimeline, SetMap | AddWeaponList] - ++ AddArmorList - ++ AddCharList - ). + OutputList = + ( + [SetTimeline, SetMap | AddWeaponList] + ++ AddArmorList + ++ AddCharList + ), + Output = jiffy:encode(OutputList), + + Output. -spec handle (binary()) -> binary(). handle (Req) -> 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), |