| | |
| | | import ChConfig
|
| | | import GameWorld
|
| | | import GameObj
|
| | | import PlayerControl
|
| | |
|
| | | import SkillCommon
|
| | |
|
| | | def CheckCanHappen(attacker, defender, effect, curSkill):
|
| | |
|
| | | result = GameWorld.CanHappen(effect.GetEffectValue(0))
|
| | | if result:
|
| | | GameObj.SetHP(attacker, 1) # 为了避免生命为0时,屏蔽过多逻辑
|
| | | return result
|
| | | # 提前触发CD, 不然外层无法触发技能的话就不进入CD, 如和平模式
|
| | | if curSkill.GetCoolDownTime():
|
| | | SkillCommon.SetSkillRemainTime(curSkill, 0, GameWorld.GetGameWorld().GetTick(), attacker)
|
| | | return True
|
| | | |
| | | if effect.GetEffectValue(1):
|
| | | #不死血量1,但不触发技能
|
| | | if GameWorld.CanHappen(effect.GetEffectValue(1)):
|
| | | GameObj.SetHP(attacker, 1)
|
| | | # 提前触发CD, 不然外层无法触发技能的话就不进入CD, 如和平模式
|
| | | if curSkill.GetCoolDownTime():
|
| | | SkillCommon.SetSkillRemainTime(curSkill, 0, GameWorld.GetGameWorld().GetTick(), attacker)
|
| | | return False
|
| | |
|
| | | return False
|