Commit 51718558358221feaf9ccbbfe921061c8d7dd61d

Authored by zhouhaihai
1 parent 6732f756

中继层初始经验

src/actions/AdvAction.lua
... ... @@ -62,7 +62,7 @@ function _M.startAdvRpc( agent, data )
62 62  
63 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 68 if not role:advChapterIsOpen(chapterId, layer) then return 5 end
... ... @@ -107,7 +107,7 @@ function _M.startHangRpc(agent, data)
107 107 if advHang[chapterId] then return end --正在挂机
108 108  
109 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 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 176 error("chapterId " .. chapterId .. " dont exist!")
177 177 return
178 178 end
179   - if level > chapterData.limitlevel then
  179 + if chapterData.limitlevel ~= 0 and level > chapterData.limitlevel then
180 180 error("level overflow!")
181 181 return
182 182 end
... ... @@ -276,7 +276,8 @@ local function clickOut(self, room, block, params)
276 276 if params.relay then
277 277 if self.level % globalCsv.adv_can_out_layer_pre ~= 0 or not self.owner:isFuncOpen(FuncOpenType.AdvRelay) then return end
278 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 281 self:over(true)
281 282 else
282 283 self:initByChapter(self.chapterId, self.level + 1, true, true)
... ...
src/adv/AdvBattle.lua
... ... @@ -13,6 +13,7 @@ function Battle:ctor(adv)
13 13 self:initAfter()
14 14 if self.isNewPlayer then
15 15 self.player:triggerPassive(Passive.BORN_ONCE)
  16 + self.player:addExp((self.adv.level - 1) * 40)
16 17 end
17 18 end
18 19  
... ...
src/adv/AdvMap.lua
... ... @@ -380,8 +380,6 @@ getEventLib = function(self, needEventType) -- needEventType 需要的事件
380 380 return eventLib
381 381 end
382 382  
383   -
384   -
385 383 return Map
386 384  
387 385  
... ...
src/adv/AdvPlayer.lua
... ... @@ -431,6 +431,7 @@ function Player:initData(data)
431 431 end
432 432  
433 433 function Player:addExp(value)
  434 + if value <= 0 then return end
434 435 local newExp = self.exp + value
435 436 local level = self.level
436 437 if level >= #csvdb["adv_levelCsv"] then return end
... ...