diff --git a/src/GlobalVar.lua b/src/GlobalVar.lua index 6e13be5..a612b66 100644 --- a/src/GlobalVar.lua +++ b/src/GlobalVar.lua @@ -422,4 +422,5 @@ SystemBnousType = { TreasureBaseMaximum = 14, -- 增加宝藏资源值上限 UpSpeedNum = 15, -- 加速次数上限增加 15=1探索加速or 2齿轮加速or 3餐厅加速=增加次数 ChangeBaseCount = 16, -- 每日奖励关卡挑战卡基础数量增加 + ChangeBuyCount = 17, -- 每日奖励关卡挑战卡可购买次数增加, } diff --git a/src/actions/HangAction.lua b/src/actions/HangAction.lua index 94de4c9..0de3f91 100644 --- a/src/actions/HangAction.lua +++ b/src/actions/HangAction.lua @@ -580,7 +580,7 @@ function _M.buyBonusCountRpc(agent, data) local bonusC = role.dailyData:getProperty("bonusC") local extraCnt = role.storeData:getBonusExtraFightCount() bonusC[btype] = bonusC[btype] or {c = 0, b = 0} - local lastCount = globalCsv.bonus_daily_buy_count * coef + extraCnt - bonusC[btype]["b"] + local lastCount = (globalCsv.bonus_daily_buy_count + role:getBnousChangeBuyCount()) * coef + extraCnt - bonusC[btype]["b"] if math.illegalNum(count, 1, lastCount) then return 1 end if not role:checkItemEnough({[ItemId.Jade] = globalCsv.bonus_buy_cost * count}) then return 2 end diff --git a/src/models/RolePlugin.lua b/src/models/RolePlugin.lua index ebead1a..7b969d2 100644 --- a/src/models/RolePlugin.lua +++ b/src/models/RolePlugin.lua @@ -2864,6 +2864,10 @@ function RolePlugin.bind(Role) return self:getProperty("levelBnous")[SystemBnousType.ChangeBaseCount] or 0 end + function Role:getBnousChangeBuyCount() + return self:getProperty("levelBnous")[SystemBnousType.ChangeBuyCount] or 0 + end + function Role:getLevelBnous(level) local levelBnous = self:getProperty("levelBnous") local additionData = csvdb["level_additionCsv"][level] @@ -2882,10 +2886,10 @@ function RolePlugin.bind(Role) end levelBnous[pm1][pm4][pm2] = (levelBnous[pm1][pm4][pm2] or 0) + pm3 elseif pm1 == SystemBnousType.HangTime or - pm1 == SystemBnousType.ExploreMaximum or pm1 == SystemBnousType.DismantlingMaximum or pm1 == SystemBnousType.TreasureBaseMaximum or - pm1 == SystemBnousType.ChangeBaseCount then + pm1 == SystemBnousType.ChangeBaseCount or + pm1 == SystemBnousType.ChangeBuyCount then if type(levelBnous[pm1]) == "table" then levelBnous[pm1] = 0 end -- libgit2 0.21.2