心愿抽卡修改

onepiece_demo_new
wangzhenxing 2024-05-24 15:14:47 +08:00
parent fd144090cb
commit 6f40daa7e6
4 changed files with 25 additions and 6 deletions

View File

@ -108,11 +108,28 @@ function this:Refresh(isTop,isAni)
if not RecruitManager.drawTimes[1] or RecruitManager.drawTimes[1] < data then
self.parent:ClosePanel()
end
local aaa=string.format("抽到<size=35><color=#31FF00>5星</color></size>英雄时,有<size=35><color=#31FF00>%s%s</color></size>几率转化为<size=35><color=#31FF00>心愿英雄!</color></size>",RecruitManager.GetWishPro(),"%")
self.infoTxt.text=aaa
self.selectBtn:GetComponent("RectTransform").localPosition = self.tabListObj[self.curSelect]:GetComponent("RectTransform").localPosition
this:SetHeroList(isTop,isAni)
this:SetUpHero()
local pro,pro1=RecruitManager.GetWishPro()
LogError("pro==============="..pro.." pro1=="..pro1)
local showPro=pro
if RecruitManager.WishCardData[1] then
local id=RecruitManager.WishCardData[1].heroTid
LogError("you yingxiong ======================================"..id)
if heroConfig[id] then
if heroConfig[id].Natural<=6 then
showPro=pro
elseif heroConfig[id].Natural==7 then
showPro=pro1
end
end
end
local aaa=string.format("抽到<size=35><color=#31FF00>5星</color></size>神将时,有<size=35><color=#31FF00>%s%s</color></size>几率转化为<size=35><color=#31FF00>心愿神将!</color></size>",showPro,"%")
self.infoTxt.text=aaa
end
function this:SetUpHero()

View File

@ -203,7 +203,7 @@ function RecruitEquipPanelNew:UpdataPanel()
for i, v in ConfigPairs(wishConfig) do
if RecruitManager.drawTimes[4] and RecruitManager.drawTimes[4]>= v.DrawCardNumber and v.LotteryType==4 then
wishLv=v.Level
RecruitManager.SetWishPro(v.Weight/10000*100)
RecruitManager.SetWishPro(v.Weight/10000*100,v.MythWeight/10000*100)
end
end
self.boxNameText.text="宝箱等级:"..wishLv

View File

@ -79,12 +79,14 @@ function this.GetWishTailsManSoulChips()
return datas
end
local wishPro=20
function this.SetWishPro(pro)
local mythPro=20
function this.SetWishPro(pro,pro1)
wishPro=pro
mythPro=pro1
end
function this.GetWishPro()
return wishPro
return wishPro,mythPro
end
function this.CheckIsUpTailsManSoulChip(id)
if this.upTailsManSoulChip[id] then

View File

@ -191,7 +191,7 @@ function RecruitPanelNew:UpdataPanel()
for i, v in ConfigPairs(wishConfig) do
if RecruitManager.drawTimes[1] and RecruitManager.drawTimes[1]>= v.DrawCardNumber and v.LotteryType==1 then
wishLv=v.Level
RecruitManager.SetWishPro(v.Weight/10000*100)
RecruitManager.SetWishPro(v.Weight/10000*100,v.MythWeight/10000*100)
end
end
self.boxNameText.text="宝箱等级:"..wishLv