Advertisement
Kovitikus

Temp Char Appearance Generation

Aug 1st, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.06 KB | None | 0 0
  1. class Player_Character(DefaultCharacter):
  2.     def at_object_creation(self):
  3.         # Figure Attributes
  4.         self.db.figure = {}
  5.         self.db.figure['height'] = 'short'
  6.         self.db.figure['build'] = 'burly'
  7.         self.db.figure['gender'] = 'male'
  8.  
  9.         # Facial Attributes
  10.         self.db.facial = {}
  11.         self.db.facial['eye_color'] = 'blue'
  12.         self.db.facial['nose'] = 'thin'
  13.         self.db.facial['lips'] = 'thin'
  14.         self.db.facial['chin'] = 'pointed'
  15.         self.db.facial['face_shape'] = 'narrow'
  16.         self.db.facial['face_color'] = 'ivory'
  17.  
  18.         # Hair Attributes
  19.         self.db.hair = {}
  20.         self.db.hair['length'] = 'long'
  21.         self.db.hair['texture'] = 'bouncy'
  22.         self.db.hair['color'] = 'tawny'
  23.         self.db.hair['style'] = 'in a pony-tail'
  24.  
  25.     def create_figure(self):
  26.         # The figure should result in "You see a short burly man."
  27.         figure = []
  28.         for k, v in self.db.figure.items():
  29.             figure.append(v)
  30.         full_figure = f"You see a {figure[0]} {figure[1]} {figure[2]}."
  31.         return full_figure
  32.  
  33.     def create_facial(self):
  34.         # The facial should result in "He has <color> eyes set above an <shape> nose, <shape> lips and a <shape> chin in a <shape> <color> face."
  35.         facial = []
  36.         for k, v in self.db.facial.items():
  37.             facial.append(v)
  38.         gender = self.db.figure.get('gender')
  39.         gender = ("He" if gender == 'male' else "She")
  40.         full_facial = f"{gender} has {facial[0]} eyes set above a {facial[1]} nose, {facial[2]} lips and a {facial[3]} chin in a {facial[4]} {facial[5]} face."
  41.         return full_facial
  42.  
  43.     def create_hair(self):
  44.         # The hair should result in "<gender> has <length> <texture> <color> hair <style>."
  45.         hair = []
  46.         for k, v in self.db.hair.items():
  47.             hair.append(v)
  48.         gender = self.db.figure.get('gender')
  49.         gender = ("He" if gender == 'male' else "She")
  50.         full_hair = f"{gender} has {hair[0]} {hair[1]} {hair[2]} hair {hair[3]}."
  51.         return full_hair
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement