hch
2019-03-20 df824550205e9f266f51ebbf4028ac37fe0992bc
2683 子 天赋技能和新增双职业各两个技能 / 【后端】天赋技能
4个文件已修改
3个文件已添加
163 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_801.py 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_44.py 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4074.py 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4075.py 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
@@ -1761,17 +1761,14 @@
                # 用于回血
                findBuff.SetValue(int(findBuff.GetValue() + absortValue))
    if defObj.GetDictByKey(ChConfig.Def_PlayerKey_AbsorbValue):
        defObj.SetDict(ChConfig.Def_PlayerKey_AbsorbValue, 0) #吸收的单次伤害,单次伤害必须清空
    if defObj.GetDictByKey(ChConfig.Def_PlayerKey_AbsorbShieldValue):
        # 麒麟护盾吸收伤害,将抵消的伤害存储
        absortValue = int(defObj.GetDictByKey(ChConfig.Def_PlayerKey_AbsorbShieldValue)/float(ShareDefine.Def_MaxRateValue)*hurtValue)   
        hurtValue -= absortValue
        defObj.SetDict(ChConfig.Def_PlayerKey_AbsorbValue, absortValue) #吸收的单次伤害
        
        # 吸收至指定血量比例值
        absorbHurt = defObj.GetDictByKey(ChConfig.Def_PlayerKey_AbsorbShield)
        if absorbHurt <= defObj.GetDictByKey(ChConfig.Def_PlayerKey_AbsorbShieldMax):
            maxValue = min(absorbHurt + absortValue, defObj.GetDictByKey(ChConfig.Def_PlayerKey_AbsorbShieldMax))
            defObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShield, maxValue)    # 记录护盾吸收的伤害用于爆炸
    # 天罡护法,将期间受到的伤害总值用于回血,不改变伤害
    curEffect, plusValue, skillID2 = BuffSkill.FindBuffEffectPlusByEffectID(buffManager, ChConfig.Def_Skill_Effect_StoreBlood)
    if skillID2:
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -570,7 +570,7 @@
#写死的技能效果ID---------------------------------------------------------------------
Def_Skill_Effect_AddAtkByHP = 503  # 每损失XX血量增加攻击XX,最高攻击加成XX
Def_Skill_Effect_AbsorbShield = 801  # A值记录吸收伤害值,B值记录吸收值上限为xx%血量上限值 C值为释放的爆炸技能ID 如麒麟盾
Def_Skill_Effect_AbsorbShield = 801  # A值记录吸收伤害值
Def_Skill_Effect_AbsorbShieldXMZJ = 802    # 须弥真界 神兵技能吸收伤害 百分比
Def_Skill_Effect_BoomSeedHurt = 804 # BUFF种子单层伤害
Def_Skill_Effect_StoreBlood = 809 # 将期间受到的伤害总值,用于最后回血,不影响伤害
@@ -580,6 +580,7 @@
Def_Skill_Effect_MasterBuff = 1012 # 主从技能(同步buff持续时间)
Def_Skill_Effect_SummonAttr = 1013 # 召唤兽属性
Def_Skill_Effect_BoomSeedID = 1014 # 引爆BUFF种子
Def_Skill_Effect_ReCD = 1016 # 重置CD
Def_Skill_Effect_RandWarn = 1061 # 随机预警
Def_Skill_Effect_AttackReplaceByNPCSeries = 1062 # 对指定系的伤害
Def_Skill_Effect_AvgHurtFMCnt = 1064 # NPC技能按仙盟成员数均摊伤害  
@@ -3046,8 +3047,7 @@
Def_PlayerKey_MoreHurtValue = "MoreHurtValue"     # 额外的伤害值,一般用于不走公式
Def_PlayerKey_BloodShiledHurt = "BSHurt"     # 伤害值用于血盾抵消
Def_PlayerKey_AbsorbShieldValue = "AbsorbShieldValue"     # 麒麟盾吸收减免伤害百分比
Def_PlayerKey_AbsorbShieldMax = "AbsorbShieldMax"     # 麒麟盾吸收最大伤害量
Def_PlayerKey_AbsorbShield = "AbsorbShield"     # 麒麟盾吸收的伤害量用于爆炸
Def_PlayerKey_AbsorbValue = "AbsorbValue"     # 麒麟盾吸收的单次伤害
Def_PlayerKey_StartEquipCnt = "StartEquipCnt"     # 珍品数量
Def_PlayerKey_TJGPackFullAfterEat = "TJGFullEat"     # 脱机挂吞噬后背包依然满的情况
Def_PlayerKey_TJGStartTime = "TJGStartTime"     # 脱机挂结算时间起点
@@ -4544,7 +4544,8 @@
TriggerType_SuperHitSubLayer, # 暴击减层 67
TriggerType_SuperHitSkipCD, # 暴击无冷却 68
TriggerType_BuffHurtCnt, # 当持续buff伤害第X次时触发技能 69
) = range(1, 70)
TriggerType_4074PerValue, # 特殊效果的加成 70
) = range(1, 71)
# NPC功能类型定义
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_801.py
@@ -3,7 +3,7 @@
#
#
##@package Buff_801
# @todo: 麒麟盾,吸收XX%伤害,护盾吸收伤害达到血量上限的xx%值或者3秒后爆发所吸收的伤害
# @todo: 麒麟盾,吸收XX%伤害
#
# @author Alee
# @date 2017-10-31 14:10
@@ -21,31 +21,6 @@
import PySkillManager
import GameObj
#===============================================================================
# ## 根据释放方的属性添加效果
# #  @param defender Buff承受者
# #  @param curEffect 技能效果
# #  @param calcDict 技能效果累加总表
# #  @return None
# def OnCalcBuffEx(curObj, curEffect, calcDict, curBuff):
#    GameWorld.DebugLog("801 ǰ OnCalcBuffEx-------------%s"%curEffect.GetEffectValue(0))
#    buffValue = curEffect.GetEffectValue(0) + PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(
#                                            curObj, None, curBuff.GetSkill(), ChConfig.TriggerType_AbsorbShield)
#    GameWorld.DebugLog("801 ǰ OnCalcBuffEx------buffValue-------%s"%buffValue)
#    # 吸收伤害比率, SetAtkAbsorb记录已吸收伤害值
#    curObj.SetDefanceAbsorb(buffValue)
#    maxValue = int(curEffect.GetEffectValue(1)/float(ChConfig.Def_MaxRateValue)*GameObj.GetMaxHP(curObj))
#    curObj.SetAtkAbsorb(maxValue)
#    return
#
#
# ## 返回buff类型,线性与否
# #  @param None
# #  @return 线性
# #  @remarks 函数详细说明.
# def GetCalcType():
#    return ChConfig.TYPE_Linear
#===============================================================================
## 添加BUFF后的逻辑
#  @param None
@@ -55,9 +30,6 @@
                                            curObj, None, addBuff.GetSkill(), ChConfig.TriggerType_AbsorbShield)
    # 战斗属性 在刷新的时候会清空,不能用在此函数中
    curObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShieldValue, buffValue)  # 吸收的伤害百分比
    maxValue = int(curEffect.GetEffectValue(1)/float(ChConfig.Def_MaxRateValue)*GameObj.GetMaxHP(curObj))
    curObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShieldMax, maxValue)  # 吸收上限值
    return
