Commit 8781e10326dcb450be4e549f8b48b85fe041c125
1 parent
d3da3368
冒险 bug
Showing
4 changed files
with
11 additions
and
6 deletions
Show diff stats
src/actions/GmAction.lua
@@ -197,6 +197,8 @@ function _M.advc(role, pms) | @@ -197,6 +197,8 @@ function _M.advc(role, pms) | ||
197 | role:updateProperty({field = "advTask", value = {}}) | 197 | role:updateProperty({field = "advTask", value = {}}) |
198 | role:updateProperty({field = "advItems", value = ""}) | 198 | role:updateProperty({field = "advItems", value = ""}) |
199 | role:updateProperty({field = "advTeam", value = {}}) | 199 | role:updateProperty({field = "advTeam", value = {}}) |
200 | + role:updateProperty({field = "advAFGet", value = {}}) | ||
201 | + role:updateProperty({field = "advAFWear", value = {}}) | ||
200 | role.advData = nil | 202 | role.advData = nil |
201 | return "成功" | 203 | return "成功" |
202 | end | 204 | end |
src/adv/Adv.lua
@@ -325,6 +325,7 @@ function Adv:over(success, isAllPass) | @@ -325,6 +325,7 @@ function Adv:over(success, isAllPass) | ||
325 | self.owner:checkTaskEnter("AdvScore", {score = score}) | 325 | self.owner:checkTaskEnter("AdvScore", {score = score}) |
326 | self.owner:updateProperty({field = "advItems", value = ""}) | 326 | self.owner:updateProperty({field = "advItems", value = ""}) |
327 | self.owner:updateProperty({field = "advAFGet", value = {}}) | 327 | self.owner:updateProperty({field = "advAFGet", value = {}}) |
328 | + self.owner:updateProperty({field = "advAFWear", value = {}}) | ||
328 | 329 | ||
329 | self:backEnd(success, score, scoreInfo, reward) | 330 | self:backEnd(success, score, scoreInfo, reward) |
330 | end | 331 | end |
@@ -764,7 +765,7 @@ function Adv:clickBlock(roomId, blockId, params) | @@ -764,7 +765,7 @@ function Adv:clickBlock(roomId, blockId, params) | ||
764 | end | 765 | end |
765 | end | 766 | end |
766 | if canOpen and not hadMonster then --开放 | 767 | if canOpen and not hadMonster then --开放 |
767 | - self:getCurMap():openBlock(roomId, blockId, true) | 768 | + self:getCurMap():openBlock(roomId, blockId, true, true) |
768 | status = true | 769 | status = true |
769 | end | 770 | end |
770 | else | 771 | else |
src/adv/AdvMap.lua
@@ -126,16 +126,18 @@ end | @@ -126,16 +126,18 @@ end | ||
126 | 126 | ||
127 | 127 | ||
128 | -- 打开一个地块 | 128 | -- 打开一个地块 |
129 | -function Map:openBlock(roomId, blockId, isPlayer) | 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 |
132 | local block = room.blocks[blockId] | 132 | local block = room.blocks[blockId] |
133 | if not block then return end | 133 | if not block then return end |
134 | room:openBlock(block) | 134 | room:openBlock(block) |
135 | if isPlayer then | 135 | if isPlayer then |
136 | - self.adv.player:triggerPassive(Passive.OPEN_BLOCK) | 136 | + self.adv.battle.player:triggerPassive(Passive.OPEN_BLOCK) |
137 | + end | ||
138 | + if not ignoreBack then | ||
139 | + self.adv:backBlockChange(roomId, blockId) | ||
137 | end | 140 | end |
138 | - self:backBlockChange(roomId, blockId) | ||
139 | end | 141 | end |
140 | 142 | ||
141 | function Map:openBlockBySize(roomId, blockId, size, isPlayer) | 143 | function Map:openBlockBySize(roomId, blockId, size, isPlayer) |
src/adv/AdvPlayer.lua
@@ -140,7 +140,7 @@ function BaseObject:addBuff(buffId, releaser) | @@ -140,7 +140,7 @@ function BaseObject:addBuff(buffId, releaser) | ||
140 | if not Buff.checkKeep({ | 140 | if not Buff.checkKeep({ |
141 | owner = self, | 141 | owner = self, |
142 | buffData = buffData, | 142 | buffData = buffData, |
143 | - releaseId = releaser.monsterId | 143 | + releaseId = releaser and releaser.monsterId or nil |
144 | }) then return end | 144 | }) then return end |
145 | table.insert(self.buffs, Buff.create(self, releaser, {id = buffId})) | 145 | table.insert(self.buffs, Buff.create(self, releaser, {id = buffId})) |
146 | end | 146 | end |
@@ -574,7 +574,7 @@ function Player:addExp(value) | @@ -574,7 +574,7 @@ function Player:addExp(value) | ||
574 | end | 574 | end |
575 | local delta = level - self.level | 575 | local delta = level - self.level |
576 | if delta > 0 then | 576 | if delta > 0 then |
577 | - for _, attr in pairs(AdvAttsEnum) do | 577 | + for attr, _ in pairs(AdvAttsEnum) do |
578 | if attr == "hp" then | 578 | if attr == "hp" then |
579 | self[attr] = self[attr] + self.growth[attr] * delta | 579 | self[attr] = self[attr] + self.growth[attr] * delta |
580 | self._hpMax = self._hpMax + self.growth[attr] * delta | 580 | self._hpMax = self._hpMax + self.growth[attr] * delta |