#ifndef CREATURELIB_SPECIESVARIANT_HPP #define CREATURELIB_SPECIESVARIANT_HPP #include #include #include #include "../../Core/StatisticSet.hpp" #include "CreatureMoves.hpp" #include "LearnableAttacks.hpp" using ConstString = Arbutils::CaseInsensitiveConstString; namespace CreatureLib::Library { /*! \brief A single species can have more than one variant. This class holds the data for those variants. */ class SpeciesVariant { protected: ConstString _name; float _height; float _weight; uint32_t _baseExperience; private: std::vector _types; const Core::StatisticSet _baseStatistics; std::vector _talents; std::vector _secretTalents; const LearnableAttacks* _attacks; public: SpeciesVariant(ConstString name, float height, float weight, uint32_t baseExperience, std::vector types, Core::StatisticSet baseStats, std::vector talents, std::vector secretTalents, const LearnableAttacks* attacks); virtual ~SpeciesVariant(); inline const ConstString& 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& GetTypes() const; [[nodiscard]] uint32_t GetStatistic(Core::Statistic stat) const; [[nodiscard]] const ConstString& GetTalent(int32_t index) const; [[nodiscard]] const LearnableAttacks* GetLearnableAttacks() const; [[nodiscard]] int8_t GetTalentIndex(const std::string& talent) const; [[nodiscard]] int8_t GetRandomTalent(Arbutils::Random* rand) const; [[nodiscard]] inline const std::vector& GetTalents() const { return _talents; } [[nodiscard]] inline const std::vector& GetSecretTalents() const { return _secretTalents; } }; } #endif // CREATURELIB_SPECIESVARIANT_HPP