CreatureLib/CInterface/Battling/DamageLibrary.cpp

29 lines
1.7 KiB
C++

#include "../../src/Battling/Library/DamageLibrary.hpp"
#include "../Core.hpp"
using namespace CreatureLib::Battling;
export_func const DamageLibrary* CreatureLib_DamageLibrary_Construct() { return new DamageLibrary(); }
export_func void CreatureLib_DamageLibrary_Destruct(const DamageLibrary* p) { delete p; }
export_func u8 CreatureLib_DamageLibrary_GetDamage(u32& out, const DamageLibrary* p, ExecutingAttack* attack,
Creature* target, u8 hitIndex, ExecutingAttack::HitData* hitData) {
Try(out = p->GetDamage(attack, target, hitIndex, *hitData);)
}
export_func u8 CreatureLib_DamageLibrary_GetBasePower(u8& out, const DamageLibrary* p, ExecutingAttack* attack,
Creature* target, u8 hitIndex,
ExecutingAttack::HitData* hitData) {
Try(out = p->GetBasePower(attack, target, hitIndex, *hitData);)
}
export_func u8 CreatureLib_DamageLibrary_GetStatModifier(float& out, const DamageLibrary* p, ExecutingAttack* attack,
Creature* target, u8 hitIndex,
ExecutingAttack::HitData* hitData) {
Try(out = p->GetStatModifier(attack, target, hitIndex, *hitData);)
}
export_func u8 CreatureLib_DamageLibrary_GetDamageModifier(float& out, const DamageLibrary* p, ExecutingAttack* attack,
Creature* target, u8 hitIndex,
ExecutingAttack::HitData* hitData) {
Try(out = p->GetDamageModifier(attack, target, hitIndex, *hitData);)
}