Commit 61dc5eb6c90fe68df51a6ad6f4071ba38c145bba
1 parent
cb3aaefb
fix global to local
Showing
1 changed file
with
4 additions
and
4 deletions
Show diff stats
src/adv/Adv.lua
| 1 | 1 | local Passive = require "adv.AdvPassive" |
| 2 | 2 | |
| 3 | --- 工具函数 | |
| 3 | +-- 工具函数--第一象限 < 10000 < 第二象限 < 20000 < 第四象限 < 30000 < 第三象限 | |
| 4 | 4 | local function getIdByCr(c, r) |
| 5 | - local crId = math.abs(r) + math.abs(c) * 100 | |
| 5 | + local crId = math.abs(r) + math.abs(c) * 100 -- row + column * 100 | |
| 6 | 6 | if c < 0 then |
| 7 | 7 | crId = crId + 10000 |
| 8 | 8 | end |
| ... | ... | @@ -27,7 +27,7 @@ local function getCrById(crId) |
| 27 | 27 | end |
| 28 | 28 | |
| 29 | 29 | -----------------------------随机地图----------------------------- |
| 30 | ---检查 是否满足层数限制条件 | |
| 30 | +--检查 是否满足层数限制条件 -- if checktype == 1 then check value in range a=b else check value in array a=b=c | |
| 31 | 31 | local function checkIsIn(checkValue, checkType, checkRange) |
| 32 | 32 | if not checkValue then return end |
| 33 | 33 | if checkType == 1 then |
| ... | ... | @@ -213,7 +213,7 @@ local function randomAdvMap(role, chapterId, level, notNotify) |
| 213 | 213 | end |
| 214 | 214 | for blockId, stageType in pairs(roomData["blocks"]) do |
| 215 | 215 | if AdvSpecialStage[stageType] then |
| 216 | - eventType = AdvEventType[AdvSpecialStage[stageType]] -- 地块固定类型 | |
| 216 | + local eventType = AdvEventType[AdvSpecialStage[stageType]] -- 地块固定类型 | |
| 217 | 217 | randomEvent(roomId, blockId, eventType) |
| 218 | 218 | else |
| 219 | 219 | stagePool["global"][stageType] = stagePool["global"][stageType] or {} | ... | ... |