def new(): properties = {} properties["name"] = input("Please input your adventurer's name:") print("Select your race") properties["race"] = tools.show_picker( ["Human", "Elf", "Dwarf", "Princess", "Magician", "Peon"] ) print("Select your gender") properties["gender"] = tools.show_picker(["Male", "Female", "Other"]) print() print("Rolling ability scores") wait.quick_spin() print() properties["strength"] = random.randint(3, 18) properties["dexterity"] = random.randint(3, 18) properties["constitution"] = random.randint(3, 18) properties["hitpoints"] = random.randint(3, 18) properties["inventory"] = ["5 coins", "1 sword", "3 health potions"] properties["experience"] = 0 properties["level"] = 0 return character.Character(properties)
def meet(self): print(self.greeting) answer = tools.show_picker(['YES', 'NO']) if answer == 'YES': print('Wonderful!') else: print('whatevs.')
def meet(self): print(self.greeting) answer = tools.show_picker(["YES", "NO"]) if answer == "YES": print("Wonderful!") else: print("whatevs.")
def new(): properties = {} properties["name"] = input("Please input your adventurer's name:") print('Select your race') properties['race'] = tools.show_picker(['Human', 'Elf', 'Dwarf']) print('Select your gender') properties['gender'] = tools.show_picker(['Male', 'Female', 'Other']) print() print("Rolling ability scores") # "\r" takes the cursor to the beginning of the line wait.quick_spin() print() properties["strength"] = random.randint(3, 18) properties["dexterity"] = random.randint(3, 18) properties["constitution"] = random.randint(3, 18) properties["hitpoints"] = 10 return character.Character(properties)
def ask_for_selection(): return tools.show_picker(menu)