From 3a62560ad1f29d87134e19675a8b1a8dba57ecdd Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 02 十一月 2018 22:08:17 +0800
Subject: [PATCH] 2683 子 天赋技能和新增双职业各两个技能 / 【后端】天赋技能 ----- 枪的攻和防
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py | 4
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_222.py | 34 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4515.py | 44 +-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4509.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4507.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4511.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4513.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4028.py | 11
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py | 227 +++++++++++----
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4501.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4503.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4520.py | 36 ++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py | 16
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4054.py | 27 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4517.py | 56 +++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4519.py | 30 ++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4056.py | 25 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4512.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4010.py | 12
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_NoLineReduce.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4508.py | 10
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4510.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4516.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_513.py | 50 +++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4514.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4506.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py | 23 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4027.py | 8
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4500.py | 4
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py | 39 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4502.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4504.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_1065.py | 38 ++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4518.py | 24 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4055.py | 53 +++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py | 7
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4057.py | 32 ++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4053.py | 19 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 10
39 files changed, 724 insertions(+), 143 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 4d99ba7..4392192 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
@@ -441,6 +441,18 @@
return ChConfig.Def_BattleRelationType_PVE
+# 判断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
## 获取攻击类型
# @param attack 攻击方对象
@@ -1582,7 +1594,7 @@
#攻击触发事件, 该代码应该放在DoAttack函数中处理逻辑比较清晰,也不会破坏GetHurtHP函数
#因为DoAttack修改点比较多,暂不迁移,相关攻击事件逻辑,就往此函数中添加
- AttackEventTrigger(atkObj, defObj, resultHurtType, tick)
+ AttackEventTrigger(atkObj, defObj, curSkill, resultHurtType, tick)
#===========================================================================
# if atkObj.GetGameObjType() == IPY_GameWorld.gotPlayer:
# GameWorld.DebugAnswer(atkObj, "--%s剩余血量 %s"%(defObj.GetID(), defObj.GetHP()))
@@ -1710,6 +1722,7 @@
# atkSkillPer 包含普攻,所以不是用技能增强处理
atkSkillPer += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(atkObj, defObj, curSkill, ChConfig.TriggerType_AttackAddSkillPer)
+
atkSkillPer += PassiveBuffEffMng.GetValueByPassiveBuffTriggerType(atkObj, defObj, curSkill, ChConfig.TriggerType_AttackAddSkillPer)
@@ -1935,12 +1948,12 @@
## 攻击时事件处理,反弹吸血或者额外触发技能等
# @param resultHurtType 伤害结构体
# @return
-def AttackEventTrigger(atkObj, defObj, resultHurtType, tick):
+def AttackEventTrigger(atkObj, defObj, curSkill, resultHurtType, tick):
#反弹伤害
CalcBounceHP(atkObj, defObj, resultHurtType.LostHP, resultHurtType.HurtType)
#吸血
- CalcSuckBlood(atkObj, defObj, resultHurtType.RealHurtHP, tick)
+ CalcSuckBlood(atkObj, defObj, curSkill, resultHurtType.RealHurtHP, tick)
if atkObj.GetGameObjType() == IPY_GameWorld.gotPlayer:
# 记录最后一次伤害值
@@ -2062,7 +2075,7 @@
# @param atkObj 攻击者
# @param defObj 防守者
# @return None
-def CalcSuckBlood(atkObj, defObj, hurtValue, tick):
+def CalcSuckBlood(atkObj, defObj, curSkill, hurtValue, tick):
if atkObj.GetGameObjType() != IPY_GameWorld.gotPlayer:
return
@@ -2089,7 +2102,7 @@
atkBackHP += PlayerControl.GetPVPAtkBackHP(atkObj)
# 百分比吸血
atkBackHPPer = PassiveBuffEffMng.GetValueByPassiveBuffTriggerType(atkObj, defObj, None, ChConfig.TriggerType_Buff_SuckBloodPer)
- atkBackHPPer += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(atkObj, defObj, None, ChConfig.TriggerType_Buff_SuckBloodPer)
+ atkBackHPPer += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(atkObj, defObj, curSkill, ChConfig.TriggerType_Buff_SuckBloodPer)
atkBackHP += int(hurtValue * atkBackHPPer*1.0 / ChConfig.Def_MaxRateValue)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py
index 28cfd70..21abbde 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py
@@ -1318,6 +1318,9 @@
if curPlayerSkill:
SkillCommon.SetSkillRemainTime(curPlayerSkill, PlayerControl.GetReduceSkillCDPer(curPlayer), tick, curPlayer)
+
+ if curSkill.GetFuncType() == ChConfig.Def_SkillFuncType_GiftSkill:
+ UseSkillOver(curPlayer, target, curSkill, tick)
return True
#玩家进入战斗状态
@@ -1373,7 +1376,6 @@
# 根据伤血类型触发技能,群攻只触发一次,放在伤血列表被清之前
def OnHurtTypeTriggerSkill(attacker, target, curSkill, tick):
-
isSuperHit = False
usePassiveSkillResult = True # 第一次判断不能调用,即代表都不可用无需循环
usePassiveSkillResultOnSuperHit = True # 暴击对象1V1触发,第一次判断不能调用,即代表都不可用无需循环
@@ -1402,6 +1404,7 @@
if hurtList[1] == IPY_GameWorld.gotPlayer:
# 濒死状态触发技能, 不能在GetHurtHP内部触发技能,否则会导致原技能的伤血列表异常
PassiveBuffEffMng.OnPassiveSkillTrigger(defender, attacker, None, ChConfig.TriggerType_WillDead, tick)
+ PassiveBuffEffMng.OnPassiveBuffTrigger(defender, attacker, None, ChConfig.TriggerType_WillDead, tick)
continue
if usePassiveSkillResult:
@@ -1434,6 +1437,7 @@
# 灵为玩家的替身需要走此逻辑
# 技能使用结束,在处理技能逻辑和通知封包之后调用
def UseSkillOver(attacker, defender, curSkill, tick):
+
# 根据伤血类型触发技能,群攻只触发一次,放在伤血列表被清之前
OnHurtTypeTriggerSkill(attacker, defender, curSkill, tick)
@@ -1444,10 +1448,9 @@
ChConfig.Def_SkillFuncType_NormalAttack]):
# 攻击减层级 优先处理,因为同个技能触发buff后,会再处理层级,导致立即减层级
PassiveBuffEffMng.OnPassiveBuffTrigger(attacker, defender, curSkill, ChConfig.TriggerType_Buff_AttackSubLayer, tick)
-
+
# 普攻和对敌技能
if not curSkill or curSkill.GetSkillType() in ChConfig.Def_CanAttackSkill_List:
-
PassiveBuffEffMng.OnPassiveSkillTrigger(attacker, defender, curSkill, ChConfig.TriggerType_AttackOver, tick)
PassiveBuffEffMng.OnPassiveBuffTrigger(attacker, defender, curSkill, ChConfig.TriggerType_AttackOver, tick)
@@ -2196,7 +2199,7 @@
continue
#放在函数中可多次触发 如SP 触发减速或者伤害,但不能放在攻击计算中,因为伤害型技能会影响伤血列表
- PassiveBuffEffMng.OnPassiveSkillTrigger(attacker, defObj, curSkill, ChConfig.TriggerType_AttackPlayer, tick,
+ PassiveBuffEffMng.OnPassiveSkillTrigger(attacker, defObj, curSkill, ChConfig.TriggerType_StormAttackOneByOne, tick,
isEnhanceSkill=False, skillIDSet=skillIDSet)
DoLogic_AttackResult(attacker, defObj, curSkill, tick)
@@ -2216,6 +2219,11 @@
continue
SkillCommon.SetSkillRemainTime(curSkill, 0, tick, attacker)
+ if attackList:
+ PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(attacker, attackList[0], curSkill, ChConfig.TriggerType_StormAttackReduceCD)
+ PassiveBuffEffMng.OnPassiveSkillTrigger(attacker, attackList[0], curSkill, ChConfig.TriggerType_StormAttackOver, tick)
+
+
## 清空伤血列表
# @param 无
# @return 无
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index b13a052..e5f5364 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -4299,7 +4299,7 @@
TriggerType_AttackAddSkillPer, # 所有攻击伤害(SkillPer)增加,含普攻,计算时 5
TriggerType_SuperHit, # 暴击时 触发技能
TriggerType_SuperHitValue, # 暴击时 增加暴击值
-TriggerType_AttackPlayer, # 击中玩家(群攻多次触发) 同 TriggerType_HurtObjAddBuff
+TriggerType_StormAttackOneByOne, # 类剑刃风暴攻击1对1触发技能
TriggerType_ReduceCD, # 减少CD
TriggerType_SuperHitSkillPer, # 暴击时,增加技能伤害 10
TriggerType_AttackAddFinalValue, #增加输出伤害
@@ -4344,7 +4344,13 @@
TriggerType_LuckyHit, # 会心一击时增加会心伤害百分比 50
TriggerType_ChangeHurtToHP, # 把受到伤害的xx%转化为生命值 51
TriggerType_AddLayer, # BUFF层级增加时 52
-) = range(1, 53)
+TriggerType_ForbidenCure, # 禁止治疗 53
+TriggerType_PassiveBuffValue, ## 被动buff值计算中二次获取被动值 54
+TriggerType_AttackKillHappen, ## 对被动技能斩杀的概率增强 55
+TriggerType_AddBuffOver, # 添加buff之后触发技能 56
+TriggerType_StormAttackOver, # 类剑刃风暴每攻击一次触发技能 57
+TriggerType_StormAttackReduceCD, # 类剑刃风暴攻击每攻击一次减少CD 58
+) = range(1, 59)
# NPC功能类型定义
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_222.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_222.py
index 2f8641a..33d750e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_222.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_222.py
@@ -25,6 +25,10 @@
import IPY_GameWorld
import GameObj
import GameMap
+import AttackCommon
+import SkillCommon
+import AICommon
+
#---------------------------------------------------------------------
#---------------------------------------------------------------------
@@ -58,7 +62,7 @@
npcControl = NPCCommon.NPCControl(curNPC)
#刷新自己仇恨度列表
- npcControl.RefreshAngryList(tick, 500) # 为确保踩陷阱体验,暂定1秒
+ npcControl.RefreshAngryList(tick, 500) # 为确保踩陷阱体验,
#遍历仇恨列表找到最近的,并触发
for i in range(0, curNPC.GetNPCAngry().GetAngryCount()):
curAngry = curNPC.GetNPCAngry().GetAngryValueTag(i)
@@ -77,7 +81,8 @@
continue
#进入战斗
- NPCFight(curNPC, npcControl, curObj, tick)
+ if not NPCFight(curNPC, npcControl, curObj, tick):
+ continue
return
return
@@ -97,14 +102,24 @@
if curSkill == None:
GameWorld.Log("陷阱 = %s 数据库查找技能失败"%curNPC.GetName())
- return
+ return True
+
+ battleRelationType = AttackCommon.GetBattleRelationType(curNPC, curObj)
+
+ skillBattleType = SkillCommon.GetSkillBattleType(curSkill)
+ if not AttackCommon.CheckBattleRelationType(skillBattleType, battleRelationType):
+ # PK模式的判定
+ return False
+
+ curNPC.SetDict("traptagType", curObj.GetGameObjType())
+ curNPC.SetDict("traptagID", curObj.GetID())
#触发技能, 改为统一在死亡时释放技能
#SkillShell.NPCUseSkillTag(curNPC, curObj, curSkill, tick)
#有玩家进入仇恨列表,,,自爆
npcControl.SetKilled()
- return
+ return True
## NPC死亡
# @param curNPC 当前npc
@@ -115,15 +130,20 @@
#死亡NPC不能攻击, 这里设置NPC血量为1
curNPC.SetHP(1)
-
+
#获得技能管理器
skillManager = curNPC.GetSkillManager()
curSkill = skillManager.GetSkillByIndex(0)
if not curSkill:
return
-
+
+ curObj = GameWorld.GetObj(curNPC.GetDictByKey("traptagID"), curNPC.GetDictByKey("traptagType"))
tick = GameWorld.GetGameWorld().GetTick()
- SkillShell.NPCUseSkill(curNPC, curSkill, tick)
+ if curObj == None or GameObj.GetHP(curObj) <= 0:
+ SkillShell.NPCUseSkill(curNPC, curSkill, tick)
+ return
+
+ AICommon.DoNPCUseSkill(curNPC, curObj, curSkill, 0, tick)
GameObj.SetHP(curNPC, 0)
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py
index c826690..004abbd 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py
@@ -35,9 +35,8 @@
# @param tick 当前时间
# @param value Buff总值->用于持续类技能
# @param buffOwner Buff拥有者
-# @return None
-# @remarks 函数详细说明.
-def DoAddBuff( curObj, buffType, curSkill, tick, addBuffValueList = [], buffOwner = None ):
+# @param addForce 代表是否一定添加buff,避免互相反弹buff
+def DoAddBuff( curObj, buffType, curSkill, tick, addBuffValueList = [], buffOwner = None, addForce = False ):
if curObj == None:
# 避免配表错误导致报错
return False
@@ -46,7 +45,7 @@
# 释放后 对指定BOSS无效的技能
return True
- result = AddBuffNoRefreshState(curObj, buffType, curSkill, tick, addBuffValueList, buffOwner)
+ result = AddBuffNoRefreshState(curObj, buffType, curSkill, tick, addBuffValueList, buffOwner, addForce)
if result is not 0:
# 被抵消的buff 不处理
@@ -69,8 +68,7 @@
#异常
else:
GameWorld.Log("添加buff刷新失败 curObjType = %s"%(curObjType))
-
-
+
return result
@@ -111,8 +109,9 @@
## 增加BUFF 减少BUFF(参数 -> 当前对象,buff类型,当前技能,当前时间,Buff总值->用于持续类技能 , Buff拥有者)
# buff的effect在添加和删除的时候处理,buff共存由buff本身决定而不是effect互斥,不再统一调用RefreshPlayerBuffOnAttrAddEffect
# plusValueList 改为buff value列表 第一个为增加数值,其他自定义
+# addForce 表示是否一定会增加buff,避免互相反弹buff
# 返回值 返回真刷属性,返回0 代表被抵消buff
-def AddBuffNoRefreshState( curObj, buffType, curSkill, tick, plusValueList=[] , buffOwner = None ):
+def AddBuffNoRefreshState( curObj, buffType, curSkill, tick, plusValueList=[], buffOwner = None, addForce = False):
if not SkillCommon.IsBuff(curSkill):
GameWorld.ErrLog("%s 不能加这个buff, 因为它是攻击技能! %s-->TypeID = %d"%(curObj.GetName(), curSkill.GetSkillName(), curSkill.GetSkillType()))
return False
@@ -122,11 +121,16 @@
if buffTuple == ():
return False
- if curSkill.GetSkillType() in ChConfig.Def_Debuff_List:
+ if not addForce and curSkill.GetSkillType() in ChConfig.Def_Debuff_List:
if PassiveBuffEffMng.OnPassiveSkillHappen(curObj, buffOwner, curSkill, ChConfig.TriggerType_DebuffOff, tick):
# 此处必须返回0 用于外层判断被抵消
return 0
+ if PassiveBuffEffMng.OnPassiveBuffHappen(curObj, buffOwner, curSkill, ChConfig.TriggerType_DebuffOff, tick):
+ # 被动类buff抵消
+ # 此处必须返回0 用于外层判断被抵消
+ return 0
+
buffState = buffTuple[0]
maxBuffCount = buffTuple[1]
buffCount = buffState.GetBuffCount()
@@ -152,6 +156,7 @@
if hasEffect:
layerMaxCnt = hasEffect.GetEffectValue(0) # 能叠加的最大上限
layerCalc = hasEffect.GetEffectValue(1) # 增加层级还是减少层级 Def_BuffLayer_Add
+
#1 检查是否有相同的BUFF,如果有相同的就刷新时间
for i in range( 0, buffCount ):
@@ -202,13 +207,15 @@
if curLayerCnt < layerMaxCnt:
if layerCalc == ChConfig.Def_BuffLayer_Add:
curBuff.SetLayer(curLayerCnt + 1)
+ #BUFF层级变化触发被动
+ if buffOwner:
+ curObj.SetDict("addBuffLayer", curBuff.GetLayer())
+ PassiveBuffEffMng.OnPassiveSkillTrigger(buffOwner, curObj, curSkill, ChConfig.TriggerType_AddLayer, tick)
+ PassiveBuffEffMng.OnPassiveBuffTrigger(buffOwner, curObj, curSkill, ChConfig.TriggerType_AddLayer, tick)
+ curObj.SetDict("addBuffLayer", 0)
else:
curBuff.SetLayer(layerMaxCnt)
changeLayer = True
- #BUFF层级变化触发被动
- if buffOwner:
- PassiveBuffEffMng.OnPassiveSkillTrigger(buffOwner, curObj, curSkill, ChConfig.TriggerType_AddLayer, tick)
-
__BuffCanRemain(buffState, curBuff, i, resultTime, plusValueList, buffOwner)
# 此处考虑下plusValue变强是否刷属性
#DoAddBuffOver(curObj, curSkill, addBuff, tick)
@@ -360,7 +367,7 @@
#添加BUFF后的特殊处理
- DoAddBuffOver(curObj, curSkill, addBuff, tick)
+ DoAddBuffOver(curObj, curSkill, addBuff, buffOwner, tick)
# 通知客户端
buffState.Sync_AddBuffEx()
@@ -380,7 +387,11 @@
# @param addBuff 玩家身上的BUFF实例
# @param tick 时间戳
# @return None
-def DoAddBuffOver(curObj, curSkill, addBuff, tick):
+def DoAddBuffOver(curObj, curSkill, addBuff, buffOwner, tick):
+ #触发被动技能
+ if buffOwner:
+ PassiveBuffEffMng.OnPassiveSkillTrigger(buffOwner, curObj, curSkill, ChConfig.TriggerType_AddBuffOver, tick)
+
#是否是持续性技能
isLstSkill = curSkill.GetSkillType() in ChConfig.Def_LstBuff_List
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_1065.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_1065.py
new file mode 100644
index 0000000..25ca8c7
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_1065.py
@@ -0,0 +1,38 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#
+##@package
+#
+# @todo: buff消失后触发技能
+#
+# @author: Alee
+# @date 2018-10-30 下午03:56:57
+# @version 1.0
+#
+# @note:
+#
+#---------------------------------------------------------------------
+
+import SkillShell
+import IPY_GameWorld
+import GameWorld
+import GameObj
+
+## BUFF消失后
+# @param None
+# @return None
+def OnBuffDisappear(curObj, curSkill, curBuff, curEffect, tick):
+ # 暂且只有玩家,玩家可以取主动攻击的目标
+ if curObj.GetGameObjType() != IPY_GameWorld.gotPlayer:
+ return
+ defender = GameWorld.GetObj(curObj.GetUseSkillTagID(), curObj.GetUseSkillTagType())
+ if not defender or GameObj.GetHP(defender) <= 0:
+ return
+ if not GameWorld.CanHappen(curEffect.GetEffectValue(1)):
+ return
+ triggerSkill = GameWorld.GetGameData().GetSkillBySkillID(curEffect.GetEffectValue(0))
+ SkillShell.DoLogic_UseSkill(curObj, defender, triggerSkill, tick)
+
+ return
+
+
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_513.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_513.py
new file mode 100644
index 0000000..2b33fe6
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_513.py
@@ -0,0 +1,50 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#
+# @todo: 佩戴X代以上翅膀,额外添加属性百分比
+#
+# @author: Alee
+# @date 2018-1-20 下午02:50:26
+# @version 1.0
+#
+# @note:
+#
+#---------------------------------------------------------------------
+#导入
+import ChConfig
+import ItemCommon
+import ShareDefine
+import IPY_GameWorld
+import GameWorld
+import PlayerControl
+#---------------------------------------------------------------------
+
+
+def OnCalcBuffEx(defender, curEffect, calcDict, curBuff):
+ equipPack = defender.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
+ curWing = equipPack.GetAt(ShareDefine.retWing)
+
+ if not ItemCommon.CheckItemCanUse(curWing):
+ #GameWorld.Log("翅膀不合法,或者没有带翅膀")
+ return
+
+ if curWing.GetItemColor() < curEffect.GetEffectValue(2):
+ return
+
+ attrType = curEffect.GetEffectValue(1)
+ attrTypeList = [attrType]
+ # 攻击力有最大最小 特殊处理
+ if attrType in [ChConfig.TYPE_Calc_AttrATKMin, ChConfig.TYPE_Calc_AttrATKMax]:
+ attrTypeList = [ChConfig.TYPE_Calc_AttrATKMin, ChConfig.TYPE_Calc_AttrATKMax]
+ for tmpType in attrTypeList:
+ calcDict[tmpType] = calcDict.get(tmpType, 0) + curEffect.GetEffectValue(0)
+ return
+
+
+## 返回buff类型,线性与否
+# @param
+# @return None
+# @remarks 函数详细说明.
+def GetCalcType():
+ return ChConfig.TYPE_NoLinear
+
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_NoLineReduce.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_NoLineReduce.py
index a2f2fc9..5f4112e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_NoLineReduce.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_NoLineReduce.py
@@ -35,7 +35,7 @@
effect = curEffect.GetEffectValue(0)
if curBuff and curBuff.GetLayer():
# 层级叠加效果
- effect = effect*curBuff.GetLayer()()
+ effect = effect*curBuff.GetLayer()
# 属性buff效果id对应计算模块字典{效果id:(计算模块名后缀, [属性类型])}
suffixName, attrTypeList = BuffSkill.FindBuffAttrByEffectID(curEffect)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
index 949f755..2444a95 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
@@ -108,6 +108,7 @@
# remainTime = skillData.GetCoolDownTime()
reduceSkillCDPer += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(atkObj, None, curSkill, ChConfig.TriggerType_ReduceCD)
+
# 减CD比率
if reduceSkillCDPer > 0:
remainTime = int(remainTime * max(0, ShareDefine.Def_MaxRateValue - reduceSkillCDPer) / ShareDefine.Def_MaxRateValue)
@@ -1127,6 +1128,10 @@
if curHP <= 0:
return
+ if PassiveBuffEffMng.GetValueByPassiveBuffTriggerType(curObj, None, None, ChConfig.TriggerType_ForbidenCure):
+ # 禁止治疗
+ return
+
# 治疗加成
curePer = PlayerControl.GetCurePer(curObj) if curObjType == IPY_GameWorld.gotPlayer else ChConfig.Def_MaxRateValue
addValue = int(addValue*curePer*1.0/ChConfig.Def_MaxRateValue)
@@ -1237,7 +1242,7 @@
# 濒死状态触发技能
if GameObj.GetHP(curObj) == 0:
PassiveBuffEffMng.OnPassiveSkillTrigger(curObj, None, curSkill, ChConfig.TriggerType_WillDead, tick)
-
+ PassiveBuffEffMng.OnPassiveBuffTrigger(curObj, None, curSkill, ChConfig.TriggerType_WillDead, tick)
#无法找到Buff拥有者
if not buffOwner:
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4500.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4500.py
index 1c706cb..e795937 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4500.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4500.py
@@ -16,13 +16,13 @@
import SkillCommon
import BuffSkill
-def CheckCanHappen(attacker, defender, passiveEffect, skillID):
+def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
onlySkillID = passiveEffect.GetEffectValue(2) # 单状态不可重复的BUFFID, 层数决定触发次数
if onlySkillID:
if not defender:
return False
# 目标身上查找
- findSkill = GameWorld.GetGameData().GetSkillBySkillID(passiveEffect.GetEffectValue(2))
+ findSkill = GameWorld.GetGameData().GetSkillBySkillID(onlySkillID)
if not findSkill:
return False
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4501.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4501.py
index 0bb0c94..6397dc3 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4501.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4501.py
@@ -16,7 +16,7 @@
import PassiveBuffEffMng
import SkillCommon
-def CheckCanHappen(attacker, defender, passiveEffect, skillID):
+def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
curSkill = GameWorld.GetGameData().GetSkillBySkillID(skillID)
if not curSkill:
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4502.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4502.py
index d401976..fbaa13e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4502.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4502.py
@@ -16,7 +16,7 @@
import SkillCommon
import BuffSkill
-def CheckCanHappen(attacker, defender, passiveEffect, skillID):
+def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
onlySkillID = passiveEffect.GetEffectValue(2) # 单状态不可重复的BUFFID, 层数决定触发次数
if onlySkillID:
if not defender:
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4503.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4503.py
index 86bbc52..60eddc4 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4503.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4503.py
@@ -15,7 +15,7 @@
import GameWorld
import GameObj
-def CheckCanHappen(attacker, defender, passiveEffect, skillID):
+def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
if not defender:
return False
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4504.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4504.py
index 1fffaa8..36887d2 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4504.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4504.py
@@ -15,7 +15,7 @@
import GameWorld
import GameObj
-def CheckCanHappen(attacker, defender, passiveEffect, skillID):
+def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
return True
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4506.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4506.py
index dd4ca1e..57c1f96 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4506.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4506.py
@@ -19,7 +19,7 @@
import BuffSkill
import PlayerControl
-def CheckCanHappen(attacker, defender, passiveEffect, skillID):
+def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
tick = GameWorld.GetGameWorld().GetTick()
# 判断间隔
if tick - attacker.GetDictByKey("atkRefresh4506") < passiveEffect.GetEffectValue(0):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4507.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4507.py
index 67ed17f..db170f6 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4507.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4507.py
@@ -16,7 +16,7 @@
import IPY_GameWorld
import SkillCommon
-def CheckCanHappen(attacker, defender, passiveEffect, skillID):
+def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
if not defender:
return False
if defender.GetGameObjType() != IPY_GameWorld.gotPlayer:
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4508.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4508.py
index ab20270..ac475bc 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4508.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4508.py
@@ -16,22 +16,22 @@
import SkillCommon
import BuffSkill
-def CheckCanHappen(attacker, defender, passiveEffect, skillID):
+def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
curSkill = GameWorld.GetGameData().GetSkillBySkillID(skillID)
if not curSkill:
return False
-
+
buffType = SkillCommon.GetBuffType(curSkill)
buffTuple = SkillCommon.GetBuffManagerByBuffType(attacker, buffType)
#通过类型获取目标的buff管理器为空,则跳出
if buffTuple == ():
return False
-
+
buffManager = buffTuple[0]
- buff = buffManager.FindBuff(skillID)
+ buff = buffManager.FindBuff(curSkill.GetSkillTypeID())
if not buff:
return False
-
+
if buff.GetLayer() <= 0:
return False
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4509.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4509.py
index 5ab4b6d..766e1b1 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4509.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4509.py
@@ -16,7 +16,7 @@
import SkillCommon
import BuffSkill
-def CheckCanHappen(attacker, defender, passiveEffect, skillID):
+def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
return passiveEffect.GetEffectValue(0)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4510.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4510.py
index fce8f74..9e74655 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4510.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4510.py
@@ -16,7 +16,7 @@
import SkillCommon
import BuffSkill
-def CheckCanHappen(attacker, defender, passiveEffect, skillID):
+def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
return True
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4511.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4511.py
index 3bd60d3..b53c6c5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4511.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4511.py
@@ -15,7 +15,7 @@
import GameWorld
import PlayerControl
-def CheckCanHappen(attacker, defender, passiveEffect, skillID):
+def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
return True
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4512.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4512.py
index 6e82b34..41c5999 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4512.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4512.py
@@ -15,7 +15,7 @@
import GameWorld
import PlayerControl
-def CheckCanHappen(attacker, defender, passiveEffect, skillID):
+def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
return True
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4513.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4513.py
index ce7eb70..d5d6a7b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4513.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4513.py
@@ -14,7 +14,7 @@
import ChConfig
import GameObj
-def CheckCanHappen(attacker, defender, passiveEffect, skillID):
+def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
return True
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4514.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4514.py
index b0691f1..fdf8ad8 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4514.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4514.py
@@ -16,7 +16,7 @@
import SkillCommon
import BuffSkill
-def CheckCanHappen(attacker, defender, passiveEffect, skillID):
+def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
curSkill = GameWorld.GetGameData().GetSkillBySkillID(skillID)
if not curSkill:
return False
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4515.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4515.py
index 63797b4..d1eefbb 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4515.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4515.py
@@ -1,22 +1,22 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#
-# @todo: BUFF类:攻击附加真实伤害百分比
-#
-# @author: Alee
-# @date 2018-1-30 下午05:11:45
-# @version 1.0
-#
-# @note:
-#
-#---------------------------------------------------------------------
-
-import ChConfig
-import GameWorld
-
-def CheckCanHappen(attacker, defender, passiveEffect, skillID):
- return GameWorld.CanHappen(passiveEffect.GetEffectValue(1))
-
-
-def GetValue(attacker, defender, passiveEffect):
- return float(passiveEffect.GetEffectValue(0))/ChConfig.Def_MaxRateValue
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#
+# @todo: BUFF类:攻击附加真实伤害百分比
+#
+# @author: Alee
+# @date 2018-1-30 下午05:11:45
+# @version 1.0
+#
+# @note:
+#
+#---------------------------------------------------------------------
+
+import ChConfig
+import GameWorld
+
+def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
+ return GameWorld.CanHappen(passiveEffect.GetEffectValue(1))
+
+
+def GetValue(attacker, defender, passiveEffect):
+ return float(passiveEffect.GetEffectValue(0))/ChConfig.Def_MaxRateValue
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4516.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4516.py
index cd3e54f..9ea98a2 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4516.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4516.py
@@ -13,7 +13,7 @@
import ChConfig
-def CheckCanHappen(attacker, defender, passiveEffect, skillID):
+def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
return True
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4517.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4517.py
new file mode 100644
index 0000000..9f98ce1
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4517.py
@@ -0,0 +1,56 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#
+# @todo: buff中抵消debuff并且反射debuff,层级决定次数
+#
+# @author: Alee
+# @date 2018-1-9 下午09:39:37
+# @version 1.0
+#
+# @note:
+#
+#---------------------------------------------------------------------
+
+import ChConfig
+import GameWorld
+import SkillCommon
+import BuffSkill
+
+def CheckCanHappen(attacker, defender, effect, tagSkill):
+ debuffState = effect.GetEffectValue(1)
+ if debuffState and debuffState != SkillCommon.GetBuffStateType(tagSkill):
+ return False
+
+ if effect.GetEffectValue(2):
+ if SkillCommon.GetBuffType(tagSkill) != ChConfig.Def_SkillBuffList.get(effect.GetEffectValue(2)):
+ return False
+ if not effect.GetEffectValue(0):
+ return True
+ return GameWorld.CanHappen(effect.GetEffectValue(0))
+
+def DoLogic(attacker, defender, effect, tagSkill, skillID):
+ # 反射debuff
+ if not defender:
+ return
+
+ findSkill = GameWorld.GetGameData().GetSkillBySkillID(skillID)
+ if not findSkill:
+ return
+
+ buffType = SkillCommon.GetBuffType(findSkill)
+ buffTuple = SkillCommon.GetBuffManagerByBuffType(attacker, buffType)
+ if buffTuple == ():
+ return
+
+ buffManager = buffTuple[0]
+ findBuff = buffManager.FindBuffEx(skillID)
+ if not findBuff:
+ return
+
+ BuffSkill.SetBuffLayer(attacker, findBuff, findBuff.GetLayer()-1, skillTypeID=findSkill.GetSkillTypeID())
+
+ # 给对方加buff
+ BuffSkill.DoAddBuff(defender, SkillCommon.GetBuffType(tagSkill), tagSkill,
+ GameWorld.GetGameWorld().GetTick(), [], attacker, addForce = True)
+ return
+
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4518.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4518.py
new file mode 100644
index 0000000..24c585c
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4518.py
@@ -0,0 +1,24 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#
+# @todo: 禁止治疗
+#
+# @author: Alee
+# @date 2018-1-9 下午09:39:37
+# @version 1.0
+#
+# @note:
+#
+#---------------------------------------------------------------------
+
+import ChConfig
+import GameWorld
+import SkillCommon
+import BuffSkill
+
+def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
+ return True
+
+
+def GetValue(attacker, defender, passiveEffect):
+ return 1
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4519.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4519.py
new file mode 100644
index 0000000..9b42979
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4519.py
@@ -0,0 +1,30 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#
+# @todo: 进入濒死状态 血量为1, 不触发技能
+#
+# @author: Alee
+# @date 2017-12-9 下午09:41:44
+# @version 1.0
+#
+# @note:
+#
+#---------------------------------------------------------------------
+
+import ChConfig
+import GameWorld
+import SkillCommon
+import BuffSkill
+
+def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
+ attacker.SetHP(1)
+
+ return False
+
+
+def GetSkillData(passiveEffect):
+ return
+
+def AfterUsePassiveSkill(attacker, defender, passiveEffect, tick):
+ return
+
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4520.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4520.py
new file mode 100644
index 0000000..0754760
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4520.py
@@ -0,0 +1,36 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#
+# @todo: buff中对目标的buff层级达到第几层触发技能
+#
+# @author: Alee
+# @date 2017-12-9 下午09:41:44
+# @version 1.0
+#
+# @note:
+#
+#---------------------------------------------------------------------
+
+import ChConfig
+import GameWorld
+import SkillCommon
+import BuffSkill
+
+def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
+ if not defender:
+ return False
+
+ useSkill = skillkwargs['useSkill']
+ skillTypeID = useSkill.GetSkillTypeID() if useSkill else 0
+ if passiveEffect.GetEffectValue(2) and passiveEffect.GetEffectValue(2) != skillTypeID:
+ # 验证关联技能
+ return False
+ return defender.GetDictByKey("addBuffLayer") == passiveEffect.GetEffectValue(0)
+
+
+def GetSkillData(passiveEffect):
+ skillID = passiveEffect.GetEffectValue(1)
+
+ return GameWorld.GetGameData().GetSkillBySkillID(skillID)
+
+
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4010.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4010.py
index 9b79a01..9b7ba7a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4010.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4010.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- coding: GBK -*-
#
-# @todo: 减CD
+# @todo: 减CD,添加自身血量判断,自身血量低于百分比,默认0为不受血量影响
#
# @author: Alee
# @date 2018-1-9 下午09:39:37
@@ -11,12 +11,18 @@
#
#---------------------------------------------------------------------
-import ItemControler
import ChConfig
+import GameObj
def CheckCanHappen(attacker, defender, effect, curSkill):
+
+ # 未配置不验证血量百分比
+ hpPer = effect.GetEffectValue(1)
+ if hpPer:
+ if GameObj.GetHP(attacker)*ChConfig.Def_MaxRateValue/GameObj.GetMaxHP(attacker) >= hpPer:
+ return False
+
return True
-
def GetValue(attacker, defender, effect):
return effect.GetEffectValue(0)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4027.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4027.py
index 7dad201..149e0f8 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4027.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4027.py
@@ -15,7 +15,7 @@
import GameWorld
import GameObj
import IPY_GameWorld
-
+import PassiveBuffEffMng
# 血量低于XX
def CheckCanHappen(attacker, defender, effect, curSkill):
if not defender:
@@ -25,7 +25,11 @@
if GameObj.GetHP(defender)*ChConfig.Def_MaxRateValue/GameObj.GetMaxHP(defender) >= effect.GetEffectValue(0):
return False
- return GameWorld.CanHappen(effect.GetEffectValue(1))
+ value = effect.GetEffectValue(1)
+
+ value += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(attacker, defender, curSkill, ChConfig.TriggerType_AttackKillHappen)
+
+ return GameWorld.CanHappen(value)
def GetValue(attacker, defender, effect):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4028.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4028.py
index 67de7f5..a4d4399 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4028.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4028.py
@@ -18,7 +18,16 @@
def CheckCanHappen(attacker, defender, effect, curSkill):
+
result = GameWorld.CanHappen(effect.GetEffectValue(0))
if result:
GameObj.SetHP(attacker, 1) # 为了避免生命为0时,屏蔽过多逻辑
- return result
+ return True
+
+ if effect.GetEffectValue(1):
+ #不死血量1,但不触发技能
+ if GameWorld.CanHappen(effect.GetEffectValue(1)):
+ GameObj.SetHP(attacker, 1)
+ return False
+
+ return False
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4053.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4053.py
new file mode 100644
index 0000000..fcee521
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4053.py
@@ -0,0 +1,19 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#
+# 对目标的buff层级达到第几层触发技能
+#
+# @author: Alee
+# @date 2018-1-9 下午09:39:37
+# @version 1.0
+#
+# @note:
+#
+#---------------------------------------------------------------------
+
+
+def CheckCanHappen(attacker, defender, effect, curSkill):
+
+ return defender.GetDictByKey("addBuffLayer") == effect.GetEffectValue(0)
+
+
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4054.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4054.py
new file mode 100644
index 0000000..5edd9af
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4054.py
@@ -0,0 +1,27 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#
+# @todo: 对某个职业提高技能伤害
+#
+# @author: Alee
+# @date 2018-1-9 下午09:39:37
+# @version 1.0
+#
+# @note:
+#
+#---------------------------------------------------------------------
+
+import ChConfig
+import IPY_GameWorld
+
+def CheckCanHappen(attacker, defender, effect, curSkill):
+ if not defender:
+ return False
+
+ if defender.GetGameObjType() != IPY_GameWorld.gotPlayer:
+ return False
+
+ return defender.GetJob() == effect.GetEffectValue(1)
+
+def GetValue(attacker, defender, effect):
+ return effect.GetEffectValue(0)*1.0/ChConfig.Def_MaxRateValue
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4055.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4055.py
new file mode 100644
index 0000000..ee8cd03
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4055.py
@@ -0,0 +1,53 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#
+# @todo: 减少指定技能的CD,如果有次数控制 需要做成层级buff ----- 类剑刃风暴技能使用
+# 第三个效果值默认为0,每次都减少CD 则不需要配置成buff; 配置数字则需要和buff层级搭配来控制次数
+#
+# @author: Alee
+# @date 2018-1-9 下午09:39:37
+# @version 1.0
+#
+# @note:
+#
+#---------------------------------------------------------------------
+
+import ChConfig
+import IPY_GameWorld
+import GameWorld
+import SkillCommon
+import BuffSkill
+
+def CheckCanHappen(attacker, defender, effect, curSkill):
+ if attacker.GetGameObjType() != IPY_GameWorld.gotPlayer:
+ return False
+
+ if effect.GetEffectValue(2):
+ skillID = curSkill.GetSkillID()
+ if SkillCommon.IsBuff(curSkill):
+ buffType = SkillCommon.GetBuffType(curSkill)
+ buffTuple = SkillCommon.GetBuffManagerByBuffType(attacker, buffType)
+ if buffTuple == ():
+ return False
+
+ buffManager = buffTuple[0]
+ findBuff = buffManager.FindBuff(skillID)
+ if findBuff and findBuff.GetLayer() >= effect.GetEffectValue(2):
+ # 超过不再减CD
+ return False
+
+ return True
+
+def GetValue(attacker, defender, effect):
+ # 此处处理减少CD逻辑
+ skillID = effect.GetEffectValue(0)
+
+ curSkill = attacker.GetSkillManager().FindSkillBySkillID(skillID)
+ coolDownTime = curSkill.GetCoolDownTime()
+ remainTime = curSkill.GetRemainTime()
+ remainTime = int(max(remainTime - coolDownTime*1.0*effect.GetEffectValue(1)/ChConfig.Def_MaxRateValue, 0))
+
+ curSkill.SetRemainTime(remainTime)
+ curSkill.SetLastUseTick(GameWorld.GetGameWorld().GetTick())
+ curSkill.Sync_Skill()
+ return 0
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4056.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4056.py
new file mode 100644
index 0000000..59ea7e5
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4056.py
@@ -0,0 +1,25 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#
+# @todo: # 如被动技能:千幻冥炎真实伤害从2变4倍
+#
+# @author: Alee
+# @date 2018-1-9 下午09:39:37
+# @version 1.0
+#
+# @note:
+#
+#---------------------------------------------------------------------
+
+import ChConfig
+import IPY_GameWorld
+import GameWorld
+import SkillCommon
+import BuffSkill
+
+def CheckCanHappen(attacker, defender, effect, curSkill):
+
+ return True
+
+def GetValue(attacker, defender, effect):
+ return float(effect.GetEffectValue(0))/ChConfig.Def_MaxRateValue
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4057.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4057.py
new file mode 100644
index 0000000..5c27874
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4057.py
@@ -0,0 +1,32 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#
+##@package
+#
+# @todo: 对被动技能斩杀的概率增强
+#
+# @author: Alee
+# @date 2018-10-26 下午03:26:26
+# @version 1.0
+#
+# @note:
+#
+#---------------------------------------------------------------------
+
+import GameWorld
+import GameObj
+
+# 目标某个状态时触发
+def CheckCanHappen(attacker, defender, effect, curSkill):
+ if not defender:
+ return False
+
+ if GameObj.GetPyPlayerState(defender, effect.GetEffectValue(1)):#ChConfig.Def_PlayerState_Stun):
+ #GameWorld.DebugLog("状态触发----%s"%effect.GetEffectValue(1))
+ return True
+
+ return False
+
+
+def GetValue(attacker, defender, effect):
+ return effect.GetEffectValue(0)
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 3b3543c..e4e37db 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
@@ -328,8 +328,16 @@
4050:ChConfig.TriggerType_OneDamage, # 伤害降低到1点
4051:ChConfig.TriggerType_LuckyHit, # 会心一击时增加会心伤害百分比 50
4052:ChConfig.TriggerType_Buff_SuckBloodPer, # 攻击 百分比吸血
+ 4053:ChConfig.TriggerType_AddLayer, # BUFF层级增加时 52
+ 4054:ChConfig.TriggerType_AttackAddSkillPer, # 所有攻击伤害(SkillPer)增加,含普攻,计算时 5
+ 4055:ChConfig.TriggerType_StormAttackReduceCD, # 类剑刃风暴攻击后触发效果
+ 4056:ChConfig.TriggerType_PassiveBuffValue, ## 被动buff值计算中二次获取被动值 54
+ 4057:ChConfig.TriggerType_AttackKillHappen, ## 对被动技能斩杀的概率增强 55
+ 4058:ChConfig.TriggerType_AddBuffOver, # 添加buff之后触发技能 56
+ 4059:ChConfig.TriggerType_StormAttackOneByOne, # 类剑刃风暴攻击1对1触发技能 57
+ 4060:ChConfig.TriggerType_StormAttackOver, # 类剑刃风暴攻击后触发技能 57
}
- return tdict.get(effectID, -1)
+ return tdict.get(effectID, -1)
#===========================================================================
# # 此表配置 影响类型
# ipyData = IpyGameDataPY.GetIpyGameData('SkillEffect', effectID)
@@ -360,6 +368,10 @@
4513:ChConfig.TriggerType_AttackAddFinalValue, #攻击增加输出伤害11
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
803:ChConfig.TriggerType_BloodShield, # 血盾
806:ChConfig.TriggerType_BloodShield, # 血盾
808:ChConfig.TriggerType_BloodShield, # 血盾
@@ -715,18 +727,20 @@
# #===========================================================================
# 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
+#===============================================================================
+# # 判断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):
@@ -757,47 +771,58 @@
if not attacker:
return False
+ stopPassiveSkill = False # 被动技能不能再触发被动技能,但可以触发天赋技能
if connSkill:
if not connSkill.GetFuncType():
# 非功能类技能,避免死循环
return False
if SkillCommon.isPassiveSkill(connSkill):
#GameWorld.DebugLog("被动技能不能再次触发被动技能")
- return False
+ #return False
+ stopPassiveSkill = True
if SkillCommon.GetUsingPassiveSkill(attacker) and triggerType != ChConfig.TriggerType_BuffState:
# 防范被动技能触发的 非被动技能
- GameWorld.DebugLog("被动技能不能再次触发被动技能---%s"%triggerType)
- return
+ #GameWorld.DebugLog("被动技能释放中不能再次触发被动技能---%s"%triggerType)
+ #return
+ stopPassiveSkill = True
passiveEff = GetPassiveEffManager().GetPassiveEff(attacker)
if not passiveEff:
return False
-
+
connSkillID = connSkill.GetSkillTypeID() if connSkill else 0
skills = passiveEff.GetPassiveSkillsByTriggerType(triggerType, connSkillID)
if not skills:
return False
-
+
defender = GetPassiveDefender(attacker, defender)
+ result = False
# 当前战斗关系 pvp pve
battleRelationType = AttackCommon.GetBattleRelationType(attacker, defender)
#GameWorld.DebugLog("OnPassiveSkillTrigger-----------%s-%s"%(skills, battleRelationType))
for skillTypeID, effectID in skills:
+ if connSkillID == skillTypeID:
+ continue
curSkill = attacker.GetSkillManager().FindSkillBySkillTypeID(skillTypeID)
if not curSkill:
continue
+ if stopPassiveSkill and curSkill.GetFuncType() != ChConfig.Def_SkillFuncType_GiftSkill:
+ # 只有天赋才可以再次被触发
+ continue
+
effect = SkillCommon.GetSkillEffectByEffectID(curSkill, effectID)
if not effect:
continue
if SkillCommon.RefreshSkillRemainTime(curSkill, tick):
continue
+ result = True # 代表有效触发,但不关系触发结果
skillBattleType = SkillCommon.GetSkillBattleType(curSkill)
- if not CheckBattleRelationType(skillBattleType, battleRelationType):
+ if not AttackCommon.CheckBattleRelationType(skillBattleType, battleRelationType):
# PK模式的判定
continue
@@ -813,8 +838,9 @@
curSkill.SetRemainTime(0) # 一次攻击多次调用 ,在外层统一调用CD
skillIDSet.add(skillTypeID)
SkillCommon.SetUsingPassiveSkill(attacker, 0)
-
- return True
+
+ # 代表有效触发,但不关系触发结果, 外层根据需求使用,如减少循环判断
+ return result
#ntSummon:(3)普通召唤兽,可继承主人基础属性如攻击
@@ -853,9 +879,12 @@
if not attacker:
return 0
+ stopPassiveSkill = False # 被动技能不能再触发被动技能,但可以触发天赋技能
if connSkill and SkillCommon.isPassiveSkill(connSkill):
#GameWorld.DebugLog("被动技能不能再次触发被动技能")
- return 0
+ #return 0
+ stopPassiveSkill = True
+
passiveEff = GetPassiveEffManager().GetPassiveEff(attacker)
if not passiveEff:
return 0
@@ -870,9 +899,15 @@
curValue = 0
for skillTypeID, effectID in skills:
+ if connSkillID == skillTypeID:
+ continue
curSkill = attacker.GetSkillManager().FindSkillBySkillTypeID(skillTypeID)
if not curSkill:
continue
+ if stopPassiveSkill and curSkill.GetFuncType() != ChConfig.Def_SkillFuncType_GiftSkill:
+ # 只有天赋才可以再次被触发
+ continue
+
if curSkill.GetCoolDownTime() and SkillCommon.RefreshSkillRemainTime(curSkill, tick):
#有配置CD的才判断
continue
@@ -881,11 +916,11 @@
if not effect:
continue
skillBattleType = SkillCommon.GetSkillBattleType(curSkill)
- if not CheckBattleRelationType(skillBattleType, battleRelationType):
+ if not AttackCommon.CheckBattleRelationType(skillBattleType, battleRelationType):
continue
pyName = "PassiveSkill_%s" % effectID
-
+
callFunc = GameWorld.GetExecFunc(PassiveBuff, "%s.%s" % (pyName, "CheckCanHappen"))
# 条件不满足
@@ -924,6 +959,8 @@
#tick = GameWorld.GetGameWorld().GetTick()
skillList = []
for skillTypeID, effectID in skills:
+ if connSkillID == skillTypeID:
+ continue
curSkill = attacker.GetSkillManager().FindSkillBySkillTypeID(skillTypeID)
#if SkillCommon.RefreshSkillRemainTime(curSkill, tick):
# continue
@@ -934,7 +971,7 @@
if not effect:
continue
skillBattleType = SkillCommon.GetSkillBattleType(curSkill)
- if not CheckBattleRelationType(skillBattleType, battleRelationType):
+ if not AttackCommon.CheckBattleRelationType(skillBattleType, battleRelationType):
continue
pyName = "PassiveSkill_%s" % effectID
@@ -969,6 +1006,8 @@
battleRelationType = AttackCommon.GetBattleRelationType(attacker, defender)
for skillTypeID, effectID in skills:
+ if connSkillID == skillTypeID:
+ continue
curSkill = attacker.GetSkillManager().FindSkillBySkillTypeID(skillTypeID)
if not curSkill:
continue
@@ -979,7 +1018,7 @@
if SkillCommon.RefreshSkillRemainTime(curSkill, tick):
continue
skillBattleType = SkillCommon.GetSkillBattleType(curSkill)
- if not CheckBattleRelationType(skillBattleType, battleRelationType):
+ if not AttackCommon.CheckBattleRelationType(skillBattleType, battleRelationType):
# PK模式的判定
continue
@@ -997,42 +1036,30 @@
return False
-
-#------------------------Buff类 被动触发, 并非全是被动技能-----------------------------------------------
-
-#buff类触发释放技能,无CD验证
-def OnPassiveBuffTrigger(attacker, defender, useSkill, triggerType, tick):
+# 被动技能触发但无需释放,如抵消debuff,只需走CD即可
+def OnPassiveBuffHappen(attacker, defender, tagSkill, triggerType, tick):
attacker = FindRealAttacker(attacker)
if not attacker:
- return
- if useSkill:
- if not useSkill.GetFuncType():
- # 非功能类技能,避免死循环
- return
- if SkillCommon.isPassiveSkill(useSkill):
- #GameWorld.DebugLog("被动技能不能再次触发被动技能")
- return
-
- if SkillCommon.GetUsingPassiveSkill(attacker):
- # 防范被动技能触发的 非被动技能
- GameWorld.DebugLog("被动技能不能再次触发被动技能---%s"%triggerType)
- return
-
-
+ return False
+
passiveEff = GetPassiveEffManager().GetPassiveEff(attacker)
if not passiveEff:
- return
-
+ return False
buffDict = passiveEff.GetBuffsByTriggerType(triggerType)
if not buffDict:
- return
+ return False
- defender = GetPassiveDefender(attacker, defender)
-
# 当前战斗关系 pvp pve
battleRelationType = AttackCommon.GetBattleRelationType(attacker, defender)
+ skillBattleType = SkillCommon.GetSkillBattleType(tagSkill)
+ if not AttackCommon.CheckBattleRelationType(skillBattleType, battleRelationType):
+ return
+
+ tagSkillID = tagSkill.GetSkillID() if tagSkill else 0
for skillID, effectList in buffDict.items():
+ if tagSkillID == skillID:
+ continue
for passiveEffect in effectList:
# 被动触发的技能
pyName = "PassiveBuff_%s"%passiveEffect.GetEffectID()
@@ -1041,7 +1068,71 @@
if not callFunc:
continue
- if not callFunc(attacker, defender, passiveEffect, skillID):
+ if not callFunc(attacker, defender, passiveEffect, tagSkill):
+ continue
+
+ callFunc = GameWorld.GetExecFunc(PassiveBuff, "%s.%s" % (pyName, "DoLogic"))
+ if callFunc:
+ callFunc(attacker, defender, passiveEffect, tagSkill, skillID)
+
+ return True
+
+ return False
+#------------------------Buff类 被动触发, 并非全是被动技能-----------------------------------------------
+
+#buff类触发释放技能,无CD验证
+def OnPassiveBuffTrigger(attacker, defender, useSkill, triggerType, tick):
+ attacker = FindRealAttacker(attacker)
+ if not attacker:
+ return
+
+ stopPassiveSkill = False # 被动技能不能再触发被动技能,但可以触发天赋技能
+ if useSkill:
+ if not useSkill.GetFuncType():
+ # 非功能类技能,避免死循环
+ return
+ if SkillCommon.isPassiveSkill(useSkill):
+ #GameWorld.DebugLog("被动技能不能再次触发被动技能")
+ #return
+ stopPassiveSkill = True
+
+ if SkillCommon.GetUsingPassiveSkill(attacker):
+ # 防范被动技能触发的 非被动技能
+ #GameWorld.DebugLog("被动技能不能再次触发被动技能---%s"%triggerType)
+ #return
+ stopPassiveSkill = True
+
+ passiveEff = GetPassiveEffManager().GetPassiveEff(attacker)
+ if not passiveEff:
+ return
+
+ buffDict = passiveEff.GetBuffsByTriggerType(triggerType)
+ if not buffDict:
+ return
+
+ defender = GetPassiveDefender(attacker, defender)
+
+ # 当前战斗关系 pvp pve
+ battleRelationType = AttackCommon.GetBattleRelationType(attacker, defender)
+ useSkillID = useSkill.GetSkillID() if useSkill else 0
+
+ for skillID, effectList in buffDict.items():
+ if skillID == useSkillID:
+ 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
+
+ if not callFunc(attacker, defender, passiveEffect, skillID, useSkill=useSkill):
continue
callFunc = GameWorld.GetExecFunc(PassiveBuff, "%s.%s" % (pyName, "GetSkillData"))
@@ -1053,7 +1144,7 @@
continue
skillBattleType = SkillCommon.GetSkillBattleType(skillData)
- if not CheckBattleRelationType(skillBattleType, battleRelationType):
+ if not AttackCommon.CheckBattleRelationType(skillBattleType, battleRelationType):
# PK模式的判定
continue
@@ -1076,9 +1167,13 @@
attacker = FindRealAttacker(attacker)
if not attacker:
return 0
+
+ stopPassiveSkill = False # 被动技能不能再触发被动技能,但可以触发天赋技能
if useSkill and SkillCommon.isPassiveSkill(useSkill):
#GameWorld.DebugLog("被动技能不能再次触发被动技能")
- return 0
+ #return 0
+ stopPassiveSkill = True
+
passiveEff = GetPassiveEffManager().GetPassiveEff(attacker)
if not passiveEff:
@@ -1090,14 +1185,25 @@
# 当前战斗关系 pvp pve
battleRelationType = AttackCommon.GetBattleRelationType(attacker, defender)
skillBattleType = SkillCommon.GetSkillBattleType(useSkill)
- if not CheckBattleRelationType(skillBattleType, battleRelationType):
+ if not AttackCommon.CheckBattleRelationType(skillBattleType, battleRelationType):
return 0
-
+
+ useSkillID = useSkill.GetSkillID() if useSkill else 0
#tick = GameWorld.GetGameWorld().GetTick()
curValue = 0
-
+
for skillID, effectList in buffDict.items():
+ if skillID == useSkillID:
+ continue
+ curSkill = GameWorld.GetGameData().GetSkillBySkillID(skillID)
+ if not curSkill:
+ continue
+
for passiveEffect in effectList:
+ if stopPassiveSkill and curSkill.GetFuncType() != ChConfig.Def_SkillFuncType_GiftSkill:
+ # 只有天赋才可以再次被触发
+ continue
+
# 被动触发的技能
pyName = "PassiveBuff_%s"%passiveEffect.GetEffectID()
@@ -1105,17 +1211,16 @@
if not callFunc:
continue
- if not callFunc:
- continue
-
# 条件不满足
- if not callFunc(attacker, defender, passiveEffect, skillID):
+ if not callFunc(attacker, defender, passiveEffect, skillID, useSkill=useSkill):
continue
callFunc = GameWorld.GetExecFunc(PassiveBuff, "%s.%s" % (pyName, "GetValue"))
if callFunc is None:
continue
+ # 如被动技能:千幻冥炎真实伤害从2变4倍
+ curValue += GetPassiveSkillValueByTriggerType(attacker, defender, curSkill, ChConfig.TriggerType_PassiveBuffValue)
curValue += callFunc(attacker, defender, passiveEffect)
return curValue
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
index 0e6f4cb..1fbe500 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
@@ -166,6 +166,10 @@
if attacker.GetGameObjType() != IPY_GameWorld.gotPlayer:
return False
+ if not curSkill:
+ # 玩家普通也是技能,正常是不会走到这边
+ return False
+
useSkillData = attacker.GetUseSkill()
if useSkillData and curSkill.GetSkillTypeID() != useSkillData.GetSkillTypeID():
# 默认群攻附加触发buff的对象与攻击对象一致
--
Gitblit v1.8.0