【战斗】=====变身卡提交
parent
7348534847
commit
b9763ad25e
|
@ -18,6 +18,7 @@ local BuffRegister = {
|
|||
[BuffName.Blood] = "Blood",
|
||||
[BuffName.BanBlood] = "BanBlood",
|
||||
[BuffName.SigilSign] = "SigilSign",
|
||||
[BuffName.CommonSign] = "CommonSign",
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2731,63 +2731,90 @@ local effectList = {
|
|||
end)
|
||||
end)
|
||||
end,
|
||||
-- [a]%概率造成[b],每回合造成[c]%自身[d]的伤害,持续[e]回合;[f]%概率使目标灼烧2层,[g]%概率3层
|
||||
-- a[float]b[持续伤害状态].c[float],d[属性]e[int],f[float],g[float]
|
||||
--概率[a]添加[b]类型[c]效果,[d]%概率无视免疫,持续[e]回合,参数1[f],参数2[g],参数3[h]
|
||||
--a[float],b[int],c[int],d[float],e[int],f[int/float],g[int/float],h[int/float]
|
||||
[141] = function(caster, target, args, interval, skill)
|
||||
local f1 = args[1]
|
||||
local dot = args[2]
|
||||
local f2 = args[3]
|
||||
local pro = args[4]
|
||||
local i1 = args[5]
|
||||
local p1 = args[6]
|
||||
local p2 = args[7]
|
||||
caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, skill, target)
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
local floor=0
|
||||
local rand=Random.Range01()
|
||||
if rand<=p2 then
|
||||
floor=3
|
||||
end
|
||||
if floor==0 and rand<=p1 then
|
||||
floor=2
|
||||
end
|
||||
if floor==0 and rand<=f2 then
|
||||
floor=1
|
||||
end
|
||||
|
||||
local damage = BattleUtil.ErrorCorrection(f2 * caster:GetRoleData(BattlePropList[pro]))
|
||||
if floor~=0 then
|
||||
for i = 1, floor do
|
||||
-- local buff = Buff.Create(caster, BuffName.DOT, i1, 1, dot, floor(damage))
|
||||
-- buff.skill=skill
|
||||
-- buff.isRealDamage = true
|
||||
-- target:AddBuff(buff)
|
||||
BattleUtil.RandomDot(1, dot, caster, target, i1, 1, damage,skill)
|
||||
end
|
||||
end
|
||||
|
||||
end)
|
||||
end,
|
||||
--概率[a]添加[b]类型[c]效果,持续[d]回合,参数1[e],参数2[f]
|
||||
--a[float],b[int],c[int],d[int],e[int/float],f[int/float]
|
||||
[142] = function(caster, target, args, interval, skill)
|
||||
local pro=args[1]
|
||||
local t1=args[2]
|
||||
local t2=args[3]
|
||||
local r1=args[4]
|
||||
local v1=args[5]
|
||||
local v2=args[6]
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
if t1==BuffName.SigilSign then
|
||||
local pro2=args[4]
|
||||
local r1=args[5]
|
||||
local v1=args[6]
|
||||
local v2=args[7]
|
||||
local v3=args[8]
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
BattleUtil.RandomAction(pro,function()
|
||||
local buff=Buff.Create(target, t1, r1)
|
||||
target:AddBuff(buff)
|
||||
local buff=nil
|
||||
if t1==BuffName.Control then
|
||||
buff=Buff.Create(caster, t1, r1,t2)
|
||||
elseif t1==BuffName.Immune then
|
||||
if t2==4 then --自定义免疫
|
||||
local imms={}
|
||||
if v1 then
|
||||
table.insert(imms,v1)
|
||||
end
|
||||
if v2 then
|
||||
table.insert(imms,v2)
|
||||
end
|
||||
if v3 then
|
||||
table.insert(imms,v3)
|
||||
end
|
||||
local emmune=function(buff)
|
||||
return buff.type == BuffName.Control and (BattleUtil.ChecklistIsContainValue(imms,buff.ctrlType)),caster
|
||||
end
|
||||
buff=Buff.Create(caster, t1, r1,t2,emmune)
|
||||
else
|
||||
buff=Buff.Create(caster, t1, r1,t2)
|
||||
end
|
||||
else
|
||||
buff=Buff.Create(caster, t1, r1,t2)
|
||||
end
|
||||
target:AddBuff(buff,pro2)
|
||||
end)
|
||||
|
||||
end)
|
||||
|
||||
end,
|
||||
--概率[a]%为[b]阵营非[c]职业添加[d]类型[e]效果,[f]%概率无视免疫,持续[g]回合,参数1[h],参数2[i],参数3[j]
|
||||
--a[float],b[int],c[int],d[int],e[int],f[float],g[int],h[int/float],i[int/float]
|
||||
[142] = function(caster, target, args, interval, skill)
|
||||
local pro=args[1]
|
||||
local ele=args[2]
|
||||
local job=args[3]
|
||||
local t1=args[4]
|
||||
local t2=args[5]
|
||||
local pro2=args[6]
|
||||
local r1=args[7]
|
||||
local v1=args[8]
|
||||
local v2=args[9]
|
||||
local v3=args[10]
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
if target.element~=ele and ele~=0 then
|
||||
return
|
||||
end
|
||||
if target.job==job and job~=0 then
|
||||
return
|
||||
end
|
||||
if t1==BuffName.CommonSign then
|
||||
BattleUtil.RandomAction(pro,function()
|
||||
local buff=Buff.Create(caster, t1, r1)
|
||||
target:AddBuff(buff,pro2)
|
||||
end)
|
||||
end
|
||||
end)
|
||||
|
||||
end,
|
||||
|
||||
--回复目标[a]属性[b]%的生命(最终治疗 不暴击,不受被动影响)
|
||||
--a[int],b[float]
|
||||
[143] = function(caster, target, args, interval, skill)
|
||||
local pro=args[1]
|
||||
local v1=args[2]
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
local treat=floor(target:GetRoleData(RoleDataName.MaxHp)*v1)
|
||||
BattleUtil.FinalTreat(caster,target,treat,1,skill)
|
||||
end)
|
||||
end,
|
||||
|
||||
}
|
||||
|
||||
return effectList
|
|
@ -0,0 +1,47 @@
|
|||
CommonSign = Buff:New()
|
||||
|
||||
--初始化Buff,通过传入一些自定义参数控制成长相关的数值
|
||||
function CommonSign:SetData(...)
|
||||
self.signType=...
|
||||
-- 刷新排序等级
|
||||
self.sort = 4
|
||||
end
|
||||
|
||||
local onRageChange=function(caster,target,func,type,value)
|
||||
|
||||
local buff=Buff.Create(caster,BuffName.Control,1,7)
|
||||
target:AddBuff(buff)
|
||||
end
|
||||
|
||||
local onSkillCast=function(skill)
|
||||
skill.owner.Event:AddEvent(BattleEventName.RecordRageChange,onRageChange,nil,nil,skill.owner)
|
||||
end
|
||||
|
||||
local onSkillCastEnd=function(skill)
|
||||
skill.owner.Event:RemoveEvent(BattleEventName.RecordRageChange,onRageChange,nil,nil,skill.owner)
|
||||
end
|
||||
|
||||
--初始化后调用一次
|
||||
function CommonSign:OnStart()
|
||||
self.target.Event:AddEvent(BattleEventName.SkillCast,onSkillCast,nil,nil,self.target)
|
||||
self.target.Event:AddEvent(BattleEventName.SkillCastEnd,onSkillCastEnd,nil,nil,self.target)
|
||||
end
|
||||
|
||||
--间隔N帧触发,返回true时表示继续触发,返回false立刻触发OnEnd
|
||||
function CommonSign:OnTrigger()
|
||||
return true
|
||||
end
|
||||
|
||||
--效果结束时调用一次
|
||||
function CommonSign:OnEnd()
|
||||
self.target.Event:RemoveEvent(BattleEventName.SkillCast,onSkillCast,nil,nil,self.target)
|
||||
self.target.Event:RemoveEvent(BattleEventName.SkillCastEnd,onSkillCastEnd,nil,nil,self.target)
|
||||
|
||||
end
|
||||
|
||||
--只有当cover字段为true时触发,返回true则被新效果覆盖
|
||||
function CommonSign:OnCover(newBuff)
|
||||
return true
|
||||
end
|
||||
|
||||
return CommonSign
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 29b13ba3e65292944850a33142e8c29b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -6,7 +6,8 @@ function NoDead:SetData(...)
|
|||
self.factorCT,
|
||||
self.isCanRelive,
|
||||
self.pro,
|
||||
self.v1 = ... -- buff期间的增伤系数
|
||||
self.v1,
|
||||
self.changePro = ... -- buff期间的增伤系数
|
||||
self.cover = true --控制效果可被覆盖
|
||||
-- 刷新排序等级
|
||||
self.sort = 4
|
||||
|
@ -26,7 +27,7 @@ end
|
|||
-- 记录承受伤害
|
||||
function NoDead:OnRoleBeHit(atkRole, damage, bCrit, finalDmg, damageType, skill,isDirect)
|
||||
if skill and (skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra or skill.type==BattleSkillType.DeadSkill ) and atkRole.camp~=self.target.camp then
|
||||
self.recordDamage=self.recordDamage+math.floor(damage*0.1)
|
||||
self.recordDamage=self.recordDamage+math.floor(damage*self.changePro)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -271,6 +271,7 @@ BuffName = {
|
|||
Blood = 13,
|
||||
BanBlood = 14,
|
||||
SigilSign = 15,
|
||||
CommonSign = 16,
|
||||
}
|
||||
|
||||
DotType = {
|
||||
|
|
|
@ -370,6 +370,14 @@ function BattleUtil.ChooseTarget(role, chooseId)
|
|||
elseif chooseLimit == 6 then --两纵排单位
|
||||
local tempArr=BattleUtil.ChooseTowCol(arr)
|
||||
arr=tempArr
|
||||
elseif chooseLimit == 7 then --佛阵营
|
||||
local tempArr = {}
|
||||
for i = 1, #arr do
|
||||
if arr[i].element == BattleRoleElementType.FO then
|
||||
table.insert(tempArr, arr[i])
|
||||
end
|
||||
end
|
||||
arr = tempArr
|
||||
end
|
||||
|
||||
-- 选择条件
|
||||
|
@ -433,6 +441,8 @@ function BattleUtil.ChooseTarget(role, chooseId)
|
|||
if list and #list>0 then
|
||||
arr=RoleManager.GetNeighbor(list[1], chooseType)
|
||||
end
|
||||
elseif chooseWeight ==15 then --敌方
|
||||
-- body
|
||||
end
|
||||
local finalArr = {}
|
||||
if num == 0 then
|
||||
|
@ -698,7 +708,7 @@ function BattleUtil.CalRage(caster, target, value, countType,isBorrow)
|
|||
if (countType==3 or countType==4) and target.RoundMaxSubRage~=0 then
|
||||
target.AllSubRage=target.AllSubRage-deltaRage
|
||||
end
|
||||
|
||||
caster.Event:DispatchEvent(BattleEventName.RecordRageChange, caster, target, deltaRage,countType,value,lastRage,isBorrow)
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.RecordRageChange, caster, target, deltaRage,countType,value,lastRage,isBorrow)
|
||||
-- 用于记录统计
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.RecordRage, caster, target, deltaRage)
|
||||
|
|
|
@ -169,6 +169,13 @@ local _ConditionConfig = {
|
|||
|
||||
return false
|
||||
end,
|
||||
[9] = function(skill, condition) --6:我方道系非治疗数量
|
||||
local conId = condition[1]
|
||||
local comType = condition[2]
|
||||
local comValue = condition[3]
|
||||
local list=RoleManager.Query(function(role) return role.camp==skill.owner.camp and role.element==BattleRoleElementType.DAO and role.job~=1 end)
|
||||
return BattleUtil.CompareValue(#list, comValue, comType)
|
||||
end,
|
||||
}
|
||||
|
||||
-- 条件检测
|
||||
|
|
|
@ -118,6 +118,22 @@ local _TriggerConfig = {
|
|||
local args = {...}
|
||||
local role = args[1]
|
||||
return role.camp == skill.owner.camp
|
||||
end,
|
||||
[13] = function(skill, ...)--13:敌方攻击最高单位行动后
|
||||
local args = {...}
|
||||
local caster = args[1]
|
||||
local cam=skill.owner.camp
|
||||
if caster.camp==cam then
|
||||
return false
|
||||
end
|
||||
local list = RoleManager.Query(function(v) return v.camp~=cam end)
|
||||
if list and #list>0 then
|
||||
BattleUtil.SortByProp(list,RoleDataName.Attack,0)
|
||||
if caster==list[1] then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
},
|
||||
[BattleEventName.BattleStart] = {
|
||||
|
@ -160,7 +176,13 @@ local _TriggerConfig = {
|
|||
local args = {...}
|
||||
local castSkill = args[1]
|
||||
return castSkill.owner.camp == skill.owner.camp and castSkill.owner.job==2 and (castSkill.type==BattleSkillType.DeadSkill or castSkill.type==BattleSkillType.Extra or castSkill.type==BattleSkillType.Special)
|
||||
end
|
||||
end,
|
||||
[14] =function(skill,...) --14:我方金乌释放技能后
|
||||
local args = {...}
|
||||
local castSkill = args[1]
|
||||
return castSkill.owner.camp == skill.owner.camp and castSkill.owner.type==BattleUnitType.Monster and castSkill.owner.uid==20008
|
||||
end,
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -327,7 +327,7 @@ function RoleLogic:IsAssignHeroAndHeroStar(id,star)
|
|||
end
|
||||
|
||||
|
||||
function RoleLogic:AddBuff(buff)
|
||||
function RoleLogic:AddBuff(buff,_ignorePro)
|
||||
if self:IsRealDead() then
|
||||
BattleLogic.BuffMgr:PutBuff(buff)
|
||||
return
|
||||
|
@ -352,6 +352,9 @@ function RoleLogic:AddBuff(buff)
|
|||
|
||||
--概率忽略免疫
|
||||
local ignoreProb=0
|
||||
if _ignorePro then
|
||||
ignoreProb=_ignorePro
|
||||
end
|
||||
local changeIgnore=function(v1,ct)
|
||||
ignoreProb=BattleUtil.CountValue(ignoreProb,v1,ct)
|
||||
end
|
||||
|
|
|
@ -13,6 +13,7 @@ local BuffTypeToConfigType = {
|
|||
[BuffName.Blood] = 10,
|
||||
[BuffName.BanBlood] = 11,
|
||||
[BuffName.SigilSign] = 13,
|
||||
[BuffName.CommonSign] = 14,
|
||||
}
|
||||
local function _GetPropChangeBuffCType(pName)
|
||||
for cType, pn in ipairs(BattlePropList) do
|
||||
|
@ -54,6 +55,8 @@ local function _GetBuffEffectConfig(buff)
|
|||
elseif bType==BuffName.BanBlood then
|
||||
cType = 1
|
||||
elseif bType==BuffName.SigilSign then
|
||||
cType = 1
|
||||
elseif bType==BuffName.CommonSign then
|
||||
cType = 1
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue