Advertisement
Kalidor_Vorlich

Untitled

Apr 10th, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.14 KB | None | 0 0
  1. #IMPORTS
  2. import random
  3.  
  4. #DIE MODULES
  5. def dice():
  6.     d6 = number = random.randint(1,6)
  7.     return d6
  8.  
  9.  
  10. #CHARACTER CREATION
  11. def nameselection():
  12.     print('What is your name adventurer?')
  13.     name = input('>.')
  14.     return name
  15.  
  16. skill = dice() + 6
  17. stamina = dice() + dice() +12
  18. luck = dice() + 6
  19.  
  20.  
  21. class Player:
  22.     def __init__(self,name,gold,inventory,skill,stamina,luck):
  23.         self.name = name
  24.         self.gold = gold
  25.         self.inventory = inventory
  26.         self.skill = skill
  27.         self.stamina = stamina
  28.         self.luck = luck
  29.  
  30. class Enemy:
  31.     def __init__(self,enemy_name,enemy_skill,enemy_stamina):
  32.         self.enemy_name = enemy_name
  33.         self.enemy_skill = enemy_skill
  34.         self.enemy_stamina = enemy_stamina
  35.  
  36.  
  37.  
  38. player = Player(nameselection(),5,{'Swords': ['rusty Sword', 'Steel Sword'],'Potions': ['Blue Potion', 'Red Potion']},skill,stamina,luck)
  39.  
  40. #COMBAT
  41. def combat(enemy):
  42.     print('Combat Begins')
  43.     attack = dice() + dice() + skill
  44.     enemy_attack = dice() + dice() + enemy_skill
  45.     print(attack)
  46.     print(enemy_attack)
  47.  
  48. #ROOMS
  49. def intro():
  50.     print("intro text")
  51.     print(player.inventory['Swords'])
  52.     room1()
  53.  
  54. def room1():
  55.     print("Now in room 1")
  56.     enemy = Enemy('Goblin',8,6)
  57.     #combat(enemy)
  58.  
  59. #MENU
  60. def menu():
  61.     print('###########################################################################')
  62.     print('###########################################################################')
  63.     print('###########################################################################')
  64.     print('### Name:\t',player.name,'\t\t\t\t\t\t###' )
  65.     print('### Skill:\t',player.skill,'\t\t\t\t\t\t\t###')
  66.     print('### Stamina:\t',player.stamina,'\t\t\t\t\t\t\t###')
  67.     print('### Gold:\t',player.gold,'\t\t\t\t\t\t\t###')
  68.     print('### Inventory:\t',player.inventory,'\t\t\t\t\t\t\t###')
  69.     print('###########################################################################')
  70.     print('###########################################################################')
  71.     print('###########################################################################')
  72.  
  73. intro()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement