Commit 1a04c06cc6e65258e4e9ce11c76fa3054e4dd92e
1 parent
aeb5da9a
冒险 被动调整
Showing
3 changed files
with
17 additions
and
25 deletions
Show diff stats
src/actions/AdvAction.lua
| ... | ... | @@ -734,7 +734,7 @@ function _M.refreshSupportRpc(agent, data) |
| 734 | 734 | local al = role:getAdvSupportFreeCount() |
| 735 | 735 | |
| 736 | 736 | if cr < al then --免费 |
| 737 | - role.dailyData:updateProperty({field = advSupRe, delta = 1}) | |
| 737 | + role.dailyData:updateProperty({field = "advSupRe", delta = 1}) | |
| 738 | 738 | else -- 付费 |
| 739 | 739 | if not role:checkItemEnough({[ItemId.Diamond] = globalCsv.adv_support_refresh_cost}) then return end |
| 740 | 740 | role:costItems({[ItemId.Diamond] = globalCsv.adv_support_refresh_cost}) | ... | ... |
src/adv/AdvPassive.lua
| ... | ... | @@ -394,19 +394,17 @@ function Passive:effect2(value, triggerPms) |
| 394 | 394 | aim:addBuff(value, self.owner) |
| 395 | 395 | end |
| 396 | 396 | end |
| 397 | ---3=翻开自己所在格子 | |
| 398 | 397 | |
| 399 | --- 胡博文 : 目前还不会配一定范围 先不处理把。我想不出来自己开一定范围的应用环境 | |
| 400 | --- 如果打开注释 需要注意 自动开放不能点击的处理 | |
| 398 | +--3=翻开自己所在格子 | |
| 401 | 399 | function Passive:effect3(value) |
| 402 | 400 | if value == 0 then |
| 403 | 401 | self.owner.battle.adv:getCurMap():openBlock(self.owner.roomId, self.owner.blockId) |
| 404 | - -- elseif value > 0 then | |
| 405 | - -- self.owner.battle.adv:getCurMap():openBlocksBySize(self.owner.roomId, self.owner.blockId, value) | |
| 406 | - -- elseif value == -1 then -- 当前房间 | |
| 407 | - -- self.owner.battle.adv:getCurMap():openBlocksByRoom(self.owner.roomId) | |
| 408 | - -- elseif value == -2 then -- 当前层 | |
| 409 | - -- self.owner.battle.adv:getCurMap():openAllBlocks(not self.owner.monsterId) | |
| 402 | + elseif value > 0 then | |
| 403 | + self.owner.battle.adv:getCurMap():openBlocksBySize(self.owner.roomId, self.owner.blockId, value) | |
| 404 | + elseif value == -1 then -- 当前房间 | |
| 405 | + self.owner.battle.adv:getCurMap():openBlocksByRoom(self.owner.roomId) | |
| 406 | + elseif value == -2 then -- 当前层 | |
| 407 | + self.owner.battle.adv:getCurMap():openAllBlocks(not self.owner.monsterId) | |
| 410 | 408 | end |
| 411 | 409 | end |
| 412 | 410 | --4=逃跑 |
| ... | ... | @@ -427,25 +425,19 @@ function Passive:effect5(monsterId) |
| 427 | 425 | self.owner.battle.adv:getCurMap():addNewMonsterRand(monsterId) |
| 428 | 426 | end |
| 429 | 427 | |
| 430 | ---6=给所有敌方增加一个buff | |
| 428 | +--6=给所有场上怪物增加buff | |
| 431 | 429 | function Passive:effect6(value) |
| 432 | - local monsters = self.owner.battle.player:getTeam(2) | |
| 433 | - for _, enemy in ipairs(monsters) do | |
| 434 | - enemy:addBuff(value, self.owner) | |
| 435 | - end | |
| 436 | -end | |
| 437 | ---6=给自己加一個被動技能 | |
| 438 | -function Passive:effect6(value) | |
| 439 | - self.owner:addPassive({id = value}) | |
| 440 | -end | |
| 441 | ---7=给场上队友增加buff | |
| 442 | -function Passive:effect7(value) | |
| 443 | - local firends = self.owner:getTeam(1, true) | |
| 430 | + local firends = self.owner.battle.player:getTeam(2) | |
| 444 | 431 | for k , v in pairs(firends) do |
| 445 | 432 | self.owner:addBuff(value, self.owner) |
| 446 | 433 | end |
| 447 | 434 | end |
| 448 | 435 | |
| 436 | +--7=给自己加一個被動技能 --废弃 | |
| 437 | +-- function Passive:effect7(value) | |
| 438 | +-- self.owner:addPassive({id = value}) | |
| 439 | +-- end | |
| 440 | + | |
| 449 | 441 | --8=获得drop,直接进入背包 |
| 450 | 442 | function Passive:effect8(dropId) |
| 451 | 443 | local item = csvdb["event_dropCsv"][dropId]["range"]:randWeight(true) | ... | ... |
src/adv/AdvPlayer.lua
| ... | ... | @@ -392,6 +392,8 @@ function BaseObject:hurt(value, releaser, params) |
| 392 | 392 | end |
| 393 | 393 | |
| 394 | 394 | if self.hp == 0 then |
| 395 | + self.isDead = true | |
| 396 | + | |
| 395 | 397 | self:triggerPassive(Passive.SELF_DEAD) |
| 396 | 398 | for _, team in ipairs(self:getTeam(1, true)) do |
| 397 | 399 | team:triggerPassive(Passive.TEAM_DEAD) |
| ... | ... | @@ -400,8 +402,6 @@ function BaseObject:hurt(value, releaser, params) |
| 400 | 402 | if (params.hurtType == 6 or params.hurtType == 2) and self ~= self.battle.player then |
| 401 | 403 | self.battle.adv:checkAchievement(self.battle.adv.AchievType.KillByBuff, 1, params.buffId) |
| 402 | 404 | end |
| 403 | - | |
| 404 | - self.isDead = true | |
| 405 | 405 | end |
| 406 | 406 | self:triggerPassive(Passive.HURT_PERCENT_SELF, {value = value / self.hpMax}) |
| 407 | 407 | for _, team in ipairs(self:getTeam(1, true)) do | ... | ... |