Battle C Interface.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "RegisterExecutingAttack.hpp"
|
||||
#include <CreatureLib/Battling/Models/ExecutingAttack.hpp>
|
||||
#include <cassert>
|
||||
#include <Arbutils/Assert.hpp>
|
||||
|
||||
void RegisterExecutingAttack::Register(asIScriptEngine* engine) {
|
||||
RegisterHitData(engine);
|
||||
@@ -8,46 +8,46 @@ void RegisterExecutingAttack::Register(asIScriptEngine* engine) {
|
||||
}
|
||||
void RegisterExecutingAttack::RegisterHitData(asIScriptEngine* engine) {
|
||||
[[maybe_unused]] int r = engine->RegisterObjectType("HitData", 0, asOBJ_REF | asOBJ_NOCOUNT);
|
||||
assert(r >= 0);
|
||||
Assert(r >= 0);
|
||||
r = engine->RegisterObjectMethod("HitData", "bool get_IsCritical() const property",
|
||||
asMETHOD(CreatureLib::Battling::ExecutingAttack::HitData, IsCritical),
|
||||
asCALL_THISCALL);
|
||||
assert(r >= 0);
|
||||
Assert(r >= 0);
|
||||
r = engine->RegisterObjectMethod("HitData", "uint8 get_BasePower() const property",
|
||||
asMETHOD(CreatureLib::Battling::ExecutingAttack::HitData, GetBasePower),
|
||||
asCALL_THISCALL);
|
||||
assert(r >= 0);
|
||||
Assert(r >= 0);
|
||||
r = engine->RegisterObjectMethod("HitData", "float get_Effectiveness() const property",
|
||||
asMETHOD(CreatureLib::Battling::ExecutingAttack::HitData, GetEffectiveness),
|
||||
asCALL_THISCALL);
|
||||
assert(r >= 0);
|
||||
Assert(r >= 0);
|
||||
r = engine->RegisterObjectMethod("HitData", "uint get_Damage() const property",
|
||||
asMETHOD(CreatureLib::Battling::ExecutingAttack::HitData, GetDamage),
|
||||
asCALL_THISCALL);
|
||||
assert(r >= 0);
|
||||
Assert(r >= 0);
|
||||
r = engine->RegisterObjectMethod("HitData", "uint8 get_Type() const property",
|
||||
asMETHOD(CreatureLib::Battling::ExecutingAttack::HitData, GetType),
|
||||
asCALL_THISCALL);
|
||||
assert(r >= 0);
|
||||
Assert(r >= 0);
|
||||
}
|
||||
void RegisterExecutingAttack::RegisterExecutingAttackType(asIScriptEngine* engine) {
|
||||
[[maybe_unused]] int r = engine->RegisterObjectType("ExecutingMove", 0, asOBJ_REF | asOBJ_NOCOUNT);
|
||||
assert(r >= 0);
|
||||
Assert(r >= 0);
|
||||
r = engine->RegisterObjectMethod("ExecutingMove", "HitData@ GetHitData(Pokemon@ target, uint8 hit) const",
|
||||
asMETHOD(CreatureLib::Battling::ExecutingAttack, GetHitData),
|
||||
asCALL_THISCALL);
|
||||
assert(r >= 0);
|
||||
Assert(r >= 0);
|
||||
r = engine->RegisterObjectMethod("ExecutingMove", "bool IsPokemonTarget(Pokemon@ pkmn) const",
|
||||
asMETHOD(CreatureLib::Battling::ExecutingAttack, IsCreatureTarget),
|
||||
asCALL_THISCALL);
|
||||
assert(r >= 0);
|
||||
Assert(r >= 0);
|
||||
r = engine->RegisterObjectMethod("ExecutingMove", "Pokemon@ get_User() const property",
|
||||
asMETHOD(CreatureLib::Battling::ExecutingAttack, GetUser),
|
||||
asCALL_THISCALL);
|
||||
assert(r >= 0);
|
||||
Assert(r >= 0);
|
||||
r = engine->RegisterObjectMethod("ExecutingMove", "LearnedMove@ get_Move() const property",
|
||||
asMETHOD(CreatureLib::Battling::ExecutingAttack, GetAttack),
|
||||
asCALL_THISCALL);
|
||||
assert(r >= 0);
|
||||
Assert(r >= 0);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user