Move several classes from Core to Arbutils.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -40,7 +40,7 @@ void CreatureSpecies::SetVariant(const std::string& name, const SpeciesVariant*
|
||||
_variants[key] = variant;
|
||||
}
|
||||
|
||||
Gender CreatureSpecies::GetRandomGender(CreatureLib::Core::Random& rand) const {
|
||||
Gender CreatureSpecies::GetRandomGender(Arbutils::Random& rand) const {
|
||||
// TODO: Genderless creatures
|
||||
auto val = rand.GetDouble();
|
||||
if (val >= this->_genderRate)
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace CreatureLib::Library {
|
||||
[[nodiscard]] bool HasVariant(const std::string& key) const;
|
||||
[[nodiscard]] bool TryGetVariant(const std::string& name, const SpeciesVariant*& out) const;
|
||||
[[nodiscard]] const SpeciesVariant* GetVariant(const std::string& key) const;
|
||||
[[nodiscard]] Gender GetRandomGender(Core::Random& rand) const;
|
||||
[[nodiscard]] Gender GetRandomGender(Arbutils::Random& rand) const;
|
||||
[[nodiscard]] const std::string& GetName() const;
|
||||
|
||||
void SetVariant(const std::string& name, const SpeciesVariant* variant);
|
||||
|
||||
@@ -36,7 +36,7 @@ int8_t CreatureLib::Library::SpeciesVariant::GetTalentIndex(const std::string& t
|
||||
throw CreatureException("The given talent is not a valid talent for this creature.");
|
||||
}
|
||||
|
||||
int8_t CreatureLib::Library::SpeciesVariant::GetRandomTalent(CreatureLib::Core::Random* rand) const {
|
||||
int8_t CreatureLib::Library::SpeciesVariant::GetRandomTalent(Arbutils::Random* rand) const {
|
||||
return rand->Get(_talents.size());
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#ifndef CREATURELIB_SPECIESVARIANT_HPP
|
||||
#define CREATURELIB_SPECIESVARIANT_HPP
|
||||
|
||||
#include <Arbutils/Random.hpp>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "../../Core/Random.hpp"
|
||||
#include "../../Core/StatisticSet.hpp"
|
||||
#include "CreatureMoves.hpp"
|
||||
#include "LearnableAttacks.hpp"
|
||||
@@ -46,7 +46,7 @@ namespace CreatureLib::Library {
|
||||
[[nodiscard]] const std::string& GetTalent(int32_t index) const;
|
||||
[[nodiscard]] const LearnableAttacks* GetLearnableAttacks() const;
|
||||
[[nodiscard]] int8_t GetTalentIndex(const std::string& talent) const;
|
||||
[[nodiscard]] int8_t GetRandomTalent(Core::Random* rand) const;
|
||||
[[nodiscard]] int8_t GetRandomTalent(Arbutils::Random* rand) const;
|
||||
[[nodiscard]] inline const std::vector<std::string>& GetTalents() const { return _talents; }
|
||||
[[nodiscard]] inline const std::vector<std::string>& GetSecretTalents() const { return _secretTalents; }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user