예제 #1
0
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])
예제 #2
0
def generate_birthplace():
    return roll_event(100, birthplaces)
예제 #3
0
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)
예제 #4
0
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)
예제 #5
0
def generate_childhood_socioeconomic_status():
    return roll_event(18, family_lifestyle, low=3)
예제 #6
0
def generate_reason_for_parent_absense():
    return roll_event(4, reason_absent)
예제 #7
0
def generate_who_raised():
    return roll_event(100, family)
예제 #8
0
def generate_number_siblings():
    return roll_event(10, number_siblings)