Commit 6433fe76515abc2e167f29f3034a31c94f55e187
1 parent
a2f78911
到某一关
Showing
1 changed file
with
20 additions
and
0 deletions
Show diff stats
src/actions/GmAction.lua
| ... | ... | @@ -59,6 +59,26 @@ function _M.fb(role, pms) -- 直接通关 |
| 59 | 59 | return "成功" |
| 60 | 60 | end |
| 61 | 61 | |
| 62 | +function _M.fbc(role, pms) -- 直接通关 | |
| 63 | + local carbonId = tonum(pms.pm1) | |
| 64 | + if not csvdb["idle_battleCsv"][carbonId] then return "不存在的carbon" end | |
| 65 | + local passCarbon = {} | |
| 66 | + local addPre | |
| 67 | + addPre = function(carbonId) | |
| 68 | + local carbonData = csvdb["idle_battleCsv"][carbonId] | |
| 69 | + for _, pre in ipairs(carbonData.prepose:toArray(true, "=")) do | |
| 70 | + passCarbon[pre] = 1 | |
| 71 | + role:checkTaskEnter(role.TaskType.HangPass, {id = pre}) | |
| 72 | + addPre(pre) | |
| 73 | + end | |
| 74 | + end | |
| 75 | + addPre(carbonId) | |
| 76 | + role:updateProperty({field = "hangInfo", value = {}}) | |
| 77 | + role:updateProperty({field = "hangPass", value = passCarbon}) | |
| 78 | + role:checkTaskEnter(role.TaskType.HangPass, {id = carbonId}) | |
| 79 | + return "成功" | |
| 80 | +end | |
| 81 | + | |
| 62 | 82 | function _M.love(role, pms) |
| 63 | 83 | local heroType = tonum(pms.pm1) |
| 64 | 84 | local level = tonum(pms.pm2) | ... | ... |