Commit 9d66362c57a44b9dbc2bb8c8c23d037cade120e0
1 parent
56e2b75f
修改冒险选择条件
Showing
1 changed file
with
6 additions
and
4 deletions
Show diff stats
src/adv/Adv.lua
... | ... | @@ -858,10 +858,12 @@ local function chooseCommon(self, room, block, chooseData, choose, tag) |
858 | 858 | end |
859 | 859 | end, |
860 | 860 | -- xx角色(todo 队长) |
861 | - [2] = function(_, leaderType) | |
862 | - local hero = self.owner.heros[self.owner:getProperty("advTeam").leader] | |
863 | - if hero and hero:getProperty("type") == leaderType then | |
864 | - return true | |
861 | + [2] = function(_, heroType) | |
862 | + for slot, heroId in pairs(self.owner:getProperty("advTeam").heros) do | |
863 | + local hero = self.owner.heros[heroId] | |
864 | + if hero and hero:getProperty("type") == heroType then | |
865 | + return true | |
866 | + end | |
865 | 867 | end |
866 | 868 | end, |
867 | 869 | --消灭所有怪 | ... | ... |