From 57c142a11a6d4a26b1232b3c0c95acd383b2c065 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sun, 16 Feb 2020 16:55:46 +0100 Subject: [PATCH] Add Stat boost change script function in AngelScript. --- .../AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp index 83b26e5..e83defc 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp @@ -144,6 +144,9 @@ void RegisterPokemonClass::RegisterPokemonType(asIScriptEngine* engine) { r = engine->RegisterObjectMethod("Pokemon", "LearnedMove@[]@ GetMoves() const", asFUNCTION(GetMoves), asCALL_CDECL_OBJLAST); assert(r >= 0); + r = engine->RegisterObjectMethod("Pokemon", "void ChangeStatBoost(Statistic stat, int8 amount)", + asMETHOD(PkmnLib::Battling::Pokemon, GetDisplaySpecies), asCALL_THISCALL); + assert(r >= 0); r = engine->RegisterObjectMethod("Pokemon", "const Species@ get_DisplaySpecies() const property", asMETHOD(PkmnLib::Battling::Pokemon, GetDisplaySpecies), asCALL_THISCALL); assert(r >= 0);