Commit d677158e5720afbce135d4a13bc6a8211359dfda
1 parent
c8210d56
调整打开地块位置
Showing
3 changed files
with
5 additions
and
9 deletions
Show diff stats
src/adv/AdvBlock.lua
@@ -189,7 +189,6 @@ function Block:open() | @@ -189,7 +189,6 @@ function Block:open() | ||
189 | local map = room.map | 189 | local map = room.map |
190 | local adv = map.adv | 190 | local adv = map.adv |
191 | self:randomEvent() | 191 | self:randomEvent() |
192 | - adv.owner:checkTaskEnter("AdvOpenBlock") | ||
193 | self.isOpen = true | 192 | self.isOpen = true |
194 | return true | 193 | return true |
195 | end | 194 | end |
src/adv/AdvMap.lua
@@ -125,7 +125,7 @@ function Map:openBlockRand(num, isPlayer, ignoreBack) | @@ -125,7 +125,7 @@ function Map:openBlockRand(num, isPlayer, ignoreBack) | ||
125 | end | 125 | end |
126 | 126 | ||
127 | 127 | ||
128 | --- 打开一个地块 | 128 | +-- 打开一个地块 翻开地块的入口方法 !!! |
129 | function Map:openBlock(roomId, blockId, isPlayer, ignoreBack) | 129 | function Map:openBlock(roomId, blockId, isPlayer, ignoreBack) |
130 | local room = self.rooms[roomId] | 130 | local room = self.rooms[roomId] |
131 | if not room then return end | 131 | if not room then return end |
@@ -136,7 +136,8 @@ function Map:openBlock(roomId, blockId, isPlayer, ignoreBack) | @@ -136,7 +136,8 @@ function Map:openBlock(roomId, blockId, isPlayer, ignoreBack) | ||
136 | if status then | 136 | if status then |
137 | if isPlayer then | 137 | if isPlayer then |
138 | self.adv.battle.player:triggerPassive(Passive.OPEN_BLOCK) | 138 | self.adv.battle.player:triggerPassive(Passive.OPEN_BLOCK) |
139 | - self.map.adv:scoreChange(AdvScoreType.Block) | 139 | + self.adv:scoreChange(AdvScoreType.Block) |
140 | + self.adv.owner:checkTaskEnter("AdvOpenBlock") | ||
140 | end | 141 | end |
141 | 142 | ||
142 | if not ignoreBack then | 143 | if not ignoreBack then |
src/adv/AdvRoom.lua
@@ -21,10 +21,6 @@ function Room:loadBlocks(csvData, info) | @@ -21,10 +21,6 @@ function Room:loadBlocks(csvData, info) | ||
21 | local isFirstOpen = false | 21 | local isFirstOpen = false |
22 | for blockId, _ in pairs(csvData["blocks"]) do | 22 | for blockId, _ in pairs(csvData["blocks"]) do |
23 | self.blocks[blockId] = Block.new(self, blockId, info.event[blockId], info.open == 1 or info.open[blockId], info.trap[blockId]) | 23 | self.blocks[blockId] = Block.new(self, blockId, info.event[blockId], info.open == 1 or info.open[blockId], info.trap[blockId]) |
24 | - if self.map.adv.isRelay then -- 中继层全部开放 | ||
25 | - self.blocks[blockId].isOpen = true | ||
26 | - self.blocks[blockId]:randomEvent() | ||
27 | - end | ||
28 | if not self.isPath and self.blocks[blockId]:isBoss() then | 24 | if not self.isPath and self.blocks[blockId]:isBoss() then |
29 | self.isBossRoom = true | 25 | self.isBossRoom = true |
30 | end | 26 | end |
@@ -40,8 +36,8 @@ function Room:loadBlocks(csvData, info) | @@ -40,8 +36,8 @@ function Room:loadBlocks(csvData, info) | ||
40 | end | 36 | end |
41 | end | 37 | end |
42 | end | 38 | end |
43 | - -- boss 房间 开启一下所有的地块 | ||
44 | - if self.isBossRoom and self.isShow and isFirstOpen then | 39 | + --中继层全部开放 boss 房间 开启所有的地块 |
40 | + if self.map.adv.isRelay or (self.isBossRoom and self.isShow and isFirstOpen) then | ||
45 | for _, block in pairs(self.blocks) do | 41 | for _, block in pairs(self.blocks) do |
46 | self:openBlock(block) | 42 | self:openBlock(block) |
47 | end | 43 | end |