#include "../../src/Library/Species/PokemonForme.hpp" #include "../../src/Library/Species/LearnableMoves.hpp" #include "../Core.hpp" using namespace PkmnLib::Library; export_func PokemonForme* PkmnLib_PokemonForme_Construct(const char* name, float height, float weight, uint32_t baseExperience, uint8_t types[], size_t typeLength, uint16_t baseHealth, uint16_t baseAttack, uint16_t baseDefense, uint16_t baseMagicalAttack, uint16_t baseMagicalDefense, uint16_t baseSpeed, const CreatureLib::Library::Talent* talents[], size_t talentsLength, const CreatureLib::Library::Talent* secretTalents[], size_t secretTalentsLength, const LearnableMoves* attacks, const char* flags[], size_t flagsCount) { std::unordered_set conversedFlags(flagsCount); for (size_t i = 0; i < flagsCount; i++) { conversedFlags.insert(ArbUt::StringView::CalculateHash(flags[i])); } auto talentsWrapped = ArbUt::List>(talentsLength); for (size_t i = 0; i < talentsLength; i++) { talentsWrapped.Append(talents[i]); } auto secretTalentsWrapped = ArbUt::List>(secretTalentsLength); for (size_t i = 0; i < secretTalentsLength; i++) { secretTalentsWrapped.Append(secretTalents[i]); } return new PokemonForme(ArbUt::StringView(name), height, weight, baseExperience, ArbUt::List(types, types + typeLength), CreatureLib::Library::StatisticSet( baseHealth, baseAttack, baseDefense, baseMagicalAttack, baseMagicalDefense, baseSpeed), talentsWrapped, secretTalentsWrapped, attacks, conversedFlags); }