Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Dragon Realm
- import random
- import time
- def displayIntro():
- print('You are in a land full of dragons. In front of you,')
- print('you see two caves. In one cave, the dragon is friendly')
- print('and will share his treasure with you. The other dragon')
- print('is greedy and hungry, and will eat you on sight.')
- print()
- def chooseCave():
- cave = ''
- while cave != '1' and cave != '2':
- print('Which Cave will you go into? (1 or 2)')
- cave = input()
- return cave
- def checkCave (chosenCave):
- print('let us see what you got')
- time.sleep(1)
- print('Oooh spookey')
- time.sleep(1)
- print('A large dragon jumps out of nowhere...')
- print()
- time.sleep(1)
- friendlyCave = random.randint(1, 2)
- if chosenCave == str(friendlyCave):
- print('wohooo! You got the treasure and a huge cock in bonus!')
- return 0
- else:
- print("he want's to kill you!.")
- print('Do you want to draw your sword? yes or no?')
- return 1
- def chooseSword():
- Sword = ''
- while Sword != 'y' and Sword != 'yes' and Sword != 'n' and Sword != 'no':
- Sword = input()
- return Sword
- def checkSword (chooseSword):
- if chooseSword == 'yes' or chooseSword == 'y':
- print('You will now try to kill the dragon')
- else:
- print('Run and hide!')
- PlayAgain = 'yes'
- while PlayAgain == 'yes' or PlayAgain == 'y':
- displayIntro()
- caveNumber = chooseCave()
- if checkCave(caveNumber) == 1:
- swordLetter = chooseSword()
- checkSword(swordLetter)
- print('do you want to play again? (yes or no)')
- PlayAgain = input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement