| | |
| | |
|
| | | return None
|
| | |
|
| | |
|
| | | |
| | | # 触发型技能根据伤血类型触发被动技能,群攻只触发一次,放在伤血列表被清之前
|
| | | # 只处理 isEnhanceSkill的情况,对应 OnHurtTypeTriggerSkill
|
| | | def OnHurtTypeTriggerPassiveSkill(attacker, target, curSkill, tick):
|
| | | |
| | | skillHurtLists = [] # 内部触发清除g_skillHurtList
|
| | | for i in xrange(g_skillHurtList.GetHurtCount()):
|
| | | hurtObj = g_skillHurtList.GetHurtAt(i)
|
| | | if not hurtObj:
|
| | | continue
|
| | | |
| | | skillHurtLists.append([hurtObj.GetObjID(), hurtObj.GetObjType(), hurtObj.GetAttackType()])
|
| | | |
| | | for hurtList in skillHurtLists:
|
| | | defender = GameWorld.GetObj(hurtList[0], hurtList[1])
|
| | | if not defender:
|
| | | continue
|
| | | |
| | | if GameObj.GetHP(defender) > 0:
|
| | | continue
|
| | | |
| | | if hurtList[1] == IPY_GameWorld.gotPlayer:
|
| | | if hurtList[2] == ChConfig.Def_HurtType_Zhansha:
|
| | | defender.SetDict(ChConfig.Def_PlayerKey_Zhansha, 1)
|
| | | elif hurtList[2] == ChConfig.Def_HurtType_ZhognjiZhansha:
|
| | | defender.SetDict(ChConfig.Def_PlayerKey_Zhansha, 2)
|
| | | |
| | | # 濒死状态触发技能, 不能在GetHurtHP内部触发技能,否则会导致原技能的伤血列表异常
|
| | | PassiveBuffEffMng.OnPassiveSkillTrigger(defender, attacker, None, ChConfig.TriggerType_WillDead, tick)
|
| | | PassiveBuffEffMng.OnPassiveBuffTrigger(defender, attacker, None, ChConfig.TriggerType_WillDead, tick)
|
| | | if hurtList[2] in [ChConfig.Def_HurtType_Zhansha, ChConfig.Def_HurtType_ZhognjiZhansha]:
|
| | | defender.SetDict(ChConfig.Def_PlayerKey_Zhansha, 0)
|
| | |
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | ## 攻击通用函数
|
| | | # @param attacker 攻击Obj
|
| | |
| | | __AttackSuccess(attacker, attackerHP, defender, useSkill, tick)
|
| | | #调用触发附加技能
|
| | | SkillShell.DoLogic_UseEnhanceSkill(attacker, defender, useSkill, tick, destX, destY)
|
| | | else:
|
| | | OnHurtTypeTriggerPassiveSkill(attacker, defender, useSkill, tick)
|
| | |
|
| | | #因攻击结束动作中,法宝攻击将导致目标死亡。要判定后在次调用,避免2次->AttackResult
|
| | | if AttackCommon.GetIsDead(defender):
|
| | |
| | | # 防守者自己通知
|
| | | __Sync_AttackResult(defender, defender, curSkill)
|
| | |
|
| | |
|
| | | OnHurtTypeTriggerPassiveSkill(attacker, defender, curSkill, tick)
|
| | | DoLogic_AttackResult(attacker, defender, curSkill, tick)
|
| | |
|
| | | return True
|
| | |
| | | SkillShell.SkillTrigSkill(attacker, defObj, curSkill, enhanceSkillID, tick)
|
| | | else:
|
| | | SkillShell.SkillTrigSkill(attacker, defender, curSkill, enhanceSkillID, tick)
|
| | |
|
| | | else:
|
| | | OnHurtTypeTriggerPassiveSkill(attacker, defender, curSkill, tick)
|
| | | |
| | | for defObj in attackList:
|
| | |
|
| | | #因攻击结束动作中,法宝攻击将导致目标死亡。要判定后在次调用,避免2次->AttackResult
|
| | |
| | |
|
| | | if curSkill.GetFuncType() == ChConfig.Def_SkillFuncType_GiftSkill:
|
| | | UseSkillOver(curPlayer, target, curSkill, tick)
|
| | | else:
|
| | | OnHurtTypeTriggerPassiveSkill(curPlayer, target, curSkill, tick)
|
| | | return True
|
| | |
|
| | | #玩家进入战斗状态
|
| | |
| | | continue
|
| | |
|
| | | skillHurtLists.append([hurtObj.GetObjID(), hurtObj.GetObjType(), hurtObj.GetAttackType()])
|
| | | |
| | |
|
| | | skillIDSet = set()
|
| | | for hurtList in skillHurtLists:
|
| | |
| | | #===========================================================================
|
| | | Sync_SkillHurtList(attacker, curSkill.GetSkillID(), srcPosX, srcPosY, g_skillHurtList)
|
| | |
|
| | | OnHurtTypeTriggerPassiveSkill(attacker, None, curSkill, tick)
|
| | | skillIDSet = set()
|
| | | #攻击结果 不处理触发逻辑
|
| | | for defObj in attackList:
|