hch
2019-05-14 010db2152c26061cf4ac03a72fbd574196001f74
6603 【后端】【2.0】增加新版的sp和被动技能 - 被动技能
5个文件已修改
1个文件已添加
70 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4536.py 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py
@@ -1550,7 +1550,7 @@
            return True
    return False
    
### 不管什么技能都会到此处
#只对第一目标造成某伤害类型时触发技能
def OnHurtTypeTriggerSkillFirstObj(attacker, curSkill, tick):
    if g_skillHurtList.GetHurtCount() == 0:
@@ -1571,6 +1571,7 @@
    elif hurtType == ChConfig.Def_HurtType_ThumpHit:
        PassiveBuffEffMng.OnPassiveSkillTrigger(attacker, defender, curSkill, ChConfig.TriggerType_ThumpHit, tick)
    return
    
# 根据伤血类型触发技能,群攻只触发一次,放在伤血列表被清之前
def OnHurtTypeTriggerSkill(attacker, target, curSkill, tick):
@@ -1643,8 +1644,6 @@
    
    # 根据伤血类型触发技能,群攻只触发一次,放在伤血列表被清之前
    OnHurtTypeTriggerSkill(attacker, defender, curSkill, tick)
    #释放技能即可处理的 不区分攻击和非攻击
    PassiveBuffEffMng.OnPassiveSkillTrigger(attacker, defender, curSkill, ChConfig.TriggerType_SkillSuccess, tick)
    
    # 普通或者可以主动释放的攻击性技能
    if not curSkill or (curSkill.GetSkillType() == ChConfig.Def_SkillType_Atk and\
@@ -1666,6 +1665,8 @@
    else:
        PassiveBuffEffMng.OnPassiveSkillTrigger(attacker, defender, curSkill, ChConfig.TriggerType_SkillOverNoAttack, tick)
    
    #释放技能即可处理的 不区分攻击和非攻击
    PassiveBuffEffMng.OnPassiveSkillTrigger(attacker, defender, curSkill, ChConfig.TriggerType_SkillSuccess, tick)
    return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -4477,7 +4477,7 @@
TriggerType_IsDealy,    # 是否触发致命一击 72 暂且理解为和概率是独立,有新概念产生则重定义  
TriggerType_AddThumpHitRate, # 提高重击概率 73
TriggerType_ThumpHit, # 重击时 触发技能74
TriggerType_AddThumpHitPer, # 重击时 增加重击百分比 75
TriggerType_AddThumpHitPer, # 重击时 增加重击百分比 75 默认10000
TriggerType_SkillSuccess, # 任何技能释放成功都可触发 76
TriggerType_BounceHPPerByAttacker,   # 反弹伤害百分比值, 由攻击方决定 77
TriggerType_NoControl,   # 使关联技能不受控制 78
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py
@@ -411,6 +411,10 @@
    #触发被动技能
    if buffOwner:
        PassiveBuffEffMng.OnPassiveSkillTrigger(buffOwner, curObj, curSkill, ChConfig.TriggerType_AddBuffOver, tick)
        # 此处不能传技能curSkill 屏蔽被动触发被动限制
        # 暂且特殊处理控制类buff才触发
        if SkillCommon.GetBuffType(curSkill) == IPY_GameWorld.bfActionBuff:
            PassiveBuffEffMng.OnPassiveBuffTrigger(curObj, buffOwner, None, ChConfig.TriggerType_AddBuffOver, tick)
    
    #是否是持续性技能
    isLstSkill = curSkill.GetSkillType() in ChConfig.Def_LstBuff_List
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4536.py
New file
@@ -0,0 +1,42 @@
#!/usr/bin/python
# -*- coding: GBK -*-
#
##@package
#
# @todo: buff中继续被控制延长时间
#
# @author: Alee
# @date 2019-5-14 下午02:01:54
# @version 1.0
#
# @note:
#
#---------------------------------------------------------------------
import ChConfig
import GameWorld
import SkillCommon
import BuffSkill
def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
    if not defender:
        return
    findBuff = SkillCommon.FindBuffByOwner(attacker, skillID, defender.GetID(), defender.GetGameObjType())
    if not findBuff:
        return False
    curValue = findBuff.GetValue2()
    if curValue >= passiveEffect.GetEffectValue(1):
        return False
    remainTime = findBuff.GetRemainTime()
    findBuff.SetRemianTime(remainTime + passiveEffect.GetEffectValue(0))
    findBuff.SetValue2(curValue + 1)
    return False
def GetSkillData(passiveEffect):
    return None
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
@@ -43,7 +43,12 @@
GameWorld.ImportAll("Script\\Skill\\", "PassiveBuff")
# 被动关联的技能模块
# 获得关联技能,0 全部 1是主动型技能(法宝,普攻) 2 为人族法宝技能 3为普攻  其他技能ID
Def_ConnSkill_Template = {
             ChConfig.Def_SkillFuncType_FbSkill:[1,2],
             ChConfig.Def_SkillFuncType_NormalAttack:[1,3],
             }
# --------被动功法设置--------------------------------------------------------------------
@@ -432,6 +437,7 @@
             4533:ChConfig.TriggerType_BurnDisappear, # 灼烧消失触发 81
             4534:ChConfig.TriggerType_DebuffOff,   # BUFF类: 抵消debuff
             4535:ChConfig.TriggerType_BeAttackAddSkillPer, # buff中, 被攻击提高技能伤害
             4536:ChConfig.TriggerType_AddBuffOver,
             
             803:ChConfig.TriggerType_BloodShield,  # 血盾
             806:ChConfig.TriggerType_BloodShield,  # 血盾
@@ -696,8 +702,10 @@
        skillList.extend(self.AffectSuperEquipSkillDict.get((triggerType, connSkillID), []))
        
        # 指定特殊类型可触发
        # 获得关联技能,0 全部 1是主动型技能(法宝,普攻) 2 为人族法宝技能 3为普攻  其他技能ID
        if connSkill and connSkill.GetFuncType() in [ChConfig.Def_SkillFuncType_FbSkill, ChConfig.Def_SkillFuncType_NormalAttack]:
            funcType = 1
            funcTypeList = Def_ConnSkill_Template.get(connSkill.GetFuncType(), [])
            for funcType in funcTypeList:
            skillList.extend(self.AffectSkillDict.get((triggerType, funcType), []))
            skillList.extend(self.AffectPassiveSkillSetDict.get((triggerType, funcType), []))
            skillList.extend(self.AffectDogzSkillDict.get((triggerType, funcType), []))
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
@@ -3510,6 +3510,7 @@
#        return True
    
    if isEnhanceSkill:
        BaseAttack.OnHurtTypeTriggerPassiveSkill(attacker, defender, curSkill, tick)
        return True
    
    #在这边调用避免群攻时多次扣除消耗
@@ -3642,7 +3643,7 @@
    return
#---------------------------------------------------------------------
# 获得关联技能,0 全部 1是主动型技能(法宝,普攻)   其他技能ID
# 获得关联技能,0 全部 1是主动型技能(法宝,普攻) 2 为人族法宝技能 3为普攻  其他技能ID
def GetConnectSkillID(curSkill):
    return curSkill.GetExAttr1()