20 lines
973 B
C++
20 lines
973 B
C++
#include "../../src/Battling/Library/MiscLibrary.hpp"
|
|
#include "../Core.hpp"
|
|
using namespace CreatureLib::Battling;
|
|
|
|
export_func MiscLibrary* CreatureLib_MiscLibrary_Construct() { return new MiscLibrary(); }
|
|
|
|
export_func void CreatureLib_MiscLibrary_Destruct(const MiscLibrary* p) { delete p; }
|
|
|
|
export_func u8 CreatureLib_MiscLibrary_IsCritical(bool& out, MiscLibrary* p, ExecutingAttack* attack, Creature* target,
|
|
u8 hit) {
|
|
Try(out = p->IsCritical(attack, target, hit);)
|
|
};
|
|
export_func u8 CreatureLib_MiscLibrary_CanFlee(bool& out, MiscLibrary* p, FleeTurnChoice* switchChoice) {
|
|
Try(out = p->CanFlee(switchChoice);)
|
|
};
|
|
export_func u8 CreatureLib_MiscLibrary_ReplacementAttack(BaseTurnChoice*& out, MiscLibrary* p, Creature* user,
|
|
u8 sideTarget, u8 creatureTarget) {
|
|
Try(out = p->ReplacementAttack(user, CreatureIndex(sideTarget, creatureTarget));)
|
|
};
|