| | |
| | | import GameObj
|
| | | import BuffSkill
|
| | | import PlayerState
|
| | | import MirrorAttack
|
| | | import ChPyNetSendPack
|
| | | import NPCHurtManager
|
| | | import NetPackCommon
|
| | | import FamilyRobBoss
|
| | | import FBCommon
|
| | | import ChNPC
|
| | | import BossHurtMng
|
| | | import NPCHurtMgr
|
| | | import ChNetSendPack
|
| | | import TurnAttack
|
| | |
|
| | |
| | |
|
| | | curObjType = curObj.GetGameObjType()
|
| | | if curObjType == IPY_GameWorld.gotPlayer:
|
| | | #BossHurtMng.BossAddPlayerInHurtList(curObj, curTagObj, hurtHP)
|
| | | FamilyRobBoss.OnPlayerHurtFamilyOwnerBoss(curObj, curTagObj, hurtHP)
|
| | | if curTagObj.GetGameObjType() == IPY_GameWorld.gotNPC:
|
| | | FBLogic.DoFB_Player_HurtNPC(curObj, curTagObj, hurtHP)
|
| | | if GameObj.GetHP(curTagObj) == 0:
|
| | | curTagObj.SetDict(ChConfig.Def_PlayerKey_LastHurt, curObj.GetPlayerID())
|
| | |
|
| | | if NPCHurtManager.AddHurtValue(curObj, curTagObj, hurtHP, isBounce):
|
| | | return
|
| | | |
| | | if NPCHurtMgr.AddHurtValue(curObj, curTagObj, hurtHP, isBounce):
|
| | | return
|
| | | |
| | | curTeam = curObj.GetTeam()
|
| | | if curTeam == None:
|
| | | #无队伍,添加个人伤害
|
| | |
| | | #if not CheckAttackNPCByCnt(attacker, defender):
|
| | | # return False
|
| | |
|
| | | #击杀次数判断
|
| | | if not NPCHurtManager.IsAssistPlayer(attacker.GetPlayerID(), defender) and not CheckKillNPCByCnt(attacker, defender):
|
| | | return False
|
| | | |
| | | #仙盟归属NPC判断
|
| | | if not CheckCanAttackFamilyOwnerNPC(attacker, defender):
|
| | | return False
|
| | |
| | | #if not CheckAttackNPCByCnt(defender, attacker, False):
|
| | | # return False
|
| | |
|
| | | #击杀次数判断
|
| | | if not CheckKillNPCByCnt(defender, attacker, False) and not NPCHurtManager.IsAssistPlayer(defender.GetPlayerID(), attacker):
|
| | | return False
|
| | | |
| | | #仙盟归属NPC判断
|
| | | if not CheckCanAttackFamilyOwnerNPC(defender, attacker, False):
|
| | | return False
|
| | |
| | | # NPC打NPC
|
| | | elif atkObjType == IPY_GameWorld.gotNPC and defObjType == IPY_GameWorld.gotNPC:
|
| | | if PetControl.IsPet(attacker) or attacker.GetGameNPCObjType()== IPY_GameWorld.gnotSummon:
|
| | | #击杀次数判断
|
| | | if not CheckKillNPCByCnt(attacker, defender, False):
|
| | | ownerPlayer = GetAttackPlayer(attacker)[0]
|
| | | if ownerPlayer and not NPCHurtManager.IsAssistPlayer(ownerPlayer.GetPlayerID(), defender):
|
| | | return False
|
| | | ##击杀次数判断
|
| | | #if not CheckKillNPCByCnt(attacker, defender, False):
|
| | | # ownerPlayer = GetAttackPlayer(attacker)[0]
|
| | | # if ownerPlayer and not NPCHurtManager.IsAssistPlayer(ownerPlayer.GetPlayerID(), defender):
|
| | | # return False
|
| | |
|
| | | #仙盟归属NPC判断
|
| | | if not CheckCanAttackFamilyOwnerNPC(attacker, defender, False):
|
| | |
| | | if not GameFuncComm.GetFuncCanUse(atkPlayer, funcID):
|
| | | PlayerControl.NotifyCode(atkPlayer, funcSysMark)
|
| | | return
|
| | | canKillCnt = BossHurtMng.GetCanKillBossCnt(atkPlayer, index)[0]
|
| | | |
| | | if canKillCnt <= 0:
|
| | | #if BossHurtMng.GetPlayerBossHurt(atkPlayer, defender):
|
| | | # GameWorld.DebugLog("攻击过该boss可继续攻击")
|
| | | # return True
|
| | | #次数不足
|
| | | # 实际攻击者类型None则需要提示玩家
|
| | | if npcObjType is None:
|
| | | if isNotify:
|
| | | sysMark = IpyGameDataPY.GetFuncEvalCfg('KillBossCntLimit', 3, {}).get(index, '')
|
| | | PlayerControl.NotifyCode(atkPlayer, sysMark)
|
| | | return False
|
| | | |
| | | |
| | | #npcDataEx = NPCCommon.GetNPCDataPy(npcID)
|
| | | #if npcDataEx and npcDataEx.GetFightPowerLackAtkLimit():
|
| | | # if npcDataEx.GetSuppressFightPower() > PlayerControl.GetFightPower(atkPlayer):
|
| | |
| | | hasAttackCnt = atkPlayer.NomalDictGetProperty(ChConfig.Def_PDict_WorldBoss_HurtCnt, 0)
|
| | |
|
| | | if hasAttackCnt >= limitCnt:
|
| | | #if BossHurtMng.GetPlayerBossHurt(atkPlayer, defender):
|
| | | # GameWorld.DebugLog("攻击过该boss可继续攻击")
|
| | | # return True
|
| | | #次数不足
|
| | | # 实际攻击者类型None则需要提示玩家
|
| | | if npcObjType is None:
|
| | |
| | | atkObj.SetDict(ChConfig.Def_PlayerKey_LastHurtNPCObjID, defObj.GetID())
|
| | | else:
|
| | | defObj.SetDict(ChConfig.Def_PlayerKey_LastAttackerObjID, atkObj.GetID())
|
| | | |
| | | #TurnAttack.AddTurnObjHurtValue(atkObj, defObj, resultHurtType.HurtType, resultHurtType.RealHurtHP, resultHurtType.LostHP, curSkill)
|
| | |
|
| | | #if resultHurtType.RealHurtHP:
|
| | | # PassiveBuffEffMng.OnPassiveSkillTrigger(defObj, atkObj, None, ChConfig.TriggerType_BeHurt, tick)
|
| | |
| | | # GameWorld.DebugLog("不能攻击,不反弹")
|
| | | # return
|
| | | #杀怪次数判断
|
| | | if not CheckKillNPCByCnt(defObj, atkObj, False) and not NPCHurtManager.IsAssistPlayer(defObj.GetPlayerID(), atkObj):
|
| | | #GameWorld.DebugLog("不能攻击,不反弹")
|
| | | return
|
| | | #if not CheckKillNPCByCnt(defObj, atkObj, False) and not NPCHurtManager.IsAssistPlayer(defObj.GetPlayerID(), atkObj):
|
| | | # #GameWorld.DebugLog("不能攻击,不反弹")
|
| | | # return
|
| | |
|
| | | #没有反弹退出
|
| | | defObj_DamageBackRate = defObj.GetDamageBackRate()
|
| | |
| | | '''
|
| | | #关系有3层,无-友好-敌人
|
| | |
|
| | | #镜像PK下,无视PK区域、PK模式等,仅验证双方是否同一阵营
|
| | | curBattleID = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_MirrorBattleID)
|
| | | tagBattleID = tagPlayer.GetDictByKey(ChConfig.Def_PlayerKey_MirrorBattleID)
|
| | | if curBattleID and curBattleID == tagBattleID:
|
| | | battle = MirrorAttack.GetMirrorBattleByID(curBattleID)
|
| | | if battle.batState != ChConfig.Def_MirrorBatState_Fight:
|
| | | return ChConfig.Type_Relation_None, ChConfig.Def_PASysMessage_None
|
| | | if curPlayer.GetFaction() != tagPlayer.GetFaction():
|
| | | return ChConfig.Type_Relation_Enemy , ChConfig.Def_PASysMessage_None
|
| | | return ChConfig.Type_Relation_Friend, ChConfig.Def_PASysMessage_None
|
| | | |
| | | #判断是否可释放(增/减)技能或普攻
|
| | | if CheckPlayersRelationInFB_IsNone(curPlayer, tagPlayer):
|
| | | return ChConfig.Type_Relation_None, ChConfig.Def_PASysMessage_None
|
| | |
| | | elif curPlayerAttackMode == IPY_GameWorld.amAll:
|
| | | pass
|
| | |
|
| | | # 协助关系不可攻击
|
| | | if NPCHurtManager.IsAssistRelation(curPlayer, tagPlayer):
|
| | | return ChConfig.Type_Relation_Friend, ChConfig.Def_PASysMessage_NotAttackTeam
|
| | | |
| | | # 以下为所属区域的一些特殊处理
|
| | | #普通区
|
| | | if curPlayerAreaType == IPY_GameWorld.gatNormal:
|