##吸收伤害百分比
@@ -72,29 +44,5 @@
    return [changeBuffValueDict.get(i, 0) for i in range(ChConfig.Def_BuffValue_Count)]
def OnBuffDisappear(curObj, curSkill, curBuff, curEffect, tick):
    if not curObj.GetDictByKey(ChConfig.Def_PlayerKey_AbsorbShield):
        curObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShieldValue, 0)  # 吸收的伤害百分比
        curObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShieldMax, 0)  # 吸收上限值
        curObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShield, 0)
        return
    #效果值 第三个值为技能ID
    boomID = curEffect.GetEffectValue(2)
    skillData = GameWorld.GetGameData().GetSkillBySkillID(boomID)
    if not skillData:
        curObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShieldValue, 0)  # 吸收的伤害百分比
        curObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShieldMax, 0)  # 吸收上限值
        curObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShield, 0)
        return
    # 存储起来用于伤害
    curObj.SetDict(ChConfig.Def_PlayerKey_MoreHurtValue,
                   curObj.GetDictByKey(ChConfig.Def_PlayerKey_AbsorbShield))
    SkillShell.Trigger_UseSkill(curObj, None, skillData, tick, curObj.GetPosX(), curObj.GetPosY())
    curObj.SetDict(ChConfig.Def_PlayerKey_MoreHurtValue, 0)
    curObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShieldValue, 0)  # 吸收的伤害百分比
    curObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShieldMax, 0)  # 吸收上限值
    curObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShield, 0)
    return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_44.py
