当前位置: 首页>>代码示例>>Python>>正文


Python IPlayer.update方法代码示例

本文整理汇总了Python中IPlayer.IPlayer.update方法的典型用法代码示例。如果您正苦于以下问题:Python IPlayer.update方法的具体用法?Python IPlayer.update怎么用?Python IPlayer.update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IPlayer.IPlayer的用法示例。


在下文中一共展示了IPlayer.update方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: update

# 需要导入模块: from IPlayer import IPlayer [as 别名]
# 或者: from IPlayer.IPlayer import update [as 别名]
	def update(self, tran, obj):
		# call super method
		IPlayer.update(self, tran, obj)
		#
		obj.techLevel = 99
		# grant special technologies
		obj.techs[Rules.Tech.PIRATEBASE] = Rules.techMaxImprovement
		obj.techs[Rules.Tech.PIRATEDEN] = Rules.techMaxImprovement
		obj.techs[Rules.Tech.PIRATESD] = Rules.techMaxImprovement
		obj.techs[Rules.Tech.PIRATEBREWERY] = Rules.techMaxImprovement
		obj.techs[Rules.Tech.PIRATEPRISON] = Rules.techMaxImprovement
		obj.techs[Rules.Tech.PIRATEPRISON] = Rules.techMaxImprovement
		obj.techs[Rules.Tech.PIRSMCOLONYMOD] = Rules.techMaxImprovement
		obj.techs[Rules.Tech.PIRATEFTLENG] = Rules.techMaxImprovement
		obj.techs[Rules.Tech.PIRCOLONYMOD] = Rules.techMaxImprovement
		# grant all TL1 ship techs except for colony module(s)
		for techID in Rules.techs:
			tech = Rules.techs[techID]
			if tech.level == 1 and (tech.isShipEquip or tech.isShipHull) and not tech.unpackStruct:
				obj.techs[techID] = Rules.techMaxImprovement
		# convert enslavedPop
		if hasattr(obj, "enslavedPop"):
			obj.pirateFame = int(obj.enslavedPop * 0.0005)
			log.debug(obj.oid, "New pirate fame is", obj.pirateFame, obj.enslavedPop)
			del obj.enslavedPop
开发者ID:mozts2005,项目名称:OuterSpace,代码行数:27,代码来源:IPiratePlayer.py

示例2: update

# 需要导入模块: from IPlayer import IPlayer [as 别名]
# 或者: from IPlayer.IPlayer import update [as 别名]
	def update(self, tran, obj):
		obj.techLevel = 99
		obj.race = "m"
#		# grant technologies
#		obj.techs[Rules.Tech.EMCANNON] = Rules.techMaxImprovement
#		obj.techs[Rules.Tech.SSROCKET] = Rules.techMaxImprovement
#		obj.techs[Rules.Tech.TORPEDO] = Rules.techMaxImprovement
#		obj.techs[Rules.Tech.FTLENG1] = 3
#		obj.techs[Rules.Tech.SMALLHULL1] = 3
#		obj.techs[Rules.Tech.SCOCKPIT1] = 3
#		obj.techs[Rules.Tech.SCANNERMOD1] = 3
#		obj.techs[Rules.Tech.CONBOMB1] = 3
#		obj.techs[Rules.Tech.MUTANTBASE] = 3
#		obj.techs[Rules.Tech.MUTANTBASE2] = 3
#		obj.techs[Rules.Tech.MUTANTBASE3] = 3
#		obj.techs[Rules.Tech.MUTANTBASE4] = 3
#		obj.techs[Rules.Tech.MUTANTPP1] = 3
#		obj.techs[Rules.Tech.MUTANTPP2] = 3
#		obj.techs[Rules.Tech.MUTANTFACT1] = 3
#		obj.techs[Rules.Tech.MUTANTFACT2] = 3
#		obj.techs[Rules.Tech.MUTANTMINES] = 3
#		# create two basic designs [they use modules not available to the
#		# player otherwise so it has to be done this way]
#		obj.shipDesigns[1] = ShipUtils.makeShipMinSpec(obj, 'Swarmer', Rules.Tech.SMALLHULL1,
#				{Rules.Tech.SCOCKPIT1:1, Rules.Tech.EMCANNON:2, Rules.Tech.FTLENG1:2}, [])
#		obj.shipDesigns[2] = ShipUtils.makeShipMinSpec(obj, 'Seeder', Rules.Tech.MEDIUMHULL2,
#				{Rules.Tech.SCOCKPIT1:1, Rules.Tech.MUTANTPOD:1, Rules.Tech.FTLENG1:4}, [])
#		obj.shipDesigns[3] = ShipUtils.makeShipMinSpec(obj, 'Seeker', Rules.Tech.SMALLHULL1,
#				{Rules.Tech.SCOCKPIT1:1, Rules.Tech.SCANNERMOD1:1, Rules.Tech.FTLENG1:2}, [])
#		obj.shipDesigns[4] = ShipUtils.makeShipMinSpec(obj, 'Sower', Rules.Tech.SMALLHULL1,
#				{Rules.Tech.SCOCKPIT1:1, Rules.Tech.CONBOMB1:1, Rules.Tech.FTLENG1:2}, [])
		# call super method
		IPlayer.update(self, tran, obj)
