diff --git a/include/characteristic.hpp b/include/characteristic.hpp index f4d886d..ad8f167 100644 --- a/include/characteristic.hpp +++ b/include/characteristic.hpp @@ -12,7 +12,6 @@ namespace character { } namespace character::characteristic { - /*! * \brief Different characteristic type */ @@ -41,7 +40,7 @@ namespace character::characteristic { std::uint32_t carac{ 0 }; //! Value changed from a billyObjects (billyEnums) possessed - std::uint32_t materiel{ 0 }; + std::int32_t materiel{ 0 }; //! Additional value when creating the character std::uint32_t additional{ 0 }; @@ -70,7 +69,7 @@ namespace character::characteristic { constexpr Characteristic(const characType inType, const std::uint32_t carac, - const std::uint32_t materiel, + const std::int32_t materiel, const std::uint32_t additional) : base(get_base(inType)), carac(carac), @@ -98,11 +97,11 @@ namespace character::characteristic { [[nodiscard]] std::uint32_t get_carac() const { return carac; } - [[nodiscard]] std::uint32_t get_materiel() const { return materiel; } + [[nodiscard]] std::int32_t get_materiel() const { return materiel; } [[nodiscard]] std::uint32_t get_additional() const { return additional; } - [[nodiscard]] std::size_t get_total() const noexcept { + [[nodiscard]] std::int32_t get_total() const noexcept { if (total == defaultValue::max()) { total = static_cast(base + carac + materiel + additional); total = std::max(total, 0); @@ -114,7 +113,7 @@ namespace character::characteristic { const_cast(charac.base) = j.at("base").get(); const_cast(charac.type) = static_cast(j.at("type").get()); charac.carac = j.at("carac").get(); - charac.materiel = j.at("materiel").get(); + charac.materiel = j.at("materiel").get(); charac.additional = j.at("additional").get(); charac.total = j.at("total").get(); }