Support for failing a MoveTurnChoice in Angelscript.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2021-11-12 13:00:34 +01:00
parent 5334ad14da
commit 46538092bf
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 6 additions and 0 deletions

View File

@ -39,6 +39,12 @@ void RegisterTurnChoices::RegisterMoveTurnChoice(asIScriptEngine* engine) {
GetAttack);
REGISTER_GETTER("MoveTurnChoice", "int8 get_Priority() const property", CreatureLib::Battling::AttackTurnChoice,
GetPriority);
REGISTER_GETTER("MoveTurnChoice", "bool get_HasFailed() const property", CreatureLib::Battling::AttackTurnChoice,
HasFailed);
r = engine->RegisterObjectMethod("MoveTurnChoice", "void Fail()",
asMETHOD(CreatureLib::Battling::AttackTurnChoice, Fail), asCALL_THISCALL);
Ensure(r >= 0);
r = engine->RegisterObjectMethod(
"BaseTurnChoice", "MoveTurnChoice@ opCast()",