【战斗】====清除盾效果添加破盾提示文字,清除免疫,持续伤害,控制效果添加清除提示;被动278修改;被动添加排序;控制效果结束修改

dev_chengFeng
wangzhenxing 2021-03-30 16:34:17 +08:00
parent fd9fc05994
commit 2e886d4524
7 changed files with 28 additions and 4 deletions

View File

@ -2234,4 +2234,6 @@
[12233] = GetLanguageStrById("核心神将:"),
[12234] = GetLanguageStrById("%d次内必得金色及以上魂印"),
[12235] = GetLanguageStrById("重连失败,请重新登录"),
[12236] = GetLanguageStrById("破盾"),
[12237] = GetLanguageStrById("清除"),
}

View File

@ -976,7 +976,11 @@ end
function this.GetArtFontConfig(_ArtFontType)
if _ArtFontType == BattleArtFontType.Immune then
return {type = 2, content = Language[10203]}
return {type = 2, content = Language[10203]}
elseif _ArtFontType == BattleArtFontType.Shield then
return {type = 2, content = Language[12236]}
elseif _ArtFontType == BattleArtFontType.clear then
return {type = 2, content = Language[12237]}
end
end

View File

@ -227,6 +227,13 @@ function BuffManager:ClearBuff(target, func)
while idx <= list.size do
local buff = list.buffer[idx]
if buff.target == target and (not func or (func and buff.clear and func(buff))) then
if func and func(buff) then
if buff.type== BuffName.Shield then
buff.target.Event:DispatchEvent(BattleEventName.ShowHintText, BattleArtFontType.Shield)
elseif buff.type== BuffName.DOT or buff.type==BuffName.Control or buff.type==BuffName.Immune then
buff.target.Event:DispatchEvent(BattleEventName.ShowHintText, BattleArtFontType.clear)
end
end
buff:OnEnd()
buff.target.Event:DispatchEvent(BattleEventName.BuffEnd, buff)
putBuff(buff)

View File

@ -5664,7 +5664,11 @@ local passivityList = {
if defRole and defRole.camp~=role.camp and skill.owner==role and (skill.type==BattleSkillType.Special or skill.type==BattleSkillType.Extra) then
BattleUtil.RandomAction(pro, function()
BattleLogic.BuffMgr:ClearBuff(defRole, function(buff)
return buff.type == BuffName.Immune and (buff.immuneType == 4 or buff.immuneType == 2)
if buff.type == BuffName.Immune and (buff.immuneType == 4 or buff.immuneType == 2) then
buff.target.Event:DispatchEvent(BattleEventName.ShowHintText, BattleArtFontType.clear)
return true
end
return false
end)
end)
end
@ -6081,7 +6085,7 @@ local passivityList = {
local v1=args[2]
local OnBuffEnd=function(buff)
if buff and not buff.target:IsDead() and buff.caster==role and buff.type==BuffName.Shield then
local val = floor(BattleUtil.FP_Mul(v1, role:GetRoleData(BattlePropList[pro])))
local val = floor(BattleUtil.FP_Mul(v1, buff.target:GetRoleData(BattlePropList[pro])))
BattleUtil.CalTreat(role,buff.target, val)
end
end

View File

@ -40,6 +40,10 @@ end
--效果结束时调用一次
function Control:OnEnd()
--如果还有同类型的控制效果,就返回
if BattleLogic.BuffMgr:HasBuff(self.target, BuffName.Control, function (buff) return buff~=self and buff.ctrlType == self.ctrlType end) then
return
end
if self.ctrlType == 1 then --眩晕
self.target.ctrl_dizzy = false
elseif self.ctrlType == 2 then --沉默

View File

@ -328,4 +328,6 @@ BattleRoleElementType = {
BattleArtFontType = {
Immune = 1, -- 免疫文字
Shield = 2, --破盾文字
clear = 3, --清除文字
}

View File

@ -84,6 +84,7 @@ function RoleLogic:Init(uid, data, position)
self.type = BattleUnitType.Role
self.passiveList = {}
if data.passivity and #data.passivity > 0 then
table.sort(data.passivity,function(a,b)return a[1] < b[1] end)
for i = 1, #data.passivity do
local v = data.passivity[i]
local passivityId=v[1]
@ -96,7 +97,7 @@ function RoleLogic:Init(uid, data, position)
if BattleUtil.Passivity[id] then
BattleUtil.Passivity[id](self, args,passivityId,judge)
-- 加入被动列表
table.insert(self.passiveList, {id, args})
table.insert(self.passiveList, {id, args,passivityId})
end
end
end