Bläddra i källkod

增加新战斗效果 2.修改新商业化活动2——七日任务

gitxsm 8 månader sedan
förälder
incheckning
f1ebda98ce

+ 2 - 2
script/module/absAct/CycleSevenDayTask.lua

@@ -187,7 +187,7 @@ local function subscribeEvents(human, actId)
 
     for taskId, taskCfg in ipairs(sevenDayTaskCfg)  do
         if not registerTypeList[taskCfg.eventType] and (not taskList[taskId] or taskList[taskId].progress < taskCfg.condValue) then
-            TriggerLogic.SubscribeEvent(taskCfg.eventType, human.db._id, EventCBFunc)
+            TriggerLogic.SubscribeEvent(taskCfg.eventType, human.db._id, TaskActEventCBFunc)
             registerTypeList[taskCfg.eventType] = 1
         end
     end
@@ -263,7 +263,7 @@ end
 
 
 --事件处理函数
-function EventCBFunc(eventType, uuid, nValue1, nValue2)
+function TaskActEventCBFunc(eventType, uuid, nValue1, nValue2)
     local human = ObjHuman.onlineUuid[uuid]
     if not human then
         return

+ 29 - 2
script/module/combat/CombatBuff.lua

@@ -34,7 +34,8 @@ end
 
 --和血量相关的作用
 local function isHpCmd(cmd)
-	if cmd == "hp" or cmd == "hurt" or cmd == "hurt1" or cmd == "liuxue" or cmd == "liuxue2" or cmd == "zhongdu" or cmd == "ranshao" or cmd == "ranshao1" or cmd == "huiheYinji" then
+	if cmd == "hp" or cmd == "hurt" or cmd == "hurt1" or cmd == "liuxue" or cmd == "liuxue2" or cmd == "liuxue3"
+		or cmd == "zhongdu" or cmd == "ranshao" or cmd == "ranshao1" or cmd == "huiheYinji" then
 		return true
 	end
 	return false
@@ -206,6 +207,7 @@ CMD2KEY = {
 	["ranshao1"] = RoleDefine.STATUS_MIANYI_RATE5,
 	["liuxue"] = RoleDefine.STATUS_MIANYI_RATE6,
 	["liuxue2"] = RoleDefine.STATUS_MIANYI_RATE6,
+	["liuxue3"] = RoleDefine.STATUS_MIANYI_RATE6,
 	["zhongdu"] = RoleDefine.STATUS_MIANYI_RATE7,
     ["hunluan"] = RoleDefine.STATUS_MIANYI_RATE9,
 	["xuanyun2"] = RoleDefine.STATUS_MIANYI_RATE1,
@@ -1872,6 +1874,30 @@ function handlerEx.yinJi(target, buffer, conf)
 end
 
 
+
+handle2 = {}
+function handle2.liuxue3(target, buffer)
+	local hurt = chixuHurtDel2(target,buffer)
+	local d = CombatObj.updateHp(target, -hurt, nil, nil, buffer.attackPos,CombatObj.BUFFER_HP_TYPE)
+	buffer.attrs[RoleDefine.HP_COMBAT] = -hurt
+	onExtraCombatRecord(buffer.attackPos,hurt,"liuxue")
+end
+
+
+
+-- 有些buff, 在释放技能后会触发效果
+function BuffHandleAfterSkill(obj)
+	local res, _, idx = isStatus(obj, {"liuxue3"})
+	if res then
+		local buffer = obj.buffer[idx]
+		handle2.liuxue3(obj, buffer)
+		CombatImpl.addFrameBuffer(obj,buffer,CombatDefine.BUFFER_OP_HOLD)
+	end
+
+end
+
+
+
 function qingsuan(target)
 	if target.hp <= 0 then
 		return 0
@@ -1883,7 +1909,8 @@ function qingsuan(target)
 		--local conf = BufferExcel.buffer[buffer.id]
 		local conf = GetBuffConfig(buffer.id)
 		local cmd = conf.cmd
-		if cmd == "ranshao" or cmd == "ranshao1" or cmd == "liuxue"or cmd == "liuxue2" or cmd == "zhongdu" or cmd == "hurt" or cmd == "hurt1" then
+		if cmd == "ranshao" or cmd == "ranshao1" or cmd == "liuxue"or cmd == "liuxue2" or cmd == "liuxue3"
+			or cmd == "zhongdu" or cmd == "hurt" or cmd == "hurt1" then
 			round = 1
 			if buffer.round and buffer.round > 0 then
 				round = buffer.round

+ 2 - 1
script/module/combat/CombatImpl.lua

@@ -782,7 +782,8 @@ function calcFrame()
     	-- buff作用效果
         --skillID = 10131
 		if skillID then
-        	Skill.use(attacker,skillID,mpAtkRate)			
+        	Skill.use(attacker,skillID,mpAtkRate)
+			CombatBuff.BuffHandleAfterSkill(attacker)
         	addObjResultOut(attacker,round)
 		end	
 	end