fix: fix a crash

This commit is contained in:
Kazhnuz 2021-05-16 08:36:06 +02:00
parent 6818a441df
commit 8c9f814370

View file

@ -84,7 +84,7 @@ end
function FighterParent:receiveDamage(value, type, element, isSpecial, fromWho)
local damages = battleutils.computeReceivingDamages(value, self:getStats(), isSpecial, self.isDefending)
damages = battleutils.applyProtectTypes(damages, type, self:getProtecTypes())
damages = battleutils.applyProtectTypes(damages, type, self.abstract:getProtecTypes())
if (battleutils.isAttackSuccess(nil)) then
self:applyDamage(damages)