2 //! @brief Implementation of belt equipment
4 //! This class represents the belt that is equipped or carried by a character
5 //! This class validates the belt and assigns its stats
8 //! Default belt constructor sets stats to 1
17 //! Beltconstructor sets stats.
18 //! @param b_str: the strength to be set
19 //! @param b_con: the constitution to be set
20 //! @param b_level the level to be set to
21 Belt::Belt(int b_str
, int b_con
, int b_level
)
30 //! Beltconstructor sets stats based on level.
31 //! @param b_level the level which designates stat values
32 Belt::Belt(int b_level
)
36 constitution
= b_level
;
45 //! Validates the armor
46 //! Belt has a strength attribute that must be between 1 and 5
47 //! Belt has a constitution attribute that must be between 1 and 5
48 bool Belt::validateEquipment()
50 if (str
< 1 || str
> 5 ||
51 constitution
< 1 || constitution
> 5)
57 //! Sets the belt stats to the given level
58 void Belt::levelUpEquipment(int b_level
)
61 constitution
= b_level
;