Improve attack hit timing and camera shake
This commit is contained in:
@@ -297,6 +297,7 @@ if m.block > 0 and pierce ~= true then
|
||||
m.block = m.block - absorbed
|
||||
dmg = dmg - absorbed
|
||||
end
|
||||
self:ShakeCombatCamera()
|
||||
m.hp = m.hp - dmg
|
||||
if dmg > 0 then
|
||||
local poison = self:AddPowerFieldTotal("attackPoison")
|
||||
@@ -333,6 +334,7 @@ end
|
||||
if m == nil then
|
||||
return false
|
||||
end
|
||||
self:ShakeCombatCamera()
|
||||
m.hp = m.hp - amount
|
||||
self:ShowDmgPop(m.slot, amount)
|
||||
self:MonsterHitMotion(m.slot)
|
||||
@@ -359,6 +361,7 @@ local m = alive[math.random(1, #alive)]
|
||||
if m == nil then
|
||||
return false
|
||||
end
|
||||
self:ShakeCombatCamera()
|
||||
m.hp = m.hp - amount
|
||||
self:ShowDmgPop(m.slot, amount)
|
||||
self:MonsterHitMotion(m.slot)
|
||||
@@ -393,6 +396,17 @@ end`, [
|
||||
method('DealDamageToAllMonsters', `if self.Monsters == nil then
|
||||
return false
|
||||
end
|
||||
local anyAlive = false
|
||||
for i = 1, #self.Monsters do
|
||||
local m = self.Monsters[i]
|
||||
if m ~= nil and m.alive == true then
|
||||
anyAlive = true
|
||||
break
|
||||
end
|
||||
end
|
||||
if anyAlive == true and isAttack == true then
|
||||
self:ShakeCombatCamera()
|
||||
end
|
||||
local killCount = 0
|
||||
for i = 1, #self.Monsters do
|
||||
local m = self.Monsters[i]
|
||||
@@ -572,6 +586,7 @@ end
|
||||
if dmg > 0 and self.PlayerIntangible ~= nil and self.PlayerIntangible > 0 and dmg > 1 then
|
||||
dmg = 1
|
||||
end
|
||||
self:ShakeCombatCamera()
|
||||
if dmg > 0 then
|
||||
self.PlayerHp = self.PlayerHp - dmg
|
||||
local reactiveBlock = self:AddPowerFieldTotal("blockOnDamaged")
|
||||
|
||||
Reference in New Issue
Block a user