| | |
| | | import PlayerNewFairyCeremony
|
| | | import GameLogic_CrossGrassland
|
| | | import PlayerActGarbageSorting
|
| | | import PlayerViewCacheTube
|
| | | import PlayerActBossTrial
|
| | | import PlayerTongTianLing
|
| | | import CrossPlayerData
|
| | |
| | | # @param aiType: AI类型
|
| | | # @return 如果召唤失败返回None 否则返回召唤的NPC的实例
|
| | | # @remarks 在地图里召唤NPC 根据NPCID 出生点 AI类型 和TICK
|
| | | def SummonMapNpc(npcId, rebornX, rebornY, aiType=0, lastTime=0, playerID=0, sightLevel=0, refreshID=0):
|
| | | def SummonMapNpc(npcId, rebornX, rebornY, aiType=0, lastTime=0, playerID=0, sightLevel=0, refreshID=0, pvpPlayerID=0):
|
| | | curSummon = GameWorld.GetNPCManager().AddPlayerSummonNPC()
|
| | | if not curSummon:
|
| | | return
|
| | |
| | |
|
| | | if curSummon.GetType() == ChConfig.ntRobot:
|
| | | __OnFBRobotReborn(curSummon, curSummon.GetLV())
|
| | | |
| | | if curSummon.GetType() == ChConfig.ntPVP and pvpPlayerID:
|
| | | curSummon.SetDict(ChConfig.Def_NPC_Dict_PVPPlayerID, pvpPlayerID)
|
| | |
|
| | | curSummon.Reborn(rebornX, rebornY, False)
|
| | | NPCControl(curSummon).DoNPCRebornCommLogic(tick)
|
| | |
| | | summonPlayerID = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_SummonMapNPCPlayerID)
|
| | | if summonPlayerID > 0:
|
| | | curNPC.SetDict(ChConfig.Def_NPC_Dict_SummonMapNPCPlayerID, 0)
|
| | | |
| | | if curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_PVPPlayerID):
|
| | | curNPC.SetDict(ChConfig.Def_NPC_Dict_PVPPlayerID, 0)
|
| | |
|
| | | refreshObj = NPCRealmRefresh.GetTagNPCRefresh(curNPC)
|
| | | if refreshObj:
|
| | |
| | | PetControl.RefurbishPetAttr(curNPC, canSyncClient)
|
| | | return
|
| | |
|
| | | DoNPCAttrStrengthen(curNPC, isReborn)
|
| | |
|
| | | pvpPlayerID = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_PVPPlayerID)
|
| | | if pvpPlayerID:
|
| | | self.SetPVPNPCPlayerAttr(pvpPlayerID)
|
| | | else:
|
| | | DoNPCAttrStrengthen(curNPC, isReborn)
|
| | | |
| | | #计算buf对战斗属性的改变
|
| | | allAttrList = SkillShell.CalcBuffer_NPCBattleEffect(curNPC)
|
| | |
|
| | |
| | |
|
| | | return
|
| | |
|
| | | def SetPVPNPCPlayerAttr(self, pvpPlayerID):
|
| | | PropDict = PlayerViewCacheTube.GetPlayerPropData(pvpPlayerID)
|
| | | if not PropDict:
|
| | | return
|
| | | curNPC = self.__Instance
|
| | | curNPC.SetCurLV(PropDict["LV"], False)
|
| | | curNPC.SetMinAtk(PropDict["MinAtk"])
|
| | | curNPC.SetMaxAtk(PropDict["MaxAtk"])
|
| | | curNPC.SetDef(PropDict["Def"])
|
| | | GameObj.SetMaxHP(curNPC, PropDict["MaxHP"])
|
| | | curNPC.SetHit(PropDict["Hit"])
|
| | | curNPC.SetMiss(PropDict["Miss"])
|
| | | |
| | | # curPlayerPropDict["SkillAtkRate"] = curPlayer.GetSkillAtkRate() # 技能攻击比例加成
|
| | | # curPlayerPropDict["SkillAtkRateReduce"] = PlayerControl.GetSkillAtkRateReduce(curPlayer) # 技能攻击比例减少
|
| | | # curPlayerPropDict["LuckyHitRate"] = curPlayer.GetLuckyHitRate() # 会心一击几率
|
| | | # curPlayerPropDict["LuckyHitVal"] = curPlayer.GetLuckyHitVal() # 会心一击伤害固定值
|
| | | # curPlayerPropDict["LuckyHitRateReduce"] = PlayerControl.GetLuckyHitRateReduce(curPlayer) # 会心一击概率抗性
|
| | | # curPlayerPropDict["LuckyHitReduce"] = PlayerControl.GetLuckyHitReduce(curPlayer) # 会心一击伤害减免固定值
|
| | | # curPlayerPropDict["SuperHitRate"] = curPlayer.GetSuperHitRate() # 暴击概率
|
| | | # curPlayerPropDict["SuperHit"] = curPlayer.GetSuperHit() # 暴击伤害固定值
|
| | | # curPlayerPropDict["SuperHitRateReduce"] = PlayerControl.GetSuperHitRateReduce(curPlayer) # 暴击概率抗性
|
| | | # curPlayerPropDict["SuperHitReduce"] = PlayerControl.GetSuperHitReduce(curPlayer) # 暴击伤害抗性固定值
|
| | | # curPlayerPropDict["IceAtk"] = curPlayer.GetIceAtk() # 真实伤害 固定值
|
| | | # curPlayerPropDict["IceDef"] = curPlayer.GetIceDef() # 真实伤害防御 固定值
|
| | | # curPlayerPropDict["IgnoreDefRate"] = curPlayer.GetIgnoreDefRate() # 无视防御几率
|
| | | # curPlayerPropDict["IgnoreDefRateReduce"] = PlayerControl.GetIgnoreDefRateReduce(curPlayer) # 无视防御概率抗性
|
| | | # curPlayerPropDict["IgnoreDefReducePer"] = PlayerControl.GetIgnoreDefReducePer(curPlayer) # 无视防御伤害减免
|
| | | # curPlayerPropDict["DamagePVE"] = PlayerControl.GetDamagePVE(curPlayer) # 伤害输出计算固定值PVE
|
| | | # curPlayerPropDict["DamagePerPVP"] = PlayerControl.GetDamagePerPVP(curPlayer) # 伤害输出计算百分比PVP
|
| | | # curPlayerPropDict["DamagePerPVPReduce"] = PlayerControl.GetDamagePerPVPReduce(curPlayer) # 伤害输出计算百分比PVP减少
|
| | | # curPlayerPropDict["DamagePVP"] = PlayerControl.GetDamagePVP(curPlayer) # PVP固定伤害
|
| | | # curPlayerPropDict["DamagePVPReduce"] = PlayerControl.GetDamagePVPReduce(curPlayer) # PVP固定减伤
|
| | | # curPlayerPropDict["FinalHurt"] = PlayerControl.GetFinalHurt(curPlayer) # 最终固定伤害增加
|
| | | # curPlayerPropDict["FinalHurtReduce"] = PlayerControl.GetFinalHurtReduce(curPlayer) # 最终固定伤害减少
|
| | | # curPlayerPropDict["FinalHurtPer"] = PlayerControl.GetFinalHurtPer(curPlayer) # 最终伤害百分比
|
| | | # curPlayerPropDict["FinalHurtReducePer"] = PlayerControl.GetFinalHurtReducePer(curPlayer) # 最终伤害减少百分比
|
| | | # curPlayerPropDict["OnlyFinalHurt"] = PlayerControl.GetOnlyFinalHurt(curPlayer) # 额外输出伤害
|
| | | # curPlayerPropDict["DamChanceDef"] = PlayerControl.GetDamChanceDef(curPlayer) # 20%的概率抵御伤害比率
|
| | | # curPlayerPropDict["NPCHurtAddPer"] = PlayerControl.GetNPCHurtAddPer(curPlayer) # 对怪物伤害加成
|
| | | # curPlayerPropDict["AtkBackHPPer"] = PlayerControl.GetAtkBackHPPer(curPlayer) # 攻击回复血量固定值
|
| | | # curPlayerPropDict["PVPAtkBackHP"] = PlayerControl.GetPVPAtkBackHP(curPlayer) # PVP攻击回血
|
| | | # curPlayerPropDict["FaintRate"] = PlayerControl.GetFaintRate(curPlayer) # 触发击晕
|
| | | # curPlayerPropDict["FaintDefRate"] = PlayerControl.GetFaintDefRate(curPlayer) # 击晕抵抗
|
| | | return
|
| | | |
| | | def SetHelpBattleRobotRebornAttr(self, fightPower):
|
| | | '''助战机器人只设置血量属性
|
| | | 血量算法,(助战玩家=助战机器人):每个副本配置伤害*(助战玩家战力/副本规定战力)*系数值 系数值暂定为50
|