2020-03-04 17:50:16 +00:00
|
|
|
#include "../../src/Battling/Library/DamageLibrary.hpp"
|
2020-07-31 08:51:03 +00:00
|
|
|
#include "../Core.hpp"
|
2020-03-04 17:50:16 +00:00
|
|
|
using namespace CreatureLib::Battling;
|
|
|
|
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func const DamageLibrary* CreatureLib_DamageLibrary_Construct() { return new DamageLibrary(); }
|
2020-03-04 17:50:16 +00:00
|
|
|
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func void CreatureLib_DamageLibrary_Destruct(const DamageLibrary* p) { delete p; }
|
2020-03-04 17:50:16 +00:00
|
|
|
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func u8 CreatureLib_DamageLibrary_GetDamage(u32& out, const DamageLibrary* p, ExecutingAttack* attack,
|
|
|
|
Creature* target, u8 hitIndex, ExecutingAttack::HitData* hitData) {
|
2020-04-25 14:51:10 +00:00
|
|
|
Try(out = p->GetDamage(attack, target, hitIndex, *hitData);)
|
2020-03-04 17:50:16 +00:00
|
|
|
}
|
|
|
|
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func u8 CreatureLib_DamageLibrary_GetBasePower(u8& out, const DamageLibrary* p, ExecutingAttack* attack,
|
|
|
|
Creature* target, u8 hitIndex,
|
|
|
|
ExecutingAttack::HitData* hitData) {
|
2020-04-25 14:51:10 +00:00
|
|
|
Try(out = p->GetBasePower(attack, target, hitIndex, *hitData);)
|
2020-03-04 17:50:16 +00:00
|
|
|
}
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func u8 CreatureLib_DamageLibrary_GetStatModifier(float& out, const DamageLibrary* p, ExecutingAttack* attack,
|
|
|
|
Creature* target, u8 hitIndex,
|
|
|
|
ExecutingAttack::HitData* hitData) {
|
2020-05-20 13:02:53 +00:00
|
|
|
Try(out = p->GetStatModifier(attack, target, hitIndex, *hitData);)
|
|
|
|
}
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func u8 CreatureLib_DamageLibrary_GetDamageModifier(float& out, const DamageLibrary* p, ExecutingAttack* attack,
|
|
|
|
Creature* target, u8 hitIndex,
|
|
|
|
ExecutingAttack::HitData* hitData) {
|
2020-04-25 14:51:10 +00:00
|
|
|
Try(out = p->GetDamageModifier(attack, target, hitIndex, *hitData);)
|
2020-03-04 17:50:16 +00:00
|
|
|
}
|