【战斗】========被动438修改
parent
92e56472de
commit
1f37ce3b4e
|
@ -11308,6 +11308,8 @@ local passivityList = {
|
||||||
local time=args[4]
|
local time=args[4]
|
||||||
local num=0
|
local num=0
|
||||||
--处理伤害技能
|
--处理伤害技能
|
||||||
|
local triggerSkill=nil
|
||||||
|
local isTrigger=false
|
||||||
local onDamageBefore=function(defRole, factorFunc, damageType, skill)
|
local onDamageBefore=function(defRole, factorFunc, damageType, skill)
|
||||||
if type~=damageType or type>2 then
|
if type~=damageType or type>2 then
|
||||||
return
|
return
|
||||||
|
@ -11315,14 +11317,21 @@ local passivityList = {
|
||||||
if not skill or skill.type~=BattleSkillType.Special or skill.isAdd then
|
if not skill or skill.type~=BattleSkillType.Special or skill.isAdd then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if isTrigger then
|
||||||
|
return
|
||||||
|
end
|
||||||
if num>=time then
|
if num>=time then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if triggerSkill then
|
||||||
|
return
|
||||||
|
end
|
||||||
BattleUtil.RandomAction(p1,function()
|
BattleUtil.RandomAction(p1,function()
|
||||||
role:AddSuperSkill(false,true,nil,false,false,p2)
|
role:AddSuperSkill(false,true,nil,false,false,p2)
|
||||||
|
triggerSkill=skill
|
||||||
num=num+1
|
num=num+1
|
||||||
end)
|
end)
|
||||||
|
isTrigger=true
|
||||||
end
|
end
|
||||||
role.Event:AddEvent(BattleEventName.RoleDamageBefore,onDamageBefore,nil,nil,role)
|
role.Event:AddEvent(BattleEventName.RoleDamageBefore,onDamageBefore,nil,nil,role)
|
||||||
--处理治疗技能
|
--处理治疗技能
|
||||||
|
@ -11333,13 +11342,21 @@ local passivityList = {
|
||||||
if not skill or skill.type~=BattleSkillType.Special or skill.isAdd then
|
if not skill or skill.type~=BattleSkillType.Special or skill.isAdd then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if isTrigger then
|
||||||
|
return
|
||||||
|
end
|
||||||
if num>=time then
|
if num>=time then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if triggerSkill then
|
||||||
|
return
|
||||||
|
end
|
||||||
BattleUtil.RandomAction(p1,function()
|
BattleUtil.RandomAction(p1,function()
|
||||||
role:AddSuperSkill(false,true,nil,false,false,p2)
|
role:AddSuperSkill(false,true,nil,false,false,p2)
|
||||||
|
triggerSkill=skill
|
||||||
num=num+1
|
num=num+1
|
||||||
end)
|
end)
|
||||||
|
isTrigger=true
|
||||||
end
|
end
|
||||||
role.Event:AddEvent(BattleEventName.PassiveTreatingFactor,OnTreatSkill,nil,nil,role)
|
role.Event:AddEvent(BattleEventName.PassiveTreatingFactor,OnTreatSkill,nil,nil,role)
|
||||||
|
|
||||||
|
@ -11347,6 +11364,12 @@ local passivityList = {
|
||||||
num=0
|
num=0
|
||||||
end
|
end
|
||||||
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange,onRoundChange,nil,nil,role)
|
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange,onRoundChange,nil,nil,role)
|
||||||
|
local OnSkillCast=function()
|
||||||
|
triggerSkill=nil
|
||||||
|
isTrigger=false
|
||||||
|
end
|
||||||
|
|
||||||
|
role.Event:AddEvent(BattleEventName.SkillCastBefore,OnSkillCast,nil,nil,role)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@ function RecruitPanelNew:InitComponent()
|
||||||
self.helpPosition = self.helpBtn:GetComponent("RectTransform").localPosition
|
self.helpPosition = self.helpBtn:GetComponent("RectTransform").localPosition
|
||||||
|
|
||||||
self.wish = Util.GetGameObject(self.panel,"wishBtn")
|
self.wish = Util.GetGameObject(self.panel,"wishBtn")
|
||||||
|
self.wish:SetActive(false)
|
||||||
self.wishNoOpen = Util.GetGameObject(self.wish,"noOpen")
|
self.wishNoOpen = Util.GetGameObject(self.wish,"noOpen")
|
||||||
self.wishBtn = Util.GetGameObject(self.wishNoOpen,"Img")
|
self.wishBtn = Util.GetGameObject(self.wishNoOpen,"Img")
|
||||||
self.wishTextImg = Util.GetGameObject(self.wishNoOpen,"ImgText")
|
self.wishTextImg = Util.GetGameObject(self.wishNoOpen,"ImgText")
|
||||||
|
@ -181,7 +182,8 @@ function RecruitPanelNew:UpdataWishPanel()
|
||||||
self.tenTip.gameObject:SetActive(false)
|
self.tenTip.gameObject:SetActive(false)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
self.wish.gameObject:SetActive(true)
|
--屏蔽心愿
|
||||||
|
self.wish.gameObject:SetActive(false)
|
||||||
--如果没有达到150抽按钮置灰
|
--如果没有达到150抽按钮置灰
|
||||||
local data = tonumber(specialConfig[119].Value)
|
local data = tonumber(specialConfig[119].Value)
|
||||||
NetManager.ChoiceWishHeroRequest(nil,function ()
|
NetManager.ChoiceWishHeroRequest(nil,function ()
|
||||||
|
|
Loading…
Reference in New Issue