Adds Angelscript function to change forme.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2021-11-21 13:46:49 +01:00
parent 67df06ef04
commit 55cebc4802
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 5 additions and 0 deletions

View File

@ -203,6 +203,11 @@ void RegisterPokemonClass::RegisterPokemonType(asIScriptEngine* engine) {
asMETHOD(PkmnLib::Battling::Pokemon, SetStatus), asCALL_THISCALL); asMETHOD(PkmnLib::Battling::Pokemon, SetStatus), asCALL_THISCALL);
Ensure(r >= 0); 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", r = engine->RegisterObjectMethod("TypeLibrary",
"float GetEffectiveness(uint8 attackingType, Pokemon@ defender) const", "float GetEffectiveness(uint8 attackingType, Pokemon@ defender) const",
asFUNCTION(GetEffectivenessHelper), asCALL_CDECL_OBJFIRST); asFUNCTION(GetEffectivenessHelper), asCALL_CDECL_OBJFIRST);