心愿概率修改

PC-202302260912\Administrator 2024-04-10 16:25:36 +08:00
parent 1e1d1611dc
commit 92203aceef
5 changed files with 31 additions and 7 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

@ -123,7 +123,12 @@ function this.SetScrollPre(root,data)
goBtn:SetActive(false)
getBtn:SetActive(false)
local mask=Util.GetGameObject(root,"mask")
info.text="宝箱"..wishData.Level.."级奖励,心愿概率提升为"..wishData.Weight/100 .."%"
if type==1 then
info.text="宝箱"..wishData.Level.."级奖励,心愿概率提升为: 传说"..wishData.Weight/100 .."%".." 神话"..wishData.MythWeight/100 .."%"
else
info.text="宝箱"..wishData.Level.."级奖励,心愿概率提升为:"..wishData.Weight/100 .."%"
end
if not itemList[root] then
itemList[root] = {}
end

View File

@ -202,7 +202,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

@ -77,12 +77,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