SHARE
TWEET

Untitled

a guest Aug 19th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #SHIT TO DO
  2. #Create objects: units and classes, items
  3. #Create function for  spawning items
  4. #Way to pick up items
  5. #Game timer for cooldowns
  6. #World creation
  7. #AI
  8.  
  9. class world:
  10.     def __init__(self, size):
  11.         self.size = size
  12.  
  13. class items:
  14.    
  15.     def __init__(self, objectState = 'item', name, itemType):
  16.        
  17.         self.name = name
  18.         self.itemType = itemType
  19.        
  20. class consumables(items):
  21.    
  22.     def __init__(self):
  23.         pass
  24.  
  25. class equipables(items):
  26.    
  27.     def __init__(self):
  28.         pass
  29.        
  30. class basic:
  31.    
  32.     #Every unit should have basic attributes that are shared among all
  33.     def __init__(self, objectState = 'player', name, hp, sp, atk = 15, defense = 7, speed = 10, inventory = [], equips = [], healthCooldown = False, manaCooldown = False):
  34.        
  35.         self.name = name
  36.         self.hp = hp
  37.         self.sp = sp
  38.         self.atk = atk
  39.         self.defense = defense
  40.         self.inventory = inventory
  41.         self.equips = equips
  42.         self.healthCooldown = healthCooldown
  43.         self.manaCooldown = manaCooldown
  44.        
  45.     def attack(self, enemy):
  46.         #Basic formula when a unit attacks another unit
  47.         enemy.hp = enemy.hp - (enemy.defense - self.attack)
  48.    
  49.     def heal(self):
  50.        
  51.         #When a unit wants to recover health... it will add HP and subtract from inventory
  52.         self.hp += self.inventory[potions.hp]
  53.         #Cool down *Need to figure out how to make a game timer*
  54.         self.healthCooldown = True
  55.        
  56.     def manaPot(self):
  57.        
  58.         #When a unit wants to recover mana... it will add SP and subtract from inventory
  59.         self.sp += self.inventory[potions.sp]
  60.         #Cool down *Need to figure out how to make a game timer*
  61.         self.manaCooldown = True
  62.        
  63. class warrior(basic):
  64.    
  65.     def __init__(self):
  66.         pass
  67.  
  68. class mage(basic):
  69.    
  70.     def __init__(self):
  71.         pass
  72.        
  73. class assassin(basic):
  74.    
  75.     def __init__(self):
  76.         pass
  77.        
  78. class tank(basic):
  79.    
  80.     def __init__(self):
  81.         pass
  82.        
  83. class healer(basic):
  84.    
  85.     def __init__(self):
  86.         pass
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top