Adds new Angelscript script hooks.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-03-28 18:53:08 +02:00
parent 4e215895b7
commit c89c572aa2
5 changed files with 17 additions and 1 deletions

View File

@@ -285,3 +285,12 @@ void AngelScriptScript::PreventOpponentRunAway(const CreatureLib::Battling::Flee
ctx->SetArgAddress(1, result);
})
}
void AngelScriptScript::PreventOpponentSwitch(const CreatureLib::Battling::SwitchTurnChoice* choice, bool* outResult) {
CALL_HOOK(PreventOpponentSwitch, {
ctx->SetArgObject(0, (void*)choice);
ctx->SetArgAddress(1, outResult);
})
}
void AngelScriptScript::OnEndTurn(CreatureLib::Battling::Creature* creature) {
CALL_HOOK(OnEndTurn, { ctx->SetArgObject(0, (void*)creature); })
}