Adds a bunch of new evolution methods.
This commit is contained in:
parent
1f298cef08
commit
68e7dd5f08
|
@ -9,6 +9,12 @@ export const EvolutionData* PkmnLib_EvolutionData_CreateFriendshipEvolution(uint
|
|||
const PokemonSpecies* into) {
|
||||
return EvolutionData::CreateFriendshipEvolution(friendship, into);
|
||||
}
|
||||
export const EvolutionData* PkmnLib_EvolutionData_CreateFriendshipTimeEvolution(uint8_t friendship, TimeOfDay startTime,
|
||||
TimeOfDay endTime,
|
||||
const PokemonSpecies* into) {
|
||||
return EvolutionData::CreateFriendshipTimeEvolution(friendship, startTime, endTime, into);
|
||||
}
|
||||
|
||||
export const EvolutionData* PkmnLib_EvolutionData_CreateKnownMoveEvolution(const MoveData* move,
|
||||
const PokemonSpecies* into) {
|
||||
return EvolutionData::CreateKnownMoveEvolution(move, into);
|
||||
|
@ -17,12 +23,19 @@ export const EvolutionData* PkmnLib_EvolutionData_CreateLocationEvolution(const
|
|||
const PokemonSpecies* into) {
|
||||
return EvolutionData::CreateLocationEvolution(ArbUt::StringView(location), into);
|
||||
}
|
||||
export const EvolutionData* PkmnLib_EvolutionData_CreateTimeEvolution(TimeOfDay time, const PokemonSpecies* into) {
|
||||
return EvolutionData::CreateTimeEvolution(time, into);
|
||||
export const EvolutionData* PkmnLib_EvolutionData_CreateTimeEvolution(TimeOfDay startTime, TimeOfDay endTime,
|
||||
const PokemonSpecies* into) {
|
||||
return EvolutionData::CreateTimeEvolution(startTime, endTime, into);
|
||||
}
|
||||
export const EvolutionData* PkmnLib_EvolutionData_CreateItemEvolution(const Item* item, const PokemonSpecies* into) {
|
||||
export const EvolutionData* PkmnLib_EvolutionData_CreateHeldItemEvolution(const Item* item,
|
||||
const PokemonSpecies* into) {
|
||||
return EvolutionData::CreateHeldItemEvolution(item, into);
|
||||
}
|
||||
export const EvolutionData* PkmnLib_EvolutionData_CreateHeldItemTimeEvolution(const Item* item, TimeOfDay startTime,
|
||||
TimeOfDay endTime,
|
||||
const PokemonSpecies* into) {
|
||||
return EvolutionData::CreateHeldItemTimeEvolution(item, startTime, endTime, into);
|
||||
}
|
||||
export const EvolutionData* PkmnLib_EvolutionData_CreateGenderBasedEvolution(CreatureLib::Library::Gender gender,
|
||||
uint8_t level,
|
||||
const PokemonSpecies* into) {
|
||||
|
|
|
@ -13,6 +13,18 @@ const EvolutionData* EvolutionData::CreateHeldItemEvolution(const Item* item, co
|
|||
return new EvolutionData(EvolutionMethod::HoldsItem, {new CreatureLib::Library::EffectParameter(item->GetName())},
|
||||
into);
|
||||
}
|
||||
|
||||
const EvolutionData* EvolutionData::CreateHeldItemTimeEvolution(const Item* item, TimeOfDay startTime,
|
||||
TimeOfDay endTime, const PokemonSpecies* into) {
|
||||
return new EvolutionData(EvolutionMethod::HoldsItemTime,
|
||||
{
|
||||
new CreatureLib::Library::EffectParameter(item->GetName()),
|
||||
new CreatureLib::Library::EffectParameter((i64)startTime),
|
||||
new CreatureLib::Library::EffectParameter((i64)endTime),
|
||||
},
|
||||
into);
|
||||
}
|
||||
|
||||
const EvolutionData* EvolutionData::CreateItemUseEvolution(const Item* item, const PokemonSpecies* into) {
|
||||
return new EvolutionData(EvolutionMethod::EvolutionItemUse,
|
||||
{new CreatureLib::Library::EffectParameter(item->GetName())}, into);
|
||||
|
|
|
@ -32,17 +32,33 @@ namespace PkmnLib::Library {
|
|||
return new EvolutionData(EvolutionMethod::HighFriendship,
|
||||
{new CreatureLib::Library::EffectParameter((int64_t)friendship)}, into);
|
||||
}
|
||||
static inline const EvolutionData* CreateFriendshipTimeEvolution(uint8_t friendship, TimeOfDay startTime,
|
||||
TimeOfDay endTime,
|
||||
const PokemonSpecies* into) {
|
||||
return new EvolutionData(EvolutionMethod::HighFriendshipTime,
|
||||
{new CreatureLib::Library::EffectParameter((int64_t)friendship),
|
||||
new CreatureLib::Library::EffectParameter((int64_t)startTime),
|
||||
new CreatureLib::Library::EffectParameter((int64_t)endTime)},
|
||||
into);
|
||||
}
|
||||
static const EvolutionData* CreateKnownMoveEvolution(const MoveData* move, const PokemonSpecies* into);
|
||||
static inline const EvolutionData* CreateLocationEvolution(const ArbUt::StringView& location,
|
||||
const PokemonSpecies* into) {
|
||||
return new EvolutionData(EvolutionMethod::LocationBased,
|
||||
{new CreatureLib::Library::EffectParameter(location)}, into);
|
||||
}
|
||||
static inline const EvolutionData* CreateTimeEvolution(TimeOfDay time, const PokemonSpecies* into) {
|
||||
static inline const EvolutionData* CreateTimeEvolution(TimeOfDay startTime, TimeOfDay endTime,
|
||||
const PokemonSpecies* into) {
|
||||
return new EvolutionData(EvolutionMethod::TimeBased,
|
||||
{new CreatureLib::Library::EffectParameter((int64_t)time)}, into);
|
||||
{
|
||||
new CreatureLib::Library::EffectParameter((int64_t)startTime),
|
||||
new CreatureLib::Library::EffectParameter((int64_t)endTime),
|
||||
},
|
||||
into);
|
||||
}
|
||||
static const EvolutionData* CreateHeldItemEvolution(const Item* item, const PokemonSpecies* into);
|
||||
static const EvolutionData* CreateHeldItemTimeEvolution(const Item* item, TimeOfDay startTime,
|
||||
TimeOfDay endTime, const PokemonSpecies* into);
|
||||
static inline const EvolutionData* CreateGenderBasedEvolution(CreatureLib::Library::Gender gender,
|
||||
uint8_t level, const PokemonSpecies* into) {
|
||||
return new EvolutionData(EvolutionMethod::IsGenderAndLevel,
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
#define PKMNLIB_EVOLUTIONMETHOD_HPP
|
||||
|
||||
namespace PkmnLib::Library {
|
||||
ENUM(EvolutionMethod, uint8_t, Level, HighFriendship, KnownMove, LocationBased, TimeBased, HoldsItem,
|
||||
IsGenderAndLevel, EvolutionItemUse, EvolutionItemUseWithGender, Trade, TradeWithHeldItem,
|
||||
ENUM(EvolutionMethod, uint8_t, Level, HighFriendship, HighFriendshipTime, KnownMove, LocationBased, TimeBased,
|
||||
HoldsItem, HoldsItemTime, IsGenderAndLevel, EvolutionItemUse, EvolutionItemUseWithGender, Trade, TradeWithHeldItem,
|
||||
TradeWithSpecificPokemon, Custom)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue