本文整理匯總了Python中FleetUtilsAI.assessFleetRole方法的典型用法代碼示例。如果您正苦於以下問題:Python FleetUtilsAI.assessFleetRole方法的具體用法?Python FleetUtilsAI.assessFleetRole怎麽用?Python FleetUtilsAI.assessFleetRole使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FleetUtilsAI
的用法示例。
在下文中一共展示了FleetUtilsAI.assessFleetRole方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: identifyFleetsRoles
# 需要導入模塊: import FleetUtilsAI [as 別名]
# 或者: from FleetUtilsAI import assessFleetRole [as 別名]
def identifyFleetsRoles():
"identify fleet roles"
# assign roles to fleets
universe = fo.getUniverse()
for fleetID in universe.fleetIDs:
foAIstate.addFleetRole(fleetID, FleetUtilsAI.assessFleetRole(fleetID))
示例2: identifyFleetsRoles
# 需要導入模塊: import FleetUtilsAI [as 別名]
# 或者: from FleetUtilsAI import assessFleetRole [as 別名]
def identifyFleetsRoles():
"identify fleet roles"
print ("Identifying fleet roles")
# assign roles to fleets
universe = fo.getUniverse()
for fleetID in universe.fleetIDs:
print ("considering fleet with id: " + str(fleetID))
foAIstate.addFleetRole(fleetID, FleetUtilsAI.assessFleetRole(fleetID))
示例3: getFleetRole
# 需要導入模塊: import FleetUtilsAI [as 別名]
# 或者: from FleetUtilsAI import assessFleetRole [as 別名]
def getFleetRole(self, fleetID, forceNew=False):
"returns fleet role by ID"
if (not forceNew) and fleetID in self.__fleetRoleByID:
return self.__fleetRoleByID[fleetID]
else:
role=FleetUtilsAI.assessFleetRole(fleetID)
self.__fleetRoleByID[fleetID] = role
makeAggressive=False
if role in [AIFleetMissionType.FLEET_MISSION_COLONISATION, AIFleetMissionType.FLEET_MISSION_OUTPOST]:
pass
if role in [AIFleetMissionType.FLEET_MISSION_EXPLORATION]:
thisRating=self.getRating(fleetID)
if float(thisRating.get('overall', 0))/thisRating.get('nships', 1) >= 0.5 * ProductionAI.curBestMilShipRating():
makeAggressive=True
else:
makeAggressive=True
fo.issueAggressionOrder(fleetID, makeAggressive)
return role