xdh
2019-03-18 6ef04a63b7411f2570c2c30414697bca8c45dd61
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/BuffProcess_1089.py
@@ -2,7 +2,7 @@
# -*- coding: GBK -*-
##@package BuffProcess_1089
# 按最大血量百分比减血
# 按被攻击者的最大血量百分比减血
#
# @author Alee
# @date 2011-03-18 16:45
@@ -10,17 +10,14 @@
#
# 修改时间 修改人 修改内容
#
# 模块详细说明 按最大血量百分比减血
# @change: "2013-03-20 18:00" Alee 添加释放者相关的属性刷新逻辑,压入值计算
# @change: "2013-10-31 14:45" Alee 武器的技能增强效果
#---------------------------------------------------------------------
"""Version = 2013-10-31 14:45"""
#导入
import SkillCommon
import GameWorld
import ChConfig
import GameObj
import IPY_GameWorld
import PassiveBuffEffMng
#---------------------------------------------------------------------
#全局变量
#---------------------------------------------------------------------
@@ -45,7 +42,28 @@
    curBuffSkillID = curBuff.GetSkill().GetSkillTypeID()
    
    SkillCommon.SkillLostHP(defender, curBuffSkillID, buffOwner, singleDecHP, tick, hurtType=ChConfig.Def_HurtType_Bleed)
    if curEffect.GetEffectValue(2) and buffOwner:
        SkillCommon.SkillAddHP(buffOwner, curBuffSkillID, singleDecHP)
    OnPassiveSkillByHurtCount(defender, curBuff, curEffect, buffOwner)
    return
def OnPassiveSkillByHurtCount(defender, curBuff, curEffect, buffOwner):
    if not buffOwner:
        return
    if buffOwner.GetGameObjType() != IPY_GameWorld.gotPlayer:
        return
    # 执行次数。 当汲灵对目标造成3次伤害时,可降低目标20%的防御
    curBuff.SetValue1(curBuff.GetValue1() + 1)
    tick = GameWorld.GetGameWorld().GetTick()
    defender.SetDict(ChConfig.Def_PlayerKey_BuffHurtCnt, curBuff.GetValue1())
    PassiveBuffEffMng.OnPassiveSkillTrigger(buffOwner, defender, curBuff.GetSkill(), ChConfig.TriggerType_BuffHurtCnt, tick)
    defender.SetDict(ChConfig.Def_PlayerKey_BuffHurtCnt, 0)
    return
## 持续性Buff消失
#  @param defender 承受者
@@ -68,6 +86,9 @@
    buffOwner = SkillCommon.GetBuffOwner(curBuff)
    
    SkillCommon.SkillLostHP(defender, curSkill.GetSkillTypeID(), buffOwner, buffValue, tick, hurtType=ChConfig.Def_HurtType_Bleed)
    # 执行次数
    OnPassiveSkillByHurtCount(defender, curBuff, curEffect, buffOwner)
    return
@@ -83,5 +104,5 @@
    #技能附加
    skillEnhance = curEffect.GetEffectValue(1)
    
    return [int(GameObj.GetMaxHP(attacker) * skillPer + skillEnhance)]
    return [int(GameObj.GetMaxHP(defender) * skillPer + skillEnhance)]