本文整理汇总了Python中monster.Monster.from_monster_name方法的典型用法代码示例。如果您正苦于以下问题:Python Monster.from_monster_name方法的具体用法?Python Monster.from_monster_name怎么用?Python Monster.from_monster_name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类monster.Monster
的用法示例。
在下文中一共展示了Monster.from_monster_name方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: normalize_ac
# 需要导入模块: from monster import Monster [as 别名]
# 或者: from monster.Monster import from_monster_name [as 别名]
def normalize_ac(creature):
creature.armor_class.misc.add_circumstance(
get_generic_ac_calc()[creature.level-1] - creature.armor_class.normal())
if __name__ == "__main__":
args = initialize_argument_parser()
if args['function'] == CHARACTER:
creature = Creature.from_creature_name(args['creature_input'],
args['level'])
print creature
if args['output'] is not None:
latex_string = creature.to_latex()
output_file = open(args['output'], 'w')
output_file.write(latex_string)
elif args['function'] == MONSTER:
creature = Monster.from_monster_name(args['creature_input'],
args['level'])
print creature.to_latex()
if args['output'] is not None:
latex_string = creature.to_latex()
output_file = open(args['output'], 'w')
output_file.write(latex_string)
elif args['function'] == COMBAT:
for i in xrange(20):
"""
barbarian = Character.from_creature_name('brb-heavy', i+1)
other_barbarian = Character.from_creature_name('brb-heavy', i+1)
cleric = Character.from_creature_name('cleric-warrior', i+1)
fighter_heavy = Character.from_creature_name('ftr-heavy', i+1)
npc = Character.from_creature_name('npc', i+1)
npc2 = Character.from_creature_name('npc', i+1)
rogue = Character.from_creature_name('rogue-single', i+1)