Add documentation
This commit is contained in:
parent
3c68557549
commit
ea1206e58c
1 changed files with 22 additions and 0 deletions
|
|
@ -12,6 +12,10 @@ namespace character {
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace character::characteristic {
|
namespace character::characteristic {
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Different characteristic type
|
||||||
|
*/
|
||||||
enum class characType : std::uint8_t {
|
enum class characType : std::uint8_t {
|
||||||
Adresse = 0,
|
Adresse = 0,
|
||||||
Endurance = 1,
|
Endurance = 1,
|
||||||
|
|
@ -19,16 +23,34 @@ namespace character::characteristic {
|
||||||
Habilete = 3
|
Habilete = 3
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief This class represents a characteristic for Billy (one of characType)
|
||||||
|
*/
|
||||||
class Characteristic {
|
class Characteristic {
|
||||||
protected:
|
protected:
|
||||||
friend BillyObjects;
|
friend BillyObjects;
|
||||||
using defaultValue = std::numeric_limits<std::int32_t>;
|
using defaultValue = std::numeric_limits<std::int32_t>;
|
||||||
|
|
||||||
|
//! Total point for this charac
|
||||||
mutable std::int32_t total{ defaultValue::max() };
|
mutable std::int32_t total{ defaultValue::max() };
|
||||||
|
|
||||||
|
//! Base value
|
||||||
const std::uint32_t base{ 0 };
|
const std::uint32_t base{ 0 };
|
||||||
|
|
||||||
|
//! Value depending of the characType for this characteristic.
|
||||||
std::uint32_t carac{ 0 };
|
std::uint32_t carac{ 0 };
|
||||||
|
|
||||||
|
//! Value changed from a billyObjects (billyEnums) possessed
|
||||||
std::uint32_t materiel{ 0 };
|
std::uint32_t materiel{ 0 };
|
||||||
|
|
||||||
|
//! Additional value when creating the character
|
||||||
std::uint32_t additional{ 0 };
|
std::uint32_t additional{ 0 };
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Get base value depending of the characType
|
||||||
|
* \param inType Characteristic type used to get base number
|
||||||
|
* \return Base value depending of the characType
|
||||||
|
*/
|
||||||
static constexpr std::uint32_t get_base(const characType inType) noexcept {
|
static constexpr std::uint32_t get_base(const characType inType) noexcept {
|
||||||
switch (inType) {
|
switch (inType) {
|
||||||
case characType::Adresse:
|
case characType::Adresse:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue