1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/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