本文整理汇总了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
示例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)
示例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
示例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
示例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
示例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)
示例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
示例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)
示例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)
示例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)