Commit 0163328c949bab54dc12736d577eaa044a1310a8
1 parent
6d4b10bc
修改活动boss关卡三星条件
Showing
2 changed files
with
26 additions
and
12 deletions
Show diff stats
src/actions/ActivityAction.lua
... | ... | @@ -293,7 +293,12 @@ function _M.exchangeRpc(agent, data) |
293 | 293 | curData[actid] = exchangeData |
294 | 294 | role.activity:updateActData("Exchange", curData) |
295 | 295 | |
296 | - local reward, change = role:award(actCfg.award, {log = {desc = "actExchange", int1 = actid, int2 = id}}) | |
296 | + local award = actCfg.award:toNumMap() | |
297 | + for k,v in pairs(award) do | |
298 | + award[k] = v * count | |
299 | + end | |
300 | + | |
301 | + local reward, change = role:award(award, {log = {desc = "actExchange", int1 = actid, int2 = id}}) | |
297 | 302 | |
298 | 303 | |
299 | 304 | SendPacket(actionCodes.Activity_exchangeRpc, MsgPack.pack(role:packReward(reward, change))) |
... | ... | @@ -386,7 +391,7 @@ function _M.hangDropRpc(agent, data) |
386 | 391 | if type == 1 then |
387 | 392 | local actId = arr[2] |
388 | 393 | local carbonId = arr[3] |
389 | - if not role.activity:isOpenById(actid, "ChallengeLevel") then return 3 end | |
394 | + if not role.activity:isOpenById(actId, "ChallengeLevel") then return 3 end | |
390 | 395 | local clInfo = role.activity:getActData("ChallengeLevel") or {} |
391 | 396 | if not clInfo[carbonId] then |
392 | 397 | break |
... | ... | @@ -562,6 +567,14 @@ function _M.endBattleRpc(agent, data) |
562 | 567 | |
563 | 568 | local actData = role.activity:getActData("ChallengeLevel") or {} |
564 | 569 | |
570 | + -- 总输出 | |
571 | + local dmg = 0 | |
572 | + for k, v in pairs(msg.info.damage) do | |
573 | + if k % 100 == 2 then | |
574 | + dmg = dmg + v | |
575 | + end | |
576 | + end | |
577 | + | |
565 | 578 | local reward, change = {}, nil |
566 | 579 | |
567 | 580 | local battleInfo = actData[id] or {} |
... | ... | @@ -617,6 +630,10 @@ function _M.endBattleRpc(agent, data) |
617 | 630 | check[7] = function(_, cond) |
618 | 631 | return msg.info.atime and msg.info.atime <= cond |
619 | 632 | end |
633 | + -- 8 总输出值 msg.info.atime | |
634 | + check[8] = function(_, cond) | |
635 | + return dmg >= cond | |
636 | + end | |
620 | 637 | curStar = 0 |
621 | 638 | local sweepConds = battleCfg.sweep_condition:toTableArray(true) |
622 | 639 | for i, cond in ipairs(sweepConds) do |
... | ... | @@ -624,8 +641,11 @@ function _M.endBattleRpc(agent, data) |
624 | 641 | curStar = curStar + (1 << (i - 1)) |
625 | 642 | end |
626 | 643 | end |
627 | - else | |
628 | - curStar = 0 | |
644 | + else | |
645 | + curStar = 0 | |
646 | + if battleCfg.rank ~= 0 then | |
647 | + curStar = 1 | |
648 | + end | |
629 | 649 | end |
630 | 650 | local oldStarNum = getStarCount(battleCfg, battleInfo["star"] or 0) |
631 | 651 | local newStarNum = getStarCount(battleCfg, curStar) |
... | ... | @@ -635,12 +655,6 @@ function _M.endBattleRpc(agent, data) |
635 | 655 | |
636 | 656 | if battleCfg.rank ~= 0 then |
637 | 657 | -- 更新排行榜 最高伤害 |
638 | - local dmg = 0 | |
639 | - for k, v in pairs(msg.info.damage) do | |
640 | - if k % 100 == 2 then | |
641 | - dmg = dmg + v | |
642 | - end | |
643 | - end | |
644 | 658 | battleInfo["top"] = math.max(battleInfo["top"] or 0, dmg) |
645 | 659 | battleInfo["sum"] = (battleInfo["sum"] or 0) + dmg |
646 | 660 | local rankVal = 0 |
... | ... | @@ -659,7 +673,7 @@ function _M.endBattleRpc(agent, data) |
659 | 673 | if oldStarNum == 0 or battleCfg.rank ~= 0 then |
660 | 674 | reward = battleCfg.item_clear:toNumMap() |
661 | 675 | end |
662 | - if (oldStarNum < 3 and newStarNum == 3) or battleCfg.rank ~= 0 then | |
676 | + if (oldStarNum < 3 and newStarNum == 3) or (battleCfg.rank ~= 0 and newStarNum == 3) then | |
663 | 677 | local aw = battleCfg.perfect_reward:toNumMap() |
664 | 678 | for k, v in pairs(aw) do |
665 | 679 | reward[k] = (reward[k] or 0) + v | ... | ... |