From 2155e43a7acdbc91ef561ae1cfd06eae297020e7 Mon Sep 17 00:00:00 2001 From: nsensfel Date: Thu, 7 Jun 2018 16:44:26 +0200 Subject: add_{armor,weapon}, coefs, db stores stats. --- src/shared/struct/sh_armor.erl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/shared/struct/sh_armor.erl') diff --git a/src/shared/struct/sh_armor.erl b/src/shared/struct/sh_armor.erl index 4156016..3ff1a61 100644 --- a/src/shared/struct/sh_armor.erl +++ b/src/shared/struct/sh_armor.erl @@ -32,7 +32,7 @@ [ get_id/1, get_name/1, - get_coef/1, + get_coefficient/1, get_category/1 ] ). @@ -61,8 +61,8 @@ get_id (Ar) -> Ar#armor.id. -spec get_name (type()) -> binary(). get_name (Ar) -> Ar#armor.name. --spec get_coef (type()) -> float(). -get_coef (Ar) -> Ar#armor.coef. +-spec get_coefficient (type()) -> float(). +get_coefficient (Ar) -> Ar#armor.coef. -spec get_category (type()) -> category(). get_category (Ar) -> Ar#armor.category. @@ -105,15 +105,15 @@ from_id (4) -> }. -spec random_id () -> id(). -random_id () -> sh_roll:between(0, 24). +random_id () -> sh_roll:between(0, 4). -spec apply_to_attributes ( - sh_attributes:type(), - type() + type(), + sh_attributes:type() ) -> sh_attributes:type(). -apply_to_attributes (Att, Ar) -> +apply_to_attributes (Ar, Att) -> Dexterity = sh_attributes:get_dexterity(Att), Speed = sh_attributes:get_speed(Att), Strength = sh_attributes:get_strength(Att), -- cgit v1.2.3-70-g09d2