New file
@@ -0,0 +1,32 @@
#!/usr/bin/python
# -*- coding: GBK -*-
#
##@package
#
# @todo: 取消指定技能的CD
#
# @author: Alee
# @date 2019-3-20 下午12:09:33
# @version 1.0
#
# @note:
#
#---------------------------------------------------------------------
import ChConfig
import BaseAttack
import BuffSkill
import IPY_GameWorld
import SkillCommon
import EffGetSet
def UseSkill(attacker, defender, curSkill, tagRoundPosX, tagRoundPosY, isEnhanceSkill, tick):
    skillEffect = SkillCommon.GetSkillEffectByEffectID(curSkill, ChConfig.Def_Skill_Effect_ReCD)
    curPlayerSkill = attacker.GetSkillManager().FindSkillBySkillTypeID(skillEffect.GetEffectValue(0))
    if not curPlayerSkill:
        return
    curPlayerSkill.SetRemainTime(0)
    curSkill.Sync_Skill()
    #处理技能触发和攻击成功逻辑
    return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4074.py
New file
@@ -0,0 +1,30 @@
#!/usr/bin/python
# -*- coding: GBK -*-
#
##@package
#
# @todo: 反弹麒麟佑身吸收的伤害
#
# @author: Alee
# @date 2019-3-20 上午11:47:44
# @version 1.0
#
# @note:
#
#---------------------------------------------------------------------
import ChConfig
import GameWorld
import ItemControler
import PlayerControl
import PassiveBuffEffMng
# 目标某个状态时触发
def CheckCanHappen(attacker, defender, effect, curSkill):
    return True if attacker.GetDictByKey(ChConfig.Def_PlayerKey_AbsorbValue) else False #吸收的单次伤害
def GetValue(attacker, defender, effect):
    value = attacker.GetDictByKey(ChConfig.Def_PlayerKey_AbsorbValue)
    perValue = effect.GetEffectValue(0) + PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(attacker, None, None, ChConfig.TriggerType_4074PerValue)
    return value * perValue / ChConfig.Def_MaxRateValue
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4075.py
New file
@@ -0,0 +1,27 @@
#!/usr/bin/python
# -*- coding: GBK -*-
#
##@package
#
# @todo: 反弹麒麟佑身吸收的伤害 4074的特殊加成
#
# @author: Alee
# @date 2019-3-20 上午11:47:44
# @version 1.0
#
# @note:
#
#---------------------------------------------------------------------
import ChConfig
import GameWorld
import ItemControler
import PlayerControl
import PassiveBuffEffMng
# 目标某个状态时触发
def CheckCanHappen(attacker, defender, effect, curSkill):
    return True if attacker.GetDictByKey(ChConfig.Def_PlayerKey_AbsorbValue) else False #吸收的单次伤害
def GetValue(attacker, defender, effect):
    return effect.GetEffectValue(0)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
@@ -354,6 +354,8 @@
             4071:ChConfig.TriggerType_Buff_SuckBloodPer,   # 攻击 百分比吸血
             4072:ChConfig.TriggerType_SuperHitSkipCD, # 暴击无冷却 68
             4073:ChConfig.TriggerType_BuffHurtCnt, # 当持续buff伤害第X次时触发技能 69
             4074:ChConfig.TriggerType_BounceHP,   # 反弹伤害固定值14, 记录值
             4075:ChConfig.TriggerType_4074Value,   # 增加4074的反弹比例
             }
    return tdict.get(effectID, -1) 
    #===========================================================================