2020-04-04 11:36:13 +00:00
|
|
|
#include "../../src/Battling/Models/LearnedAttack.hpp"
|
2020-07-31 08:51:03 +00:00
|
|
|
#include "../Core.hpp"
|
2020-04-04 11:36:13 +00:00
|
|
|
using namespace CreatureLib::Battling;
|
|
|
|
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func u8 CreatureLib_LearnedAttack_Construct(LearnedAttack*& out, const CreatureLib::Library::AttackData* attack,
|
|
|
|
u8 maxUses, AttackLearnMethod learnMethod) {
|
2020-05-26 16:31:06 +00:00
|
|
|
Try(out = new LearnedAttack(ArbUt::BorrowedPtr<const CreatureLib::Library::AttackData>(attack), maxUses,
|
|
|
|
learnMethod);)
|
2020-04-04 11:36:13 +00:00
|
|
|
}
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func void CreatureLib_LearnedAttack_Destruct(LearnedAttack* p) { delete p; }
|
2020-04-04 11:36:13 +00:00
|
|
|
|
2020-07-07 13:33:43 +00:00
|
|
|
BORROWED_GET_FUNC(LearnedAttack, GetAttack, const CreatureLib::Library::AttackData*);
|
2022-03-23 12:56:45 +00:00
|
|
|
SIMPLE_GET_FUNC(LearnedAttack, GetMaxUses, u8);
|
|
|
|
SIMPLE_GET_FUNC(LearnedAttack, GetRemainingUses, u8);
|
2020-04-04 11:36:13 +00:00
|
|
|
SIMPLE_GET_FUNC(LearnedAttack, GetLearnMethod, AttackLearnMethod);
|
|
|
|
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func bool CreatureLib_LearnedAttack_TryUse(LearnedAttack* p, u8 uses) { return p->TryUse(uses); }
|
|
|
|
export_func void CreatureLib_LearnedAttack_DecreaseUses(LearnedAttack* p, u8 uses) { p->DecreaseUses(uses); }
|
|
|
|
export_func void CreatureLib_LearnedAttack_RestoreUses(LearnedAttack* p, u8 uses) { p->RestoreUses(uses); }
|
|
|
|
export_func void CreatureLib_LearnedAttack_RestoreAllUses(LearnedAttack* p) { p->RestoreAllUses(); }
|