[战斗]=======================被动添加480 481
parent
4ca9009932
commit
3dfc21e7b9
|
@ -12720,5 +12720,78 @@ local passivityList = {
|
|||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, onBattleRoundChange,nil,nil,role)
|
||||
end,
|
||||
--回合结束时,再次释放一次技能
|
||||
--a[int]
|
||||
[480]=function(role,args,id,judge)
|
||||
local num=args[1]
|
||||
local onRoundChange=function(round)
|
||||
if round<2 then
|
||||
return
|
||||
end
|
||||
role:AddSkill(BattleSkillType.Special, false, false, nil,false)
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundEnd, onRoundChange,nil,nil,role)
|
||||
end,
|
||||
--释放技能如果造成减怒,对目标造成 减除怒气*属性[a][b]%的伤害,每回合最多触发[c]次
|
||||
--a[int],b[float],c[int]
|
||||
[481]=function(role,args,id,judge)
|
||||
local f1=args[1]
|
||||
local v1 =args[2]
|
||||
local num=args[3]
|
||||
local triggerNum=0
|
||||
local isTrigger=false
|
||||
local curRound=0
|
||||
local onRageChange=function(caster, target, deltaRage,type,value)
|
||||
if triggerNum>=num then
|
||||
return
|
||||
end
|
||||
if caster~=role then
|
||||
return
|
||||
end
|
||||
if type~=CountTypeName.Sub then
|
||||
return
|
||||
end
|
||||
if (f1==12 or f1==13) and BattleUtil.CheckIsBoss(target) then
|
||||
return
|
||||
end
|
||||
local val = floor(BattleUtil.FP_Mul(v1*value, target:GetRoleData(BattlePropList[f1])))
|
||||
BattleUtil.FinalDamageCountShield(nil,role,target,val)
|
||||
isTrigger=true
|
||||
end
|
||||
|
||||
|
||||
local onSkillCastEnd=function(_skill)
|
||||
if _skill and not _skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if _skill.owner==role and (_skill.type==BattleSkillType.Special or _skill.type==BattleSkillType.Extra) then
|
||||
role.Event:AddEvent(BattleEventName.RecordRageChange,onRageChange,nil,nil,role)
|
||||
end
|
||||
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCast,onSkillCastEnd,nil,nil,role)
|
||||
|
||||
|
||||
local onRoleTurn=function(_skill)
|
||||
if _skill and not _skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if isTrigger then
|
||||
triggerNum=triggerNum+1
|
||||
isTrigger=false
|
||||
end
|
||||
role.Event:RemoveEvent(BattleEventName.RecordRageChange,onRageChange,nil,nil,role)
|
||||
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCastBefore,onRoleTurn,nil,nil,role)
|
||||
|
||||
local onRoundChange=function(round)
|
||||
BattleLogic.WaitForTrigger(2,function()
|
||||
triggerNum=0
|
||||
end)
|
||||
curRound=round
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundStart, onRoundChange,nil,nil,role)
|
||||
end,
|
||||
}
|
||||
return passivityList
|
Loading…
Reference in New Issue