2022-01-10 21:16:05 +01:00
|
|
|
#ifndef BILLYSHEET_ENDURANCE_HPP
|
|
|
|
#define BILLYSHEET_ENDURANCE_HPP
|
|
|
|
|
2022-01-14 22:58:16 +01:00
|
|
|
#include "characteristic.hpp"
|
|
|
|
#include <nlohmann/json.hpp>
|
2022-01-10 21:16:05 +01:00
|
|
|
|
2022-01-14 22:58:16 +01:00
|
|
|
using json = nlohmann::json;
|
2022-01-10 21:28:29 +01:00
|
|
|
|
2022-01-14 22:58:16 +01:00
|
|
|
namespace character::characteristic {
|
|
|
|
class Endurance final : public Characteristic {
|
2022-01-10 21:28:29 +01:00
|
|
|
public:
|
2022-01-14 22:58:16 +01:00
|
|
|
Endurance() noexcept: Characteristic(2, 0, 0, 0) {};
|
2022-01-10 21:28:29 +01:00
|
|
|
|
2022-01-14 22:58:16 +01:00
|
|
|
~Endurance() noexcept final = default;
|
2022-01-10 21:28:29 +01:00
|
|
|
|
|
|
|
[[nodiscard]] std::uint32_t get_max_lp() const noexcept;
|
2022-01-14 22:58:16 +01:00
|
|
|
|
|
|
|
friend void from_json(const json &j, Endurance &endurance) {
|
|
|
|
nlohmann::from_json(j, static_cast<Characteristic &>(endurance));
|
|
|
|
}
|
2022-01-10 21:16:05 +01:00
|
|
|
};
|
2022-01-14 22:58:16 +01:00
|
|
|
|
2022-01-17 19:57:00 +01:00
|
|
|
static void to_json(json &j, const Endurance &endurance) {
|
2022-01-14 22:58:16 +01:00
|
|
|
to_json(j, static_cast<Characteristic>(endurance));
|
|
|
|
}
|
2022-01-10 21:16:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif //BILLYSHEET_ENDURANCE_HPP
|