This commit is contained in:
2 files changed
+5
-1
No files matched your search
@@ -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));
|
||||
|
||||
@@ -37,6 +37,8 @@ namespace CreatureLib::Battling {
|
||||
virtual void IsInvulnerable(ExecutingAttack* attack, Creature* target, bool* outResult){};
|
||||
virtual void OnAttackMiss(ExecutingAttack* attack, Creature* target){};
|
||||
virtual void ChangeAttackType(ExecutingAttack* attack, Creature* target, uint8_t hitNumber, uint8_t* outType){};
|
||||
virtual void ChangeEffectiveness(ExecutingAttack* attack, Creature* target, uint8_t hitNumber,
|
||||
float* effectiveness){};
|
||||
|
||||
virtual void OverrideBasePower(ExecutingAttack* attack, Creature* target, uint8_t hitIndex,
|
||||
uint8_t* basePower){};
|
||||
|
||||
Reference in new issue
Block a user