| | |
| | | import SkillCommon
|
| | | import FBLogic
|
| | | import ReadChConfig
|
| | | import PetControl
|
| | | import GameMap
|
| | | import PassiveBuffEffMng
|
| | | import GameFuncComm
|
| | | import ShareDefine
|
| | | import SkillShell
|
| | | import FormulaControl
|
| | | import IpyGameDataPY
|
| | | import PyGameData
|
| | | import GameObj
|
| | |
| | | import PlayerState
|
| | | import ChPyNetSendPack
|
| | | import NetPackCommon
|
| | | import FBCommon
|
| | | import ChNPC
|
| | | import ChNetSendPack
|
| | | import TurnAttack
|
| | |
| | |
|
| | | # NPC打NPC
|
| | | elif atkObjType == IPY_GameWorld.gotNPC and defObjType == IPY_GameWorld.gotNPC:
|
| | | if PetControl.IsPet(attacker) or attacker.GetGameNPCObjType()== IPY_GameWorld.gnotSummon:
|
| | | if attacker.GetGameNPCObjType()== IPY_GameWorld.gnotSummon:
|
| | | ##击杀次数判断
|
| | | #if not CheckKillNPCByCnt(attacker, defender, False):
|
| | | # ownerPlayer = GetAttackPlayer(attacker)[0]
|
| | |
| | | # 召唤兽主人为玩家
|
| | | if summonOwner and summonOwner.GetGameObjType() == IPY_GameWorld.gotPlayer:
|
| | | return summonOwner, npcObjType
|
| | | |
| | | # 判断宠物主人
|
| | | elif npcObjType == IPY_GameWorld.gnotPet:
|
| | | ownerPlayer = PetControl.GetPetOwner(atkObj)
|
| | | if ownerPlayer != None:
|
| | | return ownerPlayer, npcObjType
|
| | |
|
| | | return None, None
|
| | |
|
| | |
| | |
|
| | | elif defObjType == IPY_GameWorld.gotNPC:
|
| | | if defObj.GetGameNPCObjType() == IPY_GameWorld.gnotPet:
|
| | | #设置宠物剩余血量
|
| | | PetControl.SetPetHP(defObj, remainHP)
|
| | | pass
|
| | |
|
| | | elif defObj.GetType() == ChConfig.ntHelpBattleRobot:
|
| | | remainHP = min(dHP, max(GameObj.GetMaxHP(defObj)/2, remainHP)) # 助战机器人剩余血量不能少于一半
|
| | |
| | | # @param None
|
| | | # @return 攻击形式字符串
|
| | | def GetAtkState(atkObj, defObj):
|
| | | isPet = PetControl.IsPet(atkObj)
|
| | | isPet = False
|
| | | if IsPVENPCObj(atkObj) or IsPVENPCObj(defObj):
|
| | | return 'PVE_%s' if not isPet else 'PetVE_%s'
|
| | |
|
| | |
| | | if atkObjType == IPY_GameWorld.gotNPC:
|
| | | #宠物回血
|
| | | if atkObj.GetGameNPCObjType() == IPY_GameWorld.gnotPet:
|
| | | PetControl.SetPetHP(atkObj, remainHP)
|
| | | pass
|
| | | #普通NPC回血
|
| | | else:
|
| | | GameObj.SetHP(atkObj, remainHP)
|