From 8a5a4dc89554504aa6f106744498319b8ce4f2b8 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期三, 20 三月 2019 10:53:39 +0800
Subject: [PATCH] 6381 【后端】【2.0】任务接口开发
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py | 97 +++++++++++++++++++++++++++++-------------------
1 files changed, 59 insertions(+), 38 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
index 360890f..8c38c83 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
@@ -278,6 +278,8 @@
tdict = {
2102:ChConfig.TriggerType_BeAttackOver, # 被攻击后触发 20
2104:ChConfig.TriggerType_LockHP, # 锁血触发技能 63
+ 2105:ChConfig.TriggerType_BeLuckyHit, # 被会心一击触发技能 64
+ 2106:ChConfig.TriggerType_BeSuperHit, # 被暴击触发技能
4000:ChConfig.TriggerType_BuffState, # 进入4012的某个状态触发技能 2
4001:ChConfig.TriggerType_TagBuffState, # 目标进入4012的某个状态触发技能 2
@@ -347,6 +349,11 @@
4066:ChConfig.TriggerType_AddDamagePer, # 提高增加伤害属性值,计算时 3
4067:ChConfig.TriggerType_ProDefValue, # 神兵护盾值下降时 62
4068:ChConfig.TriggerType_LockHP, # 锁血触发技能 63
+ 4069:ChConfig.TriggerType_ZhongjiZhansha, # 终极斩杀 64
+ 4070:ChConfig.TriggerType_DebuffOff, # 抵消一次debuff 23
+ 4071:ChConfig.TriggerType_Buff_SuckBloodPer, # 攻击 百分比吸血
+ 4072:ChConfig.TriggerType_SuperHitSkipCD, # 暴击无冷却 68
+ 4073:ChConfig.TriggerType_BuffHurtCnt, # 当持续buff伤害第X次时触发技能 69
}
return tdict.get(effectID, -1)
#===========================================================================
@@ -371,18 +378,24 @@
4506:ChConfig.TriggerType_BeAttackOver, # BUFF类:被攻击触发技能 只刷新属性 不触发技能
4507:ChConfig.TriggerType_Buff_AddSuperHitRate, # BUFF类:增加暴击率
4508:ChConfig.TriggerType_Buff_AttackSubLayer, # BUFF类:攻击减buff层,0消失
- 4514:ChConfig.TriggerType_Buff_BeAttackSubLayer, # BUFF类:被攻击减buff层,0消失
4509:ChConfig.TriggerType_Buff_SuckBloodPer, # BUFF类: 百分比吸血, 此处非属性类
4510:ChConfig.TriggerType_Buff_MustBeHit, # BUFF类: 无视闪避必中
4511:ChConfig.TriggerType_AttackAddFinalValue, #攻击增加输出伤害11
4512:ChConfig.TriggerType_ReduceHurtHPPer, # 百分比减少攻击计算后伤害
4513:ChConfig.TriggerType_AttackAddFinalValue, #攻击增加输出伤害11
+ 4514:ChConfig.TriggerType_Buff_BeAttackSubLayer, # BUFF类:被攻击减buff层,0消失
4515:ChConfig.TriggerType_AddIceAtkPer, # BUFF类:攻击附加真实伤害百分比
4516:ChConfig.TriggerType_ChangeHurtToHP, # BUFF类:buff中把受到伤害的xx%转化为生命值
4517:ChConfig.TriggerType_DebuffOff, # BUFF类: 抵消debuff
4518:ChConfig.TriggerType_ForbidenCure, # BUFF类: 禁止治疗 53
4519:ChConfig.TriggerType_WillDead, # BUFF类: 进入濒死状态 25
4520:ChConfig.TriggerType_AddLayer, # BUFF类: 目标BUFF层级增加时 52
+ 4521:ChConfig.TriggerType_BeLuckyHitSubPer, # 减少受到的会心伤害 65
+ 4522:ChConfig.TriggerType_DebuffOff, # BUFF类: 抵消debuff
+ 4523:ChConfig.TriggerType_SuperHitSkillPer, # 暴击时,增加技能伤害 10
+ 4524:ChConfig.TriggerType_SuperHitSubLayer, # 暴击减层 67
+ 4525:ChConfig.TriggerType_SuperHitSkipCD, # 暴击无冷却 68
+
803:ChConfig.TriggerType_BloodShield, # 血盾
806:ChConfig.TriggerType_BloodShield, # 血盾
807:ChConfig.TriggerType_BloodShield, # 血盾
@@ -724,36 +737,6 @@
return PyGameData.g_PassiveEffManager
-## 当前释放技能 skillData
-#def CalcBuffTriggerSkill(attacker, skillData, target, tick):
-# #===========================================================================
-# # passiveEff = GetPassiveEffManager().GetPassiveEff(attacker, False)
-# # if not passiveEff:
-# # return
-# # #影响技能的BUFF
-# # buffTriggerSkillDict = passiveEff.GetBuffTriggerSkill(skillData.GetSkillID())
-# # if not buffTriggerSkillDict:
-# # return
-# #
-# # passiveEff.CalcBuffTriggerSkill(attacker, target, skillData, buffTriggerSkillDict, tick)
-# #===========================================================================
-# OnPassiveSkillTrigger(attacker, target, ChConfig.TriggerType_AttackOver, tick)
-
-#===============================================================================
-# # 判断PK关系是否可攻击 Def_BattleRelationType_CommNoBoss也可攻击 只是攻击无效果
-# def CheckBattleRelationType(skillBattleType, battleRelationType):
-# if skillBattleType in [ChConfig.Def_BattleRelationType_Comm, ChConfig.Def_BattleRelationType_CommNoBoss]:
-# return True
-#
-# #if battleRelationType in [ChConfig.Def_BattleRelationType_Comm, ChConfig.Def_BattleRelationType_CommNoBoss]:
-# # return True
-#
-# if skillBattleType != battleRelationType:
-# # PK模式的判定
-# return False
-# return True
-#===============================================================================
-
# 查找被动技能时的对象
def GetPassiveDefender(attacker, defender):
# 寻找被击者,1.目标排除是自己(后面逻辑会更换) 2. 查客户端伤害队列,3.查服务端伤害队列
@@ -775,7 +758,15 @@
return
return GameWorld.GetObj(curHurt.GetObjID(), curHurt.GetObjType())
-
+
+# 当前有效被动触发技能, 可用于基础使用判定
+def IsValidPassiveSkill(curSkill):
+ validMap = SkillShell.GetAttrMapID(curSkill)
+ if validMap and validMap != GameWorld.GetMap().GetMapID():
+ # 有效地图可触发
+ return False
+
+ return True
# 多种被动技能优先触发释放一个,如被动 血量40%触发无敌技能,血量一定是停留在40%
# 先锁血,后触发技能 同 DelayUsePassiveTriggerSkill 使用
@@ -820,6 +811,9 @@
if not curSkill:
continue
+ if not IsValidPassiveSkill(curSkill):
+ continue
+
if stopPassiveSkill and curSkill.GetFuncType() != ChConfig.Def_SkillFuncType_GiftSkill:
# 只有天赋才可以再次被触发
continue
@@ -970,6 +964,9 @@
if not curSkill:
continue
+ if not IsValidPassiveSkill(curSkill):
+ continue
+
if stopPassiveSkill and curSkill.GetFuncType() != ChConfig.Def_SkillFuncType_GiftSkill:
# 只有天赋才可以再次被触发
continue
@@ -1065,6 +1062,10 @@
curSkill = attacker.GetSkillManager().FindSkillBySkillTypeID(skillTypeID)
if not curSkill:
continue
+
+ if not IsValidPassiveSkill(curSkill):
+ continue
+
if stopPassiveSkill and curSkill.GetFuncType() != ChConfig.Def_SkillFuncType_GiftSkill:
# 只有天赋才可以再次被触发
continue
@@ -1128,6 +1129,9 @@
if not curSkill:
continue
+ if not IsValidPassiveSkill(curSkill):
+ continue
+
effect = SkillCommon.GetSkillEffectByEffectID(curSkill, effectID)
if not effect:
continue
@@ -1171,6 +1175,9 @@
continue
curSkill = attacker.GetSkillManager().FindSkillBySkillTypeID(skillTypeID)
if not curSkill:
+ continue
+
+ if not IsValidPassiveSkill(curSkill):
continue
effect = SkillCommon.GetSkillEffectByEffectID(curSkill, effectID)
@@ -1220,6 +1227,13 @@
for skillID, effectList in buffDict.items():
if tagSkillID == skillID:
+ continue
+
+ curSkill = GameWorld.GetGameData().GetSkillBySkillID(skillID)
+ if not curSkill:
+ continue
+
+ if not IsValidPassiveSkill(curSkill):
continue
for passiveEffect in effectList:
# 被动触发的技能
@@ -1280,15 +1294,19 @@
for skillID, effectList in buffDict.items():
if skillID == useSkillID:
continue
+ curSkill = GameWorld.GetGameData().GetSkillBySkillID(skillID)
+ if not curSkill:
+ continue
+
+ if stopPassiveSkill and curSkill.GetFuncType() != ChConfig.Def_SkillFuncType_GiftSkill:
+ # 只有天赋才可以再次被触发
+ continue
+
+ if not IsValidPassiveSkill(curSkill):
+ continue
for passiveEffect in effectList:
# 被动触发的技能
pyName = "PassiveBuff_%s"%passiveEffect.GetEffectID()
- curSkill = GameWorld.GetGameData().GetSkillBySkillID(skillID)
- if not curSkill:
- continue
- if stopPassiveSkill and curSkill.GetFuncType() != ChConfig.Def_SkillFuncType_GiftSkill:
- # 只有天赋才可以再次被触发
- continue
callFunc = GameWorld.GetExecFunc(PassiveBuff, "%s.%s" % (pyName, "CheckCanHappen"))
if not callFunc:
continue
@@ -1360,6 +1378,9 @@
if not curSkill:
continue
+ if not IsValidPassiveSkill(curSkill):
+ continue
+
for passiveEffect in effectList:
if stopPassiveSkill and curSkill.GetFuncType() != ChConfig.Def_SkillFuncType_GiftSkill:
# 只有天赋才可以再次被触发
--
Gitblit v1.8.0