| | |
| | | #!/usr/bin/python
|
| | | # -*- coding: GBK -*-
|
| | | #
|
| | | # @todo: 被攻击后触发被动技能, 附加条件 血量低于XX百分比
|
| | | # @todo: 被攻击后触发被动技能, 附加条件 血量低于XX百分比, 附加被攻击次数判定
|
| | | #
|
| | | # @author: Alee
|
| | | # @date 2018-1-9 下午09:39:37
|
| | |
| | | if GameObj.GetHP(attacker)*ChConfig.Def_MaxRateValue/GameObj.GetMaxHP(attacker) >= effect.GetEffectValue(1):
|
| | | return False
|
| | |
|
| | | if effect.GetEffectValue(2):
|
| | | # 攻击次数判定
|
| | | attackCnt = curSkill.GetProficiency()
|
| | | curSkill.SetProficiency(attackCnt + 1)
|
| | | |
| | | if attackCnt + 1 >= effect.GetEffectValue(2):
|
| | | curSkill.SetProficiency(0)
|
| | | else:
|
| | | return False
|
| | | |
| | | return GameWorld.CanHappen(effect.GetEffectValue(0))
|