#ifndef CREATURELIB_TYPELIBRARY_HPP #define CREATURELIB_TYPELIBRARY_HPP #include #include #include #include #include namespace CreatureLib::Library { class TypeLibrary { ArbUt::Dictionary _types; ArbUt::List> _effectiveness; public: TypeLibrary(size_t initialCapacity = 20) : _types(ArbUt::Dictionary(initialCapacity)) {} uint8_t GetTypeId(const ArbUt::CaseInsensitiveConstString& s) const; uint8_t GetTypeId(uint32_t s) const; [[nodiscard]] float GetSingleEffectiveness(uint8_t attacking, uint8_t defensive) const; [[nodiscard]] float GetEffectiveness(uint8_t attacking, const std::unordered_set& defensive) const; uint8_t RegisterType(const ArbUt::CaseInsensitiveConstString& typeName); uint8_t RegisterType(uint32_t typeHash); void SetEffectiveness(uint8_t attacking, uint8_t defensive, float effectiveness); }; } #endif // CREATURELIB_TYPELIBRARY_HPP