BillySheet/include/characteristic/endurance.hpp
Pcornat cfd22179e9
Changing characteristics to try to deal with gameplay.
It is not a definitive changes, a refactoring is going to be made in the future.
2024-02-26 11:36:58 +01:00

33 lines
951 B
C++

#ifndef BILLYSHEET_ENDURANCE_HPP
#define BILLYSHEET_ENDURANCE_HPP
#include "characteristic.hpp"
#include <nlohmann/json.hpp>
using json = nlohmann::json;
namespace character::characteristic {
class Endurance final : public Characteristic {
public:
Endurance() noexcept: Characteristic(2, 0, 0, 0) {};
Endurance(const std::uint32_t carac, const std::uint32_t materiel, const std::uint32_t additional) noexcept:
Characteristic(2, carac, materiel, additional) {}
~Endurance() noexcept final = default;
[[nodiscard]] std::uint32_t get_max_lp() const noexcept;
friend void from_json(const json &j, Endurance &endurance) {
nlohmann::from_json(j, static_cast<Characteristic &>(endurance));
}
};
static void to_json(json &j, const Endurance &endurance) {
to_json(j, static_cast<Characteristic>(endurance));
}
}
#endif //BILLYSHEET_ENDURANCE_HPP