gammatools/app/functions/generate_profile.py

33 lines
735 B
Python
Raw Normal View History

import random
from app.functions.get_character_age import get_age
def get_sex():
return random.choice(['male', 'female'])
def get_hair():
return random.choice(['black', 'brown', 'auburn', 'blonde', 'copper', 'brass', 'blue', 'bald'])
def get_eyes():
return random.choice(['blue', 'brown', 'green', 'hazel', 'gray'])
def get_skin_tone():
return random.choice(['dark', 'olive', 'medium', 'light', 'pale'])
def generate_profile(chartype):
profile = {
'name': "Anon",
'sex': get_sex(),
'age': get_age(chartype)
}
if chartype == 'human':
profile['hair'] = get_hair()
profile['eyes'] = get_eyes()
profile['skintone'] = get_skin_tone()
return profile