Support for adding and replacing attacks.
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
2020-08-12 17:51:06 +02:00
parent e39b352934
commit 9c6d149ad9
7 changed files with 51 additions and 8 deletions

View File

@@ -111,4 +111,10 @@ export uint32_t CreatureLib_Creature_GetBaseStat(Creature* p, CreatureLib::Libra
}
export int8_t CreatureLib_Creature_GetStatBoost(Creature* p, CreatureLib::Library::Statistic stat) {
return p->GetStatBoost(stat);
}
SIMPLE_GET_FUNC(Creature, GetAvailableAttackSlot, uint8_t);
export uint8_t CreatureLib_Creature_AddAttack(Creature* p, LearnedAttack* attack) { Try(p->AddAttack(attack);) }
export uint8_t CreatureLib_Creature_ReplaceAttack(Creature* p, size_t index, LearnedAttack* attack) {
Try(p->ReplaceAttack(index, attack);)
}

View File

@@ -9,4 +9,4 @@ export const LibrarySettings* CreatureLib_LibrarySettings_Construct(uint8_t maxi
export void CreatureLib_LibrarySettings_Destruct(const LibrarySettings* p) { delete p; }
SIMPLE_GET_FUNC(LibrarySettings, GetMaximalLevel, uint8_t);
SIMPLE_GET_FUNC(LibrarySettings, GetMaximalMoves, uint8_t);
SIMPLE_GET_FUNC(LibrarySettings, GetMaximalAttacks, uint8_t);