本文整理汇总了Python中ColonisationAI.get_colony_fleets方法的典型用法代码示例。如果您正苦于以下问题:Python ColonisationAI.get_colony_fleets方法的具体用法?Python ColonisationAI.get_colony_fleets怎么用?Python ColonisationAI.get_colony_fleets使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ColonisationAI
的用法示例。
在下文中一共展示了ColonisationAI.get_colony_fleets方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: calculate_priorities
# 需要导入模块: import ColonisationAI [as 别名]
# 或者: from ColonisationAI import get_colony_fleets [as 别名]
def calculate_priorities():
"""Calculates the priorities of the AI player."""
print "\n", 10 * "=", "Preparing to Calculate Priorities", 10 * "="
prioritiees_timer.start('setting Production Priority')
foAI.foAIstate.set_priority(PriorityType.RESOURCE_PRODUCTION, 50) # let this one stay fixed & just adjust Research
print "\n*** Calculating Research Priority ***\n"
prioritiees_timer.start('setting Research Priority')
foAI.foAIstate.set_priority(PriorityType.RESOURCE_RESEARCH, _calculate_research_priority()) # TODO: do univ _survey before this
print "\n*** Updating Colonization Status ***\n"
prioritiees_timer.start('Evaluating Colonization Status')
ColonisationAI.get_colony_fleets() # sets foAI.foAIstate.colonisablePlanetIDs and foAI.foAIstate.outpostPlanetIDs and many other values used by other modules
print "\n*** Updating Invasion Status ***\n"
prioritiees_timer.start('Evaluating Invasion Status')
InvasionAI.get_invasion_fleets() # sets AIstate.invasionFleetIDs, AIstate.opponentPlanetIDs, and AIstate.invasionTargetedPlanetIDs
print "\n*** Updating Military Status ***\n"
prioritiees_timer.start('Evaluating Military Status')
MilitaryAI.get_military_fleets()
print("\n** Calculating Production Priorities ***\n")
prioritiees_timer.start('reporting Production Priority')
_calculate_industry_priority() # purely for reporting purposes
prioritiees_timer.start('setting Exploration Priority')
foAI.foAIstate.set_priority(PriorityType.RESOURCE_TRADE, 0)
foAI.foAIstate.set_priority(PriorityType.RESOURCE_CONSTRUCTION, 0)
foAI.foAIstate.set_priority(PriorityType.PRODUCTION_EXPLORATION, _calculate_exploration_priority())
prioritiees_timer.start('setting Colony Priority')
foAI.foAIstate.set_priority(PriorityType.PRODUCTION_COLONISATION, _calculate_colonisation_priority())
prioritiees_timer.start('setting Outpost Priority')
foAI.foAIstate.set_priority(PriorityType.PRODUCTION_OUTPOST, _calculate_outpost_priority())
prioritiees_timer.start('setting Invasion Priority')
foAI.foAIstate.set_priority(PriorityType.PRODUCTION_INVASION, _calculate_invasion_priority())
prioritiees_timer.start('setting Military Priority')
foAI.foAIstate.set_priority(PriorityType.PRODUCTION_MILITARY, _calculate_military_priority())
prioritiees_timer.start('setting other priorities')
foAI.foAIstate.set_priority(PriorityType.PRODUCTION_BUILDINGS, 25)
foAI.foAIstate.set_priority(PriorityType.RESEARCH_LEARNING, _calculate_learning_priority())
foAI.foAIstate.set_priority(PriorityType.RESEARCH_GROWTH, _calculate_growth_priority())
foAI.foAIstate.set_priority(PriorityType.RESEARCH_PRODUCTION, _calculate_techs_production_priority())
foAI.foAIstate.set_priority(PriorityType.RESEARCH_CONSTRUCTION, _calculate_construction_priority())
foAI.foAIstate.set_priority(PriorityType.RESEARCH_ECONOMICS, 0)
foAI.foAIstate.set_priority(PriorityType.RESEARCH_SHIPS, _calculate_ships_priority())
foAI.foAIstate.set_priority(PriorityType.RESEARCH_DEFENSE, 0)
prioritiees_timer.stop_print_and_clear()
示例2: calculate_priorities
# 需要导入模块: import ColonisationAI [as 别名]
# 或者: from ColonisationAI import get_colony_fleets [as 别名]
def calculate_priorities():
"""calculates the priorities of the AI player"""
print ("checking statuses")
# Industry, Research, Colony, Invasion, Military
prioritiees_timer.start("setting Production Priority")
foAI.foAIstate.set_priority(
EnumsAI.AIPriorityType.PRIORITY_RESOURCE_PRODUCTION, 50
) # let this one stay fixed & just adjust Research
prioritiees_timer.start("setting Research Priority")
foAI.foAIstate.set_priority(
EnumsAI.AIPriorityType.PRIORITY_RESOURCE_RESEARCH, calculateResearchPriority()
) # TODO: do univ _survey before this
prioritiees_timer.start("Evaluating Colonization Status")
ColonisationAI.get_colony_fleets() # sets foAI.foAIstate.colonisablePlanetIDs and foAI.foAIstate.outpostPlanetIDs and many other values used by other modules
prioritiees_timer.start("Evaluating Invasion Status")
InvasionAI.get_invasion_fleets() # sets AIstate.invasionFleetIDs, AIstate.opponentPlanetIDs, and AIstate.invasionTargetedPlanetIDs
prioritiees_timer.start("Evaluating Military Status")
MilitaryAI.get_military_fleets() # sets AIstate.militaryFleetIDs and AIstate.militaryTargetedSystemIDs
prioritiees_timer.start("reporting Production Priority")
print ("calculating priorities")
calculateIndustryPriority() # purely for reporting purposes
prioritiees_timer.start("setting Exploration Priority")
foAI.foAIstate.set_priority(EnumsAI.AIPriorityType.PRIORITY_RESOURCE_TRADE, 0)
foAI.foAIstate.set_priority(EnumsAI.AIPriorityType.PRIORITY_RESOURCE_CONSTRUCTION, 0)
foAI.foAIstate.set_priority(EnumsAI.AIPriorityType.PRIORITY_PRODUCTION_EXPLORATION, calculateExplorationPriority())
prioritiees_timer.start("setting Colony Priority")
foAI.foAIstate.set_priority(
EnumsAI.AIPriorityType.PRIORITY_PRODUCTION_COLONISATION, calculateColonisationPriority()
)
prioritiees_timer.start("setting Outpost Priority")
foAI.foAIstate.set_priority(EnumsAI.AIPriorityType.PRIORITY_PRODUCTION_OUTPOST, calculateOutpostPriority())
prioritiees_timer.start("setting Invasion Priority")
foAI.foAIstate.set_priority(EnumsAI.AIPriorityType.PRIORITY_PRODUCTION_INVASION, calculateInvasionPriority())
prioritiees_timer.start("setting Military Priority")
foAI.foAIstate.set_priority(EnumsAI.AIPriorityType.PRIORITY_PRODUCTION_MILITARY, calculateMilitaryPriority())
prioritiees_timer.start("setting other priorities")
foAI.foAIstate.set_priority(EnumsAI.AIPriorityType.PRIORITY_PRODUCTION_BUILDINGS, 25)
foAI.foAIstate.set_priority(EnumsAI.AIPriorityType.PRIORITY_RESEARCH_LEARNING, calculateLearningPriority())
foAI.foAIstate.set_priority(EnumsAI.AIPriorityType.PRIORITY_RESEARCH_GROWTH, calculateGrowthPriority())
foAI.foAIstate.set_priority(EnumsAI.AIPriorityType.PRIORITY_RESEARCH_PRODUCTION, calculateTechsProductionPriority())
foAI.foAIstate.set_priority(EnumsAI.AIPriorityType.PRIORITY_RESEARCH_CONSTRUCTION, calculateConstructionPriority())
foAI.foAIstate.set_priority(EnumsAI.AIPriorityType.PRIORITY_RESEARCH_ECONOMICS, 0)
foAI.foAIstate.set_priority(EnumsAI.AIPriorityType.PRIORITY_RESEARCH_SHIPS, calculateShipsPriority())
foAI.foAIstate.set_priority(EnumsAI.AIPriorityType.PRIORITY_RESEARCH_DEFENSE, 0)
prioritiees_timer.end()