Adds script hook for overriding incoming damage.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
parent
0b9028ea97
commit
316ac12a01
|
@ -13,6 +13,7 @@ uint32_t DamageLibrary::GetDamage(ExecutingAttack* attack, Creature* target, uin
|
|||
uint32_t damage = static_cast<uint32_t>((((levelMod * static_cast<float>(bp) * statMod) / 50) + 2) *
|
||||
GetDamageModifier(attack, target, hitIndex, hitData));
|
||||
HOOK(OverrideDamage, attack, attack, target, hitIndex, &damage);
|
||||
HOOK(OverrideIncomingDamage, target, attack, target, hitIndex, &damage);
|
||||
return damage;
|
||||
}
|
||||
|
||||
|
|
|
@ -63,6 +63,8 @@ namespace CreatureLib::Battling {
|
|||
[[maybe_unused]] u8 hitIndex, [[maybe_unused]] float* modifier){};
|
||||
virtual void OverrideDamage([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target,
|
||||
[[maybe_unused]] u8 hitIndex, [[maybe_unused]] u32* damage){};
|
||||
virtual void OverrideIncomingDamage([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target,
|
||||
[[maybe_unused]] u8 hitIndex, [[maybe_unused]] u32* damage){};
|
||||
|
||||
virtual void PreventSecondaryEffects([[maybe_unused]] const ExecutingAttack* attack,
|
||||
[[maybe_unused]] Creature* target, [[maybe_unused]] u8 hitNumber,
|
||||
|
|
Loading…
Reference in New Issue