#ifndef CREATURELIB_BATTLERANDOM_HPP #define CREATURELIB_BATTLERANDOM_HPP #include namespace CreatureLib::Battling { class ExecutingAttack; class Creature; class BattleRandom { private: ArbUt::Random _random; public: BattleRandom() noexcept : _random() {} explicit BattleRandom(uint_fast32_t seed) noexcept : _random(seed) {} bool EffectChance(float chance, ExecutingAttack* attack, Creature* target); int32_t Get() noexcept { return _random.Get(); } int32_t Get(int32_t max) noexcept { return _random.Get(max); } int32_t Get(int32_t min, int32_t max) noexcept { return _random.Get(min, max); } ArbUt::Random& GetRNG() noexcept { return _random; } uint_fast32_t GetSeed() const noexcept { return _random.GetSeed(); } }; } #endif // CREATURELIB_BATTLERANDOM_HPP