Advertisement
miksar

LAM-40 Alpha character.py

Aug 6th, 2015
3,557
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.67 KB | None | 0 0
  1. '''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 [E]ntreat \
  8.        [F]latter [H]ug [I]gnore [J]oke [K]iss [L]augh \
  9.        [M]ock [P]ress [S]hame [T]hreaten [Y]ell \
  10.        [W]ait [Q]uit'.split()  # splits the string into a list of actions
  11.  
  12.     def probability_is_high(self):
  13.         '''The probability of a successful action is relatively high.'''
  14.         self.multiplier = 2  # multiplied by this when odds are increased
  15.         self.divisor = 1.5  # divided by this when odds are decreased
  16.  
  17.     def probability_is_low(self):
  18.         '''The probability of a successful action is relatively low.'''
  19.         self.multiplier = 1.5
  20.         self.divisor = 2
  21.  
  22.     def desc_rank_desc_mood(self):
  23.         '''The lower the rank and the mood, the higher the odds.'''
  24.         self.asc_rank = False  # the lower the rank the higher the odds
  25.         self.asc_mood = False  # the lower the mood the higher the odds
  26.  
  27.     def desc_rank_asc_mood(self):
  28.         '''The lower the rank and the higher the mood, the higher the odds.'''
  29.         self.asc_rank = False
  30.         self.asc_mood = True  # the higher the mood the higher the odds
  31.  
  32.     def asc_rank_desc_mood(self):
  33.         '''The higher the rank and the lower the mood, the higher the odds.'''
  34.         self.asc_rank = True  # the higher the rank the higher the odds
  35.         self.asc_mood = False
  36.  
  37.     def asc_rank_asc_mood(self):
  38.         '''The higher the rank and the mood, the higher the odds.'''
  39.         self.asc_rank = True
  40.         self.asc_mood = True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement