【战斗】主动效果117,118添加
parent
a42f259c29
commit
4201f2d7cd
|
|
@ -2245,6 +2245,35 @@ local effectList = {
|
|||
end
|
||||
end,
|
||||
|
||||
-- [a]%概率[b]改变[c]点怒气
|
||||
-- a[float],b[改变类型],c[int]
|
||||
[117] = function(caster, target, args, interval, skill)
|
||||
local f1 = args[1]
|
||||
local ct = args[2]
|
||||
local i1 = args[3]
|
||||
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
BattleUtil.RandomAction(f1, function()
|
||||
target:AddRage(i1, ct)
|
||||
end)
|
||||
end)
|
||||
end,
|
||||
|
||||
|
||||
-- 造成[a]*[b]%的直接伤害(不会被分摊机制分摊)
|
||||
-- a[属性],b[float]
|
||||
[118] = function(caster, target, args, interval, skill)
|
||||
local pro = args[1]
|
||||
local f1 = args[2]
|
||||
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
local damage = BattleUtil.ErrorCorrection(f1 * caster:GetRoleData(BattlePropList[pro]))
|
||||
BattleUtil.FinalDamage(skill, caster, target, damage, nil, 0, nil, true)
|
||||
end)
|
||||
end,
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
return effectList
|
||||
|
|
@ -270,4 +270,11 @@ OutDataName = {
|
|||
BattleUnitType = {
|
||||
Role = 1,
|
||||
Monster = 2
|
||||
}
|
||||
|
||||
BattleRoleElementType = {
|
||||
REN = 1,
|
||||
FO = 2,
|
||||
YAO = 3,
|
||||
DAO = 4
|
||||
}
|
||||
|
|
@ -188,7 +188,22 @@ function BattleUtil.ChooseTarget(role, chooseId)
|
|||
end
|
||||
arr = tempArr
|
||||
end
|
||||
|
||||
elseif chooseLimit == 4 then -- 处于灼烧状态
|
||||
local tempArr = {}
|
||||
for i = 1, #arr do
|
||||
if BattleLogic.BuffMgr:HasBuff(arr[i], BuffName.DOT, function (buff) return buff.damageType == DotType.Burn end) then
|
||||
table.insert(tempArr, arr[i])
|
||||
end
|
||||
end
|
||||
arr = tempArr
|
||||
elseif chooseLimit == 5 then -- 人阵营
|
||||
local tempArr = {}
|
||||
for i = 1, #arr do
|
||||
if arr[i].element == BattleRoleElementType.REN then
|
||||
table.insert(tempArr, arr[i])
|
||||
end
|
||||
end
|
||||
arr = tempArr
|
||||
end
|
||||
|
||||
-- 选择条件
|
||||
|
|
@ -535,10 +550,8 @@ function BattleUtil.CalDamage(skill, atkRole, defRole, damageType, baseFactor, i
|
|||
atkRole.Event:DispatchEvent(BattleEventName.RoleDamageAfter, defRole, damageFunc, fixDamage)
|
||||
defRole.Event:DispatchEvent(BattleEventName.RoleBeDamagedAfter, atkRole, damageFunc, fixDamage)
|
||||
|
||||
|
||||
fixDamage = max(floor(attack * 0.1), fixDamage)
|
||||
|
||||
|
||||
local finalDmg = 0 --计算实际造成的扣血
|
||||
if not defRole:IsRealDead() then
|
||||
finalDmg = BattleUtil.ApplyDamage(skill, atkRole, defRole, fixDamage, bCrit, damageType, dotType)
|
||||
|
|
@ -554,12 +567,12 @@ function BattleUtil.CalTreat(castRole, targetRole, value, baseFactor)
|
|||
if targetRole.ctrl_noheal or targetRole:IsDead() then --禁疗和死亡无法加血
|
||||
return
|
||||
end
|
||||
-- 是否暴击: 暴击率 = 自身暴击率 - 对方抗暴率
|
||||
local bCrit = false
|
||||
local critRandom = Random.Range01()
|
||||
local critCondition = castRole:GetRoleData(RoleDataName.Crit)
|
||||
bCrit = critRandom <= critCondition
|
||||
bCrit = bCrit or targetRole.isFlagCrit == true -- 必定暴击
|
||||
-- 是否暴击: 暴击率 = 自身暴击率 - 对方抗暴率
|
||||
local bCrit = false
|
||||
local critRandom = Random.Range01()
|
||||
local critCondition = castRole:GetRoleData(RoleDataName.Crit)
|
||||
bCrit = critRandom <= critCondition
|
||||
bCrit = bCrit or targetRole.isFlagCrit == true -- 必定暴击
|
||||
-- 计算暴伤害系数
|
||||
local critDamageFactor = 1
|
||||
--计算暴击
|
||||
|
|
|
|||
Loading…
Reference in New Issue