2020-04-04 16:24:59 +00:00
|
|
|
#include "../../src/Battling/Models/BattleRandom.hpp"
|
2020-07-30 18:06:23 +00:00
|
|
|
#include "Core.hpp"
|
2020-04-04 16:24:59 +00:00
|
|
|
using namespace CreatureLib::Battling;
|
|
|
|
|
|
|
|
export BattleRandom* CreatureLib_BattleRandom_Construct() { return new BattleRandom(); }
|
|
|
|
export BattleRandom* CreatureLib_BattleRandom_ConstructWithSeed(uint_fast32_t seed) { return new BattleRandom(seed); }
|
|
|
|
|
|
|
|
export void CreatureLib_BattleRandom_Destruct(BattleRandom* p) { delete p; }
|
|
|
|
|
|
|
|
export uint8_t CreatureLib_BattleRandom_EffectChance(bool& out, BattleRandom* p, float chance, ExecutingAttack* attack,
|
|
|
|
Creature* target) {
|
|
|
|
Try(out = p->EffectChance(chance, attack, target);)
|
|
|
|
}
|
|
|
|
|
|
|
|
export int32_t CreatureLib_BattleRandom_Get(BattleRandom* p) { return p->Get(); }
|
|
|
|
export int32_t CreatureLib_BattleRandom_GetMax(BattleRandom* p, int32_t max) { return p->Get(max); }
|
|
|
|
export int32_t CreatureLib_BattleRandom_GetMinMax(BattleRandom* p, int32_t min, int32_t max) {
|
|
|
|
return p->Get(min, max);
|
|
|
|
}
|
|
|
|
export uint_fast32_t CreatureLib_BattleRandom_GetSeed(BattleRandom* p) { return p->GetSeed(); }
|