Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. '''character.py: This class describes the main character of the game.'''
  2.  
  3.  
  4. class Character:
  5.     '''The main character of the game, i.e. the player.'''
  6.     def __init__(self):
  7.         self.actions = ['[A]sk', '[B]ribe', '[C]omplain', '[D]eceive',
  8.                         '[E]ntreat', '[F]latter', '[H]ug', '[I]gnore',
  9.                         '[J]oke', '[K]iss', '[L]augh', '[M]ock',
  10.                         '[P]ress', '[S]hame', '[T]hreaten', '[Y]ell',
  11.                         '[W]ait', '[Q]uit']
  12.  
  13.     def probability_is_high(self):
  14.         '''The probability of a successful action is relatively high.'''
  15.         self.multiplier = 2  # multiplied by this when odds are increased
  16.         self.divisor = 1.5  # divided by this when odds are decreased
  17.  
  18.     def probability_is_low(self):
  19.         '''The probability of a successful action is relatively low.'''
  20.         self.multiplier = 1.5
  21.         self.divisor = 2
  22.  
  23.     def desc_rank_desc_mood(self):
  24.         '''The lower the rank and the mood, the higher the odds.'''
  25.         self.asc_rank = False  # the lower the rank the higher the odds
  26.         self.asc_mood = False  # the lower the mood the higher the odds
  27.  
  28.     def desc_rank_asc_mood(self):
  29.         '''The lower the rank and the higher the mood, the higher the odds.'''
  30.         self.asc_rank = False
  31.         self.asc_mood = True  # the higher the mood the higher the odds
  32.  
  33.     def asc_rank_desc_mood(self):
  34.         '''The higher the rank and the lower the mood, the higher the odds.'''
  35.         self.asc_rank = True  # the higher the rank the higher the odds
  36.         self.asc_mood = False
  37.  
  38.     def asc_rank_asc_mood(self):
  39.         '''The higher the rank and the mood, the higher the odds.'''
  40.         self.asc_rank = True
  41.         self.asc_mood = True