hxp
2022-02-21 0c27822ef5e6c67782ed143a4ff03ecfbdfda1fb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/python
# -*- coding: GBK -*-
#
#
##@package Buff_803
# @todo: ÑªÄ§»¤¶Ü ×ÔÉí´¦ÓÚ¼Ó¹¥×´Ì¬£¬¸øÓèÔö¼Ó120%¹¥»÷Á¦»¤¶Ü£¬³ÖÐø5Ã룬»¤¶Üʱ¼ä½áÊøÊ±£¬Èç¹ûÉúÃüµÍÓÚ15%£¬»¤¶Üû±»»÷ÆÆ£¬Ôò»Ö¸´200%»¤¶ÜÉúÃü£¬CD100Ãë
#
# @author Alee
# @date 2017-10-31 14:10
# @version 1.0
#
#---------------------------------------------------------------------
"""Version = 2017-10-31 14:10"""
 
 
import IPY_GameWorld
import GameWorld
import ChConfig
import GameObj
import SkillCommon
 
 
 
# @param attacker ¹¥»÷ÕßʵÀý
# @param curSkill ¼¼ÄÜʵÀý
# @param curEffect µ±Ç°¼¼ÄÜЧ¹û1
# @return ×ÜÖµ
def CalcBuffValue(attacker, defender, curSkill, changeBuffValueDict):
    curEffect = curSkill.GetEffect(0)
    return [int(float(curEffect.GetEffectValue(0))/ChConfig.Def_MaxRateValue*attacker.GetMaxAtk())]
 
def OnBuffDisappear(curObj, curSkill, curBuff, findEffect, tick):
    # Ê£Ó໤¶ÜÖµÓÃÓÚ»ØÑª
    if curBuff.GetBuffValue() == 0:
        return
    
    restoreValue = int(float(findEffect.GetEffectValue(0))/ChConfig.Def_MaxRateValue*curObj.GetMaxAtk())
    if GameObj.GetHP(curObj)*ChConfig.Def_MaxRateValue/GameObj.GetMaxHP(curObj) >= findEffect.GetEffectValue(1):
        return
    
    restoreValue = int(restoreValue*float(findEffect.GetEffectValue(2))/ChConfig.Def_MaxRateValue)
    SkillCommon.SkillAddHP(curObj, 0, restoreValue, True)
 
    return