Support Pokemon style experience gain.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2020-05-20 16:05:52 +02:00
parent a19965c1c3
commit 6c7c460640
17 changed files with 116 additions and 30 deletions

View File

@@ -4,10 +4,12 @@ using namespace PkmnLib::Library;
export uint8_t PkmnLib_PokemonSpecies_Construct(const PokemonSpecies*& out, uint16_t id, const char* name,
const PokemonForme* defaultForme, float genderRatio,
const char* growthRate, uint8_t captureRate, uint8_t baseHappiness) {
const char* growthRate, uint8_t captureRate, uint8_t baseHappiness,
uint16_t experienceGain) {
Try(auto cName = Arbutils::CaseInsensitiveConstString(name);
auto cGrowthRate = Arbutils::CaseInsensitiveConstString(growthRate);
out = new PokemonSpecies(id, cName, defaultForme, genderRatio, cGrowthRate, captureRate, baseHappiness);)
out = new PokemonSpecies(id, cName, defaultForme, genderRatio, cGrowthRate, captureRate, baseHappiness,
experienceGain);)
}
export void PkmnLib_PokemonSpecies_Destruct(const PokemonSpecies* p) { delete p; }