开发者ID:Lukc,项目名称:ospace-lukc,代码行数:35,代码来源:IAIMutantPlayer.py

示例3: update

# 需要导入模块: from IPlayer import IPlayer [as 别名]
# 或者: from IPlayer.IPlayer import update [as 别名]
	def update(self, tran, obj):
		# TODO: remove in 0.5.59
		if not hasattr(self, "techs"):
			self.techs = {}

		obj.techLevel = 99
		obj.race = "p"
		# call super method
		IPlayer.update(self, tran, obj)
		#
		obj.techLevel = 99
开发者ID:Lukc,项目名称:ospace-lukc,代码行数:13,代码来源:IAIPiratePlayer.py

示例4: update

# 需要导入模块: from IPlayer import IPlayer [as 别名]
# 或者: from IPlayer.IPlayer import update [as 别名]
	def update(self, tran, obj):
		obj.techLevel = 3
		# grant technologies
		obj.techs[Rules.Tech.LASCANNONTUR3] = Rules.techMaxImprovement
		obj.techs[Rules.Tech.SSROCKET2] = Rules.techMaxImprovement
		obj.techs[Rules.Tech.TORPEDO] = Rules.techMaxImprovement
		# call super method
		IPlayer.update(self, tran, obj)
		#add TL99 techs
		obj.techLevel = 99
		obj.techs[Rules.Tech.EDENCANNON] = Rules.techMaxImprovement
		obj.techs[Rules.Tech.EDENMISSILE] = Rules.techMaxImprovement
		obj.techs[Rules.Tech.EDENTORP] = Rules.techMaxImprovement
		obj.techs[Rules.Tech.EDENBOMB] = Rules.techMaxImprovement
		obj.techs[Rules.Tech.EDENSTATION] = Rules.techMaxImprovement
开发者ID:OuterDeepSpace,项目名称:OuterDeepSpace,代码行数:17,代码来源:IAIEDENPlayer.py

示例5: update

# 需要导入模块: from IPlayer import IPlayer [as 别名]
# 或者: from IPlayer.IPlayer import update [as 别名]
 def update(self, tran, obj):
     obj.techLevel = 99
     obj.race = "p"
     # call super method
     IPlayer.update(self, tran, obj)
     #
     obj.techLevel = 99
     # grant technologies
     obj.techs[Rules.Tech.EMCANNONTUR] = Rules.techMaxImprovement
     obj.techs[Rules.Tech.SSROCKET2] = Rules.techMaxImprovement
     obj.techs[Rules.Tech.TORPEDO] = Rules.techMaxImprovement
     # grant special technologies
     obj.techs[Rules.Tech.PIRATEBASE] = Rules.techMaxImprovement
     obj.techs[Rules.Tech.PIRATEDEN] = Rules.techMaxImprovement
     obj.techs[Rules.Tech.PIRATESD] = Rules.techMaxImprovement
     obj.techs[Rules.Tech.PIRATEBREWERY] = Rules.techMaxImprovement
     obj.techs[Rules.Tech.PIRATEPRISON] = Rules.techMaxImprovement
     obj.techs[Rules.Tech.PIRSMCOLONYMOD] = Rules.techMaxImprovement
     obj.techs[Rules.Tech.PIRATEFTLENG] = Rules.techMaxImprovement
     obj.techs[Rules.Tech.PIRCOLONYMOD] = Rules.techMaxImprovement
开发者ID:ospaceteam,项目名称:outerspace,代码行数:22,代码来源:IAIPiratePlayer.py

示例6: update

# 需要导入模块: from IPlayer import IPlayer [as 别名]
# 或者: from IPlayer.IPlayer import update [as 别名]
	def update(self, tran, obj):
		obj.techLevel = 99
		obj.race = "r"
		# grant technologies
