【战斗】========被动438修改

dev_chengFeng
wangzhenxing 2022-04-26 11:14:49 +08:00
parent 92e56472de
commit 1f37ce3b4e
2 changed files with 27 additions and 2 deletions

View File

@ -11308,6 +11308,8 @@ local passivityList = {
local time=args[4]
local num=0
--处理伤害技能
local triggerSkill=nil
local isTrigger=false
local onDamageBefore=function(defRole, factorFunc, damageType, skill)
if type~=damageType or type>2 then
return
@ -11315,14 +11317,21 @@ local passivityList = {
if not skill or skill.type~=BattleSkillType.Special or skill.isAdd then
return
end
if isTrigger then
return
end
if num>=time then
return
end
if triggerSkill then
return
end
BattleUtil.RandomAction(p1,function()
role:AddSuperSkill(false,true,nil,false,false,p2)
triggerSkill=skill
num=num+1
end)
isTrigger=true
end
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
return
end
if isTrigger then
return
end
if num>=time then
return
end
if triggerSkill then
return
end
BattleUtil.RandomAction(p1,function()
role:AddSuperSkill(false,true,nil,false,false,p2)
triggerSkill=skill
num=num+1
end)
isTrigger=true
end
role.Event:AddEvent(BattleEventName.PassiveTreatingFactor,OnTreatSkill,nil,nil,role)
@ -11347,6 +11364,12 @@ local passivityList = {
num=0
end
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,

View File

@ -41,6 +41,7 @@ function RecruitPanelNew:InitComponent()
self.helpPosition = self.helpBtn:GetComponent("RectTransform").localPosition
self.wish = Util.GetGameObject(self.panel,"wishBtn")
self.wish:SetActive(false)
self.wishNoOpen = Util.GetGameObject(self.wish,"noOpen")
self.wishBtn = Util.GetGameObject(self.wishNoOpen,"Img")
self.wishTextImg = Util.GetGameObject(self.wishNoOpen,"ImgText")
@ -181,7 +182,8 @@ function RecruitPanelNew:UpdataWishPanel()
self.tenTip.gameObject:SetActive(false)
return
end
self.wish.gameObject:SetActive(true)
--屏蔽心愿
self.wish.gameObject:SetActive(false)
--如果没有达到150抽按钮置灰
local data = tonumber(specialConfig[119].Value)
NetManager.ChoiceWishHeroRequest(nil,function ()