BillySheet/include/characteristic/chance.hpp

28 lines
778 B
C++

#ifndef BILLYSHEET_CHANCE_HPP
#define BILLYSHEET_CHANCE_HPP
#include "characteristic.hpp"
namespace character::characteristic {
class Chance final : public Characteristic {
public:
Chance() noexcept: Characteristic(3, 0, 0, 0) {}
Chance(const std::uint32_t carac, const std::uint32_t materiel, const std::uint32_t additional) :
Characteristic(3, carac, materiel, additional) {}
~Chance() noexcept final = default;
friend void from_json(const json &j, Chance &chance) {
nlohmann::from_json(j, static_cast<Characteristic &>(chance));
}
};
static void to_json(json &j, const Chance &chance) {
to_json(j, static_cast<Characteristic>(chance));
}
}
#endif //BILLYSHEET_CHANCE_HPP