Sfoglia il codice sorgente

1.增加新战斗属性-破甲抵抗 2.增加donghe buff 3.删除jiban文件无用打印

gitxsm 8 mesi fa
parent
commit
e17d7c448b

+ 10 - 5
script/module/combat/CombatBuff.lua

@@ -42,7 +42,9 @@ end
 
 --控制类buff
 function isControlCmd(cmd)
-	if  cmd == "xuanyun" or cmd == "shihua" or cmd == "bingdong" or cmd == "chanrao" or cmd == "xuanyun2" or cmd == "chenshui" then
+	if  cmd == "xuanyun" or cmd == "shihua" or cmd == "bingdong"
+		or cmd == "chanrao" or cmd == "xuanyun2" or cmd == "chenshui"
+		or cmd == "donghe" then
 		return true
 	end
 end
@@ -55,7 +57,8 @@ function isStop(obj)
 	local bufferCmd = obj.bufferCmd
 	local ret
 	if bufferCmd["xuanyun"] or bufferCmd["shihua"] or bufferCmd["bingdong"]
-		or bufferCmd["chanrao"] or bufferCmd["xuanyun2"] or bufferCmd["chenshui"] then
+		or bufferCmd["chanrao"] or bufferCmd["xuanyun2"] or bufferCmd["chenshui"]
+		or bufferCmd["donghe"] then
 
 		ret = 1
 	elseif bufferCmd["xuanyun"] or bufferCmd["xuanyun2"] then
@@ -75,7 +78,7 @@ function IsJustHaveChanraoBuff(obj)
 		return false
 	end
 	
-	if bufferCmd["xuanyun"] or bufferCmd["shihua"] or bufferCmd["bingdong"] or bufferCmd["xuanyun2"] then
+	if bufferCmd["xuanyun"] or bufferCmd["shihua"] or bufferCmd["bingdong"] or bufferCmd["xuanyun2"] or bufferCmd["donghe"] then
 		return false
 	end
 
@@ -246,7 +249,7 @@ local function isMiankong(obj, cmd, attacker, skillKongRate)
     kongRate = kongRate < 0 and 0 or kongRate
 
 
-	if cmd == "xuanyun2" then
+	if cmd == "xuanyun2" or cmd == "donghe" then
 		kongRate = skillKongRate
 	end
 
@@ -2150,6 +2153,8 @@ function onExtraCombatRecord(pos,value,param)
 	elseif param == "kill" then
 		obj.extraCombatRecord.kill = (obj.extraCombatRecord.kill or 0) + value
 	elseif param == "chenshui" then
-		obj.extraCombatRecord.kchenshuiill = (obj.extraCombatRecord.chenshui or 0) + value
+		obj.extraCombatRecord.chenshui = (obj.extraCombatRecord.chenshui or 0) + value
+	elseif param == "donghe" then
+		obj.extraCombatRecord.donghe = (obj.extraCombatRecord.donghe or 0) + value
 	end
 end

+ 3 - 1
script/module/combat/CombatCalc.lua

@@ -76,7 +76,9 @@ local function getPojia(attacker, defender, skillConfig)
     local statusPoJia = BeSkill.getStatusPojia(attacker, defender)
 
     local pojia = attacker.attr[RoleDefine.POJIA] or 0
-    local total = hushiHujia + pojia + statusPoJia
+    local pojia_dk = defender.attr[RoleDefine.POJIA_DK] or 0
+
+    local total = hushiHujia + pojia + statusPoJia - pojia_dk
     total = total < 0 and 0 or total
     return total/10000
 end

+ 0 - 12
script/module/combat/JibanLogic.lua

@@ -120,7 +120,6 @@ function initAfterHot()
 end
 
 function query(human,combatType,heroID)
-	-- print("请求羁绊英雄数据================", combatType, heroID)
 	local flag = RoleSystemLogic.isOpen(human,RoleSystemDefine.ROLE_SYS_ID_207)
 	if flag ~= true then
 		return
