Adds angelscript getter for current turn of battle.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2021-08-23 21:26:48 +02:00
parent 8919ae4b02
commit e320e32226
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 4 additions and 0 deletions

View File

@ -100,6 +100,10 @@ void RegisterBattleClass::RegisterBattle(asIScriptEngine* engine) {
r = engine->RegisterObjectMethod("Battle", "bool get_CanFlee() const property", r = engine->RegisterObjectMethod("Battle", "bool get_CanFlee() const property",
asMETHOD(PkmnLib::Battling::Battle, CanFlee), asCALL_THISCALL); asMETHOD(PkmnLib::Battling::Battle, CanFlee), asCALL_THISCALL);
Ensure(r >= 0); Ensure(r >= 0);
r = engine->RegisterObjectMethod("Battle", "uint get_CurrentTurn() const property",
asMETHOD(PkmnLib::Battling::Battle, GetCurrentTurn), asCALL_THISCALL);
Ensure(r >= 0);
r = engine->RegisterObjectMethod("Battle", "BattleRandom@ get_Random() const property", r = engine->RegisterObjectMethod("Battle", "BattleRandom@ get_Random() const property",
asMETHOD(PkmnLib::Battling::Battle, GetRandom), asCALL_THISCALL); asMETHOD(PkmnLib::Battling::Battle, GetRandom), asCALL_THISCALL);
Ensure(r >= 0); Ensure(r >= 0);