C interface for Battle Random.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -12,14 +12,15 @@ namespace CreatureLib::Battling {
|
||||
Arbutils::Random _random;
|
||||
|
||||
public:
|
||||
BattleRandom() : _random() {}
|
||||
BattleRandom(int32_t seed) : _random(seed) {}
|
||||
BattleRandom() noexcept : _random() {}
|
||||
BattleRandom(uint_fast32_t seed) noexcept : _random(seed) {}
|
||||
|
||||
bool EffectChance(float chance, ExecutingAttack* attack, Creature* target);
|
||||
int32_t Get() { return _random.Get(); }
|
||||
int32_t Get(int32_t max) { return _random.Get(max); }
|
||||
int32_t Get(int32_t min, int32_t max) { return _random.Get(min, max); }
|
||||
Arbutils::Random& GetRNG() { return _random; }
|
||||
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); }
|
||||
Arbutils::Random& GetRNG() noexcept { return _random; }
|
||||
uint_fast32_t GetSeed() const noexcept { return _random.GetSeed(); }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user