| | |
| | | coolDownTime = curSkill.GetCoolDownTime()
|
| | | remainTime = coolDownTime
|
| | | if isPassiveSkill(curSkill):
|
| | | if curSkill.GetFuncType() == ChConfig.Def_SkillFuncType_GiftSkill:
|
| | | # 天赋有减CD效果
|
| | | reduceSkillCDPer += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(atkObj, None, curSkill, ChConfig.TriggerType_GiftReduceCD)
|
| | | # 减CD比率
|
| | | if reduceSkillCDPer > 0:
|
| | | remainTime = int(remainTime * max(0, ShareDefine.Def_MaxRateValue - reduceSkillCDPer) / ShareDefine.Def_MaxRateValue)
|
| | | |
| | | # 被动技能的处理和主动技能区分
|
| | | curSkill.SetRemainTime(remainTime)
|
| | | return
|
| | |
| | | # @param curNPC NPC实例
|
| | | # @param summonID 召唤兽的NPCID
|
| | | # @return 召唤兽数量
|
| | | def GetSummonCountByNPCID(curNPC, summonID):
|
| | | def GetSummonCountByNPCID(gameObj, summonID):
|
| | | count = 0
|
| | | for i in range(0, curNPC.GetSummonCount()):
|
| | | summonNPC = curNPC.GetSummonNPCAt(i)
|
| | | for i in range(0, gameObj.GetSummonCount()):
|
| | | summonNPC = gameObj.GetSummonNPCAt(i)
|
| | |
|
| | | if not summonNPC:
|
| | | continue
|
| | |
| | | if curHP <= 0:
|
| | | return
|
| | |
|
| | | if PassiveBuffEffMng.GetValueByPassiveBuffTriggerType(curObj, None, None, ChConfig.TriggerType_ForbidenCure):
|
| | | # 禁止治疗
|
| | | return
|
| | | |
| | | # 治疗加成
|
| | | curePer = PlayerControl.GetCurePer(curObj) if curObjType == IPY_GameWorld.gotPlayer else ChConfig.Def_MaxRateValue
|
| | | addValue = int(addValue*curePer*1.0/ChConfig.Def_MaxRateValue)
|
| | |
| | | # 濒死状态触发技能
|
| | | if GameObj.GetHP(curObj) == 0:
|
| | | PassiveBuffEffMng.OnPassiveSkillTrigger(curObj, None, curSkill, ChConfig.TriggerType_WillDead, tick)
|
| | | |
| | | PassiveBuffEffMng.OnPassiveBuffTrigger(curObj, None, curSkill, ChConfig.TriggerType_WillDead, tick)
|
| | |
|
| | | #无法找到Buff拥有者
|
| | | if not buffOwner:
|
| | | AttackCommon.DoLogic_ObjDead(curObj)
|
| | | AttackCommon.DoLogic_ObjDead(None, curObj, curSkill, tick)
|
| | | return
|
| | |
|
| | | #NPC需要手动添加伤血和仇恨, 因为无调用DoAttack
|
| | |
| | | #GameWorld.DebugLog("GetRestoreMP restoreType=%s,restoreMP=%s" % (restoreType, restoreMP))
|
| | | return restoreMP
|
| | |
|
| | |
|
| | | ## 获取技能对最终伤害影响的效果比例
|
| | | # @param skill 使用的技能
|
| | | # @return |
| | | #===============================================================================
|
| | | # def GetSkillFinalHurtPer(atkObj, defObj, skill, tick):
|
| | | # |
| | | # atkObjType = atkObj.GetGameObjType()
|
| | | # defObjType = defObj.GetGameObjType()
|
| | | # |
| | | # finalPer = ChConfig.Def_MaxRateValue # 默认10000
|
| | | # |
| | | # if atkObjType != IPY_GameWorld.gotPlayer:
|
| | | # return finalPer
|
| | | # |
| | | # # 技能对玩家的影响
|
| | | # if defObjType == IPY_GameWorld.gotPlayer:
|
| | | # |
| | | # # 减少值
|
| | | # reduceHurtPerEff = GetSkillEffectByEffectID(skill, ChConfig.Def_Skill_Effect_ReduceFinalHurtPer)
|
| | | # curReducePer = 0 if not reduceHurtPerEff else reduceHurtPerEff.GetEffectValue(0)
|
| | | # finalPer -= curReducePer
|
| | | # |
| | | # # 增加值
|
| | | # addHurtPerEff = GetSkillEffectByEffectID(skill, ChConfig.Def_Skill_Effect_AddFinalHurtPer)
|
| | | # curAddPer = 0 if not addHurtPerEff else addHurtPerEff.GetEffectValue(0)
|
| | | # finalPer += curAddPer
|
| | | # |
| | | # #根据防守方职业 计算攻击方伤害加成
|
| | | # if defObj.GetJob() in [ShareDefine.PlayerJob_Warrior, ShareDefine.PlayerJob_Knight]:
|
| | | # finalPer += PlayerControl.GetJobAHurtAddPer(atkObj)
|
| | | # elif defObj.GetJob() in [ShareDefine.PlayerJob_Wizard, ShareDefine.PlayerJob_ForceUser]:
|
| | | # finalPer += PlayerControl.GetJobBHurtAddPer(atkObj)
|
| | | # elif defObj.GetJob() in [ShareDefine.PlayerJob_Assassin, ShareDefine.PlayerJob_BowMaster]:
|
| | | # finalPer += PlayerControl.GetJobCHurtAddPer(atkObj)
|
| | | # |
| | | # # 对NPC的影响
|
| | | # elif defObjType == IPY_GameWorld.gotNPC:
|
| | | # finalPer += PlayerControl.GetNPCHurtAddPer(atkObj)
|
| | | # if defObj.GetNPCID() in ReadChConfig.GetEvalChConfig("PlayerSpecialAttrBossID"):
|
| | | # finalPer += PlayerControl.GetBossIDHurtAddPer(atkObj)
|
| | | # |
| | | # # 技能连击加成
|
| | | # curSkillTypeID = skill.GetSkillTypeID()
|
| | | # comboSkillTypeID = atkObj.GetDictByKey(ChConfig.Def_PlayerKey_ComboSkillTypeID)
|
| | | # # 如果是触发连击的技能, 则附加连击伤害加成
|
| | | # if curSkillTypeID == comboSkillTypeID:
|
| | | # comboAddPer = atkObj.GetDictByKey(ChConfig.Def_PlayerKey_ComboAddHurtPer)
|
| | | # finalPer += comboAddPer
|
| | | # GameWorld.DebugLog("连击最终伤害加成%s, skillID=%s" % (comboAddPer, curSkillTypeID))
|
| | | # |
| | | # finalPer = max(0, finalPer)
|
| | | # |
| | | # return finalPer
|
| | | #===============================================================================
|
| | |
|
| | | ## 更新技能连击数
|
| | | # @param attacker
|