2020-04-16 14:18:09 +00:00
|
|
|
#include "../../src/Library/Evolutions/EvolutionData.hpp"
|
|
|
|
#include "../Core.hpp"
|
|
|
|
using namespace PkmnLib::Library;
|
|
|
|
|
|
|
|
export const EvolutionData* PkmnLib_EvolutionData_CreateLevelEvolution(uint8_t level, const PokemonSpecies* into) {
|
|
|
|
return EvolutionData::CreateLevelEvolution(level, into);
|
|
|
|
}
|
|
|
|
export const EvolutionData* PkmnLib_EvolutionData_CreateFriendshipEvolution(uint8_t friendship,
|
|
|
|
const PokemonSpecies* into) {
|
|
|
|
return EvolutionData::CreateFriendshipEvolution(friendship, into);
|
|
|
|
}
|
2021-06-26 14:20:25 +00:00
|
|
|
export const EvolutionData* PkmnLib_EvolutionData_CreateFriendshipTimeEvolution(uint8_t friendship, TimeOfDay startTime,
|
|
|
|
TimeOfDay endTime,
|
|
|
|
const PokemonSpecies* into) {
|
|
|
|
return EvolutionData::CreateFriendshipTimeEvolution(friendship, startTime, endTime, into);
|
|
|
|
}
|
|
|
|
|
2020-04-16 14:18:09 +00:00
|
|
|
export const EvolutionData* PkmnLib_EvolutionData_CreateKnownMoveEvolution(const MoveData* move,
|
|
|
|
const PokemonSpecies* into) {
|
|
|
|
return EvolutionData::CreateKnownMoveEvolution(move, into);
|
|
|
|
}
|
|
|
|
export const EvolutionData* PkmnLib_EvolutionData_CreateLocationEvolution(const char* location,
|
|
|
|
const PokemonSpecies* into) {
|
2020-07-04 13:50:30 +00:00
|
|
|
return EvolutionData::CreateLocationEvolution(ArbUt::StringView(location), into);
|
2020-04-16 14:18:09 +00:00
|
|
|
}
|
2021-06-26 14:20:25 +00:00
|
|
|
export const EvolutionData* PkmnLib_EvolutionData_CreateTimeEvolution(TimeOfDay startTime, TimeOfDay endTime,
|
|
|
|
const PokemonSpecies* into) {
|
|
|
|
return EvolutionData::CreateTimeEvolution(startTime, endTime, into);
|
2020-04-16 14:18:09 +00:00
|
|
|
}
|
2021-06-26 14:20:25 +00:00
|
|
|
export const EvolutionData* PkmnLib_EvolutionData_CreateHeldItemEvolution(const Item* item,
|
|
|
|
const PokemonSpecies* into) {
|
2020-04-16 14:18:09 +00:00
|
|
|
return EvolutionData::CreateHeldItemEvolution(item, into);
|
|
|
|
}
|
2021-06-26 14:20:25 +00:00
|
|
|
export const EvolutionData* PkmnLib_EvolutionData_CreateHeldItemTimeEvolution(const Item* item, TimeOfDay startTime,
|
|
|
|
TimeOfDay endTime,
|
|
|
|
const PokemonSpecies* into) {
|
|
|
|
return EvolutionData::CreateHeldItemTimeEvolution(item, startTime, endTime, into);
|
|
|
|
}
|
2020-08-08 12:55:26 +00:00
|
|
|
export const EvolutionData* PkmnLib_EvolutionData_CreateGenderBasedEvolution(CreatureLib::Library::Gender gender,
|
|
|
|
uint8_t level,
|
|
|
|
const PokemonSpecies* into) {
|
2020-04-16 14:18:09 +00:00
|
|
|
return EvolutionData::CreateGenderBasedEvolution(gender, level, into);
|
|
|
|
}
|
2020-08-08 12:55:26 +00:00
|
|
|
export const EvolutionData* PkmnLib_EvolutionData_CreateItemUseEvolution(const Item* item, const PokemonSpecies* into) {
|
2020-04-16 14:18:09 +00:00
|
|
|
return EvolutionData::CreateItemUseEvolution(item, into);
|
|
|
|
}
|
|
|
|
|
2020-08-08 12:55:26 +00:00
|
|
|
export const EvolutionData* PkmnLib_EvolutionData_CreateItemUseWithGenderEvolution(const Item* item,
|
|
|
|
CreatureLib::Library::Gender gender,
|
|
|
|
const PokemonSpecies* into) {
|
2020-04-16 14:18:09 +00:00
|
|
|
return EvolutionData::CreateItemUseWithGenderEvolution(item, gender, into);
|
|
|
|
}
|
2020-08-08 12:55:26 +00:00
|
|
|
export const EvolutionData* PkmnLib_EvolutionData_CreateTradeEvolution(const PokemonSpecies* into) {
|
2020-04-16 14:18:09 +00:00
|
|
|
return EvolutionData::CreateTradeEvolution(into);
|
|
|
|
}
|
2020-08-08 12:55:26 +00:00
|
|
|
export const EvolutionData* PkmnLib_EvolutionData_CreateTradeWithItemEvolution(const Item* item,
|
|
|
|
const PokemonSpecies* into) {
|
2020-04-16 14:18:09 +00:00
|
|
|
return EvolutionData::CreateTradeWithItemEvolution(item, into);
|
|
|
|
}
|
2020-08-08 12:55:26 +00:00
|
|
|
export const EvolutionData* PkmnLib_EvolutionData_CreateTradeWithSpeciesEvolution(const PokemonSpecies* traded,
|
|
|
|
const PokemonSpecies* into) {
|
2020-04-16 14:18:09 +00:00
|
|
|
return EvolutionData::CreateTradeWithSpeciesEvolution(traded, into);
|
|
|
|
}
|
2020-08-08 12:55:26 +00:00
|
|
|
export const EvolutionData*
|
|
|
|
PkmnLib_EvolutionData_CreateCustomEvolution(const CreatureLib::Library::EffectParameter** data, size_t dataLength,
|
|
|
|
const PokemonSpecies* into) {
|
2020-06-02 18:37:21 +00:00
|
|
|
auto list = std::vector<const CreatureLib::Library::EffectParameter*>(data, data + dataLength);
|
2020-04-16 14:18:09 +00:00
|
|
|
return EvolutionData::CreateCustomEvolution(list, into);
|
|
|
|
}
|
|
|
|
|
2020-08-08 12:55:26 +00:00
|
|
|
export EvolutionMethod PkmnLib_EvolutionData_GetMethod(const EvolutionData* data) { return data->GetMethod(); }
|
|
|
|
export const PokemonSpecies* PkmnLib_EvolutionData_GetNewSpecies(const EvolutionData* data) {
|
2020-06-02 18:37:21 +00:00
|
|
|
return data->GetNewSpecies().GetRaw();
|
2020-04-16 14:18:09 +00:00
|
|
|
}
|
2020-08-08 12:55:26 +00:00
|
|
|
export size_t PkmnLib_EvolutionData_GetDataCount(const EvolutionData* data) { return data->GetDataCount(); }
|
2021-09-25 15:56:31 +00:00
|
|
|
export uint8_t PkmnLib_EvolutionData_GetDataAt(const EvolutionData* data, size_t index,
|
2020-08-08 12:55:26 +00:00
|
|
|
const CreatureLib::Library::EffectParameter*& out) {
|
2021-09-25 15:56:31 +00:00
|
|
|
Try(out = data->GetDataAt(index).GetRaw());
|
2020-04-16 14:18:09 +00:00
|
|
|
}
|