diff --git a/lua/app/module/battle/controller/battle_controller.lua b/lua/app/module/battle/controller/battle_controller.lua index 21229eb6..c6e3d6ff 100644 --- a/lua/app/module/battle/controller/battle_controller.lua +++ b/lua/app/module/battle/controller/battle_controller.lua @@ -1359,9 +1359,6 @@ function BattleController:getRandomGridInfo() if weight > BattleConst.MAX_ELEMENT_WIGHT then weight = BattleConst.MAX_ELEMENT_WIGHT end - if typeNum == 1 then - weight = BattleConst.MAX_ELEMENT_WIGHT - end table.insert(indexs, weight) table.insert(typeList, typeNum) end @@ -1810,7 +1807,7 @@ function BattleController:findLinkLine(posId, posIdMap, hadSkill, mainElementTyp if not posIdMap[aroundposId] then local gridEntity = self.battleData:getGridEntity(aroundposId) if gridEntity then - if gridEntity:isEmptyIdle() then + if gridEntity:canLink() and not gridEntity:getSkillId() then if not mainElementType or gridEntity:getElementType() == mainElementType then mainElementType = mainElementType or gridEntity:getElementType() local tempIdMap = GFunc.getTable(posIdMap) diff --git a/lua/app/module/gm/gm_const.lua b/lua/app/module/gm/gm_const.lua index 14ee32b4..5c3cd53e 100644 --- a/lua/app/module/gm/gm_const.lua +++ b/lua/app/module/gm/gm_const.lua @@ -37,6 +37,13 @@ arg1:英雄id Example: add_hero 1]], type = "add_hero" }, + { + title = "设置通关章节", + desc = [[添加英雄 type:pass_chapter +arg1:章节id +Example: pass_chapter 1]], + type = "pass_chapter" + }, } return GMConst \ No newline at end of file diff --git a/lua/app/server/server_data_manager.lua b/lua/app/server/server_data_manager.lua index 96374172..44586e4f 100644 --- a/lua/app/server/server_data_manager.lua +++ b/lua/app/server/server_data_manager.lua @@ -147,6 +147,12 @@ function ServerDataManager:dealGM(params, callback) end end end + elseif args[1] == "pass_chapter" then + local id = tonumber(args[2]) + if not id then + return + end + ServerGameData.ChapterData.data.maxChapterId = id end ServerGameData:saveData()