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

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

View File

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