Advertisement
Kovitikus

Untitled

Jul 31st, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.07 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 figures in self.attributes.get('figure'):
  29.             figure.append(figures)
  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 = self.db.facial
  36.         gender = self.db.figure.get('gender')
  37.         gender = ("He" if gender == 'male' else "She")
  38.         full_facial = f"{gender} has {facial.get('eye_color')} eyes set above a {facial.get('nose')} nose, {facial.get('lips')} lips and a {facial.get('chin')} chin in a {facial.get('face_shape')} {facial.get('face_color')} face."
  39.         return full_facial
  40.  
  41.     def create_hair(self):
  42.         # The hair should result in "<gender> has <length> <texture> <color> hair <style>."
  43.         hair = self.db.hair
  44.         gender = self.db.figure.get('gender')
  45.         gender = ("He" if gender == 'male' else "She")
  46.         full_hair = f"{gender} has {hair.get('length')} {hair.get('texture')} {hair.get('color')} hair {hair.get('style')}."
  47.         return full_hair
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement