hxp
2024-09-18 d0d6f28bee730ee64bf46adffa4f768d6af6ac0c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package Skill.PassiveBuff.PassiveSkill_5004
#
# @todo:±»¹¥»÷ºó´¥·¢±»¶¯¼¼ÄÜ, ¸½¼ÓÌõ¼þ ÑªÁ¿Ê״εÍÓÚXX°Ù·Ö±È
# @author hxp
# @date 2024-01-20
# @version 1.0
#
#-------------------------------------------------------------------------------
#"""Version = 2024-01-20 17:00"""
#-------------------------------------------------------------------------------
 
import ChConfig
import GameObj
 
def CheckCanHappen(attacker, defender, effect, curSkill):
    hpPer = effect.GetEffectValue(0)
    lowestHP = GameObj.GetLowestHP(attacker)
    lowestHPPer = lowestHP * ChConfig.Def_MaxRateValue / GameObj.GetMaxHP(attacker)
    return lowestHPPer < hpPer