diff --git a/CInterface/Battling/Creature.cpp b/CInterface/Battling/Creature.cpp index 4004cb2..232ea28 100644 --- a/CInterface/Battling/Creature.cpp +++ b/CInterface/Battling/Creature.cpp @@ -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_ReplaceAttack(Creature* p, size_t index, LearnedAttack* attack) { Try(p->ReplaceAttack(index, attack);) -} \ No newline at end of file +} +export uint8_t CreatureLib_Creature_SwapAttack(Creature* p, size_t a, size_t b) { Try(p->SwapAttacks(a, b);) } \ No newline at end of file diff --git a/src/Battling/Models/Creature.hpp b/src/Battling/Models/Creature.hpp index d21b768..cb639d8 100644 --- a/src/Battling/Models/Creature.hpp +++ b/src/Battling/Models/Creature.hpp @@ -164,6 +164,7 @@ namespace CreatureLib::Battling { uint8_t GetAvailableAttackSlot() const noexcept; void AddAttack(LearnedAttack* attack); void ReplaceAttack(size_t index, LearnedAttack* attack); + void SwapAttacks(size_t a, size_t b) { _attacks.Swap(a, b); } // region Stat APIs