#		obj.techs[Rules.Tech.CANNON1] = 3
#		obj.techs[Rules.Tech.SSROCKET] = 3
#		obj.techs[Rules.Tech.RENEGADEBASE] = 3
#		obj.techs[Rules.Tech.RENEGADEBASE2] = 3
#		obj.techs[Rules.Tech.RENEGADEBASE2MINOR] = 3
#		obj.techs[Rules.Tech.RENEGADEBASE3] = 3
#		obj.techs[Rules.Tech.RENEGADEBASE3MINOR] = 3
#		obj.techs[Rules.Tech.RENEGADECOSMODROME] = 3
#		if not len(obj.shipDesigns) == 3:
#			# three basic designs [they use modules not available to the player otherwise
#			# so it has to be done this way]
#			obj.shipDesigns[1] = ShipUtils.makeShipMinSpec(obj, 'Fighter', Rules.Tech.SMALLHULL1,
#				{Rules.Tech.SCOCKPIT1:1, Rules.Tech.CANNON1:1}, [])
#			obj.shipDesigns[2] = ShipUtils.makeShipMinSpec(obj, 'Corvette', Rules.Tech.SMALLHULL1,
#				{Rules.Tech.SCOCKPIT1:1, Rules.Tech.CANNON1:2, Rules.Tech.STEELARM2:1}, [])
#			obj.shipDesigns[3] = ShipUtils.makeShipMinSpec(obj, 'Frigate', Rules.Tech.MEDIUMHULL2,
#				{Rules.Tech.SBRIDGE1:1, Rules.Tech.CANNON1:2, Rules.Tech.SSROCKET:2}, [])
		# call super method
		IPlayer.update(self, tran, obj)
开发者ID:Lukc,项目名称:ospace-lukc,代码行数:25,代码来源:IAIRenegadePlayer.py

示例7: update

# 需要导入模块: from IPlayer import IPlayer [as 别名]
# 或者: from IPlayer.IPlayer import update [as 别名]
 def update(self, tran, obj):
     # TODO: remove in 0.5.59
     if not hasattr(self, "techs"):
         self.techs = {}
     
     obj.techLevel = 99
     # call super method
     IPlayer.update(self, tran, obj)
     #
     obj.techLevel = 99
     # grant technologies
     obj.techs[Rules.Tech.EMCANNONTUR] = Rules.techMaxImprovement
     obj.techs[Rules.Tech.SSROCKET2] = Rules.techMaxImprovement
     obj.techs[Rules.Tech.TORPEDO] = Rules.techMaxImprovement
     # grant special technologies
     obj.techs[Rules.Tech.PIRATEBASE] = Rules.techMaxImprovement
     obj.techs[Rules.Tech.PIRATEDEN] = Rules.techMaxImprovement
     obj.techs[Rules.Tech.PIRATESD] = Rules.techMaxImprovement
     obj.techs[Rules.Tech.PIRATEBREWERY] = Rules.techMaxImprovement
     obj.techs[Rules.Tech.PIRATEPRISON] = Rules.techMaxImprovement
     obj.techs[Rules.Tech.PIRATEPRISON] = Rules.techMaxImprovement
     obj.techs[Rules.Tech.PIRSMCOLONYMOD] = Rules.techMaxImprovement
     obj.techs[Rules.Tech.PIRATEFTLENG] = Rules.techMaxImprovement
     obj.techs[Rules.Tech.PIRCOLONYMOD] = Rules.techMaxImprovement
开发者ID:mozts2005,项目名称:OuterSpace,代码行数:26,代码来源:IAIPiratePlayer.py

示例8: update

# 需要导入模块: from IPlayer import IPlayer [as 别名]
# 或者: from IPlayer.IPlayer import update [as 别名]
 def update(self, tran, obj):
     self.setStartingTechnologies(obj)
     self.setStartingShipDesigns(obj)
     IPlayer.update(self, tran, obj)
开发者ID:ospaceteam,项目名称:outerspace,代码行数:6,代码来源:IAIEDENPlayer.py

示例9: update

# 需要导入模块: from IPlayer import IPlayer [as 别名]
# 或者: from IPlayer.IPlayer import update [as 别名]
	def update(self, tran, obj):
		obj.techLevel = 2
		# grant technologies
		obj.techs[Rules.Tech.EMCANNON] = Rules.techMaxImprovement
		# call super method
		IPlayer.update(self, tran, obj)
开发者ID:mozts2005,项目名称:OuterSpace,代码行数:8,代码来源:IAIMutantPlayer.py

示例10: update

# 需要导入模块: from IPlayer import IPlayer [as 别名]
# 或者: from IPlayer.IPlayer import update [as 别名]
 def update(self, tran, obj):
     # call super method
     IPlayer.update(self, tran, obj)
开发者ID:ospaceteam,项目名称:outerspace,代码行数:5,代码来源:IPiratePlayer.py


注:本文中的IPlayer.IPlayer.update方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。