1 #ifndef CORE_PEOPLEMON_WILDPEOPLEMON_HPP
2 #define CORE_PEOPLEMON_WILDPEOPLEMON_HPP
4 #include <BLIB/Serialization.hpp>
46 struct SerializableObject<
core::pplmn::WildPeoplemon> :
public SerializableObjectBase {
49 SerializableField<1, Wild, std::uint8_t>
minLevel;
50 SerializableField<2, Wild, std::uint8_t>
maxLevel;
51 SerializableField<3, Wild, std::uint16_t>
freq;
52 SerializableField<4, Wild, core::pplmn::Id>
id;
55 : SerializableObjectBase(
"WildPeoplemon")
56 , minLevel(
"minLevel", *this, &
Wild::minLevel, SerializableFieldBase::Required{})
57 , maxLevel(
"maxLevel", *this, &
Wild::maxLevel, SerializableFieldBase::Required{})
58 , freq(
"freq", *this, &
Wild::frequency, SerializableFieldBase::Required{})
59 , id(
"id", *this, &
Wild::id, SerializableFieldBase::Required{}) {}
Core classes and functionality for both the editor and game.
Represents an instance of a peoplemon. Can be a wild peoplemon, trainer, or player peoplemon....
Template struct to generate OwnedPeoplemon for random encounters.
Id id
The type of peoplemon to generate.
std::uint8_t minLevel
The minimum level that may spawn, inclusive.
std::uint8_t maxLevel
The maximum level that may spawn, inclusive.
std::uint16_t frequency
Frequency of spawns relative to other wild peoplemon in the region.
OwnedPeoplemon generate() const
Generate an OwnedPeoplemon from the template.
SerializableField< 3, Wild, std::uint16_t > freq
SerializableField< 2, Wild, std::uint8_t > maxLevel
SerializableField< 1, Wild, std::uint8_t > minLevel
SerializableField< 4, Wild, core::pplmn::Id > id