2020-03-04 18:18:47 +00:00
|
|
|
#include "../../src/Battling/Library/MiscLibrary.hpp"
|
|
|
|
#define export extern "C"
|
|
|
|
using namespace CreatureLib::Battling;
|
|
|
|
|
|
|
|
export MiscLibrary* CreatureLib_MiscLibrary_Construct() { return new MiscLibrary(); }
|
|
|
|
|
|
|
|
export void CreatureLib_MiscLibrary_Destruct(const MiscLibrary* p) { delete p; }
|
|
|
|
|
2020-03-12 10:15:00 +00:00
|
|
|
export bool CreatureLib_MiscLibrary_IsCritical(MiscLibrary* p, ExecutingAttack* attack, Creature* target, uint8_t hit) {
|
|
|
|
return p->IsCritical(attack, target, hit);
|
|
|
|
};
|
|
|
|
export bool CreatureLib_MiscLibrary_CanFlee(MiscLibrary* p, FleeTurnChoice* switchChoice) {
|
|
|
|
return p->CanFlee(switchChoice);
|
|
|
|
};
|
|
|
|
export BaseTurnChoice* CreatureLib_MiscLibrary_ReplacementAttack(MiscLibrary* p, Creature* user, uint8_t sideTarget,
|
|
|
|
uint8_t creatureTarget) {
|
|
|
|
return p->ReplacementAttack(user, CreatureIndex(sideTarget, creatureTarget));
|
2020-03-04 18:18:47 +00:00
|
|
|
};
|