| | |
| | | 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
|
| | |
|
| | |
| | | # 攻击时防守方神兵护盾的处理
|
| | | def CalcAtkProDef(atkObj, defObj, hurtValue, curSkill, tick):
|
| | | return hurtValue
|
| | | # if defObj.GetGameObjType() != IPY_GameWorld.gotPlayer:
|
| | | # return hurtValue
|
| | | # |
| | | # if not CheckIsPlayerOnwer(atkObj):
|
| | | # return hurtValue
|
| | | #
|
| | | # curProDef = PlayerControl.GetProDef(defObj)
|
| | | # if not curProDef:
|
| | | # return hurtValue
|
| | | # |
| | | # absortValue = min(PlayerControl.GetProDefAbsorb(defObj)*hurtValue/ChConfig.Def_MaxRateValue, curProDef)
|
| | | # |
| | | # PlayerControl.SetProDef(defObj, curProDef - absortValue)
|
| | | # |
| | | # # 被动技能触发
|
| | | # defObj.SetDict(ChConfig.Def_PlayerKey_GodWeaponBeforeProDef, curProDef)
|
| | | # PassiveBuffEffMng.OnPassiveSkillTrigger(defObj, atkObj, None, ChConfig.TriggerType_ProDefValue, tick)
|
| | | # return hurtValue - absortValue
|
| | |
|
| | |
|
| | | # 设置玩家一次主动型攻击中的第一个防御者
|
| | | def SetFirstDefender(attacker, defObj, curSkill):
|
| | |
| | |
|
| | | 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)
|