Sfoglia il codice sorgente

修改战斗逻辑

gitxsm 1 mese fa
parent
commit
6018d8d977
2 ha cambiato i file con 29 aggiunte e 0 eliminazioni
  1. 20 0
      script/module/combat/BeSkill.lua
  2. 9 0
      script/module/combat/CombatBuff.lua

+ 20 - 0
script/module/combat/BeSkill.lua

@@ -507,6 +507,7 @@ end
 -- 连击检测
 -- 连击检测
 local function comboCheck(targetObj, side)
 local function comboCheck(targetObj, side)
 	if Skill.GroupSkillCnt ~= 1 then return end--技能包首次技能攻击才能触发
 	if Skill.GroupSkillCnt ~= 1 then return end--技能包首次技能攻击才能触发
+	if CombatImpl.isFanji or CombatImpl.comboType > 0 then return end
 
 
 	for _,pos in ipairs(CombatDefine.SIDE2POS[side]) do
 	for _,pos in ipairs(CombatDefine.SIDE2POS[side]) do
 		local obj = CombatImpl.objList[pos]
 		local obj = CombatImpl.objList[pos]
@@ -514,6 +515,25 @@ local function comboCheck(targetObj, side)
 			for _, skillInfo in ipairs(obj.beSkillList[BESKILL_TYPE72] or {}) do
 			for _, skillInfo in ipairs(obj.beSkillList[BESKILL_TYPE72] or {}) do
 				local skillCfg = Skill.GetSkillConfig(skillInfo[1])
 				local skillCfg = Skill.GetSkillConfig(skillInfo[1])
 				if skillCfg and skillCfg.cmd == "comboProb" then
 				if skillCfg and skillCfg.cmd == "comboProb" then
+					local targetType = skillCfg.beSkillArgs[2] or 0
+					local targetList = skillCfg.beSkillArgs[3]
+					if targetType <= 0 or not targetList then
+						return
+					end
+
+					local bl = false
+					if targetType == 1 then -- 职业
+						if table.find(targetList, targetObj.job) then
+							bl = true
+						end
+					elseif targetType == 2 then -- 种族
+						if table.find(targetList, targetObj.camp) then
+							bl = true
+						end
+					end
+
+					if not bl then return end
+
 					local comboProbVal = skillCfg.beSkillArgs[1] or 0
 					local comboProbVal = skillCfg.beSkillArgs[1] or 0
 					local randval = math.random(0, 10000)
 					local randval = math.random(0, 10000)
 					if comboProbVal >= randval then
 					if comboProbVal >= randval then

+ 9 - 0
script/module/combat/CombatBuff.lua

@@ -306,9 +306,18 @@ local function isMiankong(obj, cmd, attacker, skillKongRate)
 	end
 	end
 end
 end
 
 
+local sp_notBan_buff_list = {
+	["hp"] = true,
+}
+
 -- 是否可能被禁止增加buff
 -- 是否可能被禁止增加buff
 local function isBanBuff(obj, cmd)
 local function isBanBuff(obj, cmd)
+	if sp_notBan_buff_list[cmd] then
+		return false
+	end
+
 	initCombatBufferType()
 	initCombatBufferType()
+
 	if BUFFER_COMBAT_TYPE[cmd] and BUFFER_COMBAT_TYPE[cmd] == 2 then
 	if BUFFER_COMBAT_TYPE[cmd] and BUFFER_COMBAT_TYPE[cmd] == 2 then
 		local res, _, ind = isStatus(obj, { "linglun" })
 		local res, _, ind = isStatus(obj, { "linglun" })
 		if not res then
 		if not res then