#!/usr/bin/python
|
# -*- coding: GBK -*-
|
#-------------------------------------------------------------------------------
|
#
|
##@package Skill.PassiveTrigger.PassiveEff_6009
|
#
|
# @todo:±Ø¶¨±©»÷
|
# @author hxp
|
# @date 2025-09-23
|
# @version 1.0
|
#
|
# ÏêϸÃèÊö: ±Ø¶¨±©»÷
|
#
|
#-------------------------------------------------------------------------------
|
#"""Version = 2025-09-23 19:00"""
|
#-------------------------------------------------------------------------------
|
|
import GameWorld
|
|
def GetHappenValue(attacker, defender, curEffect, effSkill, effBuff, connSkill, **skillkwargs):
|
checkValue = curEffect.GetEffectValue(0) # ÅжϲÎÊý
|
checkType = curEffect.GetEffectValue(1) # ÅжϷ½Ê½: 0-°´Ä¿±êÉúÃü, 1-°´Ä¿±ê״̬
|
defID = defender.GetID()
|
|
# 0 - °´Ä¿±êÉúÃüµÍÓÚx%£»²ÎÊý£ºµ¥Öµ¼´¿É£¬Èç30¾ÍÊÇ30%
|
if checkType == 0:
|
lowerThanPer = checkValue
|
defHP = defender.GetHP()
|
defMaxHP = defender.GetMaxHP()
|
nowPer = defHP / float(defMaxHP) * 100
|
if nowPer < lowerThanPer:
|
GameWorld.DebugLogEx("±Ø¶¨±©»÷->Ä¿±êѪÁ¿µÍÓÚ%s%%: defID=%s,hp:%s/%s", lowerThanPer, defID, defHP, defMaxHP)
|
return 1
|
|
# 1 - °´Ä¿±ê´¦ÓÚ״̬£»²ÎÊý£ºÖ§³Ö¶à״̬Áбí [״̬1, ...]
|
elif checkType == 1:
|
if defender.CheckInState(checkValue):
|
GameWorld.DebugLogEx("±Ø¶¨±©»÷->Ä¿±ê´¦ÓÚ״̬%s: defID=%s", checkValue, defID)
|
return 1
|
|
return
|