| | |
| | | # @remarks 刷新NPC属性
|
| | | def RefreshNPCAttrState(self, canSyncClient=True, isReborn=False):
|
| | | curNPC = self.__Instance
|
| | | if curNPC.GetType() == ChConfig.ntHelpBattleRobot:
|
| | | # 助战机器人不处理
|
| | | return
|
| | | #curNPCMaxHP_Before = GameObj.GetMaxHP(curNPC)
|
| | | #清空NPC战斗属性
|
| | | curNPC.ClearBattleEffect()
|
| | |
| | | fbFightPower = ipyData.GetFightPowerMin()
|
| | | baseHurt = ipyData.GetRobotBaseHurt()
|
| | | hpCoefficient = ipyData.GetRobotHPCoefficient()
|
| | | maxHP = int(baseHurt * fightPower / fbFightPower * hpCoefficient)
|
| | | maxHP = int(eval(IpyGameDataPY.GetFuncCompileCfg("HelpBattleRobot", 2)))
|
| | | GameWorld.DebugLog("设置助战机器人属性: objID=%s,fightPower=%s,maxHP=%s" % (curNPC.GetID(), fightPower, maxHP))
|
| | | GameObj.SetMaxHP(curNPC, maxHP)
|
| | | GameObj.SetHP(curNPC, maxHP)
|
| | |
| | | # @remarks 刷新NPC行为属性
|
| | | def RefreshNPCActionState(self):
|
| | | curNPC = self.__Instance
|
| | | if curNPC.GetType() == ChConfig.ntHelpBattleRobot:
|
| | | # 助战机器人不处理
|
| | | return
|
| | | OperControlManager.ClearObjActionState(curNPC)
|
| | |
|
| | | #根据BUFF 加上状态
|