From f9bd22b35e55dfd182205756a9d95348e055a957 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期二, 27 十一月 2018 21:53:14 +0800
Subject: [PATCH] 4923 【后端】【1.3】神兵技能--神兵等级差安全防范,模板30增加清除负面技能(减益,持续减益,控制buff)一个
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4066.py | 10 ++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_30.py | 56 ++++++++++++++++++++-------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4065.py | 12 +++++-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py | 2
4 files changed, 61 insertions(+), 19 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
index b7f7d9f..d96af81 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
@@ -1520,7 +1520,7 @@
# 被动技能触发
defObj.SetDict(ChConfig.Def_PlayerKey_GodWeaponBeforeProDef, curProDef)
- PassiveBuffEffMng.OnPassiveSkillTrigger(defObj, atkObj, curSkill, ChConfig.TriggerType_ProDefValue, tick)
+ PassiveBuffEffMng.OnPassiveSkillTrigger(defObj, atkObj, None, ChConfig.TriggerType_ProDefValue, tick)
return hurtValue - absortValue
## 计算伤血值
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_30.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_30.py
index 123a4a1..fde565d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_30.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_30.py
@@ -21,6 +21,7 @@
import PlayerControl
import IPY_GameWorld
import NPCCommon
+import GameWorld
#------------------------------------------------------------------------------
@@ -30,24 +31,49 @@
if not defender:
return
- buffType = ChConfig.Def_SkillBuffList.get(curSkill.GetEffect(0).GetEffectValue(0))
- buffTuple = SkillCommon.GetBuffManagerByBuffType(defender, buffType)
- if buffTuple == ():
- return
+ if not GameWorld.CanHappen(curSkill.GetHappenRate(), ChConfig.Def_MaxRateValue):
+ #清除失败也触发CD
+ return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill)
- buffManager = buffTuple[0]
- if buffManager.GetBuffCount() == 0:
- return
+ skillType = curSkill.GetEffect(0).GetEffectValue(0)
+ if skillType == 0:
+ # 无配置代表清除负面buff任意1个
+ skillTypeList = [
+ ChConfig.Def_SkillType_LstDepBuff , #持续减益BUFF 4
+ ChConfig.Def_SkillType_DepBuff , #减益BUFF 6
+ ChConfig.Def_SkillType_Action , #影响行为BUFF 14
+ ]
+ else:
+ skillTypeList = [skillType]
- curBuff = buffManager.GetBuff(0)
- ownerID, ownerType = curBuff.GetOwnerID(), curBuff.GetOwnerType()
+ delSuccess = False
- #删除Buff
- BuffSkill.DoBuffDisApper(defender, curBuff, tick)
- buffSkill = curBuff.GetSkill()
- skillID = buffSkill.GetSkillID()
- buffManager.DeleteBuffByTypeID(buffSkill.GetSkillTypeID())
- SkillShell.ClearBuffEffectBySkillID(defender, skillID, ownerID, ownerType)
+ for skillType in skillTypeList:
+
+ buffType = ChConfig.Def_SkillBuffList.get(skillType)
+ buffTuple = SkillCommon.GetBuffManagerByBuffType(defender, buffType)
+ if buffTuple == ():
+ continue
+
+ buffManager = buffTuple[0]
+ if buffManager.GetBuffCount() == 0:
+ continue
+
+ curBuff = buffManager.GetBuff(0)
+ ownerID, ownerType = curBuff.GetOwnerID(), curBuff.GetOwnerType()
+
+ #删除Buff
+ BuffSkill.DoBuffDisApper(defender, curBuff, tick)
+ buffSkill = curBuff.GetSkill()
+ skillID = buffSkill.GetSkillID()
+ buffManager.DeleteBuffByTypeID(buffSkill.GetSkillTypeID())
+ SkillShell.ClearBuffEffectBySkillID(defender, skillID, ownerID, ownerType)
+ delSuccess = True
+ break
+
+ if not delSuccess:
+ # 没有可清除BUFF也进入CD
+ return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill)
#刷新属性
curObjType = defender.GetGameObjType()
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4065.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4065.py
index 922beb8..6d8394b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4065.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4065.py
@@ -14,15 +14,23 @@
import ChConfig
import GameWorld
import GameObj
-
+import IPY_GameWorld
def CheckCanHappen(attacker, defender, effect, curSkill):
+ if not defender:
+ return False
+ if defender.GetGameObjType() != IPY_GameWorld.gotPlayer:
+ return False
+
+ if attacker.GetGameObjType() != IPY_GameWorld.gotPlayer:
+ return False
+
attrLV = attacker.NomalDictGetProperty(ChConfig.Def_PDict_GodWeaponLV % effect.GetEffectValue(0))
tagAttrLV = defender.NomalDictGetProperty(ChConfig.Def_PDict_GodWeaponLV % effect.GetEffectValue(0))
if tagAttrLV >= attrLV:
return False
-
+
return True
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4066.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4066.py
index 5656afc..1dc7c4d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4066.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4066.py
@@ -14,9 +14,17 @@
import ChConfig
import GameWorld
import GameObj
-
+import IPY_GameWorld
def CheckCanHappen(attacker, defender, effect, curSkill):
+ if not defender:
+ return False
+ if defender.GetGameObjType() != IPY_GameWorld.gotPlayer:
+ return False
+
+ if attacker.GetGameObjType() != IPY_GameWorld.gotPlayer:
+ return False
+
attrLV = attacker.NomalDictGetProperty(ChConfig.Def_PDict_GodWeaponLV % effect.GetEffectValue(0))
tagAttrLV = defender.NomalDictGetProperty(ChConfig.Def_PDict_GodWeaponLV % effect.GetEffectValue(0))
--
Gitblit v1.8.0