[战斗]========== 第四期觉醒技能修改
parent
4ec81d52f4
commit
bc7cb4b96a
|
|
@ -48,7 +48,7 @@ function EffectCaster:DoEffect(caster, target, eff, duration, skill)
|
|||
e = pe
|
||||
end
|
||||
end
|
||||
caster.Event:DispatchEvent(BattleEventName.SkillEffectBefore, skill, e, _PassiveCheck)
|
||||
caster.Event:DispatchEvent(BattleEventName.SkillEffectBefore, skill, e, _PassiveCheck,target,eff)
|
||||
target.Event:DispatchEvent(BattleEventName.BeSkillEffectBefore, skill, e, _PassiveCheck)
|
||||
|
||||
--
|
||||
|
|
@ -130,7 +130,7 @@ function EffectCaster:Cast()
|
|||
if arr[j] and not arr[j]:IsRealDead() then
|
||||
-- 检测是否命中
|
||||
if i == 1 then
|
||||
self.targetIsHit[arr[j]] = BattleUtil.CheckIsHit(self.skill.owner, arr[j])
|
||||
self.targetIsHit[arr[j]] = BattleUtil.CheckIsHit(self.skill.owner, arr[j],self.skill)
|
||||
end
|
||||
self:takeEffect(self.skill.owner, arr[j], effects, i, self.skill.hitTime, self.skill)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -2940,16 +2940,20 @@ local passivityList = {
|
|||
role.Event:AddEvent(BattleEventName.RoleHit, onHit)
|
||||
end,
|
||||
|
||||
-- 复活友方第[a]位阵亡的英雄并回复其[b]%的生命每场战斗触发[c]次
|
||||
-- a[int]b[float]c[int]
|
||||
-- 复活友方第[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]
|
||||
local f1 = args[2]
|
||||
local i2 = args[3]-- 无意义(第几个死亡的人只能有一个)
|
||||
|
||||
local ele = args[4]
|
||||
local v1 = args[5]
|
||||
local counter = 0
|
||||
local onRoleRealDead = function(deadRole)
|
||||
if deadRole.camp == role.camp then
|
||||
if ele and v1 and deadRole.element==ele then
|
||||
f1=v1
|
||||
end
|
||||
counter = counter + 1
|
||||
if counter == i1 then
|
||||
deadRole:SetRelive(f1)
|
||||
|
|
@ -3822,7 +3826,7 @@ local passivityList = {
|
|||
end,
|
||||
|
||||
-- 首回合免疫[a]效果
|
||||
-- a[控制状态]
|
||||
-- a[控制状态]b[控制状态]c[控制状态]
|
||||
[195] = function(role, args)
|
||||
local ctrl = args[1]
|
||||
local ctr2 = args[2]
|
||||
|
|
@ -5237,7 +5241,7 @@ local passivityList = {
|
|||
local onPassiveDamaging = function(func, defRole, damage,skill)
|
||||
--如果是boss 并且额外伤害是根据最大生命则返回
|
||||
local isBoss=BattleUtil.CheckIsBoss(defRole)
|
||||
if isBoss and f1==12 then
|
||||
if isBoss and (f1==12 or f1==13) then
|
||||
return
|
||||
end
|
||||
if skill and skill.type == BattleSkillType.Normal and skill.isAdd and skill.owner==role then
|
||||
|
|
@ -6080,6 +6084,127 @@ local passivityList = {
|
|||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillEffectBefore, onSkillEffectBefore)
|
||||
end,
|
||||
--如果被持续治疗的神将是[a]系神将,持续治疗效果[b]改变[c]回合,并添加免疫[d]的效果
|
||||
--a[int,角色职业] b[int,改变类型] c[int] d[int,控制类型]
|
||||
[294]=function(role,args,id,judge)
|
||||
local ele=args[1]
|
||||
local ct=args[2]
|
||||
local round=args[3]
|
||||
local immune=args[4]
|
||||
local onSkillEffectBefore = function(skill, e, func,target,effect)
|
||||
if target.roleData.element~=ele then
|
||||
return
|
||||
end
|
||||
if target==nil or effect==nil then
|
||||
return
|
||||
end
|
||||
local num=effect.roundDuration
|
||||
if effect.type==BuffName.HOT and effect.caster==role and num>1 then
|
||||
num=BattleUtil.CountValue(num,round,ct)
|
||||
effect.roundDuration=num
|
||||
local immune = function(buff)
|
||||
return buff.type == BuffName.Control and buff.ctrlType and buff.ctrlType==immune
|
||||
end
|
||||
local curBuff=Buff.Create(role, BuffName.Immune,num,4,immune)
|
||||
target:AddBuff(curBuff)
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillEffectBefore, onSkillEffectBefore)
|
||||
end,
|
||||
|
||||
--持续治疗效果结算时,回复被治疗的神将[a][b]%的血量
|
||||
-- a[int 属性类型] b[float]
|
||||
[295]=function(role,args)
|
||||
local pro=args[1]
|
||||
local v1=args[2]
|
||||
local OnBuffEnd=function(buff)
|
||||
if buff and buff.caster==role and buff.roundDuration>1 then
|
||||
local val = floor(BattleUtil.FP_Mul(v1, role:GetRoleData(BattlePropList[pro])))
|
||||
BattleUtil.CalTreat(role,buff.target, val)
|
||||
end
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.HotBuffEnd, OnBuffEnd)
|
||||
end,
|
||||
-- 每回合每追击[a]次,额外回复[b]点怒气
|
||||
--a[int],b[int]
|
||||
[296]=function(role,args,id,judge)
|
||||
local time=args[1]
|
||||
local num=args[2]
|
||||
local aa=0
|
||||
|
||||
local onSkillCast=function(skill)
|
||||
if skill and judge==1 and skill.isAdd and not skill.isTriggerJudge then
|
||||
return
|
||||
end
|
||||
|
||||
if skill and skill.isAdd then
|
||||
aa=aa+1
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast)
|
||||
|
||||
local onRoundChange=function()
|
||||
if aa>time then
|
||||
local ange= floor(aa/time)
|
||||
role:AddRage(ange*num, CountTypeName.Add)
|
||||
end
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange,onRoundChange )
|
||||
end,
|
||||
|
||||
-- 如果技能目标有自己,回复[a]点怒气
|
||||
-- a[int]
|
||||
[297] = function(role,args,id,judge)
|
||||
local num = args[1]
|
||||
-- 技能后后
|
||||
local onSkillEnd = function(skill)
|
||||
if skill and judge==1 and not skill.isTriggerJudge then
|
||||
return
|
||||
end
|
||||
if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra then
|
||||
local list = skill:GetDirectTargetsNoMiss()
|
||||
if list then
|
||||
local isHave=BattleUtil:ChecklistIsContainValue(list,role)
|
||||
if isHave then
|
||||
role:AddRage(num, CountTypeName.Add)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCast, onSkillEnd)
|
||||
end,
|
||||
|
||||
-- 技能,普攻治疗治疗的目标为[a]阵营,资料量额外提升[b]%,并解除[c]效果
|
||||
-- a[int], b[flaot], c[持续伤害type类型]
|
||||
[298] = function(role, args,id,judge)
|
||||
local ele = args[1]
|
||||
local v1 = args[2]
|
||||
local type = args[3]
|
||||
local curSkill = nil
|
||||
local passiveTreating = function(func,target)
|
||||
if curSkill and curSkill.isTriggerJudge==false and judge==1 then
|
||||
return
|
||||
end
|
||||
if target and target.roleData.element ==ele then
|
||||
BattleLogic.BuffMgr:ClearBuff(target, function (buff)
|
||||
return buff.type == BuffName.DOT and buff.damageType==type
|
||||
end)
|
||||
if func then func(v1, CountTypeName.AddPencent) end
|
||||
end
|
||||
end
|
||||
local OnSkillCast = function(skill)
|
||||
curSkill=skill
|
||||
role.Event:AddEvent(BattleEventName.PassiveTreatingFactor, passiveTreating)
|
||||
end
|
||||
local OnSkillCastEnd = function(skill)
|
||||
curSkill=nil
|
||||
role.Event:RemoveEvent(BattleEventName.PassiveTreatingFactor, passiveTreating)
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast)
|
||||
role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd)
|
||||
end,
|
||||
|
||||
|
||||
|
||||
}
|
||||
return passivityList
|
||||
|
|
@ -27,7 +27,7 @@ end
|
|||
|
||||
--效果结束时调用一次
|
||||
function HOT:OnEnd()
|
||||
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.HotBuffEnd, self)
|
||||
end
|
||||
|
||||
--只有当cover字段为true时触发,返回true则被新效果覆盖
|
||||
|
|
|
|||
|
|
@ -131,6 +131,8 @@ BattleEventName = {
|
|||
RoleCastSkillBefore = indexAdd(),
|
||||
--护盾buff消失以后
|
||||
ShieldBuffEnd=indexAdd(),
|
||||
--治疗效果导入
|
||||
HotBuffEnd=indexAdd(),
|
||||
}
|
||||
|
||||
BattleMaxFrame = 1000000
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ function Skill:Init(role, effectData, type, targets, isAdd, isRage) --type 0 异
|
|||
self.isKill = false --是否技能击杀目标
|
||||
self.isAdd = isAdd
|
||||
self.isRage = isRage
|
||||
|
||||
self.isTriggerJudge = true
|
||||
-- 初始化
|
||||
local effects = {}
|
||||
for i=5, #effectData do
|
||||
|
|
|
|||
Loading…
Reference in New Issue