BillySheet/include/characteristic/endurance.hpp

30 lines
767 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() 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