54 lines
2.0 KiB
C++
54 lines
2.0 KiB
C++
#ifndef CREATURELIB_SPECIESVARIANT_HPP
|
|
#define CREATURELIB_SPECIESVARIANT_HPP
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include "../../Core/Random.hpp"
|
|
#include "../../Core/StatisticSet.hpp"
|
|
#include "CreatureMoves.hpp"
|
|
#include "LearnableAttacks.hpp"
|
|
|
|
namespace CreatureLib::Library {
|
|
/*!
|
|
\brief A single species can have more than one variant. This class holds the data for those variants.
|
|
*/
|
|
class SpeciesVariant {
|
|
protected:
|
|
std::string _name;
|
|
float _height;
|
|
float _weight;
|
|
uint32_t _baseExperience;
|
|
|
|
private:
|
|
std::vector<uint8_t> _types;
|
|
const Core::StatisticSet<uint16_t> _baseStatistics;
|
|
std::vector<std::string> _talents;
|
|
std::vector<std::string> _secretTalents;
|
|
const LearnableAttacks* _attacks;
|
|
|
|
public:
|
|
SpeciesVariant(std::string name, float height, float weight, uint32_t baseExperience,
|
|
std::vector<uint8_t> types, Core::StatisticSet<uint16_t> baseStats,
|
|
std::vector<std::string> talents, std::vector<std::string> secretTalents,
|
|
const LearnableAttacks* attacks);
|
|
|
|
virtual ~SpeciesVariant();
|
|
|
|
inline const std::string& GetName() const { return _name; }
|
|
inline float GetHeight() const { return _height; }
|
|
inline float GetWeight() const { return _weight; }
|
|
inline uint32_t GetBaseExperience() const { return _baseExperience; }
|
|
|
|
[[nodiscard]] size_t GetTypeCount() const;
|
|
[[nodiscard]] uint8_t GetType(size_t index) const;
|
|
[[nodiscard]] const std::vector<uint8_t>& GetTypes() const;
|
|
[[nodiscard]] uint32_t GetStatistic(Core::Statistic stat) const;
|
|
[[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;
|
|
};
|
|
}
|
|
|
|
#endif // CREATURELIB_SPECIESVARIANT_HPP
|