#!/usr/bin/python # -*- coding: GBK -*- #------------------------------------------------------------------------------- # ##@package Skill.GameBuffs.BuffProcess_1308 # # @todo:³Ö¼Ì»ØÑª´¥·¢µÄbuffÂß¼­ÊµÏÖ # @author hxp # @date 2024-03-28 # @version 1.0 # # ÏêϸÃèÊö: ³Ö¼Ì»ØÑª´¥·¢µÄbuffÂß¼­ÊµÏÖ # Ч¹û1£º AÖµ-°Ù·Ö±È£»BÖµ-¸½¼ÓÖµ£»CÖµ-»Ö¸´ÀàÐÍ£¨Í¬ÊÍ·Å·½Ê½8µÄ»Ö¸´ÀàÐÍ£© # Ч¹û2£º Ò»°ã´îÅäЧ¹ûID 9999 ´¦Àí¼ä¸ôʹÓà # #------------------------------------------------------------------------------- #"""Version = 2024-03-28 18:30""" #------------------------------------------------------------------------------- import ChConfig import GameWorld import SkillCommon import SkillShell import GameObj def ProcessBuff(defender, curBuff, curEffect, processBuffTick, tick): if curBuff.GetValue2() == 0: return curBuff.SetValue2(max(curBuff.GetValue2() - 1, 0)) curBuffSkillID = curBuff.GetSkill().GetSkillTypeID() singleAddHP = curBuff.GetValue() + curBuff.GetValue1() * ChConfig.Def_PerPointValue SkillCommon.SkillAddHP(defender, curBuffSkillID, singleAddHP) return # ÏûʧǰÈçÓÐδִÐдÎÊýÔò²¹ÉÏ # @param defender ³ÐÊÜÕß def OnBuffDisappear(defender, curSkill, curBuff, curEffect, tick): count = curBuff.GetValue2() #ÎÞÊ£Óà if count <= 0: return #ÒѾ­ËÀÍö²»´¥·¢ if GameObj.GetHP(defender) <= 0: return singleAddHP = curBuff.GetValue() + curBuff.GetValue1() * ChConfig.Def_PerPointValue SkillCommon.SkillAddHP(defender, curSkill.GetSkillTypeID(), singleAddHP * count) return def CalcBuffValue(attacker, defender, curSkill, changeBuffValueDict): curEffect = curSkill.GetEffect(0) cureType = curEffect.GetEffectValue(2) cureHP = SkillCommon.GetCureHP(attacker, defender, curSkill, cureType, largeNum=True) # Ö§³Ö³¬20E buffTime = curSkill.GetLastTime() buffTick = SkillShell.GetProcessBuffTick(curSkill, defender) count = int(buffTime / buffTick) GameWorld.DebugLog("BuffProcess_1308.CalcBuffValue: cureHP=%s,count=%s,atkID=%s,defID=%s" % (cureHP, count, attacker.GetID(), defender.GetID())) return [cureHP % ChConfig.Def_PerPointValue, cureHP / ChConfig.Def_PerPointValue, count]