Explorar el Código

秘宝新功能

gitxsm hace 1 año
padre
commit
c44b0fa1f0

+ 27 - 3
script/module/combat/CombatPosLogic.lua

@@ -46,6 +46,19 @@ local SkillExcel = require("excel.skill")
 local RoleAttr = require("role.RoleAttr")
 local LostTempleCombatLogic = require("lostTemple.lostTempleCombatLogic")
 local RecommendLineup = require("drawCard.RecommendLineup")
+local TalismanLogic = require("talisman.TalismanLogic")
+
+
+
+--秘宝的加成
+local function getTalismanAdd(human)
+	local res = TalismanLogic.getTalismanAdd(human, TalismanLogic.OTHER_EFFECT_TBL.BATTLE_ISQUICKTIME)
+	if res == 0 then
+		return
+	end
+	return res
+end
+
 
 -- 根据战斗类型获取出战队伍类型
 function getTeamType(combatType)
@@ -485,18 +498,28 @@ function fontHelpNet(net,type,id,icon)
 	net.icon = icon or 0
 end
 
+
 function posQuery(human, combatType, group, param, flag)
 	local combatConfig = CombatExcel.combat[combatType]
 	if not combatConfig then return end
 	local msgRet = Msg.gc.GC_COMBAT_POS_QUERY
 	local len = 0
+
+	local newIsQuickTime
+	if combatType == CombatDefine.COMBAT_TYPE1 then
+		newIsQuickTime = getTalismanAdd(human)
+	end
+
+
+
 	if group and group ~= 0 then
 		for k,v in ipairs(CombatExcel.combat) do
 			if v.group == group then
 				len = len + 1
 				msgRet.list[len].type = k
 				msgRet.list[len].name = v.name
-                msgRet.list[len].isQuickTime = v.isQuickTime
+                -- msgRet.list[len].isQuickTime = v.isQuickTime
+				msgRet.list[len].isQuickTime = newIsQuickTime and newIsQuickTime or v.isQuickTime
 				msgRet.list[len].needLv = RoleSystemLogic.getOpenLv(v.systemID)
 			end
 		end
@@ -504,7 +527,8 @@ function posQuery(human, combatType, group, param, flag)
 		len = len + 1
 		msgRet.list[len].type = combatType
 		msgRet.list[len].name = combatConfig.name
-        msgRet.list[len].isQuickTime = combatConfig.isQuickTime
+        -- msgRet.list[len].isQuickTime = combatConfig.isQuickTime
+		msgRet.list[len].isQuickTime = newIsQuickTime and newIsQuickTime or combatConfig.isQuickTime
         msgRet.list[len].needLv = RoleSystemLogic.getOpenLv(combatConfig.systemID)
 	end
 	msgRet.type = combatType
@@ -566,7 +590,7 @@ function posQuery(human, combatType, group, param, flag)
     local skillID = MoshouLogic.getPutMoshouSkillID(human, combatType) or 0
     local skillConfig = SkillExcel.skill[skillID]
     msgRet.moshouSkill = skillConfig and skillConfig.icon or ""
-    
+
 	Msg.send(msgRet,human.fd)
 end
 

+ 7 - 1
script/module/talisman/TalismanLogic.lua

@@ -45,6 +45,7 @@ OTHER_EFFECT_TBL = {
     ["ZHANBU_POS6"] = "ZHANBU_POS6",                --占卜解锁格子6
     ["ZHANBU_POS7"] = "ZHANBU_POS7",                --占卜解锁格子7
     ["ZHANBU_FRAGMENT"] = "ZHANBU_FRAGMENT",        --占卜获得碎片加成
+    ["BATTLE_ISQUICKTIME"] = "BATTLE_ISQUICKTIME",  --主线闯关跳过战斗
 }
 
 --是否开启本系统
@@ -207,8 +208,13 @@ function getTalismanAdd(human, type_m)
         for i=1,#attrs do
             local singleAttr = attrs[i]
             local addType = singleAttr[1]
+            local value = singleAttr[2]
             if type(addType) == "string" and level >= i and type_m == addType then
-                addValue = addValue + singleAttr[2]
+                if type(value) == "number" then
+                    addValue = addValue + value
+                else
+                    addValue = value
+                end
             end
         end
     end