Commit e82cb5dc57713c47bc11fcc00e23146f4c2daf5c
1 parent
2820ba20
fix: level_addition新增类型17 每日奖励关卡挑战卡可购买次数增加
Showing
3 changed files
with
8 additions
and
3 deletions
Show diff stats
src/GlobalVar.lua
@@ -422,4 +422,5 @@ SystemBnousType = { | @@ -422,4 +422,5 @@ SystemBnousType = { | ||
422 | TreasureBaseMaximum = 14, -- 增加宝藏资源值上限 | 422 | TreasureBaseMaximum = 14, -- 增加宝藏资源值上限 |
423 | UpSpeedNum = 15, -- 加速次数上限增加 15=1探索加速or 2齿轮加速or 3餐厅加速=增加次数 | 423 | UpSpeedNum = 15, -- 加速次数上限增加 15=1探索加速or 2齿轮加速or 3餐厅加速=增加次数 |
424 | ChangeBaseCount = 16, -- 每日奖励关卡挑战卡基础数量增加 | 424 | ChangeBaseCount = 16, -- 每日奖励关卡挑战卡基础数量增加 |
425 | + ChangeBuyCount = 17, -- 每日奖励关卡挑战卡可购买次数增加, | ||
425 | } | 426 | } |
src/actions/HangAction.lua
@@ -580,7 +580,7 @@ function _M.buyBonusCountRpc(agent, data) | @@ -580,7 +580,7 @@ function _M.buyBonusCountRpc(agent, data) | ||
580 | local bonusC = role.dailyData:getProperty("bonusC") | 580 | local bonusC = role.dailyData:getProperty("bonusC") |
581 | local extraCnt = role.storeData:getBonusExtraFightCount() | 581 | local extraCnt = role.storeData:getBonusExtraFightCount() |
582 | bonusC[btype] = bonusC[btype] or {c = 0, b = 0} | 582 | bonusC[btype] = bonusC[btype] or {c = 0, b = 0} |
583 | - local lastCount = globalCsv.bonus_daily_buy_count * coef + extraCnt - bonusC[btype]["b"] | 583 | + local lastCount = (globalCsv.bonus_daily_buy_count + role:getBnousChangeBuyCount()) * coef + extraCnt - bonusC[btype]["b"] |
584 | if math.illegalNum(count, 1, lastCount) then return 1 end | 584 | if math.illegalNum(count, 1, lastCount) then return 1 end |
585 | 585 | ||
586 | if not role:checkItemEnough({[ItemId.Jade] = globalCsv.bonus_buy_cost * count}) then return 2 end | 586 | if not role:checkItemEnough({[ItemId.Jade] = globalCsv.bonus_buy_cost * count}) then return 2 end |
src/models/RolePlugin.lua
@@ -2864,6 +2864,10 @@ function RolePlugin.bind(Role) | @@ -2864,6 +2864,10 @@ function RolePlugin.bind(Role) | ||
2864 | return self:getProperty("levelBnous")[SystemBnousType.ChangeBaseCount] or 0 | 2864 | return self:getProperty("levelBnous")[SystemBnousType.ChangeBaseCount] or 0 |
2865 | end | 2865 | end |
2866 | 2866 | ||
2867 | + function Role:getBnousChangeBuyCount() | ||
2868 | + return self:getProperty("levelBnous")[SystemBnousType.ChangeBuyCount] or 0 | ||
2869 | + end | ||
2870 | + | ||
2867 | function Role:getLevelBnous(level) | 2871 | function Role:getLevelBnous(level) |
2868 | local levelBnous = self:getProperty("levelBnous") | 2872 | local levelBnous = self:getProperty("levelBnous") |
2869 | local additionData = csvdb["level_additionCsv"][level] | 2873 | local additionData = csvdb["level_additionCsv"][level] |
@@ -2882,10 +2886,10 @@ function RolePlugin.bind(Role) | @@ -2882,10 +2886,10 @@ function RolePlugin.bind(Role) | ||
2882 | end | 2886 | end |
2883 | levelBnous[pm1][pm4][pm2] = (levelBnous[pm1][pm4][pm2] or 0) + pm3 | 2887 | levelBnous[pm1][pm4][pm2] = (levelBnous[pm1][pm4][pm2] or 0) + pm3 |
2884 | elseif pm1 == SystemBnousType.HangTime or | 2888 | elseif pm1 == SystemBnousType.HangTime or |
2885 | - pm1 == SystemBnousType.ExploreMaximum or | ||
2886 | pm1 == SystemBnousType.DismantlingMaximum or | 2889 | pm1 == SystemBnousType.DismantlingMaximum or |
2887 | pm1 == SystemBnousType.TreasureBaseMaximum or | 2890 | pm1 == SystemBnousType.TreasureBaseMaximum or |
2888 | - pm1 == SystemBnousType.ChangeBaseCount then | 2891 | + pm1 == SystemBnousType.ChangeBaseCount or |
2892 | + pm1 == SystemBnousType.ChangeBuyCount then | ||
2889 | if type(levelBnous[pm1]) == "table" then | 2893 | if type(levelBnous[pm1]) == "table" then |
2890 | levelBnous[pm1] = 0 | 2894 | levelBnous[pm1] = 0 |
2891 | end | 2895 | end |