Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ASCII Text from http://patorjk.com/software/taag/#p=display&f=Doom&t=Type%20Something%20
- def Clear():
- for i in range(25):
- print("\n")
- def TitleText():
- print("""
- ______ _____ _
- | _ \ / __ \ |
- | | | |_ _ _ __ __ _ ___ ___ _ __ | / \/ | ___ __ _ _ __ ___ _ __
- | | | | | | | '_ \ / _` |/ _ \/ _ \| '_ \ | | | |/ _ \/ _` | '_ \ / _ \ '__|
- | |/ /| |_| | | | | (_| | __/ (_) | | | | | \__/\ | __/ (_| | | | | __/ |
- |___/ \__,_|_| |_|\__, |\___|\___/|_| |_| \____/_|\___|\__,_|_| |_|\___|_|
- __/ |
- |___/
- """)
- def FightText():
- print("""
- ______ _ _ _
- | ___(_) | | | |
- | |_ _ __ _| |__ | |_
- | _| | |/ _` | '_ \| __|
- | | | | (_| | | | | |_
- \_| |_|\__, |_| |_|\__|
- __/ |
- |___/
- """)
- def LevelUpText():
- print("""
- _ _ _ _
- | | | | | | | |
- | | _____ _____| | | | | |_ __
- | | / _ \ \ / / _ \ | | | | | '_ \
- | |___| __/\ V / __/ | | |_| | |_) |
- \_____/\___| \_/ \___|_| \___/| .__/
- | |
- |_|
- """)
- def HitText():
- print("""
- _ _ _ _
- | | | (_) |
- | |_| |_| |_
- | _ | | __|
- | | | | | |_
- \_| |_/_|\__|
- """)
- def VictoryText():
- print("""
- _ _ _ _
- | | | (_) | |
- | | | |_ ___| |_ ___ _ __ _ _
- | | | | |/ __| __/ _ \| '__| | | |
- \ \_/ / | (__| || (_) | | | |_| |
- \___/|_|\___|\__\___/|_| \__, |
- __/ |
- |___/
- """)
- def DefeatText():
- print("""
- ______ __ _
- | _ \ / _| | |
- | | | |___| |_ ___ __ _| |_
- | | | / _ \ _/ _ \/ _` | __|
- | |/ / __/ || __/ (_| | |_
- |___/ \___|_| \___|\__,_|\__|
- """)
- def RandomFoe(level):
- species = ["Swiper","Chickadee","Juan-juan","Bhatman","Zongoloid","Dangleflange","Dipppydock","Frangipan"]
- gender = ["Male","Female","Unknown"]
- attack = randint(40,100)
- defence = randint(25,40)
- hp = randint(80,100)
- if level >= 3:
- attack *= 3
- defence *= 3
- hp *= 3
- elif level >= 2:
- attack *= 2
- defence *= 2
- hp *= 3
- return (choice(species),choice(gender),attack,defence,hp,level)
- def Introduction():
- print("Welcome to Dungeon Cleaner. I am the great wizard Evignon.")
- sleep(2)
- print("Your people have chosen you to help rid our dungeon of this plague of feral beasts.")
- sleep(4)
- print("\nAre you prepared to fulfil your people's desire?")
- sleep(4)
- print("(Y)es! Are you kidding? Of course I am... HUZZAH!")
- print("(N)ay, you derange old man.")
- start = input()
- if (start.upper() != "Y") and (start.upper() != "N"):
- while (start.upper() != "Y") and (start.upper() != "N"):
- sleep(2)
- print("My dear warrior, you have yet to tell me how you wish to proceed.")
- sleep(2)
- print("\nAre you prepared to fulfil your people's desire?")
- sleep(2)
- print("(Y)es! Are you kidding? Of course I am... HUZZAH!")
- print("(N)ay, you derange old man.")
- start = input()
- if start.upper() == "N":
- sleep(1)
- print("We are terribly sorry that you have chosen not to help us. May that Gods have mercy on your cowardly soul.")
- sleep(4)
- quit()
- sleep(2)
- print("We are in your debt soldier, many thanks.\n")
- player = CharacterCreator()
- return player
- def CharacterCreator():
- schools = ["Fighter","Magician","Bandit"]
- player = {"Level":1,"Experience":0,"Fightstyle":choice(schools),"Name":NameCreator(),"Health":100,"Attack":randint(50,80),"Defence":randint(25,50)}
- print("\nSuperb. It is important you know that now you find yourself in Borrower's Down, you will need a new name to suit.")
- sleep(4)
- print("Based on what you've told me, I feel a more appropriate name would be "+player["Name"]+".")
- sleep(4)
- print("\nUsing my Eye of Kil'rogg I have assessed that you posses the following attributes:\n")
- sleep(4)
- print("-------------------------------------------------")
- print("Player's stat breakdown:")
- print("Level: "+str(player["Level"]))
- print("Experience: "+str(player["Experience"]))
- print("Name: "+player["Name"])
- print("Fight Style: "+player["Fightstyle"])
- print("Hit Points: "+str(player["Health"]))
- print("Attack: "+str(player["Attack"]))
- print("Defence: "+str(player["Defence"]))
- print("-------------------------------------------------")
- return player
- def NameCreator():
- sleep(4)
- print("Before we go any further, it's important that we know your name.\n")
- sleep(4)
- print("We ask that you kindly share with us the names that people from your realm know you as.")
- sleep(4)
- firstname = input("What is your first name?\n")
- sleep(2)
- while firstname.isalpha() == False:
- firstname = input("Apologies, your name can only contain characters")
- sleep(2)
- lastname = input("Well met. And what is your last name?\n")
- sleep(2)
- while lastname.isalpha() == False:
- firstname = input("Apologies, your name can only contain characters")
- sleep(2)
- padding = ["oot","car","ow","eed","an","un","am","ob"]
- prefixes = ["El'","La'","Los'","De'","Mc'","Sir ","Duke ","Captain ","King ","Lorde ","Champion ","Disgraceful Peasant ","Servant of GabeN ","Servant ","Magic "]
- suffixes = [" Baggins"," of the Great County of Shropshire"," Son of Something"," Son of Mother"," Dovakiinh"]
- firstname = (firstname[1:]+firstname[:2]).lower()
- firstname = firstname[0].upper()+firstname[2:]
- lastname = lastname[::-1].lower()
- lastname = lastname[0].upper()+firstname[3:].lower()+lastname[4:]
- if len(lastname) < 5:
- lastname += choice(padding)
- if len(firstname) < 5:
- firstname += choice(padding)
- return (choice(prefixes)+firstname+" "+lastname+choice(suffixes))
- def Battle(foelevel,player):
- Clear()
- FightText()
- sleep(1)
- stats = RandomFoe(foelevel)
- Foe = {"Level":stats[5],"Species":stats[0],"Gender":stats[1],"Attack":stats[2],"Defence":stats[3],"Hit Points":stats[4]}
- print("A wild "+Foe["Species"]+" appears from the darkness.\n")
- sleep(1)
- print("-------------------------------------------------")
- print("Foe's stat breakdown:")
- sleep(3)
- print("Level: "+str(Foe["Level"]))
- print("Species: "+Foe["Species"])
- print("Gender: "+Foe["Gender"])
- print("Attack: "+str(Foe["Attack"]))
- print("Defence: "+str(Foe["Defence"]))
- print("Hit Points: "+str(Foe["Hit Points"]))
- print("-------------------------------------------------\n")
- sleep(3)
- print("-------------------------------------------------")
- print("Player's stat breakdown:")
- print("Level: "+str(player["Level"]))
- print("Experience: "+str(player["Experience"]))
- print("Name: "+player["Name"])
- print("Fight Style: "+player["Fightstyle"])
- print("Hit Points: "+str(player["Health"]))
- print("Attack: "+str(player["Attack"]))
- print("Defence: "+str(player["Defence"]))
- print("-------------------------------------------------")
- sleep(3)
- while player["Health"] > 0 and Foe["Hit Points"] > 0:
- print("What will you do?")
- print("-(A)ttack")
- print("-(R)un")
- move = input()
- sleep(2)
- while move.upper() != "A" and move.upper() != "R":
- print("You cannot do that.\n")
- sleep(2)
- print("What will you do?")
- print("-(A)ttack")
- print("-(R)un")
- move = input()
- sleep(2)
- if move.upper() == "A":
- if player["Health"] > 0:
- print("You attack "+Foe["Species"]+("."))
- sleep(1)
- print("You have "+str(player["Attack"])+" attack points.")
- sleep(1)
- print(Foe["Species"]+" has "+str(Foe["Defence"])+" defence points.")
- sleep(1)
- HitText()
- print("You hit for "+str(player["Attack"]-Foe["Defence"])+".")
- sleep(1)
- Foe["Hit Points"] -= (player["Attack"]-Foe["Defence"])
- if Foe["Hit Points"] > 0:
- print("-------------------------------------------------")
- print("Foe's stat breakdown:")
- sleep(3)
- print("Level: "+str(Foe["Level"]))
- print("Species: "+Foe["Species"])
- print("Gender: "+Foe["Gender"])
- print("Attack: "+str(Foe["Attack"]))
- print("Defence: "+str(Foe["Defence"]))
- print("Hit Points: "+str(Foe["Hit Points"]))
- print("-------------------------------------------------\n")
- sleep(4)
- else:
- VictoryText()
- print("This is a work in progress, something will happen here later.")
- sleep(10)
- if Foe["Hit Points"] > 0:
- print(Foe["Species"]+" attacks you.")
- sleep(1)
- print(Foe["Species"]+" has "+str(Foe["Attack"])+" attack points.")
- sleep(1)
- print("You have "+str(player["Defence"])+" defence points.")
- sleep(1)
- HitText()
- print(Foe["Species"]+" hits you for "+str(Foe["Attack"]-player["Defence"])+".")
- sleep(1)
- player["Health"] -= (Foe["Attack"]-player["Defence"])
- if player["Health"] > 0:
- print("-------------------------------------------------")
- print("Player's stat breakdown:")
- print("Level: "+str(player["Level"]))
- print("Experience: "+str(player["Experience"]))
- print("Name: "+player["Name"])
- print("Fight Style: "+player["Fightstyle"])
- print("Hit Points: "+str(player["Health"]))
- print("Attack: "+str(player["Attack"]))
- print("Defence: "+str(player["Defence"]))
- print("-------------------------------------------------")
- sleep(4)
- else:
- DefeatText()
- print("This is a work in progress, something will happen here later.")
- sleep(10)
- elif move.upper() == "R":
- sleep(2)
- DefeatText()
- print("You flee from battle, afraid for your life")
- sleep(4)
- quit()
- Clear()
- def Quest():
- TitleText()
- sleep(1)
- player = Introduction()
- sleep(4)
- print("\nIt's now time for you to begin the cleansing. Make your way down the stairs to your left to get started.")
- sleep(4)
- print("\nYou begin to make your way downstairs...")
- sleep(2)
- for i in range(3):
- print("Step...")
- sleep(1)
- print("...")
- sleep(1)
- Clear()
- print("You find yourself in the first room of the dark and dingy stone dungeon.")
- sleep(2)
- print("You sense that you are not alone. You can hear clattering and smell warm, wet fur.")
- sleep(4)
- print("Suddenly there is a sharp sound, something is running your way...")
- sleep(4)
- for i in range(4):
- Battle(1,player)
- from random import choice
- from time import sleep
- from random import randint
- Quest()
Advertisement
Add Comment
Please, Sign In to add comment