【战斗】====================被动添加479
parent
c889e67a43
commit
db3b8d9562
|
@ -12642,5 +12642,83 @@ local passivityList = {
|
|||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveBeDamaging,nil,nil,role)
|
||||
end,
|
||||
-- 己方神将被击杀,自身释放[a]技能,释放的技能类型为[b],技能追加的额外技能额外造成目标[c][d]%的伤害;并复活该神将回复[e]%血量,每回合只触发[f]次
|
||||
-- a[int],b[int],c[int 属性id],d[float],e[float],f[int]
|
||||
[479] = function(role, args,id,judge)
|
||||
local f1 = args[1]
|
||||
local f2 = args[2]
|
||||
local f3 = args[3]
|
||||
local dt = args[4]
|
||||
local pro =args[5]
|
||||
local time=args[6]
|
||||
local addTime=0
|
||||
local extTime=0
|
||||
local deadTime=0
|
||||
local insertSkill=nil
|
||||
local onRoleHit = function(deadRole)
|
||||
if role.isExile then
|
||||
return
|
||||
end
|
||||
if addTime>=time then
|
||||
return
|
||||
end
|
||||
if deadRole.camp==role.camp and not role:IsDead() then
|
||||
addTime=addTime+1
|
||||
BattleLogic.WaitForTrigger(BattleLogic.GameDeltaTime, function ()
|
||||
insertSkill= role:InsertExtraSkill(f1,f2)
|
||||
end)
|
||||
end
|
||||
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.RoleRealDead, onRoleHit,nil,nil,role)
|
||||
|
||||
-- 直接伤害后
|
||||
local onPassiveDamaging = function(func, defRole, damage,skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
-- if extTime>=time then
|
||||
-- return
|
||||
-- end
|
||||
--观音,这个被动只有额外技能才能触发 by:王振兴 2021/1/21 17:48
|
||||
if skill and skill.isAdd and skill==insertSkill then
|
||||
--如果是boss 并且额外伤害是根据最大生命则返回
|
||||
if (f3==12 or f3==13) and BattleUtil.CheckIsBoss(defRole) then
|
||||
return
|
||||
end
|
||||
|
||||
local val = floor(BattleUtil.FP_Mul(dt, defRole:GetRoleData(BattlePropList[f3])))
|
||||
BattleUtil.FinalDamageCountShield(nil,role,defRole,val)
|
||||
--extTime=extTime+1
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role)
|
||||
|
||||
local onRoleRealDead = function(deadRole)
|
||||
if deadRole==role then
|
||||
return
|
||||
end
|
||||
|
||||
if deadTime>=time then
|
||||
return
|
||||
end
|
||||
if deadRole.camp == role.camp and not role:IsDead() then
|
||||
deadTime=deadTime+1
|
||||
BattleLogic.WaitForTrigger(BattleLogic.GameDeltaTime, function () --延时一帧做处理,我方场上所有单位都结算死亡以后,再处理299被动回血
|
||||
deadRole:SetRelive(pro,role)
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.RoleRealDead, onRoleRealDead,nil,nil,role)
|
||||
|
||||
local onBattleRoundChange = function(func, caster)
|
||||
extTime=0
|
||||
addTime=0
|
||||
deadTime=0
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, onBattleRoundChange,nil,nil,role)
|
||||
end,
|
||||
}
|
||||
return passivityList
|
|
@ -627,7 +627,8 @@ function RoleLogic:InsertExtraSkill(id,type)
|
|||
isTrigger=false
|
||||
end
|
||||
--和老史,佳琦确认果 附加技能算绝技 被沉默无法释放 可以套娃 递归触发 by:王振兴
|
||||
SkillManager.InsertSkill(self, effectData, skillType, nil, true, false,isTrigger)
|
||||
local insertSkill=SkillManager.InsertSkill(self, effectData, skillType, nil, true, false,isTrigger)
|
||||
return insertSkill
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue