本文整理汇总了Python中Zone.Zone.maxMonsters方法的典型用法代码示例。如果您正苦于以下问题:Python Zone.maxMonsters方法的具体用法?Python Zone.maxMonsters怎么用?Python Zone.maxMonsters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zone.Zone
的用法示例。
在下文中一共展示了Zone.maxMonsters方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_load_zone_from_pk
# 需要导入模块: from Zone import Zone [as 别名]
# 或者: from Zone.Zone import maxMonsters [as 别名]
def test_load_zone_from_pk(self):
pk = dbHelp.create_test_hero_using_test_values()
z1 = Zone("gas")
z1.maxMonsters = 10
z1.lvl = 10
z1.save_changes(pk)
z2 = Zone.construct_model_from_pk(z1.get_pk())
self.assertEqual(z1.get_description(),z2.get_description())
self.assertEqual(z1.get_fullName(),z2.get_fullName())
self.assertEqual(z1.maxMonsters,z2.maxMonsters)
self.assertEqual(z1.lvl,z2.lvl)
示例2: test_zone_properties_default
# 需要导入模块: from Zone import Zone [as 别名]
# 或者: from Zone.Zone import maxMonsters [as 别名]
def test_zone_properties_default(self):
testZoneKey = ZoneDefinitionFields.EMPTY_SPACE
z = Zone(testZoneKey)
z.suffix = "Alpha"
z.monstersKilled = 5
z.maxMonsters = 10
z.lvl = 4
pZPk = dbHelp.create_test_zone_obj(ZoneDefinitionFields.HOME).get_pk()
z.previousZoneReferencePK = pZPk
z.nextZoneReferenceList = [dbHelp.create_test_zone_dict(ZoneDefinitionFields.ASTEROID_FIELD),
dbHelp.create_test_zone_dict(ZoneDefinitionFields.GAS),
dbHelp.create_test_zone_dict(ZoneDefinitionFields.NEBULA)]
self.assertEqual(z.definitionKey, testZoneKey)
self.assertEqual(z.get_fullName(), ZoneDefinition.get_name_for_key(testZoneKey) + " Alpha")
self.assertEqual(z.suffix,"Alpha")
self.assertEqual(z.monstersKilled, 5)
self.assertEqual(z.maxMonsters,10)
self.assertEqual(z.lvl, 4)
self.assertEqual(z.get_description(),ZoneDefinition.get_description_for_key(testZoneKey))
self.assertEqual(z.previousZoneReferencePK,pZPk)
self.assertListEqual(z.nextZoneReferenceList,[dbHelp.create_test_zone_dict(ZoneDefinitionFields.ASTEROID_FIELD),
dbHelp.create_test_zone_dict(ZoneDefinitionFields.GAS),
dbHelp.create_test_zone_dict(ZoneDefinitionFields.NEBULA)])