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:
@@ -1,8 +1,8 @@
|
||||
#ifndef CREATURELIB_ATTACKCATEGORY_HPP
|
||||
#define CREATURELIB_ATTACKCATEGORY_HPP
|
||||
|
||||
#include <Arbutils/Enum.hpp>
|
||||
#include <cstdint>
|
||||
#include "../../Core/Enum.hpp"
|
||||
|
||||
namespace CreatureLib::Library {
|
||||
ENUM(AttackCategory, uint8_t, Physical, Magical, Status)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef CREATURELIB_ATTACKTARGET_HPP
|
||||
#define CREATURELIB_ATTACKTARGET_HPP
|
||||
|
||||
#include <Arbutils/Enum.hpp>
|
||||
#include <cstdint>
|
||||
#include "../../Core/Enum.hpp"
|
||||
|
||||
namespace CreatureLib::Library {
|
||||
ENUM(AttackTarget, uint8_t, Adjacent, AdjacentAlly, AdjacentAllySelf, AdjacentOpponent,
|
||||
|
||||
@@ -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; }
|
||||
};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef CREATURELIB_GENDER_HPP
|
||||
#define CREATURELIB_GENDER_HPP
|
||||
|
||||
#include <Arbutils/Enum.hpp>
|
||||
#include <cstdint>
|
||||
#include "../Core/Enum.hpp"
|
||||
|
||||
namespace CreatureLib::Library {
|
||||
/*!
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef CREATURELIB_BATTLEITEMCATEGORY_HPP
|
||||
#define CREATURELIB_BATTLEITEMCATEGORY_HPP
|
||||
|
||||
#include <Arbutils/Enum.hpp>
|
||||
#include <cstdint>
|
||||
#include "../../Core/Enum.hpp"
|
||||
|
||||
namespace CreatureLib::Library {
|
||||
ENUM(BattleItemCategory, uint8_t, None, Healing, StatusHealing, CaptureDevice, MiscBattleItem)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef CREATURELIB_ITEMCATEGORY_HPP
|
||||
#define CREATURELIB_ITEMCATEGORY_HPP
|
||||
|
||||
#include <Arbutils/Enum.hpp>
|
||||
#include <cstdint>
|
||||
#include "../../Core/Enum.hpp"
|
||||
|
||||
namespace CreatureLib::Library {
|
||||
ENUM(ItemCategory, uint8_t, MiscItem, CaptureDevice, Medicine, Berry, MoveLearner, VariantChanger, KeyItem, Mail)
|
||||
|
||||
Reference in New Issue
Block a user