BillySheet/include/characteristic/chance.hpp

25 lines
605 B
C++
Raw Normal View History

2022-01-10 21:16:05 +01:00
#ifndef BILLYSHEET_CHANCE_HPP
#define BILLYSHEET_CHANCE_HPP
2022-01-14 22:58:16 +01:00
#include "characteristic.hpp"
2022-01-10 21:16:05 +01:00
namespace character::characteristic {
2024-01-28 20:31:50 +01:00
class Chance final : public Characteristic {
public:
Chance() noexcept: Characteristic(3, 0, 0, 0) {}
2022-01-14 22:58:16 +01:00
2024-01-28 20:31:50 +01:00
~Chance() noexcept final = default;
2022-01-10 21:34:54 +01:00
2024-01-28 20:31:50 +01:00
friend void from_json(const json &j, Chance &chance) {
nlohmann::from_json(j, static_cast<Characteristic &>(chance));
}
};
2022-01-14 22:58:16 +01:00
2024-01-28 20:31:50 +01:00
static void to_json(json &j, const Chance &chance) {
to_json(j, static_cast<Characteristic>(chance));
}
2022-01-10 21:16:05 +01:00
}
#endif //BILLYSHEET_CHANCE_HPP