本文整理汇总了Python中actor.Actor.points["Skills"]["Brawling"]方法的典型用法代码示例。如果您正苦于以下问题:Python Actor.points["Skills"]["Brawling"]方法的具体用法?Python Actor.points["Skills"]["Brawling"]怎么用?Python Actor.points["Skills"]["Brawling"]使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类actor.Actor
的用法示例。
在下文中一共展示了Actor.points["Skills"]["Brawling"]方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Actor
# 需要导入模块: from actor import Actor [as 别名]
# 或者: from actor.Actor import points["Skills"]["Brawling"] [as 别名]
"defaults" : [],
},
# End skill dictionary
}
# Skill test code.
if __name__ == "__main__":
# Import necessary classes.
from actor import Actor
from dice import *
# Generate a dummy actor
actor = Actor()
# Put points in a few skills
actor.points["Skills"]["Brawling"] = r3d6()
actor.points["Skills"]["Judo"] = max(r3d6() - _3d6(), 1)
# Calculate skills
calculate_ranks(actor)
calculate_skills(actor)
calculate_defaults(actor)
# Print out a character sheet:
print "==ATTRIBUTES=="
for stat, points in actor.attributes.items():
print "%s: %s" % (stat, points)
print "==POINTS=="
for skill, points in actor.points["Skills"].items():
print "%s: %s points" % (skill, points)
print "==RANKS=="