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

This commit is contained in:
2021-03-27 15:34:04 +01:00
parent 793daeae80
commit 5cfa174396
6 changed files with 48 additions and 4 deletions

View File

@@ -273,3 +273,15 @@ void AngelScriptScript::OnFail(CreatureLib::Battling::Creature* target) {
void AngelScriptScript::OnOpponentFail(CreatureLib::Battling::Creature* target) {
CALL_HOOK(OnOpponentFail, { ctx->SetArgObject(0, (void*)target); })
}
void AngelScriptScript::PreventRunAway(const CreatureLib::Battling::FleeTurnChoice* choice, bool* result) {
CALL_HOOK(PreventRunAway, {
ctx->SetArgObject(0, (void*)choice);
ctx->SetArgAddress(1, result);
})
}
void AngelScriptScript::PreventOpponentRunAway(const CreatureLib::Battling::FleeTurnChoice* choice, bool* result) {
CALL_HOOK(PreventOpponentRunAway, {
ctx->SetArgObject(0, (void*)choice);
ctx->SetArgAddress(1, result);
})
}