10263 【英文】【BT】【GM】后端支持NPC仿真实玩家战斗和快速战斗(触发被动死循环防范修改;)
| | |
| | | import PassiveBuffEffMng
|
| | | import PlayerGeTui
|
| | | import IpyGameDataPY
|
| | | import PyGameData
|
| | | #---------------------------------------------------------------------
|
| | | g_skillHurtList = IPY_GameWorld.IPY_HurtList()
|
| | |
|
| | |
| | | #PlayerControl.DoPlayerStand(curPlayer)
|
| | | #激活玩家
|
| | | PlayerControl.SetIsNeedProcess(curPlayer, True)
|
| | | |
| | | #镜像单次攻击统计,查单次攻击无限触发被动死循环临时代码
|
| | | if PyGameData.g_singleAtkRecordList != None and (attacker and attacker.GetDictByKey(ChConfig.Def_PlayerKey_MirrorBattleID)) \
|
| | | and (curPlayer and curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_MirrorBattleID)):
|
| | | atkID = attacker.GetID()
|
| | | defID = curPlayer.GetID()
|
| | | skillID = curSkill.GetSkillID() if curSkill else 0
|
| | | PyGameData.g_singleAtkRecordList.append([atkID, defID, skillID])
|
| | | #GameWorld.DebugLog("PyGameData.g_singleAtkRecordList: %s, %s" % (len(PyGameData.g_singleAtkRecordList), PyGameData.g_singleAtkRecordList))
|
| | | if len(PyGameData.g_singleAtkRecordList) >= 50:
|
| | | GameWorld.SendGameError("MirrorAIAtkDepthError", str(PyGameData.g_singleAtkRecordList))
|
| | | PyGameData.g_singleAtkRecordList = None
|
| | | return
|
| | |
|
| | | # 暂且只有玩家被攻击触发
|
| | | if not curSkill or curSkill.GetSkillType() in ChConfig.Def_CanAttackSkill_List:
|
| | |
| | | # @return None
|
| | | def UsePassiveTriggerSkill(attacker, curSkill, target, tick, isEnhanceSkill=False):
|
| | | result = False # 攻击结果
|
| | | |
| | | #镜像单次攻击统计,查单次攻击无限触发被动死循环临时代码
|
| | | if PyGameData.g_singleAtkRecordList != None and (attacker and attacker.GetDictByKey(ChConfig.Def_PlayerKey_MirrorBattleID)):
|
| | | atkID = attacker.GetID()
|
| | | tagID = target.GetID() if target else 0
|
| | | skillID = curSkill.GetSkillID()
|
| | | PyGameData.g_singleAtkRecordList.append([atkID, tagID, skillID])
|
| | | #GameWorld.DebugLog("PyGameData.g_singleAtkRecordList: %s, %s" % (len(PyGameData.g_singleAtkRecordList), PyGameData.g_singleAtkRecordList))
|
| | | if len(PyGameData.g_singleAtkRecordList) >= 50:
|
| | | GameWorld.SendGameError("MirrorAIAtkDepthError", str(PyGameData.g_singleAtkRecordList))
|
| | | PyGameData.g_singleAtkRecordList = None
|
| | | return result
|
| | | |
| | | if curSkill.GetTag() == 0 and not isEnhanceSkill:
|
| | |
|
| | | # 当技能类型为被动技能并且tag字段为0,则此技能为媒介用于触发技能 SkillEnhance1 SkillEnhance2
|