#!/usr/bin/python
|
# -*- coding: GBK -*-
|
#
|
# @todo: Ôö¼ÓËùÓй¥»÷É˺¦ º¬ÆÕ¹¥ ¸½¼ÓѪÁ¿ÅÐ¶Ï --£¨PVP£©Ö÷½ÇÉúÃüÖµµÍÓÚ30%ʱ£¬ËùÓм¼ÄÜÉ˺¦ÔÙÔö¼Ó60%
|
#
|
# @author: Alee
|
# @date 2018-1-9 ÏÂÎç09:39:37
|
# @version 1.0
|
#
|
# @note:
|
#
|
#---------------------------------------------------------------------
|
|
import ChConfig
|
import GameWorld
|
import GameObj
|
import PlayerControl
|
|
|
def CheckCanHappen(attacker, defender, effect, curSkill):
|
# δÅäÖò»Ñé֤ѪÁ¿°Ù·Ö±È
|
hpPer = effect.GetEffectValue(2)
|
if hpPer:
|
if GameObj.GetHP(attacker)*ChConfig.Def_MaxRateValue/GameObj.GetMaxHP(attacker) >= hpPer:
|
return False
|
|
|
return GameWorld.CanHappen(effect.GetEffectValue(1))
|
|
|
def GetValue(attacker, defender, effect):
|
return float(effect.GetEffectValue(0))/ChConfig.Def_MaxRateValue
|