diff --git a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua index edfbe2186b..677ccea13e 100644 --- a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua +++ b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua @@ -2394,6 +2394,7 @@ GENERAL_POPUP_TYPE={ GemOneKey = 60, --命石一键合成 GemMoreCom = 61, --命石批量合成 HomeLandEquip = 65,--家园装备升级 + ChangeHeroPro = 66,--改变英雄阵营 --大号通用弹窗 YiJingBaoKu = 30,--易经宝库 diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua index 1fee2f2fd5..0ddc485d18 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua @@ -284,7 +284,7 @@ function BattleUtil.GetMaxTargetNum(chooseId) end -- -function BattleUtil.ChooseTarget(role, chooseId) +function BattleUtil.ChooseTarget(role, chooseId,queryType) local chooseType = floor(chooseId / 100000) % 10 local chooseLimit = floor(chooseId / 10000) % 10 local chooseWeight = floor(chooseId / 100) % 100 @@ -293,7 +293,11 @@ function BattleUtil.ChooseTarget(role, chooseId) local arr -- 选择类型 if chooseType == 1 then - arr = RoleManager.Query(function (r) return r.camp == role.camp end) + if queryType and queryType==1 then + arr = RoleManager.QueryNoDead(function (r) return r.camp == role.camp end) + else + arr = RoleManager.Query(function (r) return r.camp == role.camp end) + end elseif chooseType == 2 then if role.lockTarget and not role.lockTarget:IsRealDead() and not role.lockTarget.isExile and num == 1 then --嘲讽时对单个敌军生效 return {role.lockTarget} diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua b/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua index 3127e5e026..f08fc3e13d 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua @@ -315,6 +315,7 @@ function this.GetFormationPower(formationId) power2 = power2 + HeroPowerManager.GetHeroPower(formationList.teamHeroInfos[i].heroId, formationId) end end + power2=power2+PracticeManager.GetPracticeAddPower() -- LogGreen("新方式战斗力:"..power2) -- 主线编队战斗力 diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua b/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua index 69b3c33dab..0513616ee0 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua @@ -473,6 +473,7 @@ function this.InitArmData() UIManager.OpenPanel(UIName.RoleInfoPopup, heroData,nil,this.choosedList,#this.choosedList) end, 0.5) end + this.formationPower=this.formationPower+PracticeManager.GetPracticeAddPower() if this.curFormationIndex == FormationTypeDef.EXPEDITION then-- 远征加圣物战力 this.formationPower = math.floor(this.formationPower * (1 + ExpeditionManager.CalculateallHolyWarPower()/10000)) -- Log("所有圣物战力万分比 "..ExpeditionManager.CalculateallHolyWarPower()) diff --git a/Assets/ManagedResources/~Lua/Modules/Practice/PracticeManager.lua b/Assets/ManagedResources/~Lua/Modules/Practice/PracticeManager.lua index d1ae207c12..2cf7056e4c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Practice/PracticeManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Practice/PracticeManager.lua @@ -37,6 +37,18 @@ function this.UpdataPlayerSkill(msg) end end +--获取修行技能添加的战斗 +function this.GetPracticeAddPower() + local addPower=0 + for key, value in pairs(this.playerSkillList) do + local lvConfig=ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.PlayerSkill,"SkillID",key,"Level",value) + if lvConfig then + addPower=addPower+lvConfig.Fight + end + end + return addPower +end + --设置角色技能等级 function this.SetPlayerSkill(id,lv) diff --git a/Assets/ManagedResources/~Lua/Modules/Practice/PracticeSkillInfoPanel.lua b/Assets/ManagedResources/~Lua/Modules/Practice/PracticeSkillInfoPanel.lua index c9536639bd..4755621749 100644 --- a/Assets/ManagedResources/~Lua/Modules/Practice/PracticeSkillInfoPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Practice/PracticeSkillInfoPanel.lua @@ -37,8 +37,18 @@ function PracticeSkillInfoPanel:BindEvent() LogError("point skillId=="..skillId) PopupTipPanel.ShowTip("技能升级成功!") if nextData then + local oldPower=PlayerManager.maxForce PracticeSkillInfoPanel:RefreshShow(skillId,skillLv+1) PracticeManager.SetPlayerSkill(skillId,skillLv) + local newPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL) + if newPower>oldPower then + NetManager.RequestUserForceChange(FormationTypeDef.FORMATION_NORMAL,function() + PlayerManager.maxForce=newPower + UIManager.OpenPanel(UIName.WarPowerChangeNotifyPanelV2,{oldValue = oldPower,newValue = newPower}) + end) + + end + end end) elseif btnState==5 then