CreatureLib/CInterface/Battling/DamageLibrary.cpp

26 lines
1.4 KiB
C++

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