gammatools/app/functions/build_character_sheet.py

37 lines
1.3 KiB
Python
Raw Permalink Normal View History

from app.functions.roll_dices import roll_dices
from app.functions.roll_ability_scores import roll_ability_scores
from app.functions.roll_cybermods import roll_cybermods
from app.functions.roll_mutations import roll_mutations
from app.functions.roll_hp import roll_hp
from app.functions.generate_profile import generate_profile
from app.functions.roll_mutant_animal import roll_mutant_animal
def build_character_sheet(chartype):
character_sheet = dict()
character_sheet['profile'] = generate_profile(chartype)
if chartype == 'mutant':
character_sheet['animal-stock'] = (roll_mutant_animal())
ability_scores = roll_ability_scores(chartype)
character_sheet['abilities'] = ability_scores
character_sheet['hp'] = roll_hp(chartype, ability_scores['constitution'])
character_sheet['gold'] = roll_dices(4, 4, False).get('result') * 10
character_sheet['domar'] = roll_dices(2, 4, False).get('result') * 5
if chartype == 'humanoid' or chartype == 'mutant':
character_sheet['mutations'] = (
roll_mutations(ability_scores['constitution'], ability_scores['intelligence'])
)
if chartype == 'cyborg':
character_sheet['cybermods'] = (
roll_cybermods()
)
return character_sheet