本文整理汇总了Python中Character.Character.service方法的典型用法代码示例。如果您正苦于以下问题:Python Character.service方法的具体用法?Python Character.service怎么用?Python Character.service使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Character.Character
的用法示例。
在下文中一共展示了Character.service方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: choice
# 需要导入模块: from Character import Character [as 别名]
# 或者: from Character.Character import service [as 别名]
if skillslist != 'advanced_education_2':
eligibile_skills.append(skillslist)
if is_adv is True:
eligibile_skills.append('advanced_education_2')
return choice(eligibile_skills)
def __new_skill(self, character, skill_type):
service = self.__services[character.service]
"""picks a new skill from a defined target"""
available_skills = service['aquired_skills'][skill_type].copy()
skill = available_skills.popitem()
return skill[1]
def update_muster(self,character):
if(character.ranklevel <= 2):
character.musterdata['rolls'] += 1
elif(character.ranklevel == 3 or character.ranklevel == 4):
character.musterdata['rolls'] += 2
elif(character.ranklevel == 5 or character.ranklevel == 6):
character.musterdata['rolls'] += 3
return ['Character muster roll updated']
if __name__ == '__main__':
from Character import Character
p = Promotor()
c = Character()
c.service = 'Army'
outcome = p.promote_character(c, [])
for item in outcome:
print(item)