diff --git a/lua/app/module/battle/controller/battle_controller.lua b/lua/app/module/battle/controller/battle_controller.lua index beea5482..12c9bab7 100644 --- a/lua/app/module/battle/controller/battle_controller.lua +++ b/lua/app/module/battle/controller/battle_controller.lua @@ -1330,6 +1330,12 @@ function BattleController:findSkillInfluenceGrids() end function BattleController:getRandomSkillList(getCount) + local fixedList = self:getFixedRogueSkill() + if fixedList[1] then + return table.remove(fixedList, 1) + end + + getCount = getCount or BattleConst.SKILL_SELECT_COUNT local result = {} local cfg = ConfigManager:getConfig("skill_rogue") diff --git a/lua/app/module/battle/controller/battle_controller_stage.lua b/lua/app/module/battle/controller/battle_controller_stage.lua index 0aa24fda..23f21a55 100644 --- a/lua/app/module/battle/controller/battle_controller_stage.lua +++ b/lua/app/module/battle/controller/battle_controller_stage.lua @@ -118,6 +118,19 @@ function BattleControllerStage:getNotInvolvedSkills() return self.notInvolvedSkills end +function BattleControllerStage:getFixedRogueSkill() + if not self.fixedRogueSkill then + local config = ConfigManager:getConfig("chapter")[self.chapterId] + if config.involved_skill then + self.fixedRogueSkill = GFunc.getTable(config.involved_skill) + else + self.fixedRogueSkill = {} + end + end + + return self.fixedRogueSkill +end + function BattleControllerStage:findNextDefUnit() self:_stageGenerateNextMonster() end diff --git a/lua/app/server/server_game_data.lua b/lua/app/server/server_game_data.lua index ebc08e84..e9aae108 100644 --- a/lua/app/server/server_game_data.lua +++ b/lua/app/server/server_game_data.lua @@ -50,6 +50,7 @@ function ServerGameData:initData() local heroCfg = ConfigManager:getConfig("hero") local heroLvCfg = ConfigManager:getConfig("hero_level") -- 如果初始化里面有碎片就直接合成 + local initHeroMap = {} local items = self.BagData.ItemData:getAllItems() for idStr, item in pairs(items) do local itemInfo = itemCfg[item.cfg_id] @@ -66,6 +67,7 @@ function ServerGameData:initData() if item.count >= needCout then item.count = item.count - needCout self.HeroData:addHero(heroCfgId, k) + initHeroMap[heroInfo.position] = heroCfgId end break end @@ -74,6 +76,9 @@ function ServerGameData:initData() end end end + for matchType, heroId in pairs(initHeroMap) do + self.FormationData:upHeroToFormation(GConst.BattleConst.BATTLE_TYPE.STAGE, matchType, heroId) + end end self:setNotNewPlayer() self:saveData() diff --git a/lua/app/userdata/battle/skill/battle_board_skill_entity.lua b/lua/app/userdata/battle/skill/battle_board_skill_entity.lua index 10dd6574..97faaf66 100644 --- a/lua/app/userdata/battle/skill/battle_board_skill_entity.lua +++ b/lua/app/userdata/battle/skill/battle_board_skill_entity.lua @@ -153,6 +153,13 @@ function BattleBoardSkillEntity:getNameAct() return self.config.name_act end +function BattleBoardSkillEntity:cfgLinkAny() + if not self.config then + return false + end + return self.config.link ~= nil +end + function BattleBoardSkillEntity:getEnergy() return self.curEnergy end @@ -174,6 +181,10 @@ function BattleBoardSkillEntity:clearEnergy() end function BattleBoardSkillEntity:getIgnoreElementType() + if self:cfgLinkAny() then + return true + end + return self.ignoreElementType end