Commit 51718558358221feaf9ccbbfe921061c8d7dd61d
1 parent
6732f756
中继层初始经验
Showing
5 changed files
with
7 additions
and
6 deletions
Show diff stats
src/actions/AdvAction.lua
@@ -62,7 +62,7 @@ function _M.startAdvRpc( agent, data ) | @@ -62,7 +62,7 @@ function _M.startAdvRpc( agent, data ) | ||
62 | 62 | ||
63 | if (layer - 1) % globalCsv.adv_can_out_layer_pre ~= 0 then return 3 end | 63 | if (layer - 1) % globalCsv.adv_can_out_layer_pre ~= 0 then return 3 end |
64 | 64 | ||
65 | - if layer > chapterData.limitlevel then return 4 end | 65 | + if chapterData.limitlevel ~= 0 and layer > chapterData.limitlevel then return 4 end |
66 | 66 | ||
67 | -- 关卡开放判断 | 67 | -- 关卡开放判断 |
68 | if not role:advChapterIsOpen(chapterId, layer) then return 5 end | 68 | if not role:advChapterIsOpen(chapterId, layer) then return 5 end |
@@ -107,7 +107,7 @@ function _M.startHangRpc(agent, data) | @@ -107,7 +107,7 @@ function _M.startHangRpc(agent, data) | ||
107 | if advHang[chapterId] then return end --正在挂机 | 107 | if advHang[chapterId] then return end --正在挂机 |
108 | 108 | ||
109 | local advPass = role:getProperty("advPass") | 109 | local advPass = role:getProperty("advPass") |
110 | - if advPass[chapterId] ~= chapterData.limitlevel then return end -- 没有全通关 | 110 | + if chapterData.limitlevel == 0 or advPass[chapterId] ~= chapterData.limitlevel then return end -- 没有全通关 |
111 | 111 | ||
112 | 112 | ||
113 | if role.dailyData:getProperty("advC") >= role:getAdvHangLimit() then return end -- 是否有体力 | 113 | if role.dailyData:getProperty("advC") >= role:getAdvHangLimit() then return end -- 是否有体力 |
src/adv/Adv.lua
@@ -176,7 +176,7 @@ function Adv:randomMapId(chapterId, level) | @@ -176,7 +176,7 @@ function Adv:randomMapId(chapterId, level) | ||
176 | error("chapterId " .. chapterId .. " dont exist!") | 176 | error("chapterId " .. chapterId .. " dont exist!") |
177 | return | 177 | return |
178 | end | 178 | end |
179 | - if level > chapterData.limitlevel then | 179 | + if chapterData.limitlevel ~= 0 and level > chapterData.limitlevel then |
180 | error("level overflow!") | 180 | error("level overflow!") |
181 | return | 181 | return |
182 | end | 182 | end |
@@ -276,7 +276,8 @@ local function clickOut(self, room, block, params) | @@ -276,7 +276,8 @@ local function clickOut(self, room, block, params) | ||
276 | if params.relay then | 276 | if params.relay then |
277 | if self.level % globalCsv.adv_can_out_layer_pre ~= 0 or not self.owner:isFuncOpen(FuncOpenType.AdvRelay) then return end | 277 | if self.level % globalCsv.adv_can_out_layer_pre ~= 0 or not self.owner:isFuncOpen(FuncOpenType.AdvRelay) then return end |
278 | end | 278 | end |
279 | - if params.relay or self.level >= csvdb["adv_chapterCsv"][self.chapterId].limitlevel or not self.owner:advChapterIsOpen(self.chapterId, self.level + 1) then --关卡结束 | 279 | + local levellimit = csvdb["adv_chapterCsv"][self.chapterId].limitlevel |
280 | + if params.relay or (levellimit > 0 and self.level >= levellimit) or not self.owner:advChapterIsOpen(self.chapterId, self.level + 1) then --关卡结束 | ||
280 | self:over(true) | 281 | self:over(true) |
281 | else | 282 | else |
282 | self:initByChapter(self.chapterId, self.level + 1, true, true) | 283 | self:initByChapter(self.chapterId, self.level + 1, true, true) |
src/adv/AdvBattle.lua
@@ -13,6 +13,7 @@ function Battle:ctor(adv) | @@ -13,6 +13,7 @@ function Battle:ctor(adv) | ||
13 | self:initAfter() | 13 | self:initAfter() |
14 | if self.isNewPlayer then | 14 | if self.isNewPlayer then |
15 | self.player:triggerPassive(Passive.BORN_ONCE) | 15 | self.player:triggerPassive(Passive.BORN_ONCE) |
16 | + self.player:addExp((self.adv.level - 1) * 40) | ||
16 | end | 17 | end |
17 | end | 18 | end |
18 | 19 |
src/adv/AdvMap.lua
src/adv/AdvPlayer.lua
@@ -431,6 +431,7 @@ function Player:initData(data) | @@ -431,6 +431,7 @@ function Player:initData(data) | ||
431 | end | 431 | end |
432 | 432 | ||
433 | function Player:addExp(value) | 433 | function Player:addExp(value) |
434 | + if value <= 0 then return end | ||
434 | local newExp = self.exp + value | 435 | local newExp = self.exp + value |
435 | local level = self.level | 436 | local level = self.level |
436 | if level >= #csvdb["adv_levelCsv"] then return end | 437 | if level >= #csvdb["adv_levelCsv"] then return end |