From 55cebc4802c5e40881e8f9c960d46dbb6ea80ff0 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sun, 21 Nov 2021 13:46:49 +0100 Subject: [PATCH] Adds Angelscript function to change forme. --- .../TypeRegistry/Battling/RegisterPokemonClass.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp index 3bb87f7..e309637 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp @@ -203,6 +203,11 @@ void RegisterPokemonClass::RegisterPokemonType(asIScriptEngine* engine) { asMETHOD(PkmnLib::Battling::Pokemon, SetStatus), asCALL_THISCALL); Ensure(r >= 0); + r = engine->RegisterObjectMethod( + "Pokemon", "void ChangeForme(const constString& name)", + asMETHODPR(PkmnLib::Battling::Pokemon, ChangeVariant, (const ArbUt::StringView&), void), asCALL_THISCALL); + Ensure(r >= 0); + r = engine->RegisterObjectMethod("TypeLibrary", "float GetEffectiveness(uint8 attackingType, Pokemon@ defender) const", asFUNCTION(GetEffectivenessHelper), asCALL_CDECL_OBJFIRST);