【战斗】==============新将战斗修改提交
parent
379fb97b98
commit
14c546f315
|
@ -2890,12 +2890,16 @@ local effectList = {
|
|||
BattleUtil.FinalDamageCountShield(nil,caster, target,damage)
|
||||
end)
|
||||
end,
|
||||
--复活目标,并恢复血量[a]%
|
||||
--a[float]
|
||||
--复活目标,并恢复血量[a]%,回复[b]点怒气,并无敌[c]回合
|
||||
--a[float],b[int],c[int]
|
||||
[147]=function(caster, target, args, interval, skill)
|
||||
local pro=args[1]
|
||||
local num=args[2]
|
||||
local round=args[3]
|
||||
target.isRealDead=true
|
||||
target:SetRelive(pro, caster)
|
||||
BattleUtil.CalRage(caster,target,num,CountTypeName.Add)
|
||||
target:AddBuff(Buff.Create(caster, BuffName.Shield,round, ShieldTypeName.AllReduce, 0, 0))
|
||||
end,
|
||||
--造成[a]%的[b]伤害,造成伤害的[c]%用于医疗生命值最低的队友。(攻击目标为多人治疗不重复)
|
||||
--a[float],b[伤害类型],c[float]
|
||||
|
@ -3088,7 +3092,15 @@ local effectList = {
|
|||
BattleUtil.FinalDamage(nil, caster, target,addDamage, nil, 0, nil, true)
|
||||
end)
|
||||
end,
|
||||
|
||||
--造成自身损失生命[a]%的间接伤害
|
||||
--a[float]
|
||||
[158] = function(caster, target, args, interval, skill)
|
||||
local pro = args[1]
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
local value=(skill.ownHero:GetRoleData(RoleDataName.MaxHp)-skill.ownHero:GetRoleData(RoleDataName.Hp))*pro
|
||||
BattleUtil.FinalDamage(nil, caster, target,floor(value), nil, 0, nil, true)
|
||||
end)
|
||||
end,
|
||||
}
|
||||
|
||||
return effectList
|
|
@ -12219,5 +12219,79 @@ local passivityList = {
|
|||
end
|
||||
|
||||
end,
|
||||
--行动前,如果自身生命百分比为最低,则给自身[a]属性改变[b][c]%,持续[d]回合
|
||||
--a[int],b[int],c[float],d[int]
|
||||
[463] = function(role, args)
|
||||
local pro = args[1]
|
||||
local ct = args[2]
|
||||
local v1 = args[3]
|
||||
local r1 = args[4]
|
||||
local trigger=nil
|
||||
local onRoleTurnStart=function()
|
||||
local list = RoleManager.Query(function(v) return v.camp == role.camp end)
|
||||
--生命最少改成生命百分比最少 2020/09/29 by:王振兴
|
||||
BattleUtil.SortByHpFactor(list, 1)
|
||||
if list[1]==role then
|
||||
role:AddBuff(Buff.Create(role, BuffName.PropertyChange, r1, BattlePropList[pro], v1, ct))
|
||||
end
|
||||
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.RoleTurnStart,onRoleTurnStart,nil,nil,role)
|
||||
|
||||
end,
|
||||
-- 每当敌方时空孙悟空目标死亡,自身会额外行动一次,每层标记回复[a]点怒气,附加[b]属性[c]%的御甲,自身[d]属性改变[e][f]%,持续[g]回合(所有参数都不填,只生效额外行动)
|
||||
-- a[int],b[int],c[float],d[int],e[int],f[float],g[int]
|
||||
[464] = function(role, args)
|
||||
local num = args[1]
|
||||
local p1 = args[2]
|
||||
local v1 = args[3]
|
||||
local p2 = args[4]
|
||||
local ct = args[5]
|
||||
local v2 = args[6]
|
||||
local r1 = args[7]
|
||||
-- 死亡数量
|
||||
local onBattleRoleDead = function(defRole)
|
||||
local list2=BattleLogic.BuffMgr:GetAllBuffByFunc(function(buff) return buff.type==BuffName.BreakArmor and buff.signType==6 and buff.target==defRole end)
|
||||
if list2 and #list2>0 then
|
||||
BattleLogic.InsertSkillRole(role)
|
||||
if num and p1 and v1 and p2 and ct and v2 and r1 then
|
||||
local len=#list2
|
||||
BattleUtil.CalRage(role,role,num*len,CountTypeName.Add)
|
||||
local blood=floor(BattleUtil.FP_Mul(defRole:GetRoleData(BattlePropList[p1],v1,len)))
|
||||
BattleUtil.AddBlood(role,blood)
|
||||
role:AddBuff(Buff.Create(role, BuffName.PropertyChange, r1, BattlePropList[p2], v2*len, ct))
|
||||
end
|
||||
end
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.BattleRoleDead, onBattleRoleDead,nil,nil,role)
|
||||
end,
|
||||
--行动前,消耗自身当前[a]%的生命,并将消耗生命的[b]%转化为御甲,受到来自治疗神将的治疗不会回复生命,改成附加治疗量[c]%的御甲
|
||||
--a[float],b[float],c[float]
|
||||
[465] = function(role, args)
|
||||
local v1 = args[1]
|
||||
local v2 = args[2]
|
||||
local v3 = args[3]
|
||||
local onRoleTurnStart=function()
|
||||
local curHp=role:GetRoleData(RoleDataName.Hp)
|
||||
if curHp<=1 then
|
||||
return
|
||||
end
|
||||
local hp = floor(BattleUtil.FP_Mul(curHp,v1))
|
||||
role.data:SubValue(RoleDataName.Hp, hp)
|
||||
local blood = floor(hp*v2)
|
||||
BattleUtil.AddBlood(role,blood)
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.RoleTurnStart,onRoleTurnStart,nil,nil,role)
|
||||
local onTreatVoid=function(func,treat,caster)
|
||||
if caster.job==1 then
|
||||
BattleUtil.AddBlood(role,floor(treat*v3))
|
||||
func(true)
|
||||
else
|
||||
func(false)
|
||||
end
|
||||
end
|
||||
|
||||
role.Event:AddEvent(BattleEventName.CheckTreatVoid,onTreatVoid,nil,nil,role)
|
||||
end,
|
||||
}
|
||||
return passivityList
|
|
@ -52,7 +52,7 @@ end
|
|||
function Blood:CountBloodValue(damage,atkRole)
|
||||
local finalDamage=0
|
||||
if self.target==nil then
|
||||
return
|
||||
return damage
|
||||
end
|
||||
self.bloodValue=self.bloodValue-damage
|
||||
if self.bloodValue<=0 then
|
||||
|
|
|
@ -2,7 +2,7 @@ BreakArmor = Buff:New()
|
|||
|
||||
--初始化Buff,通过传入一些自定义参数控制成长相关的数值
|
||||
function BreakArmor:SetData(...)
|
||||
self.signType, --1 破军 2.迷魂 3. 4.主角状态 5.仇视
|
||||
self.signType, --1 破军 2.迷魂 3. 4.主角状态 5.仇视 6.机械猴子标记
|
||||
self.signValue1,
|
||||
self.signValue2=...
|
||||
-- 刷新排序等级
|
||||
|
|
|
@ -204,6 +204,7 @@ BattleEventName = {
|
|||
RoleAddBuffCheckBan = indexAdd(),--角色添加buff检测是否被禁止
|
||||
WeaponSkillCast = indexAdd(), --神兵技能释放
|
||||
CheckFalseNoDead = indexAdd(), --检测伪不灭
|
||||
CheckTreatVoid = indexAdd(), --检测治疗是否无效
|
||||
}
|
||||
|
||||
BattleMaxFrame = 1000000
|
||||
|
|
|
@ -1329,7 +1329,14 @@ function BattleUtil.FinalTreat(castRole, targetRole, value, baseFactor,skill)
|
|||
--baseTreat = BattleUtil.CountChangeList(baseTreat, cl)
|
||||
-- 取整
|
||||
local baseTreat = floor(baseTreat + 0.5)
|
||||
|
||||
local isVoid=false
|
||||
local treatVoidFunc=function(_void)
|
||||
isVoid=_void
|
||||
end
|
||||
targetRole.Event:DispatchEvent(BattleEventName.CheckTreatVoid,treatVoidFunc,baseTreat,castRole)
|
||||
if isVoid then
|
||||
return
|
||||
end
|
||||
local treat = min(baseTreat, maxHp - hp)
|
||||
if treat > 0 then
|
||||
targetRole.data:AddValue(RoleDataName.Hp, treat)
|
||||
|
@ -1407,7 +1414,14 @@ function BattleUtil.ApplyTreat(castRole, targetRole, value, baseFactor,critDamag
|
|||
|
||||
-- 取整
|
||||
local baseTreat = floor(baseTreat + 0.5)
|
||||
|
||||
local isVoid=false
|
||||
local treatVoidFunc=function(_void)
|
||||
isVoid=_void
|
||||
end
|
||||
targetRole.Event:DispatchEvent(BattleEventName.CheckTreatVoid,treatVoidFunc,baseTreat,castRole)
|
||||
if isVoid then
|
||||
return
|
||||
end
|
||||
local treat = min(baseTreat, maxHp - hp)
|
||||
if treat > 0 then
|
||||
targetRole.data:AddValue(RoleDataName.Hp, treat)
|
||||
|
|
Loading…
Reference in New Issue