#!/usr/bin/python
|
# -*- coding: GBK -*-
|
#-------------------------------------------------------------------------------
|
#
|
##@package Skill.TurnBuffs.BuffAtkType_1005
|
#
|
# @todo:¶îÍâÊôÐÔ
|
# @author hxp
|
# @date 2025-10-27
|
# @version 1.0
|
#
|
# ÏêϸÃèÊö: ¶îÍâÊôÐÔ£¬Ð§¹û1ÖµÅäÖãº[»÷ÖÐx״̬]|Ôö¼ÓÊôÐÔID|ÿ»÷ÖÐ1¸öÔö¼ÓÊôÐÔÖµ
|
#
|
#-------------------------------------------------------------------------------
|
#"""Version = 2025-10-27 17:00"""
|
#-------------------------------------------------------------------------------
|
|
import GameWorld
|
|
def CalcBuffValue(turnFight, attacker, defender, curSkill):
|
bySkill = curSkill.GetBySkill()
|
if not bySkill:
|
return
|
|
effect = curSkill.GetEffect(0)
|
checkInStateList = effect.GetEffectValue(0)
|
attrIDEx = effect.GetEffectValue(1)
|
attrValueEx = effect.GetEffectValue(2)
|
#GameWorld.DebugLog("BuffAtkType_1005 ¼ì²é¶îÍâÊôÐÔ: checkInStateList=%s,attrIDEx=%s,attrValueEx=%s" % (checkInStateList, attrIDEx, attrValueEx))
|
if not checkInStateList or not attrIDEx or not attrValueEx:
|
return
|
|
hitCnt = 0
|
effIgnoreObjIDList = bySkill.GetEffIgnoreObjIDList()
|
tagObjList = bySkill.GetTagObjList()
|
for tagObj in tagObjList:
|
tagID = tagObj.GetID()
|
if tagID in effIgnoreObjIDList:
|
#GameWorld.DebugLog(" ÉÁ±Ü»òÃâÒßµÄÄ¿±ê: tagID=%s" % (tagID))
|
continue
|
if not tagObj.CheckInState(checkInStateList):
|
#GameWorld.DebugLog(" ²»ÔÚ״̬ϵÄÄ¿±ê: tagID=%s not in state:%s" % (tagID, checkInStateList))
|
continue
|
hitCnt += 1
|
#GameWorld.DebugLog(" hitCnt=%s,tagID=%s" % (hitCnt, tagID))
|
|
if hitCnt <= 0:
|
return
|
|
return [hitCnt]
|
|
def CalcBuffAttrEx(batObj, buff, skillData, layer, buffAttrDict):
|
## ¼ÆËãbuff¶îÍâÊôÐÔ
|
hitCnt = buff.GetValue1()
|
effect = skillData.GetEffect(0)
|
attrID = effect.GetEffectValue(1)
|
attrValue = effect.GetEffectValue(2) * hitCnt * layer
|
if not attrID or not attrValue:
|
return
|
calcType = effect.GetEffectValue(3)
|
if calcType == 2: # ¼õÉÙ£¬ÆäËûĬÈÏÔö¼Ó
|
attrValue = -attrValue
|
buffAttrDict[attrID] = buffAttrDict.get(attrID, 0) + attrValue
|
GameWorld.DebugLog(" buff¶îÍâÊôÐÔ: skillID=%s,hitCnt=%s,attrID=%s,attrValue=%s" % (skillData.GetSkillID(), hitCnt, attrID, attrValue))
|
return
|
|
|