| | |
| | | import ShareDefine
|
| | | import GameObj
|
| | | import PassiveBuffEffMng
|
| | | import IpyGameDataPY
|
| | | #---------------------------------------------------------------------
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
| | | curSkill.SetLastUseTick(tick)
|
| | | coolDownTime = curSkill.GetCoolDownTime()
|
| | | remainTime = coolDownTime
|
| | | |
| | | skillTypeID = curSkill.GetSkillTypeID()
|
| | | if atkObj and skillTypeID in IpyGameDataPY.GetFuncEvalCfg("SkillCD", 1):
|
| | | reduceSkillCDPer += PlayerControl.GetTheFBSkillsCD(atkObj)
|
| | | |
| | | if isPassiveSkill(curSkill):
|
| | | if curSkill.GetFuncType() == ChConfig.Def_SkillFuncType_GiftSkill:
|
| | | # 天赋有减CD效果
|
| | |
| | | if curObj.GetGameNPCObjType() == IPY_GameWorld.gnotPet:
|
| | | PetControl.SetPetHP(curObj, remainHP)
|
| | | else:
|
| | | GameObj.SetHP(curObj, remainHP)
|
| | | timeLostHPIpyData = IpyGameDataPY.GetIpyGameDataNotLog("NPCTimeLostHP", curObj.GetNPCID())
|
| | | if timeLostHPIpyData:
|
| | | AttackCommon.UpdateTimeMonsterHP(curObj, timeLostHPIpyData, tick)
|
| | | else:
|
| | | GameObj.SetHP(curObj, remainHP)
|
| | | |
| | | if not view : # 已广播的不重复
|
| | | curObj.Notify_HPEx()
|
| | |
|
| | |
| | | GameObj.SetHP(curObj, remainHP, not view)
|
| | |
|
| | | AttackCommon.WriteHurtLog(buffOwner, curObj, curSkill, lostValue, hurtType, "持续掉血")
|
| | | |
| | | if view:
|
| | | #广播伤血类型
|
| | | AttackCommon.ChangeHPView(curObj, buffOwner, skillTypeID, notifyLostValue, hurtType)
|
| | | if buffOwner:
|
| | | PassiveBuffEffMng.OnPassiveSkillTrigger(buffOwner, curObj, curSkill, ChConfig.TriggerType_AttackOverPassive, tick)
|
| | |
|
| | | # 濒死状态触发技能
|
| | | if GameObj.GetHP(curObj) == 0:
|
| | |
| | |
|
| | | return returnInfo
|
| | |
|
| | |
|
| | | def FindBuffByOwner(gameObj, skillTypeID, ownerID, ownerType):
|
| | | findSkill = GameWorld.GetGameData().GetSkillBySkillID(skillTypeID)
|
| | | buffType = GetBuffType(findSkill)
|
| | | buffTuple = GetBuffManagerByBuffType(gameObj, buffType)
|
| | | if buffTuple == ():
|
| | | return None
|
| | | |
| | | buffManager = buffTuple[0]
|
| | | for i in range(0, buffManager.GetBuffCount()):
|
| | | curBuff = buffManager.GetBuff(i)
|
| | | if not curBuff:
|
| | | continue
|
| | | |
| | | #判断是否拥有同一类型的技能
|
| | | if curBuff.GetSkill().GetSkillTypeID() != skillTypeID:
|
| | | continue
|
| | | |
| | | #判断是否拥有同一类型的技能
|
| | | if curBuff.GetOwnerID() != ownerID:
|
| | | continue
|
| | | |
| | | if curBuff.GetOwnerType() != ownerType:
|
| | | continue
|
| | | |
| | | return curBuff
|
| | | |
| | | return None
|
| | | |
| | | #---------------------------------------------------------------------
|
| | | ## 执行清空命令 参数:玩家, 保留技能类型列表
|
| | | # @param curPlayer 玩家
|
| | |
| | | #技能附加
|
| | | skillValue = curSkill.GetEffect(0).GetEffectValue(1)
|
| | |
|
| | | skillPer += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(userObj, None, curSkill, ChConfig.TriggerType_AddHP)/float(ChConfig.Def_MaxRateValue)
|
| | | #公式计算治疗值
|
| | | cureHP = int((cureBaseValue * skillPer + skillValue + addExValue) * curePercent)
|
| | |
|