From 8305a5153495bed079462c629f9902174a0e5b6e Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期三, 10 七月 2019 15:21:02 +0800
Subject: [PATCH] 7940 【后端】【主干】骑宠觉醒功能
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py | 61 +++++++++++++++++++++++++-----
1 files changed, 51 insertions(+), 10 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 e4a9888..11f418e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
@@ -290,6 +290,8 @@
def GetTriggerTypeByEffectID(effectID):
# 临时配置
tdict = {
+ 1304:ChConfig.TriggerType_HitValue, # 命中记录 89
+
2102:ChConfig.TriggerType_BeAttackOver, # 被攻击后触发 20
2104:ChConfig.TriggerType_LockHP, # 锁血触发技能 63
2105:ChConfig.TriggerType_BeLuckyHit, # 被会心一击触发技能 64
@@ -403,6 +405,7 @@
4107:ChConfig.TriggerType_SkillValue, # 增加技能伤害固定值 82
4108:ChConfig.TriggerType_SkillSuccess, # 使用技能成功后不触发技能 处理消耗等问题用 87
4109:ChConfig.TriggerType_SkillValue, # 增加技能伤害固定值 82
+ 4110:ChConfig.TriggerType_ChangeSkillEff, # 改变技能特效
}
return tdict.get(effectID, -1)
#===========================================================================
@@ -451,7 +454,7 @@
4529:ChConfig.TriggerType_Buff_SuckBloodPer, # BUFF类: 百分比吸血, 此处非属性类
4530:ChConfig.TriggerType_Buff_AttackSubLayer, # BUFF类:攻击减buff层,0消失
4531:ChConfig.TriggerType_BounceHPPerByAttacker, # 反弹伤害百分比值, 由攻击方决定 77
- 4532:ChConfig.TriggerType_SuperHit, # buff中对第一目标暴击触发技能
+ 4532:ChConfig.TriggerType_AttackOver, # BUFF类:攻击触发新技能
4533:ChConfig.TriggerType_BurnDisappear, # 灼烧消失触发 81
4534:ChConfig.TriggerType_DebuffOff, # BUFF类: 抵消debuff
4535:ChConfig.TriggerType_BeAttackAddSkillPer, # buff中, 被攻击提高技能伤害
@@ -1413,11 +1416,8 @@
if not AttackCommon.CheckBattleRelationType(skillBattleType, battleRelationType):
return
- tagSkillID = tagSkill.GetSkillID() if tagSkill else 0
for skillID, effectList in buffDict.items():
- if tagSkillID == skillID:
- continue
curSkill = GameWorld.GetGameData().GetSkillBySkillID(skillID)
if not curSkill:
@@ -1534,13 +1534,13 @@
# buff 影响的(攻击)行为值
# 返回数值
-def GetValueByPassiveBuffTriggerType(attacker, defender, useSkill, triggerType):
+def GetValueByPassiveBuffTriggerType(attacker, defender, useSkill, triggerType, isStopPassiveSkill=True):
attacker = FindRealAttacker(attacker)
if not attacker:
return 0
stopPassiveSkill = False # 被动技能不能再触发被动技能,但可以触发天赋技能
- if useSkill and SkillCommon.isPassiveSkill(useSkill):
+ if useSkill and SkillCommon.isPassiveSkill(useSkill) and isStopPassiveSkill:
#GameWorld.DebugLog("被动技能不能再次触发被动技能")
#return 0
if not PassPassiveLimit(useSkill):
@@ -1696,12 +1696,53 @@
# 但也有一些特殊情况 放在此处过滤
def PassPassiveLimit(useSkill):
# 如灼烧是被动技能 但可以被不断的强化
- if useSkill.GetSkillType() != ChConfig.Def_SkillType_PassiveLstDepBuff:
- return False
+ if useSkill.GetSkillType() == ChConfig.Def_SkillType_PassiveLstDepBuff:
+ return True
if useSkill.GetFuncType() == ChConfig.Def_SkillFuncType_PassiveSkillWithSP:
# 有专精的被动技能,可以再次触发被动效果
- return False
- return True
+ return True
+ return False
+# 被动技能改变值 无条件限制 纯取值
+def GetPassiveSkillValueByTriggerTypeEx(attacker, defender, connSkill, triggerType):
+ attacker = FindRealAttacker(attacker)
+ if not attacker:
+ return 0
+
+ passiveEff = GetPassiveEffManager().GetPassiveEff(attacker)
+ if not passiveEff:
+ return 0
+ connSkillID = connSkill.GetSkillTypeID() if connSkill else 0
+ skills = passiveEff.GetPassiveSkillsByTriggerType(triggerType, connSkill)
+ if not skills:
+ return 0
+
+ curValue = 0
+
+ for skillTypeID, effectID in skills:
+ if connSkillID == skillTypeID:
+ continue
+ curSkill = attacker.GetSkillManager().FindSkillBySkillTypeID(skillTypeID)
+ if not curSkill:
+ continue
+
+ effect = SkillCommon.GetSkillEffectByEffectID(curSkill, effectID)
+ if not effect:
+ continue
+ pyName = "PassiveSkill_%s" % effectID
+
+ callFunc = GameWorld.GetExecFunc(PassiveBuff, "%s.%s" % (pyName, "CheckCanHappen"))
+
+ # 条件不满足
+ if callFunc and not callFunc(attacker, defender, effect, curSkill):
+ continue
+
+ callFunc = GameWorld.GetExecFunc(PassiveBuff, "%s.%s" % (pyName, "GetValue"))
+ if callFunc is None:
+ continue
+
+ curValue += callFunc(attacker, defender, effect, skillTypeID)
+
+ return curValue
--
Gitblit v1.8.0