【战斗】==============链接符显示修改,链接符放逐修改,灵兽无目标修改
parent
19d7914e78
commit
9101433578
|
@ -17,14 +17,17 @@ function Curse:ShareDamageTrigger(damagingFunc, atkRole, defRole, damage, skill,
|
|||
if not BattleLogic.BuffMgr:HasBuff(defRole, BuffName.Curse, function(buff) return buff.curseType == CurseTypeName.ShareDamage end) then
|
||||
-- 计算拥有此印记人的数量
|
||||
local sdList = RoleManager.Query(function(role)
|
||||
return role.camp == self.target.camp and BattleLogic.BuffMgr:HasBuff(role, BuffName.Curse, function(buff) return buff.curseType == CurseTypeName.ShareDamage end)
|
||||
return role.camp == self.target.camp and BattleLogic.BuffMgr:HasBuff(role, BuffName.Curse, function(buff) return buff.curseType == CurseTypeName.ShareDamage end)
|
||||
end)
|
||||
if sdList and #sdList ~= 0 then
|
||||
-- 计算收到的伤害
|
||||
local f1 = self.args[1] --平分伤害的百分比
|
||||
local sd = math.floor(BattleUtil.ErrorCorrection(damage * f1 / #sdList))
|
||||
if sd ~= 0 then
|
||||
BattleUtil.FinalDamage(nil, atkRole, self.target, sd)
|
||||
if not self.target.isExile then
|
||||
BattleUtil.FinalDamage(nil, atkRole, self.target, sd)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -63,6 +63,15 @@ function MSkill:Cast(func)
|
|||
|
||||
-- 技能效果生效
|
||||
if self.effectCaster then
|
||||
--放技能前判断是否有目标,没有就不会放技能,直接执行技能回调 by 王振兴 2021/03/26
|
||||
--为解决攻击目标只剩被放逐的单位导致技能播放异常
|
||||
self.effectCaster:ChooseTarget()
|
||||
local targets=LengthOfTable(self:GetDirectTargetsNoExile())
|
||||
if targets==0 and self.castDoneFunc then
|
||||
self.castDoneFunc()
|
||||
return
|
||||
end
|
||||
--end
|
||||
self.effectCaster:Cast()
|
||||
end
|
||||
|
||||
|
@ -119,7 +128,10 @@ end
|
|||
function MSkill:GetMaxTargetNum()
|
||||
return self.effectCaster:GetMaxTargetNum()
|
||||
end
|
||||
|
||||
-- 获取直接目标,不包含放逐的目标,可能为空
|
||||
function MSkill:GetDirectTargetsNoExile()
|
||||
return self.effectCaster:GetDirectTargetsNoExile()
|
||||
end
|
||||
-- 判断是否命中
|
||||
function MSkill:CheckTargetIsHit(role)
|
||||
return self.effectCaster:CheckTargetIsHit(role)
|
||||
|
|
|
@ -69,6 +69,7 @@ function Skill:Cast(func)
|
|||
self.effectCaster:ChooseTarget()
|
||||
local targets=LengthOfTable(self:GetDirectTargetsNoExile())
|
||||
if targets==0 and self.castDoneFunc then
|
||||
self.isRage=false
|
||||
self.castDoneFunc()
|
||||
return
|
||||
end
|
||||
|
@ -116,7 +117,7 @@ function Skill:GetDirectTargetsNoMiss()
|
|||
return self.effectCaster:GetDirectTargetsNoMiss()
|
||||
end
|
||||
|
||||
-- 获取直接目标,不包含miss的目标,可能为空
|
||||
-- 获取直接目标,不包含放逐的目标,可能为空
|
||||
function Skill:GetDirectTargetsNoExile()
|
||||
return self.effectCaster:GetDirectTargetsNoExile()
|
||||
end
|
||||
|
|
|
@ -237,6 +237,7 @@ function BuffCtrl:RemoveBuffIcon(buff)
|
|||
if not self.BuffIconList then
|
||||
return
|
||||
end
|
||||
LogRed(buff.id.." type "..tostring(buff.type))
|
||||
-- if self.BuffIconList[buff.id] then
|
||||
-- local count=self.BuffIconList[buff.id].count
|
||||
-- if count==1 then
|
||||
|
@ -306,8 +307,11 @@ function BuffCtrl:RemoveBuffIcon(buff)
|
|||
self.BuffIconList[key]:SetCount(floor-1)
|
||||
end
|
||||
return
|
||||
end
|
||||
elseif buffType == BuffName.Curse then
|
||||
LogError("floor "..floor)
|
||||
if self.BuffIconList[key].curseType==buff.curseType then
|
||||
|
||||
if floor==1 then
|
||||
self.BuffIconList[key]:Dispose()
|
||||
self.BuffIconList[key] = nil
|
||||
|
@ -317,7 +321,6 @@ function BuffCtrl:RemoveBuffIcon(buff)
|
|||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue