[战斗]==========被动292 ,319 修改
parent
7a77e188a8
commit
d040e0d0b2
|
@ -6487,6 +6487,13 @@ local passivityList = {
|
||||||
local f1 = args[2]
|
local f1 = args[2]
|
||||||
local f2=args[3]
|
local f2=args[3]
|
||||||
local onRoleHit = function(target, damage, bCrit, finalDmg, damageType, skill)
|
local onRoleHit = function(target, damage, bCrit, finalDmg, damageType, skill)
|
||||||
|
if not skill then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if skill.isNotLoop then
|
||||||
|
return
|
||||||
|
end
|
||||||
--如果是技能并且这个被动已经被触发过 return
|
--如果是技能并且这个被动已经被触发过 return
|
||||||
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) then
|
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) then
|
||||||
return
|
return
|
||||||
|
@ -6498,7 +6505,7 @@ local passivityList = {
|
||||||
if target:IsDead() and not BattleUtil.CheckIsNoDead(target) and not role:IsDead() then
|
if target:IsDead() and not BattleUtil.CheckIsNoDead(target) and not role:IsDead() then
|
||||||
--role:InsertExtraSkill(f1,f2)
|
--role:InsertExtraSkill(f1,f2)
|
||||||
local effectData={role.superSkill[1],role.superSkill[2],role.superSkill[3],role.superSkill[4],{targets,{1,f1,f2}}}
|
local effectData={role.superSkill[1],role.superSkill[2],role.superSkill[3],role.superSkill[4],{targets,{1,f1,f2}}}
|
||||||
SkillManager.InsertSkill(role, effectData,BattleSkillType.Extra, nil, true, false)
|
SkillManager.InsertSkill(role, effectData,BattleSkillType.Extra, nil, true, false,false,true)
|
||||||
if skill then
|
if skill then
|
||||||
table.insert(skill.triggerPassivityId,id)
|
table.insert(skill.triggerPassivityId,id)
|
||||||
end
|
end
|
||||||
|
@ -7254,24 +7261,25 @@ local passivityList = {
|
||||||
--延时一帧,等所有英雄死亡结束后再执行逻辑
|
--延时一帧,等所有英雄死亡结束后再执行逻辑
|
||||||
local roleRage=role.Rage
|
local roleRage=role.Rage
|
||||||
BattleLogic.WaitForTrigger(BattleLogic.GameDeltaTime,function()
|
BattleLogic.WaitForTrigger(BattleLogic.GameDeltaTime,function()
|
||||||
local arr=RoleManager.Query(function(v) return v.camp==role.camp and v~=role and not BattleUtil.CheckIsNoDead(v) end)
|
local arr=RoleManager.Query(function(v) return v.camp==role.camp and v~=role and not BattleUtil.CheckIsNoDead(v) end)
|
||||||
local len=#arr
|
local len=#arr
|
||||||
local rage1=roleRage*v1
|
local rage1=roleRage*v1
|
||||||
if rage1<len*v2 then
|
if rage1<len*v2 then
|
||||||
rage1=len*v2
|
rage1=len*v2
|
||||||
end
|
end
|
||||||
local num1=floor(rage1/len)
|
local num1=floor(rage1/len)
|
||||||
local num2=rage1%len
|
local num2=rage1%len
|
||||||
for i = 1, len do
|
for i = 1, len do
|
||||||
if i<=num2 then
|
-- if i<=num2 then
|
||||||
BattleUtil.CalRage(role, arr[i],num1+1, CountTypeName.Add)
|
-- BattleUtil.CalRage(role, arr[i],num1+1, CountTypeName.Add)
|
||||||
else
|
-- else
|
||||||
BattleUtil.CalRage(role,arr[i],num1, CountTypeName.Add)
|
-- BattleUtil.CalRage(role,arr[i],num1, CountTypeName.Add)
|
||||||
end
|
-- end
|
||||||
end
|
--修改为每个英雄只回复一点怒气 by:wangzhenxing 2021/07/15
|
||||||
end)
|
BattleUtil.CalRage(role,arr[i],1, CountTypeName.Add)
|
||||||
|
end
|
||||||
end
|
end)
|
||||||
|
end
|
||||||
role.Event:AddEvent(BattleEventName.RoleDead, OnDead,nil,nil,role)
|
role.Event:AddEvent(BattleEventName.RoleDead, OnDead,nil,nil,role)
|
||||||
end,
|
end,
|
||||||
--普攻额外回复怒气增加[a]点
|
--普攻额外回复怒气增加[a]点
|
||||||
|
|
|
@ -23,6 +23,7 @@ function Skill:Init(role, effectData, type, targets, isAdd, isRage,isTriggerJudg
|
||||||
self.isKill = false --是否技能击杀目标
|
self.isKill = false --是否技能击杀目标
|
||||||
self.isAdd = isAdd
|
self.isAdd = isAdd
|
||||||
self.isRage = isRage
|
self.isRage = isRage
|
||||||
|
self.isNotLoop= false
|
||||||
if isTriggerJudge~=nil then
|
if isTriggerJudge~=nil then
|
||||||
self.isTriggerJudge=isTriggerJudge
|
self.isTriggerJudge=isTriggerJudge
|
||||||
else
|
else
|
||||||
|
|
|
@ -59,7 +59,7 @@ function this.AddSkill(caster, effectData, type, targets, isAdd, isRage,isTrigge
|
||||||
return skill
|
return skill
|
||||||
end
|
end
|
||||||
-- 插入技能到技能列表首位
|
-- 插入技能到技能列表首位
|
||||||
function this.InsertSkill(caster, effectData, type, targets, isAdd, isRage,isTriggerJudge)
|
function this.InsertSkill(caster, effectData, type, targets, isAdd, isRage,isTriggerJudge,isLoop)
|
||||||
-- 如果超出最大限制则不再追加技能
|
-- 如果超出最大限制则不再追加技能
|
||||||
if not this.CheckMaxCount() then
|
if not this.CheckMaxCount() then
|
||||||
return
|
return
|
||||||
|
@ -74,6 +74,7 @@ function this.InsertSkill(caster, effectData, type, targets, isAdd, isRage,isTri
|
||||||
isTriggerJudge=false
|
isTriggerJudge=false
|
||||||
end
|
end
|
||||||
skill:Init(caster, effectData, type, targets, isAdd, isRage)
|
skill:Init(caster, effectData, type, targets, isAdd, isRage)
|
||||||
|
skill.isNotLoop=isLoop
|
||||||
if type == BattleSkillType.DeadSkill then -- 死亡技能加入单独的对列
|
if type == BattleSkillType.DeadSkill then -- 死亡技能加入单独的对列
|
||||||
table.insert(this.DeadSkillList, 1, skill)
|
table.insert(this.DeadSkillList, 1, skill)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue