Adds OnIncomingHit script hook.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-11-19 18:01:58 +01:00
parent aaadbfb4f2
commit f811fc0654
2 changed files with 4 additions and 0 deletions

View File

@@ -255,6 +255,7 @@ void TurnHandler::HandleAttackForTarget(ExecutingAttack* attack, const ArbUt::Bo
}
if (damage > 0) {
target->Damage(damage, DamageSource::AttackDamage);
HOOK(OnIncomingHit, target, attack, target.GetRaw(), hitIndex);
if (attackData->HasSecondaryEffect() && !user->IsFainted()) {
bool preventSecondary = false;