CreatureLib/CInterface/Battling/MiscLibrary.cpp

20 lines
975 B
C++
Raw Normal View History

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