Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #IMPORTS
- import random
- #DIE MODULES
- def dice():
- d6 = number = random.randint(1,6)
- return d6
- #CHARACTER CREATION
- def nameselection():
- print('What is your name adventurer?')
- name = input('>.')
- return name
- skill = dice() + 6
- stamina = dice() + dice() +12
- luck = dice() + 6
- class Player:
- def __init__(self,name,gold,inventory,skill,stamina,luck):
- self.name = name
- self.gold = gold
- self.inventory = inventory
- self.skill = skill
- self.stamina = stamina
- self.luck = luck
- class Enemy:
- def __init__(self,enemy_name,enemy_skill,enemy_stamina):
- self.enemy_name = enemy_name
- self.enemy_skill = enemy_skill
- self.enemy_stamina = enemy_stamina
- player = Player(nameselection(),5,{'Swords': ['rusty Sword', 'Steel Sword'],'Potions': ['Blue Potion', 'Red Potion']},skill,stamina,luck)
- #COMBAT
- def combat(enemy):
- print('Combat Begins')
- attack = dice() + dice() + skill
- enemy_attack = dice() + dice() + enemy_skill
- print(attack)
- print(enemy_attack)
- #ROOMS
- def intro():
- print("intro text")
- print(player.inventory['Swords'])
- room1()
- def room1():
- print("Now in room 1")
- enemy = Enemy('Goblin',8,6)
- #combat(enemy)
- #MENU
- def menu():
- print('###########################################################################')
- print('###########################################################################')
- print('###########################################################################')
- print('### Name:\t',player.name,'\t\t\t\t\t\t###' )
- print('### Skill:\t',player.skill,'\t\t\t\t\t\t\t###')
- print('### Stamina:\t',player.stamina,'\t\t\t\t\t\t\t###')
- print('### Gold:\t',player.gold,'\t\t\t\t\t\t\t###')
- print('### Inventory:\t',player.inventory,'\t\t\t\t\t\t\t###')
- print('###########################################################################')
- print('###########################################################################')
- print('###########################################################################')
- intro()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement