def generate_parents(race): mother = None father = None parents_names = [None, None] result = roll_event(100, parents) if "don't" in result: return result if 'half' in race: human_parent = random.choice([0, 1]) parents_names[human_parent] = generate_name('human', human_parent) if 'orc' in race: parents_names[not human_parent] = generate_name( 'orc', not human_parent) elif 'dwarf' in race: parents_names[not human_parent] = generate_name( 'dwarf', not human_parent) else: raise RaceNotSupportedException(race) else: for ii in range(2): parents_names[ii] = generate_name(race, ii) return ("Knew parents, they were " + parents_names[0] + " and " + parents_names[1])
def generate_birthplace(): return roll_event(100, birthplaces)
def generate_childhood_memories(modifier=None): if modifier == None: return roll_event(200, childhood_memories, low=-100) return roll_event(100, childhood_memories, modifier=modifier)
def generate_childhood_home(modifier=None): if modifier == None: return roll_event(200, childhood_home, low=-100) return roll_event(100, childhood_home, modifier=modifier)
def generate_childhood_socioeconomic_status(): return roll_event(18, family_lifestyle, low=3)
def generate_reason_for_parent_absense(): return roll_event(4, reason_absent)
def generate_who_raised(): return roll_event(100, family)
def generate_number_siblings(): return roll_event(10, number_siblings)