[战斗]========战斗逻辑修改提交

TCX_dev_realOne_master hotfix/you_gu/cdn_realOne_ios/1.1.2
PC-202302260912\Administrator 2023-12-06 15:44:06 +08:00
parent bc3f82e874
commit fc709ab00e
4 changed files with 52 additions and 6 deletions

View File

@ -3215,9 +3215,6 @@ local effectList = {
BattleLogic.WaitForTrigger(skillNumberTime[index][2]/1000, function () BattleLogic.WaitForTrigger(skillNumberTime[index][2]/1000, function ()
BattleUtil.CalDamage(skill, caster, target, dt, f1) BattleUtil.CalDamage(skill, caster, target, dt, f1)
-- LogError("触发"..index.."次"..skillNumberTime[index][2].."|"..interval) -- LogError("触发"..index.."次"..skillNumberTime[index][2].."|"..interval)
LogError("attackdamage"..os.date())
LogError("currentframe"..BattleLogic.CurFrame())
end) end)
end end
@ -3226,7 +3223,6 @@ local effectList = {
BattleLogic.WaitForTrigger(interval, function () BattleLogic.WaitForTrigger(interval, function ()
BattleUtil.CalDamage(skill, caster, target, dt, f1) BattleUtil.CalDamage(skill, caster, target, dt, f1)
LogError("attackdamage"..os.date())
end) end)
end end
@ -3242,6 +3238,34 @@ local effectList = {
end) end)
end, end,
--为目标添加[a]属性[b]%的御甲
--a[int],b[float]
[165] = function(caster, target, args, interval, skill)
local pro = args[1]
local v1 = args[2]
BattleLogic.WaitForTrigger(interval, function ()
local val = floor(BattleUtil.FP_Mul(v1, caster:GetRoleData(BattlePropList[pro])))
--如果身上有御甲就添加御甲的值
BattleUtil.AddBlood(target,val)
end)
end,
--如果目标生命百分比小于等于[a]%,直接斩杀剩余所有血量(御甲无效)
--a[float]
[166] = function(caster, target, args, interval, skill)
local prop = args[1]
local isBoss=BattleUtil.CheckIsBoss(target)
if isBoss then
return
end
local curProp=BattleUtil.GetHPPencent(target)
if curProp>prop then
return
end
BattleUtil.Seckill(skill,caster,target)
end,
} }
return effectList return effectList

View File

@ -8697,8 +8697,8 @@ local passivityList = {
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundStart,onRoundStart,nil,nil,role) BattleLogic.Event:AddEvent(BattleEventName.BattleRoundStart,onRoundStart,nil,nil,role)
end, end,
--[a]数回合,自身释放技能,己方全体神将 [b]属性[c]改变[d]%,持续[e]回合(e0为永久) --[a]数回合,自身释放技能,己方全体神将 [b]属性[c]改变[d]%,持续[e]回合(e0为永久) [f]属性[g]改变[h]%,持续[i]回合(f,g,h,i不配就不会增加)
--a[int 1:奇数 0偶数 ] b[int 属性id], c[int 改变类型], d[float],e[int] --a[int 1:奇数 0偶数 ] b[int 属性id], c[int 改变类型], d[float],e[int], f[int 属性id], g[int 改变类型], h[float],i[int]
[355]=function(role,args,id,judge) [355]=function(role,args,id,judge)
local type = args[1] local type = args[1]
local pro = args[2] local pro = args[2]
@ -8706,6 +8706,11 @@ local passivityList = {
local v1 = args[4] local v1 = args[4]
local round = args[5] local round = args[5]
local pro2 = args[6]
local ct2 = args[7]
local v2 = args[8]
local round2 = args[9]
local isTrigger=false local isTrigger=false
local onSkillCast = function(skill) local onSkillCast = function(skill)
if not skill then if not skill then
@ -8727,6 +8732,9 @@ local passivityList = {
local list = RoleManager.Query(function(v) return role.camp == v.camp end) local list = RoleManager.Query(function(v) return role.camp == v.camp end)
for _, r in pairs(list) do for _, r in pairs(list) do
r:AddBuff(Buff.Create(role, BuffName.PropertyChange, round, BattlePropList[pro],v1, ct)) r:AddBuff(Buff.Create(role, BuffName.PropertyChange, round, BattlePropList[pro],v1, ct))
if pro2 and ct2 and v2 and round2 then
r:AddBuff(Buff.Create(role, BuffName.PropertyChange, round2, BattlePropList[pro2],v2, ct2))
end
end end
isTrigger=true isTrigger=true
end end

View File

@ -1879,4 +1879,15 @@ function BattleUtil.CompareValue(v1, v2, comType)
return v1 <= v2 return v1 <= v2
end end
return true return true
end
function BattleUtil.IsUserDataNull( userData)
if (userData == nil) then -- 如果 userdata 是 nil则为空
return true
else
local metatable = getmetatable(userData)
return metatable == "null_userdata_metatable" -- 否则检查元表
end
end end

View File

@ -142,6 +142,9 @@ end
-- 判断是否命中 -- 判断是否命中
function Skill:CheckTargetIsHit(role) function Skill:CheckTargetIsHit(role)
if role == nil then
return false
end
return self.effectCaster:CheckTargetIsHit(role) return self.effectCaster:CheckTargetIsHit(role)
end end