battle
parent
069d544420
commit
afd51eb5b1
|
@ -129,7 +129,7 @@ local passivityList = {
|
|||
BattleUtil.RandomAction(f1, function ()
|
||||
local arr = BattleUtil.ChooseTarget(role, 10001)
|
||||
if arr[1] then
|
||||
arr[1]:AddBuff(Buff.Create(role, BuffName.PropertyChange, f3, propertyList[pro1], floor(role:GetRoleData(propertyList[pro2]) * f2), 1))
|
||||
arr[1]:AddBuff(Buff.Create(role, BuffName.PropertyChange, f3, propertyList[pro2], floor(role:GetRoleData(propertyList[pro1]) * f2), 1))
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
|
|
@ -194,12 +194,12 @@ function BattleUtil.ApplyDamage(atkRole, defRole, damage, bCrit, damageType, isD
|
|||
atkRole.Event:DispatchEvent(BattleEventName.RoleDamage, defRole, damage, bCrit, finalDmg, damageType)
|
||||
defRole.Event:DispatchEvent(BattleEventName.RoleBeDamaged, atkRole, damage, bCrit, finalDmg, damageType)
|
||||
if bCrit then
|
||||
atkRole.Event:DispatchEvent(BattleEventName.RoleCrit, defRole)
|
||||
defRole.Event:DispatchEvent(BattleEventName.RoleBeCrit, atkRole)
|
||||
atkRole.Event:DispatchEvent(BattleEventName.RoleCrit, defRole, damage, bCrit, finalDmg, damageType)
|
||||
defRole.Event:DispatchEvent(BattleEventName.RoleBeCrit, atkRole, damage, bCrit, finalDmg, damageType)
|
||||
end
|
||||
if not isDot then
|
||||
atkRole.Event:DispatchEvent(BattleEventName.RoleHit, defRole)
|
||||
defRole.Event:DispatchEvent(BattleEventName.RoleBeHit, atkRole)
|
||||
atkRole.Event:DispatchEvent(BattleEventName.RoleHit, defRole, damage, bCrit, finalDmg, damageType)
|
||||
defRole.Event:DispatchEvent(BattleEventName.RoleBeHit, atkRole, damage, bCrit, finalDmg, damageType)
|
||||
end
|
||||
end
|
||||
return finalDmg
|
||||
|
|
Loading…
Reference in New Issue