@@ -167,9 +166,6 @@ function query(human,combatType,heroID)
 		HeroGrid.makeHeroSimple(net.hero, heroGrid, index)
 	end
 	msgRet.posList[0] = len
-
-
-	-- print("请求羁绊英雄数据结束================", msgRet.jibanList[0], msgRet.posList[0])
 	Msg.send(msgRet,human.fd)
 end
 
@@ -254,7 +250,6 @@ function getJiban(objList,jibanList)
 		local obj = objList[i]
         -- 不是玩家不计算羁绊
 		if obj and obj.type == CombatDefine.COMBAT_OBJ_TYPE1 then
-			-- print("上阵英雄ID================", obj.id)
 			objHero[obj.id] = objHero[obj.id] or 0
 			objHero[obj.id] = objHero[obj.id] + 1
 		end
@@ -323,7 +318,6 @@ end
 
 function getJibanHero(human,combatHeroDB)
 	local jibanHero = {}
-	-- print("开始获取羁绊英雄数据================", human.db.name, combatHeroDB.jiban and true or false)
 	if combatHeroDB.jiban then
 		-- for k, uuid in pairs(combatHeroDB.jiban) do
 		-- 	if uuid ~= "0" and uuid ~= "" then
@@ -340,7 +334,6 @@ function getJibanHero(human,combatHeroDB)
 		-- end
 
 		for k, uuid in pairs(combatHeroDB.jiban) do
-			-- print(string.format("===========羁绊英雄数据, 位置: %s, 英雄UUID: %s", k, uuid))
 			if uuid ~= "0" and uuid ~= "" then
 				local heroGrid = HeroLogic.getHeroGridByUuid(human, uuid)
 				if heroGrid then
@@ -367,10 +360,6 @@ function getJibanHero(human,combatHeroDB)
 				end
 			end
 		end
-
-		-- for k in pairs(jibanHero) do
-		-- 	print("筛选出的羁绊英雄================", k)
-		-- end
 	end
 	return jibanHero
 end
@@ -444,7 +433,6 @@ function setBeSkill(objList,jiban)
 end
 
 function update(human,combatType,jibanListStr)
-	-- print("更新羁绊英雄数据================", combatType,jibanListStr)
     local conf = CombatExcel.combat[combatType]
     if not conf then return end
 

+ 1 - 1
script/module/combat/Skill.lua

@@ -943,7 +943,7 @@ end
 
 function CMD.fanji(obj,skillConfig,skillTargets)
 	if CombatImpl.isFanji or CombatImpl.comboType > 0 then return end
-	if CombatBuff.isStatus(obj,{"xuanyun","shihua","bingdong", "xuanyun2", "chenshui"}) then return end
+	if CombatBuff.isStatus(obj,{"xuanyun","shihua","bingdong", "xuanyun2", "chenshui", "donghe"}) then return end
 	if obj.side == skillTargets[1].side then
 		return
 	end

+ 1 - 0
script/module/role/RoleAttr.lua

@@ -379,6 +379,7 @@ function initCombatAttr(attr)
 	attr[RoleDefine.INIT_MP] = 0
 	attr[RoleDefine.SHANBI] = 0
 	attr[RoleDefine.KONG_RATE] = 0
+	attr[RoleDefine.POJIA_DK] = 0
 
 	attr[RoleDefine.ATK_RATE] = 0
 	attr[RoleDefine.DEF_RATE] = 0

+ 1 - 0
script/module/role/RoleDefine.lua

@@ -33,6 +33,7 @@ JIANSHANG_RATE	= 112 -- 减伤率 万分比
 SHENSHENG_HURT_RATE = 113 --神圣伤害 万分比
 SHANBI			= 114	--闪避
 KONG_RATE		= 115 -- 控率 万分比
+POJIA_DK		= 116 -- 破甲抵抗
 
 -- 内部使用属性(201-300)
 ATK_RATE		= 201 -- 攻击百分比 万分比