Add ChangeEffectiveness script hook.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -148,7 +148,9 @@ void TurnHandler::HandleAttackForTarget(ExecutingAttack* attack, Creature* targe
|
||||
|
||||
auto hitType = hit->GetType();
|
||||
HOOK(ChangeAttackType, targetSource, attack, target, hitIndex, &hitType);
|
||||
hit->SetEffectiveness(library->GetTypeLibrary()->GetEffectiveness(hitType, target->GetTypes()));
|
||||
auto effectiveness = library->GetTypeLibrary()->GetEffectiveness(hitType, target->GetTypes());
|
||||
HOOK(ChangeEffectiveness, attack, attack, target, hitIndex, &effectiveness)
|
||||
hit->SetEffectiveness(effectiveness);
|
||||
hit->SetCritical(library->GetMiscLibrary()->IsCritical(attack, target, hitIndex));
|
||||
hit->SetBasePower(dmgLibrary->GetBasePower(attack, target, hitIndex));
|
||||
hit->SetDamage(dmgLibrary->GetDamage(attack, target, hitIndex));
|
||||
|
||||
Reference in New Issue
Block a user