3 #include <BLIB/Util/Random.hpp>
12 constexpr std::uint16_t FreqRange = std::numeric_limits<std::uint16_t>::max() - 1;
18 BL_LOG_ERROR <<
"Empty catch region, spawning your punishment";
22 const std::uint16_t f = bl::util::Random::get<std::uint16_t>(0, FreqRange);
23 std::uint16_t count = 0;
25 if (f < count + ppl.frequency) {
30 count += ppl.frequency;
34 <<
"Sum of wild peoplemon frequencies was less than 100% | Spawning your punishment";
Core classes and functionality for both the editor and game.
const pplmn::WildPeoplemon & selectWild() const
Selects a wild peoplemon from the set based on frequency, or returns a level 100 Ben if the set is em...
std::vector< pplmn::WildPeoplemon > wilds
static const std::string & name(Id id)
Returns the name of the given Peoplemon.
Template struct to generate OwnedPeoplemon for random encounters.