【战斗】===============新英雄被动修改

dev_one_discount
wangzhenxing 2023-08-24 18:20:04 +08:00
parent 461029ab50
commit d28ca0a5fb
2 changed files with 22 additions and 11 deletions

View File

@ -12473,12 +12473,15 @@ local passivityList = {
if skill.type~=BattleSkillType.Special and skill.type~=BattleSkillType.Extra then if skill.type~=BattleSkillType.Special and skill.type~=BattleSkillType.Extra then
return return
end end
if BattleLogic.BuffMgr:HasBuff(skill.caster, t1, function(buff) return buff.signType == t2 and buff.caster==role end) then if BattleLogic.BuffMgr:HasBuff(skill.owner, t1, function(buff) return buff.signType == t2 and buff.caster==role end) then
BattleUtil.CalRage(role, skill.caster, v1, ct) BattleLogic.WaitForTrigger(2, function () --延迟一帧移除事件,防止触发帧和结束帧为同一帧时,被动未移除
BattleUtil.CalRage(role, skill.owner, v1, ct)
end)
end end
end end
BattleLogic.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) BattleLogic.Event:AddEvent(BattleEventName.SkillCast, onSkillEnd,nil,nil,role)
end, end,
-- 处于[a]效果[b]状态的目标,行动前有[c]%概率,无法行动 -- 处于[a]效果[b]状态的目标,行动前有[c]%概率,无法行动
@ -12535,7 +12538,7 @@ local passivityList = {
if buff.caster~=role then if buff.caster~=role then
return return
end end
BattleUtil.RandomAction(v1, function() BattleUtil.RandomAction(1, function()
BattleLogic.InsertSkillRole(role) BattleLogic.InsertSkillRole(role)
end) end)
end end
@ -12552,8 +12555,10 @@ local passivityList = {
local ct = args[5] local ct = args[5]
local f1 = args[6] local f1 = args[6]
local type = args[7] local type = args[7]
local onPassiveBeDamaging = function(func, atkRole, defRole, damage, skill, dotType) local onPassiveBeDamaging = function(func, atkRole, defRole, damage, skill, dotType)
if skill and not skill.isTriggerJudge and judge==1 then if skill and not skill.isTriggerJudge and judge==1 then
return return
end end
if cp==1 and defRole.Rage<=num then if cp==1 and defRole.Rage<=num then
@ -12575,7 +12580,7 @@ local passivityList = {
if func then func(dmgDeduction) end if func then func(dmgDeduction) end
end end
end end
BattleLogic.Event:AddEvent(BattleEventName.PassiveBeDamaging, onPassiveBeDamaging,nil,nil,role) BattleLogic.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveBeDamaging,nil,nil,role)
end, end,
-- 处于[a]效果[b]状态的目标,且怒气[c]于[d]点,造成的伤害[e]改变[f]%,伤害类型[g] -- 处于[a]效果[b]状态的目标,且怒气[c]于[d]点,造成的伤害[e]改变[f]%,伤害类型[g]
--a[int],b[int],c[int 1:大于 2小于],d[int], e[改变类型]f[float],g[int 0所有伤害 1直接伤害 2:间接伤害 ] --a[int],b[int],c[int 1:大于 2小于],d[int], e[改变类型]f[float],g[int 0所有伤害 1直接伤害 2:间接伤害 ]
@ -12591,10 +12596,10 @@ local passivityList = {
if skill and not skill.isTriggerJudge and judge==1 then if skill and not skill.isTriggerJudge and judge==1 then
return return
end end
if cp==1 and defRole.Rage<=num then if cp==1 and atkRole.Rage<=num then
return return
end end
if cp==2 and defRole.Rage>=num then if cp==2 and atkRole.Rage>=num then
return return
end end

View File

@ -28,6 +28,7 @@ local allEnemyDamage=0
local levelStarRecord local levelStarRecord
local hardStageId =0 local hardStageId =0
local insertSkillRole=nil local insertSkillRole=nil
local insertSkillRoleList=nil
--是否开启战斗日志 --是否开启战斗日志
BattleLogic.IsOpenBattleRecord = false BattleLogic.IsOpenBattleRecord = false
--逻辑帧频 --逻辑帧频
@ -60,6 +61,7 @@ function BattleLogic.Init(data, _userData, maxRound)
userData = _userData userData = _userData
hardStageId=data.nodeId hardStageId=data.nodeId
insertSkillRole=nil insertSkillRole=nil
insertSkillRoleList={}
BattleLogic.CurOrder = 0 BattleLogic.CurOrder = 0
BattleLogic.TotalOrder = #data.enemyData BattleLogic.TotalOrder = #data.enemyData
BattleLogic.Clear() BattleLogic.Clear()
@ -321,7 +323,7 @@ function BattleLogic.TurnRound(debugTurn)
--轮数变化后延时0.2秒用于初始化监听回合数被动的初始化 --轮数变化后延时0.2秒用于初始化监听回合数被动的初始化
BattleLogic.WaitForTrigger(0.5,function() BattleLogic.WaitForTrigger(0.5,function()
-- 切换阵营 -- 切换阵营
if not insertSkillRole then if #insertSkillRoleList==0 and insertSkillRole==nil then
CurCamp = (CurCamp + 1) % 2 CurCamp = (CurCamp + 1) % 2
end end
BattleLogic.CheckBattleLogic() BattleLogic.CheckBattleLogic()
@ -345,8 +347,10 @@ function BattleLogic.CheckBattleLogic()
local SkillRole local SkillRole
local lastPos local lastPos
--如果有插入行动的英雄,就先让插入的英雄行动 --如果有插入行动的英雄,就先让插入的英雄行动
if insertSkillRole then if insertSkillRoleList and #insertSkillRoleList>0 then
insertSkillRole=insertSkillRoleList[1]
SkillRole =insertSkillRole SkillRole =insertSkillRole
table.removebyvalue(insertSkillRoleList,insertSkillRole)
insertSkillRole=nil insertSkillRole=nil
--记录下正常执行行动的英雄的位置,插入英雄行动完,再按照正常顺序执行 --记录下正常执行行动的英雄的位置,插入英雄行动完,再按照正常顺序执行
lastPos=CurSkillPos[CurCamp] lastPos=CurSkillPos[CurCamp]
@ -430,8 +434,10 @@ end
--检测是否有插入得英雄 --检测是否有插入得英雄
function BattleLogic.CheckHaveInsertRole() function BattleLogic.CheckHaveInsertRole()
if insertSkillRole then if insertSkillRoleList and #insertSkillRoleList>0 then
insertSkillRole=insertSkillRoleList[1]
local SkillRole=insertSkillRole local SkillRole=insertSkillRole
table.removebyvalue(insertSkillRoleList,insertSkillRole)
insertSkillRole=nil insertSkillRole=nil
-- 如果找不到下一个人,直接交换阵营 -- 如果找不到下一个人,直接交换阵营
if not SkillRole then if not SkillRole then
@ -497,7 +503,7 @@ function BattleLogic.WaitForTrigger(delayTime, action)
end end
function BattleLogic.InsertSkillRole(role) function BattleLogic.InsertSkillRole(role)
insertSkillRole=role table.insert(insertSkillRoleList,role)
end end
function BattleLogic.CurFrame() function BattleLogic.CurFrame()