2020-03-04 18:18:47 +00:00
|
|
|
#include "../../src/Battling/Library/MiscLibrary.hpp"
|
2020-07-31 08:51:03 +00:00
|
|
|
#include "../Core.hpp"
|
2020-03-04 18:18:47 +00:00
|
|
|
using namespace CreatureLib::Battling;
|
|
|
|
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func MiscLibrary* CreatureLib_MiscLibrary_Construct() { return new MiscLibrary(); }
|
2020-03-04 18:18:47 +00:00
|
|
|
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func void CreatureLib_MiscLibrary_Destruct(const MiscLibrary* p) { delete p; }
|
2020-03-04 18:18:47 +00:00
|
|
|
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func u8 CreatureLib_MiscLibrary_IsCritical(bool& out, MiscLibrary* p, ExecutingAttack* attack, Creature* target,
|
|
|
|
u8 hit) {
|
2020-03-25 18:07:36 +00:00
|
|
|
Try(out = p->IsCritical(attack, target, hit);)
|
2020-03-12 10:15:00 +00:00
|
|
|
};
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func u8 CreatureLib_MiscLibrary_CanFlee(bool& out, MiscLibrary* p, FleeTurnChoice* switchChoice) {
|
2020-03-25 18:07:36 +00:00
|
|
|
Try(out = p->CanFlee(switchChoice);)
|
2020-03-12 10:15:00 +00:00
|
|
|
};
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func u8 CreatureLib_MiscLibrary_ReplacementAttack(BaseTurnChoice*& out, MiscLibrary* p, Creature* user,
|
|
|
|
u8 sideTarget, u8 creatureTarget) {
|
2020-03-25 18:07:36 +00:00
|
|
|
Try(out = p->ReplacementAttack(user, CreatureIndex(sideTarget, creatureTarget));)
|
2020-03-04 18:18:47 +00:00
|
|
|
};
|