From 150e128135e9322a834a81c07de7741e4e694f7a Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Fri, 21 Apr 2023 16:49:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E5=8D=A1=E5=9B=BA=E5=AE=9A=E8=82=89?= =?UTF-8?q?=E9=B8=BD=E6=8A=80=E8=83=BD=E3=80=81=E6=8A=80=E8=83=BD=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E5=BC=80=E5=A7=8B=E5=B0=B1=E4=BB=BB=E6=84=8F=E9=93=BE?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/battle/controller/battle_controller.lua | 6 ++++++ .../battle/controller/battle_controller_stage.lua | 13 +++++++++++++ .../battle/skill/battle_board_skill_entity.lua | 11 +++++++++++ 3 files changed, 30 insertions(+) diff --git a/lua/app/module/battle/controller/battle_controller.lua b/lua/app/module/battle/controller/battle_controller.lua index b40d42d9..a5f5d7fa 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/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