[战斗]==============大闹天宫同步最新战斗逻辑
parent
169253497d
commit
ad9fdfd09e
|
@ -1839,27 +1839,34 @@ local passivityList = {
|
|||
|
||||
|
||||
|
||||
-- 释放技能后给除自己外己方生命最少的武将附加无敌盾持续[b]回合(只剩自己则不加)
|
||||
--b[属性]
|
||||
-- 释放技能后给除自己外己方生命最少的[a]名武将附加无敌盾持续[b]回合(只剩自己则不加)
|
||||
-- a[int] b[int]
|
||||
[104] = function(role, args,id,judge)
|
||||
local i1 = args[1]
|
||||
local num = args[2]
|
||||
-- 释放技能后
|
||||
local onSkillEnd = function(skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
local heros={}
|
||||
if skill.type == BattleSkillType.Special then
|
||||
local list = RoleManager.Query(function(v) return v.camp == role.camp end)
|
||||
BattleUtil.SortByHpFactor(list, 1)
|
||||
local target = nil
|
||||
for i = 1, #list do
|
||||
if not list[i]:IsRealDead() and list[i] ~= role then
|
||||
target = list[i]
|
||||
break
|
||||
-- target = list[i]
|
||||
table.insert(heros,list[i])
|
||||
-- break
|
||||
end
|
||||
end
|
||||
if target then
|
||||
target:AddBuff(Buff.Create(role, BuffName.Shield, i1, ShieldTypeName.AllReduce, 0, 0))
|
||||
if heros then
|
||||
for i = 1, i1 do
|
||||
if heros[i] then
|
||||
heros[i]:AddBuff(Buff.Create(role, BuffName.Shield, num, ShieldTypeName.AllReduce, 0, 0))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -2733,7 +2740,7 @@ local passivityList = {
|
|||
end,
|
||||
|
||||
|
||||
-- 战斗第[a]回合无敌
|
||||
-- 战斗第开始无敌[a]回合
|
||||
-- a[int]
|
||||
[141] = function(role, args)
|
||||
local i1 = args[1]
|
||||
|
@ -2742,6 +2749,7 @@ local passivityList = {
|
|||
-- 第i1回合开始
|
||||
if curRound == i1 then
|
||||
buff = Buff.Create(role, BuffName.Shield, 0, ShieldTypeName.AllReduce, 0, 0)
|
||||
buff.cover = false
|
||||
buff.clear = false
|
||||
role:AddBuff(buff)
|
||||
end
|
||||
|
@ -3115,7 +3123,7 @@ local passivityList = {
|
|||
role.Event:AddEvent(BattleEventName.RoleHit, onHit,nil,nil,role)
|
||||
end,
|
||||
|
||||
-- 复活友方第[a]位阵亡的英雄并回复其[b]%的生命每场战斗触发[c]次;复活的如果是[d]阵营,回复[e]%
|
||||
-- 复活友方[a]位阵亡的英雄并回复其[b]%的生命每场战斗触发[c]次;复活的如果是[d]阵营,回复[e]%
|
||||
-- a[int]b[float]c[int] d[int] e[float] (d,e不配就不会额外回复)
|
||||
[154] = function(role, args)
|
||||
local i1 = args[1]
|
||||
|
@ -3134,7 +3142,7 @@ local passivityList = {
|
|||
f1=v1
|
||||
end
|
||||
counter = counter + 1
|
||||
if counter == i1 then
|
||||
if counter <= i1 then
|
||||
deadRole:SetRelive(f1)
|
||||
end
|
||||
end
|
||||
|
@ -3188,10 +3196,11 @@ local passivityList = {
|
|||
role.Event:AddEvent(BattleEventName.BuffCaster, OnBuffCaster,nil,nil,role)
|
||||
end,
|
||||
|
||||
-- 释放技能后回复当前本方阵容最靠前武将[a]点怒气
|
||||
-- a[int]
|
||||
-- 释放技能后回复当前本方阵容最靠前[a]名武将[b]点怒气
|
||||
-- a[int] b[int]
|
||||
[158] = function(role, args,id,judge)
|
||||
local i1 = args[1]
|
||||
local num = args[2]
|
||||
local onSkillCastEnd = function(skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
|
@ -3201,10 +3210,14 @@ local passivityList = {
|
|||
table.sort(list, function(a, b)
|
||||
return a.position < b.position
|
||||
end)
|
||||
local aaa = 0
|
||||
for i= 1, #list do
|
||||
if list[i] and not list[i]:IsRealDead() then
|
||||
BattleUtil.CalRage(role, list[i], i1, CountTypeName.Add)
|
||||
break
|
||||
BattleUtil.CalRage(role, list[i], num, CountTypeName.Add)
|
||||
aaa=aaa+1
|
||||
if aaa==i1 then
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -4773,17 +4786,40 @@ local passivityList = {
|
|||
end,
|
||||
|
||||
-- 大闹天宫胜利次数
|
||||
[225] = function(role, args)
|
||||
[225] = function(role, args,id,judge)
|
||||
--王振兴添加
|
||||
local f1 = args[1]
|
||||
local pro1 = args[2]
|
||||
local ct1 = args[3]
|
||||
local maxNum = args[4]
|
||||
-- 紫+橙
|
||||
local num = OutDataManager.GetOutData(role.camp, OutDataName.WinTimes)
|
||||
|
||||
local num = OutDataManager.GetOutData(role.camp,id)
|
||||
num = min(maxNum, num)
|
||||
if num==0 then
|
||||
return
|
||||
end
|
||||
local hp=0
|
||||
local hp2=0
|
||||
--如果提升的是血量上限
|
||||
if pro1==12 then
|
||||
hp = role:GetRoleData(RoleDataName.Hp) / role:GetRoleData(RoleDataName.MaxHp)
|
||||
end
|
||||
BattleUtil.AddProp(role, pro1, f1 * num, ct1)
|
||||
--如果提升的是血量上限
|
||||
if pro1==12 then
|
||||
hp2 = role:GetRoleData(RoleDataName.Hp) / role:GetRoleData(RoleDataName.MaxHp)
|
||||
local pro=hp-hp2
|
||||
local treat= floor(BattleUtil.ErrorCorrection(role:GetRoleData(RoleDataName.MaxHp)*pro))
|
||||
role.data:AddValue(RoleDataName.Hp, treat)
|
||||
BattleLogManager.Log(
|
||||
"Final Treat",
|
||||
"acamp", role.camp,
|
||||
"apos", role.position,
|
||||
"tcamp", role.camp,
|
||||
"tpos", role.position,
|
||||
"value", treat
|
||||
)
|
||||
end
|
||||
end,
|
||||
|
||||
-- 斩杀生命低于[a]的敌人
|
||||
|
@ -4975,7 +5011,7 @@ local passivityList = {
|
|||
-- 猎妖之路专属
|
||||
-- 根据同时拥有夜明珠的数量获得效果:2个:[c]改变[a]的[b];3个:[f]改变[d]的[e];4个:[i]改变[g]的[h]
|
||||
-- a[float],b[属性],c[改变类型],d[float],e[属性],f[改变类型],g[float],h[属性],i[改变类型]
|
||||
[237] = function(role, args)
|
||||
[237] = function(role, args,id,judge)
|
||||
local f1 = args[1]
|
||||
local pro1 = args[2]
|
||||
local ct1 = args[3]
|
||||
|
@ -4987,7 +5023,7 @@ local passivityList = {
|
|||
local ct3 = args[9]
|
||||
|
||||
|
||||
local num = OutDataManager.GetOutData(role.camp, OutDataName.DarkGlowBallNum)
|
||||
local num = OutDataManager.GetOutData(role.camp,id)
|
||||
if num >= 2 then
|
||||
BattleUtil.AddProp(role, pro1, f1, ct1)
|
||||
end
|
||||
|
@ -5001,7 +5037,7 @@ local passivityList = {
|
|||
-- 猎妖之路专属
|
||||
-- 在大闹天空的第[a]层中,我方武将[d]改变[b]的[c],[g改变[e]的[f]
|
||||
-- a[位置],b[float],c[属性],d[改变类型],e[float],f[属性],g[改变类型]
|
||||
[238] = function(role, args,id)
|
||||
[238] = function(role, args,id,judge)
|
||||
local flr = args[1]
|
||||
local f1 = args[2]
|
||||
local pro1 = args[3]
|
||||
|
@ -5039,7 +5075,7 @@ local passivityList = {
|
|||
-- 猎妖之路专属
|
||||
-- 每有一件紫色品质以上的战利品,我方武将[d]改变[b]的[c],[g改变[e]的[f],最多[h]层
|
||||
-- b[float],c[属性],d[改变类型],e[float],f[属性],g[改变类型],h[int]
|
||||
[239] = function(role, args)
|
||||
[239] = function(role, args,id,judge)
|
||||
local f1 = args[1]
|
||||
local pro1 = args[2]
|
||||
local ct1 = args[3]
|
||||
|
@ -5049,7 +5085,7 @@ local passivityList = {
|
|||
local maxNum = args[7]
|
||||
|
||||
-- 紫+橙
|
||||
local num = OutDataManager.GetOutData(role.camp, OutDataName.OrangeGloryItemNum) + OutDataManager.GetOutData(role.camp, OutDataName.RedGloryItemNum)
|
||||
local num = OutDataManager.GetOutData(role.camp, id)
|
||||
num = min(maxNum, num)
|
||||
BattleUtil.AddProp(role, pro1, f1 * num, ct1)
|
||||
BattleUtil.AddProp(role, pro2, f2 * num, ct2)
|
||||
|
@ -5057,15 +5093,15 @@ local passivityList = {
|
|||
-- 猎妖之路专属
|
||||
-- 每使用一次神秘药水,我方武将[c]改变[a]的[b],最多[d]层
|
||||
-- a[float],b[属性],c[改变类型],d[int]
|
||||
[240] = function(role, args)
|
||||
[240] = function(role, args,id,judge)
|
||||
local f1 = args[1]
|
||||
local pro1 = args[2]
|
||||
local ct1 = args[3]
|
||||
local maxNum = args[4]
|
||||
|
||||
-- 紫+橙
|
||||
local num = OutDataManager.GetOutData(role.camp, OutDataName.MisteryLiquidUsedTimes)
|
||||
|
||||
local num = OutDataManager.GetOutData(role.camp, id)
|
||||
--LogError("笔使用次数:"..num)
|
||||
num = min(maxNum, num)
|
||||
BattleUtil.AddProp(role, pro1, f1 * num, ct1)
|
||||
end,
|
||||
|
@ -5882,16 +5918,19 @@ local passivityList = {
|
|||
end
|
||||
role.Event:AddEvent(BattleEventName.PassiveBeDamaging, onPassiveBeDamaging,nil,nil,role)
|
||||
end,
|
||||
-- 战斗第回合概率无敌,回合数每增加1,概率是之前的[a]
|
||||
-- a[float]
|
||||
-- 战斗第[a]回合开始概率无敌,回合数每增加1,概率是之前的[b]
|
||||
-- a[int] b[float]
|
||||
[272] = function(role, args)
|
||||
local i1 = args[1]
|
||||
local p1 =args[2]
|
||||
local buff=nil
|
||||
local isTrigger=true
|
||||
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, function(curRound)
|
||||
local pro=0
|
||||
if curRound>0 then
|
||||
pro=i1^(curRound-1)
|
||||
if curRound>i1 then
|
||||
pro=p1^(curRound-i1)
|
||||
else
|
||||
pro=1
|
||||
end
|
||||
if isTrigger then
|
||||
local isAdd=BattleUtil.RandomAction(pro, function ()
|
||||
|
@ -6795,4 +6834,4 @@ local passivityList = {
|
|||
role.Event:AddEvent(BattleEventName.BuffCaster, OnBuffCaster,nil,nil,role)
|
||||
end,
|
||||
}
|
||||
return passivityList
|
||||
return passivityList
|
||||
|
|
Loading…
Reference in New Issue