[战斗]======================时空女儿国王 新英雄提交
parent
3037378c42
commit
178ba22181
|
@ -142,7 +142,7 @@ function this.GetPassivityData(passivityList)
|
|||
for i = 1, #passivityList do
|
||||
local passiveId = tonumber(passivityList[i])
|
||||
if passiveId then
|
||||
LogError("passiveId======================"..passiveId)
|
||||
--LogError("passiveId======================"..passiveId)
|
||||
local cfg = PassiveSkillLogicConfig[passiveId]
|
||||
-- 判断技能是否在战斗中生效
|
||||
if cfg and cfg.EffectiveRange == 1 then
|
||||
|
|
|
@ -3137,6 +3137,56 @@ local effectList = {
|
|||
target:AddBuff(Buff.Create(caster, BuffName.Control, round, ctrType))
|
||||
end)
|
||||
end,
|
||||
-- --己方场上人数 < 地方人数,对[a]目标选择[b]属性[c]%的法术伤害并附加逆风效果,不低于对[d]目标选择[e]属性[f]%的御甲并附加乘风效果。
|
||||
-- [160] = function(caster, target, args, interval, skill)
|
||||
-- local c1 = args[1]--持续回合数
|
||||
-- local p1 = args[2]--控制类型
|
||||
-- local v1 = args[3]
|
||||
-- local c2 = args[4]
|
||||
-- local p1 = args[5]
|
||||
-- local v2 = args[6]
|
||||
-- BattleLogic.WaitForTrigger(interval, function ()
|
||||
-- local myArr = RoleManager.Query(function (r) return r.camp == caster.camp end)
|
||||
-- local enArr = RoleManager.Query(function (r) return r.camp ~= caster.camp end)
|
||||
-- if #myArr< #enArr then
|
||||
-- local arr1 = BattleUtil.ChooseTarget(caster, c1)
|
||||
-- for i=1, #arr1 do
|
||||
-- BattleUtil.CalDamage(skill, caster,arr1[i], v1,1)
|
||||
-- end
|
||||
|
||||
-- else
|
||||
|
||||
-- end
|
||||
-- end)
|
||||
-- end,
|
||||
|
||||
--添加一个[a]印记,持续[b]回合
|
||||
--a[int]:7逆风风 8:顺风风
|
||||
[160] = function(caster, target, args, interval, skill)
|
||||
local type = args[1]
|
||||
local round= args[2]
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
if type==7 and caster.sunTime>=caster.sunMaxTime then
|
||||
return
|
||||
end
|
||||
if type==8 and caster.niTime>=caster.niMaxTime then
|
||||
return
|
||||
end
|
||||
target:AddBuff(Buff.Create(caster, BuffName.BreakArmor, round,type))
|
||||
end)
|
||||
end,
|
||||
--为目标添加[a]属性[b]%的御甲
|
||||
--a[int],b[float]
|
||||
[161] = 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,
|
||||
}
|
||||
|
||||
return effectList
|
|
@ -12414,5 +12414,203 @@ local passivityList = {
|
|||
end
|
||||
role.Event:AddEvent(BattleEventName.PassiveRandomControl, onPassiveRandomControl,nil,nil,role)
|
||||
end,
|
||||
--己方场上人数 < 敌方人数,技能id为[a],不低于地方人数,技能id为[b],技能附带的buff生效次数为[c]
|
||||
--a[int],b[int],c[int]
|
||||
[471] = function(role, args)
|
||||
local skill1 = args[1]
|
||||
local skill2 = args[2]
|
||||
local time = args[3]
|
||||
role.sunMaxTime=time
|
||||
role.niMaxTime=time
|
||||
--检测自身技能
|
||||
local checkRoleSkill=function()
|
||||
local myArr = RoleManager.Query(function (r) return r.camp == role.camp end)
|
||||
local enArr = RoleManager.Query(function (r) return r.camp ~= role.camp end)
|
||||
if #myArr< #enArr then
|
||||
role.superSkill=BattleUtil.GetSkillData(skill1,0)
|
||||
else
|
||||
role.superSkill=BattleUtil.GetSkillData(skill2,0)
|
||||
end
|
||||
end
|
||||
|
||||
local onSkillCast = function(role)
|
||||
checkRoleSkill()
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.RoleTurnStart, onSkillCast,nil,nil,role)
|
||||
|
||||
|
||||
local OnSkillCastEnd = function(skill)
|
||||
if skill.id==skill1 then
|
||||
role.sunTime=role.sunTime+1
|
||||
elseif skill.id==skill2 then
|
||||
role.niTime=role.niTime+1
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role)
|
||||
|
||||
end,
|
||||
-- 顺风/逆风最大次数[a]改变[b]次
|
||||
--a[int 改变类型], b[int]
|
||||
[472] = function(role, args)
|
||||
local ct = args[1]
|
||||
local time = args[2]
|
||||
role.sunMaxTime = BattleUtil.CountValue(role.sunMaxTime,time,ct)
|
||||
role.niMaxTime = BattleUtil.CountValue(role.niMaxTime,time,ct)
|
||||
end,
|
||||
-- 处于[a]效果[b]状态的目标, 释放技能后自身改变[c][d]点怒气,
|
||||
-- a[int buff大类型],b[int buff小类型],c[int 改变类型],d[int]
|
||||
[473] = function(role, args,id,judge)
|
||||
local t1 = args[1]
|
||||
local t2 = args[2]
|
||||
local ct = args[3]
|
||||
local v1 = args[4]
|
||||
|
||||
-- 释放技能后
|
||||
local onSkillEnd = function(skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
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)
|
||||
end
|
||||
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role)
|
||||
end,
|
||||
|
||||
-- 处于[a]效果[b]状态的目标,行动前有[c]%概率,无法行动
|
||||
-- a[int buff大类型],b[int buff小类型],c[float]
|
||||
[474] = function(role, args,id,judge)
|
||||
local t1 = args[1]
|
||||
local t2 = args[2]
|
||||
local v1 = args[3]
|
||||
|
||||
-- 释放技能后
|
||||
local onSkillEnd = function(skiller)
|
||||
skiller.notAction=false
|
||||
if BattleLogic.BuffMgr:HasBuff(skiller, t1, function(buff) return buff.signType == t2 and buff.caster==role end) then
|
||||
BattleUtil.RandomAction(v1, function()
|
||||
skiller.notAction=true
|
||||
end)
|
||||
end
|
||||
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.oleTurnStart, onSkillEnd,nil,nil,role)
|
||||
end,
|
||||
|
||||
-- 处于[a]效果[b]状态的目标,行动前有[c]%概率额外行动一次
|
||||
-- a[int buff大类型],b[int buff小类型],c[float]
|
||||
[475] = function(role, args,id,judge)
|
||||
local t1 = args[1]
|
||||
local t2 = args[2]
|
||||
local v1 = args[3]
|
||||
|
||||
-- 释放技能后
|
||||
local onSkillEnd = function(skiller)
|
||||
skiller.notAction=false
|
||||
if BattleLogic.BuffMgr:HasBuff(skiller, t1, function(buff) return buff.signType == t2 and buff.caster==role end) then
|
||||
BattleUtil.RandomAction(v1, function()
|
||||
BattleLogic.InsertSkillRole(skiller)
|
||||
end)
|
||||
end
|
||||
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.RoleTurnStart, onSkillEnd,nil,nil,role)
|
||||
end,
|
||||
|
||||
-- [a]效果[b]状态的buff消失时,有[c]%概率额外行动一次
|
||||
-- a[int buff大类型],b[int buff小类型],c[float]
|
||||
[476] = function(role, args,id,judge)
|
||||
local t1 = args[1]
|
||||
local t2 = args[2]
|
||||
local v1 = args[3]
|
||||
|
||||
local OnBuffEnd=function(buff)
|
||||
if buff.type~= t1 and buff.signType~=t2 then
|
||||
return
|
||||
end
|
||||
if buff.caster~=role then
|
||||
return
|
||||
end
|
||||
BattleUtil.RandomAction(v1, function()
|
||||
BattleLogic.InsertSkillRole(role)
|
||||
end)
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.BuffEnd, OnBuffEnd,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:间接伤害 ]
|
||||
[477] = function(role, args,id,judge)
|
||||
local t1 = args[1]
|
||||
local t2 = args[2]
|
||||
local cp = args[3]
|
||||
local num= args[4]
|
||||
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
|
||||
return
|
||||
end
|
||||
if cp==2 and defRole.Rage>=num then
|
||||
return
|
||||
end
|
||||
|
||||
if type==1 and not skill then
|
||||
return
|
||||
end
|
||||
|
||||
if type==2 and skill then
|
||||
return
|
||||
end
|
||||
if BattleLogic.BuffMgr:HasBuff(defRole, t1, function(buff) return buff.signType == t2 and buff.caster==role end) then
|
||||
local dmgDeduction = damage - floor(BattleUtil.ErrorCorrection(BattleUtil.CountValue(damage, f1, ct)))
|
||||
if func then func(dmgDeduction) end
|
||||
end
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.PassiveBeDamaging, 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:间接伤害 ]
|
||||
[478] = function(role, args,id,judge)
|
||||
local t1 = args[1]
|
||||
local t2 = args[2]
|
||||
local cp = args[3]
|
||||
local num= args[4]
|
||||
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
|
||||
return
|
||||
end
|
||||
if cp==2 and defRole.Rage>=num then
|
||||
return
|
||||
end
|
||||
|
||||
if type==1 and not skill then
|
||||
return
|
||||
end
|
||||
|
||||
if type==2 and skill then
|
||||
return
|
||||
end
|
||||
if BattleLogic.BuffMgr:HasBuff(atkRole, t1, function(buff) return buff.signType == t2 and buff.caster==role end) then
|
||||
local dmgDeduction = damage - floor(BattleUtil.ErrorCorrection(BattleUtil.CountValue(damage, f1, ct)))
|
||||
if func then func(dmgDeduction) end
|
||||
end
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveBeDamaging,nil,nil,role)
|
||||
end,
|
||||
}
|
||||
return passivityList
|
|
@ -2,7 +2,7 @@ BreakArmor = Buff:New()
|
|||
|
||||
--初始化Buff,通过传入一些自定义参数控制成长相关的数值
|
||||
function BreakArmor:SetData(...)
|
||||
self.signType, --1 破军 2.迷魂 3. 4.主角状态 5.仇视 6.机械猴子标记
|
||||
self.signType, --1 破军 2.迷魂 3. 4.主角状态 5.仇视 6.机械猴子标记 7.逆风 8.顺风
|
||||
self.signValue1,
|
||||
self.signValue2=...
|
||||
-- 刷新排序等级
|
||||
|
|
|
@ -298,6 +298,62 @@ function BattleUtil.GetMaxTargetNum(chooseId)
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
function BattleUtil.GetSkillData(skillId,skinId)
|
||||
local skillConfig=ConfigManager.TryGetConfigData(ConfigName.SkillLogicConfig,skillId)
|
||||
if not skillId or not skillConfig then
|
||||
return
|
||||
end
|
||||
local skill = {skillId}
|
||||
--skill = {skillId, 命中时间, 持续时间, 伤害次数, {目标id1, 效果1, 效果2, ...},{目标id2, 效果3, 效果4, ...}, ...}
|
||||
--效果 = {效果类型id, 效果参数1, 效果参数2, ...}
|
||||
|
||||
local target = skillConfig.Target
|
||||
local effectList = skillConfig.Effect
|
||||
local effectArgsList = skillConfig.EffectValue
|
||||
|
||||
local eid = BattleManager.GetCombatIdBySkin(skillId, skinId or 0)
|
||||
local EffectCombat = ConfigManager.TryGetConfigData(ConfigName.CombatControl,eid)
|
||||
skill[1] = skillId
|
||||
skill[2] = EffectCombat.KeyFrame/1000
|
||||
skill[3] = EffectCombat.SkillDuration/1000
|
||||
skill[4] = EffectCombat.SkillNumber
|
||||
|
||||
local index = 1
|
||||
for i = 1, #effectList do
|
||||
local effectGroup = { target[i][1] } -- 效果目标
|
||||
for j = 1, #effectList[i] do
|
||||
local effect = { effectList[i][j] } -- 效果Id
|
||||
for k = 1, #effectArgsList[index] do
|
||||
effect[k + 1] = effectArgsList[index][k] -- 效果参数
|
||||
end
|
||||
effectGroup[j + 1] = effect
|
||||
index = index + 1
|
||||
end
|
||||
skill[i + 4] = effectGroup
|
||||
end
|
||||
return skill
|
||||
end
|
||||
|
||||
-- 获取技能表现id
|
||||
function BattleUtil.GetCombatIdBySkin(skillId, skinId)
|
||||
local skillConfig=ConfigManager.TryGetConfigData(ConfigName.SkillLogicConfig,skillId)
|
||||
local effectIds = skillConfig.SkillDisplay
|
||||
local eid=0
|
||||
local skin = skinId or 0
|
||||
if effectIds then
|
||||
for i = 1, #effectIds do
|
||||
if effectIds[i][1] == skin then
|
||||
eid=effectIds[i][2]
|
||||
end
|
||||
end
|
||||
end
|
||||
if eid==0 then
|
||||
eid=effectIds[1][2]
|
||||
end
|
||||
return eid
|
||||
end
|
||||
|
||||
--
|
||||
function BattleUtil.ChooseTarget(role, chooseId,queryType)
|
||||
local chooseType = floor(chooseId / 100000) % 10
|
||||
|
|
|
@ -92,6 +92,7 @@ function RoleLogic:Init(uid, data, position)
|
|||
self.ctrl_chaos = false --混乱
|
||||
self.deadFilter = true -- 控制死亡,置为false则角色暂时无法死亡
|
||||
self.isSuppress = false
|
||||
self.notAction = false --无法行动
|
||||
self.isExile = false --是否放逐
|
||||
self.reliveFilter = true -- 控制复活的标志位,置为false角色将不再享受复活效果
|
||||
self.reliveHPF = 1
|
||||
|
@ -109,6 +110,10 @@ function RoleLogic:Init(uid, data, position)
|
|||
self.isNormalAttackAddRage=true --普攻是否回复怒气
|
||||
self.curMainTarget=nil --当前主目标
|
||||
self.isAllBurn = false --是否视敌方全体为燃烧
|
||||
self.sunTime = 0 --顺风次数
|
||||
self.sunMaxTime = 0
|
||||
self.niTime = 0 --逆风次数
|
||||
self.niMaxTime = 0
|
||||
self.suppressTime = 0 --被压制的次数
|
||||
self.passiveList = {}
|
||||
if data.passivity and #data.passivity > 0 then
|
||||
|
@ -454,6 +459,9 @@ function RoleLogic:IsAvailable(skill)
|
|||
if self.ctrl_palsy and self.Rage < self.SuperSkillRage then
|
||||
return false
|
||||
end
|
||||
if self.notAction then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ function Skill:Init(role, effectData, type, targets, isAdd, isRage,isTriggerJudg
|
|||
self.targets={}
|
||||
self.skillDamage=0
|
||||
self.AttactScale = 0 --用于追加的技能,设定其伤害的比例
|
||||
self.effectiveTime = 0 --顺风/逆风生效次数
|
||||
if isTriggerJudge~=nil then
|
||||
self.isTriggerJudge=isTriggerJudge
|
||||
else
|
||||
|
@ -153,6 +154,7 @@ function Skill:EndSkill()
|
|||
self.isTriggePassivity=false
|
||||
self.triggerPassivityId={}
|
||||
self.skillDamage=0
|
||||
self.effectiveTime = 0
|
||||
if self.castDoneFunc then self.castDoneFunc() end
|
||||
self.targets={}
|
||||
end)
|
||||
|
|
Loading…
Reference in New Issue