Support swapping attacks.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
parent
9c6d149ad9
commit
51325943ab
|
@ -117,4 +117,5 @@ 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_AddAttack(Creature* p, LearnedAttack* attack) { Try(p->AddAttack(attack);) }
|
||||||
export uint8_t CreatureLib_Creature_ReplaceAttack(Creature* p, size_t index, LearnedAttack* attack) {
|
export uint8_t CreatureLib_Creature_ReplaceAttack(Creature* p, size_t index, LearnedAttack* attack) {
|
||||||
Try(p->ReplaceAttack(index, attack);)
|
Try(p->ReplaceAttack(index, attack);)
|
||||||
}
|
}
|
||||||
|
export uint8_t CreatureLib_Creature_SwapAttack(Creature* p, size_t a, size_t b) { Try(p->SwapAttacks(a, b);) }
|
|
@ -164,6 +164,7 @@ namespace CreatureLib::Battling {
|
||||||
uint8_t GetAvailableAttackSlot() const noexcept;
|
uint8_t GetAvailableAttackSlot() const noexcept;
|
||||||
void AddAttack(LearnedAttack* attack);
|
void AddAttack(LearnedAttack* attack);
|
||||||
void ReplaceAttack(size_t index, LearnedAttack* attack);
|
void ReplaceAttack(size_t index, LearnedAttack* attack);
|
||||||
|
void SwapAttacks(size_t a, size_t b) { _attacks.Swap(a, b); }
|
||||||
|
|
||||||
// region Stat APIs
|
// region Stat APIs
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue