#!/usr/bin/python
|
# -*- coding: GBK -*-
|
#-------------------------------------------------------------------------------
|
#
|
##@package Skill.PassiveTrigger.PassiveEff_5029
|
#
|
# @todo:¶îÍâ½áËãdotÉ˺¦£¨µÐ·½È«ÌåÓÐdotµÄ£¬²»Ó°ÏìÔdot£©
|
# @author hxp
|
# @date 2026-01-20
|
# @version 1.0
|
#
|
# ÏêϸÃèÊö: ¶îÍâ½áËãdotÉ˺¦£¨µÐ·½È«ÌåÓÐdotµÄ£¬²»Ó°ÏìÔdot£©
|
#
|
#-------------------------------------------------------------------------------
|
#"""Version = 2026-01-20 21:30"""
|
#-------------------------------------------------------------------------------
|
|
import TurnSkill
|
import BattleObj
|
import GameWorld
|
import ChConfig
|
|
def DoSkillEffectLogic(turnFight, batObj, tagObj, effSkill, curEffect, connSkill, connBuff, **kwargs):
|
hurtPer = curEffect.GetEffectValue(0) # ¶îÍâ½áËãdot×ÜÖµµÄÍò·Ö±È
|
|
effSkillID = effSkill.GetSkillID()
|
faction = batObj.GetFaction()
|
lineupNum = batObj.GetLineupNum()
|
tagFaction = ChConfig.Def_FactionB if faction == ChConfig.Def_FactionA else ChConfig.Def_FactionA
|
|
tagBatFaction = turnFight.getBatFaction(tagFaction)
|
tagBatLineup = tagBatFaction.getBatlineup(lineupNum)
|
|
isOK = False
|
batObjMgr = BattleObj.GetBatObjMgr()
|
for objID in tagBatLineup.getBatHeroObjIDList():
|
tObj = batObjMgr.getBatObj(objID)
|
if not tObj or not tObj.IsAlive():
|
continue
|
|
dotValueDict = {}
|
buffMgr = tObj.GetBuffManager()
|
for buffIndex in range(buffMgr.GetBuffCount()):
|
buff = buffMgr.GetBuffByIndex(buffIndex)
|
buffSkillData = buff.GetSkillData()
|
|
if buffSkillData.GetSkillType() != ChConfig.Def_SkillType_LstDepBuff:
|
continue
|
buffValue = buff.GetValue1() + buff.GetValue2() * ChConfig.Def_PerPointValue
|
ownerID = buff.GetOwnerID()
|
dotValueDict[ownerID] = dotValueDict.get(ownerID, 0) + buffValue
|
|
for ownerID, dotValueTotal in dotValueDict.items():
|
hurtValue = int(dotValueTotal * hurtPer / 10000.0)
|
GameWorld.DebugLogEx("5029¶îÍâ½áËãdotÉ˺¦: objID=%s,ownerID=%s,dotValueTotal=%s,hurtPer=%s,hurtValue=%s", objID, ownerID, dotValueTotal, hurtPer, hurtValue)
|
atkObj = batObjMgr.getBatObj(ownerID)
|
if not atkObj:
|
continue
|
if TurnSkill.DoHurtExAtk(turnFight, atkObj, tObj, hurtValue, effSkillID):
|
isOK = True
|
|
return isOK
|
|