Ejemplo n.º 1
0
def deadRoom():
	print('\033[0;36;48m')#Sets text collor to cyan
	#Gen Loot
	posLoot = actions.getGroundLoot(50)#Will MAYBE spawn loot
	groundLoot = actions.tellUserOfLoot(posLoot)#Checks if user can see loot
	#Makes var for drawing with or without loot
	if groundLoot != "":
		loot = True
	else:
		loot = False

	#If man is still there
	if var.deadManAlive:
		#Man will give ring
		#Draw man and maybe loot
		art.deadRoom(loot, True)
		print('Amoung corpses, a man, almost dead, reaches his hand to you.\n“Please, take this ring to my daughter as you leave. I beg you, make my dying wish come true.”')
		#To take or not to take
		take = input("Do you take the ring? Yes or no?\n").lower()
		while take != 'yes' and take != 'no': #yes or no, no maybe
			take = actions.line()
		if take == 'yes':
			#Coins or dyying wish?
			moral = input(var.userName + ", you can fulfil the man’s wish, or lie to him and turn the ring into 20 coins. Coins or Wish?\n").lower()
			while moral != 'coins' and moral != 'wish': #coins or wish, pick m8
				moral = actions.line()
			#Gain or wish
			if moral == 'coins':
				var.money += 25
				print("You gain 25 coins.")
			else:
				print("You smile a honest person's smile.")

		print("The man’s body falls dead, never to see the light again.")

	#No man
	else:
		#Draws maybe loot and no man
		art.deadRoom(loot, False)
		
	#Cant happen again
	var.deadManAlive = False
	print("The corpses of a party lie. Dead. Never to stand again.")

	print('\033[0;37;48m')#Default Color

	actions.stdActions(groundLoot)
	#Asks the user standard Actions, what they want to do in the room, and this repeats until they choose to leave

	#After they have chosen door, they will be asked what door they wish to go into
	nextDoor = actions.pickDoor(2)
	print('\033[0;37;48m')#Default Color
	if nextDoor == 'a':
		mimicRoom()
	elif nextDoor == 'b':
		cultRoom()
Ejemplo n.º 2
0
def storeRoom():
	print('\033[0;36;48m')#Sets text collor to cyan
	posLoot = "" #Makes local ground loot so when actions are send, there is nothing to pickup

	art.store() #Draw the store
	print("So far, this room seems the most welcoming yet. At the end of the room, there is what seems to be a magically automated items shop.")

	selling = random.choice(var.buyLoot)#Puts random item on sale
	price = 0
	#Sets prices for items
	#Will also randomize the price just a little
	if selling == 'apple':
		price = 5 + random.randrange(-3, 6)
	elif selling == 'magical scroll':
		price = 7 + random.randrange(-3, 6)
	elif selling == 'magical soup':
		price = 7 + random.randrange(-3, 6)
	elif selling == 'torch':
		price = 5 + random.randrange(-3, 6)
	elif selling == 'holy symbol':
		price = 30 + random.randrange(-3, 6)
	elif selling == 'rope':
		price = 7 + random.randrange(-3, 6)
	elif selling == 'strong sword':
		price = 12 + random.randrange(-3, 6)
	elif selling == 'potion':
		price = 7 + random.randrange(-3, 6)
	#Makes offer
	print('\033[0;34;48m')#Sets text collor to blue
	print("The store magically greets you, and offers you (a/an) " + selling + " for the price of " + str(price) + " coins.\n")
	#Asks
	buy = input("Do you wish to make the purchase? Yes or No?\n").lower()
	while buy != 'yes' and buy != 'no': #yes or no, no maybe
		buy = actions.line()
	#If say yes we have to check their bal
	if buy == "yes":
		if var.money >= price:
			var.inv.append(selling)
			var.money = var.money - price
			print("You have purchased (a/an) "+ selling +".\n")
		else:
			print("You can't afford that!\n")
	
	#Back to std actions
	print('\033[0;37;48m')#Default Color
	actions.stdActions(posLoot)
	#Asks the user standard Actions, what they want to do in the room, and this repeats until they choose to leave

	#After they have chosen door, they will be asked what door they wish to go into
	nextDoor = actions.pickDoor(3)
	print('\033[0;37;48m')#Default Color

	if nextDoor == 'a':
		girlRoom()
	if nextDoor == 'b':
		potionRoom()
	if nextDoor == 'c':
		room_of_goblin()
Ejemplo n.º 3
0
def treasure():

	mob = random.randrange(1,100)#Most likly spawns a mob
	if mob <= 80:
		monsters.genMon(40)
	else:
		monsters.monAlive = False

	print('\033[0;36;48m')#Sets text collor to cyan

	#Does the treasure thing
	if var.treasure:
		#If there is treasure left
		art.tr(True, monsters.monAlive)
		groundLoot = ""
		#Makes drawing with treasure and maybe mon
		print("The room is scattered with gold coins!")
		pick = input("Do you wish to take them?\n").lower()
		#Will keep asking
		while pick != 'yes' and pick != 'no': #yes or no, no maybe
			pick = actions.line()
		#If yes or no
		if pick == 'yes':
			print("\nYou have gained 50 coins.\n")
			var.money += 50
			var.treasure = False

	else:
		print("The room reminds you of riches.")
		#If there are no potions left
		groundLoot = ""
		#Makes drawing with no treasure, and maybe mon
		art.tr(False, monsters.monAlive)
		
	#Combat if needed
	if monsters.monAlive:
		print('\033[0;31;48m')#Sets color to red
		monsters.monIntros(monsters.monName)#Will spawn the monster needed
	
	print('\033[0;37;48m')#Default Color

	actions.stdActions(groundLoot)
	#Asks the user standard Actions, what they want to do in the room, and this repeats until they choose to leave

	#After they have chosen door, they will be asked what door they wish to go into
	nextDoor = actions.pickDoor(1)
	print('\033[0;37;48m')#Default Color

	if nextDoor == 'a':
		lavaRoom()
Ejemplo n.º 4
0
def mimicRoom():
	print('\033[0;36;48m')#Sets text collor to cyan
	#Gen Loot
	posLoot = actions.getGroundLoot(80)#Will MAYBE spawn loot
	groundLoot = actions.tellUserOfLoot(posLoot)#Checks if user can see loot
	#Makes var for drawing with or without loot
	if groundLoot != "":
		loot = True
	else:
		loot = False

	#If mimic still there
	if var.mimicAlive:
		#Draw "chest" and maybe loot
		art.mimicRoom(loot, True)
		print("The room warms you as you see another chest. What joy!\n")
		#Does the user wish to open the 'chest'?
		take = input("Do you wish to open the chest?\n").lower()
		#Will keep asking
		while take != 'yes' and take != 'no': #yes or no, no maybe
			take = actions.line()
		if take == 'yes':
			print('\033[0;31;48m')#Sets color to red
			var.mimicAlive = False
			print("DECEPTION! Thou was no chest, but a mimic, the works of a devil!")
			monsters.monAlive = True
			monsters.monName = "mimic"
			monsters.monIntros(monsters.monName)#Will spawn the mimic
			
	else:
		art.mimicRoom(loot, False)
		print("Cold sweat runs down you as you no longer see what you once thought to be a chest.\n")

	print('\033[0;37;48m')#Default Color

	actions.stdActions(groundLoot)
	#Asks the user standard Actions, what they want to do in the room, and this repeats until they choose to leave

	#After they have chosen door, they will be asked what door they wish to go into
	nextDoor = actions.pickDoor(3)
	print('\033[0;37;48m')#Default Color
	if nextDoor == 'a':
		girlRoom()
	elif nextDoor == 'b':
		room_of_goblin()
	elif nextDoor == 'c':
		deadRoom()
Ejemplo n.º 5
0
def girlRoom():
	print('\033[0;36;48m')#Sets text collor to cyan
	#Gen Loot
	posLoot = actions.getGroundLoot(80)#Will MAYBE spawn loot
	groundLoot = actions.tellUserOfLoot(posLoot)#Checks if user can see loot
	#Makes var for drawing with or without loot
	if groundLoot != "":
		loot = True
	else:
		loot = False

	#If girl still there
	if var.girlThere:
		#Draw girl and maybe loot
		art.girlRoom(loot, True)
		print("As you enter the room, you think of how sad and cold it would be to cry here. That is when you hear the crying of a girl in the corner. You realize you are not the only one with the trapped fate of this dungeon of rooms.\n")
		#Does the user wish to take her?
		take = input("Do you wish to take her with you in hopes of her being free? Yes or No?\n").lower()
		#Will keep asking
		while take != 'yes' and take != 'no': #yes or no, no maybe
			take = actions.line()
		if take == 'yes':
			var.girlThere = False
			print("You take the girl, together you will find freedom.")
	else:
		art.girlRoom(loot, False)
		print("The room is cold.\n")

	print('\033[0;37;48m')#Default Color

	actions.stdActions(groundLoot)
	#Asks the user standard Actions, what they want to do in the room, and this repeats until they choose to leave

	#After they have chosen door, they will be asked what door they wish to go into
	nextDoor = actions.pickDoor(2)
	print('\033[0;37;48m')#Default Color

	if nextDoor == 'a':#Store needs key, so if the user doesnt have it /shrug
		if 'silver key' not in var.inv:
			print("You need a silver key to go here.")
			nextDoor = actions.pickDoorsKey("タイガ", "b", "タイガ", "タイガ")#Will ask for b
		else:
			storeRoom()

	if nextDoor == 'b':
		mimicRoom()
Ejemplo n.º 6
0
def lastRoom():
	groundLoot = "" #Makes local ground loot
	print('\033[0;36;48m')#Sets text collor to cyan

	#Makes a drawing of room
	#Angel there no matter what, as you either die or finish the game
	art.lastRoom()
	#Draws an angel
	art.angel()
	
	#Room intro
	print("You see the light above you. There is a ladder leading to the forever free and open world. Your escape from this nauseating and enclosed space. One thing stands in front of you. An angel looks deep into your eyes with a blank face, unmoving.")

	#Attack or not
	maybe = input("\nDo you wish to attack the angel?\n").lower()
	while maybe != 'yes' and maybe != 'no': #live or die, pick m8
		maybe = actions.line()
	#If so, the angel attacks aswell andtheres combat
	if maybe == "yes":
		print("You have chosen death, says the angel.\n")
		monsters.monAlive = True
		monsters.monName = "angel"
		monsters.monIntros(monsters.monName)#Will spawn the monster needed aka angel of DEATH

		print('\033[0;36;48m')#Sets text collor to cyan

	#If no, he lives peacefully
	elif maybe == "no":
		print("\nYou walk past the angel peacefully.\n")

	#Story
	print("You make your way up the ladder. After everything you’ve been thru, it’s all becoming worth it.")
	#If girl with user, a nice happy ever after
	if var.girlThere == False:
		print("The girl you rescued will live a happy life. She ends up marrying a boy she meets at a village, they have two kids, and you watch as their lives come to a happy ever after.")
	print("\nYou've done it.\n")

	#credits and again?
	print('\033[0;37;48m')#Default Color
	print("\n\n\nCredits\n\n\nJanik\nJohn Titor\nHououin Kyouma\nOkabe Rintarou\nKurisu Makise\nTaiga\nArima Kousei\nMai-San\n2Channel\n5Channel\nAll of CERN\nAnd you dear player.")
	
	again = input("\nType 'enter' to play again.\n").lower()
	while again != "enter":
	 again = input("\nType 'enter' to play again.\n").lower()
	#Resets varibles
	var.inv.clear()
	monsters.hp = 0
	monsters.ac = 0
	monsters.monAlive = False
	monsters.monName = ''
	monsters.dragonAlive = True
	monsters.angelAlive = TrueClassAC = 0 #Stays the same through the game
	var.CurrentAC = 0 #Used to calculate if a computers attack hits
	var.attackBonus = 0 #Used to calculate if a users attack hits
	var.money = 0 #Users money which can buy things in the store room
	var.userCLASS = 0 #Fighter is 1, Wizard is 2, Paladin is 3
	var.userName = '' #Users name
	var.girlWith = False #Is the girl in the room with the user?
	var.ringWish = False #Will the user return the ring to the woman of the dead man?
	var.chestLoot = ''
	var.scrolls = 3 #There are three scrolls in the lia and when taken, will be none
	var.potions = 3 #There are three potions in the potion-room and when taken, will be none
	var.girlThere = True #Shows that the girl is still there in the room alone
	var.dragonAlive = True #Draogn in room needs to be defeated ONCE
	var.mimicAlive = True #Mimic in room needs to be defeated ONCE
	var.angelAlive = True #Killed only once, if killed at all
	var.deadManAlive = True #The almost dead npc in deadRoom()
	var.knight = True #The undead knight in cultRoom only exists once
	var.treasure = True #Treasure room treasure only appears once
	import main
	main.start_game()
#The End
Ejemplo n.º 7
0
def potionRoom():

	mob = random.randrange(1,100)#Most likly spawns a mob
	if mob <= 80:
		monsters.genMon(40)
	else:
		monsters.monAlive = False

	print('\033[0;36;48m')#Sets text collor to cyan

	#Does the potion thing
	if var.potions == 0:
		#If there are no potions left
		posLoot = actions.getGroundLoot(75)#Will MAYBE spawn loot
		groundLoot = actions.tellUserOfLoot(posLoot)#Checks if user can see loot
		#Makes drawing with no scrolls, maybe loot, and maybe mon
		if groundLoot != "":
			art.pos(False, True, monsters.monAlive)
		else:
			art.pos(False, False, monsters.monAlive)

	else:
		#If there potions left
		art.pos(True, False, monsters.monAlive)
		groundLoot = ""
		#Makes drawing with potions and maybe mon
		print("There seem to be three potions you can pickup.")
		pick = input("Do you wish to take them?\n").lower()
		#Will keep asking
		while pick != 'yes' and pick != 'no': #yes or no, no maybe
			pick = actions.line()
		#If yes or no
		if pick == 'yes':
			print("\nYou have picked up three potions.\n")
			var.inv.append('potion')
			var.inv.append('potion')
			var.inv.append('potion')
			var.potions = 0
		
	#Room desc
	print("The room seems to be an ancient potionary of some sort. Maybe of a great brewer.\n")
		
	#Combat if needed
	if monsters.monAlive:
		print('\033[0;31;48m')#Sets color to red
		monsters.monIntros(monsters.monName)#Will spawn the monster needed
	
	print('\033[0;37;48m')#Default Color

	actions.stdActions(groundLoot)
	#Asks the user standard Actions, what they want to do in the room, and this repeats until they choose to leave

	#After they have chosen door, they will be asked what door they wish to go into
	nextDoor = actions.pickDoor(2)
	print('\033[0;37;48m')#Default Color

	if nextDoor == 'a':#Store needs key, so if the user doesnt have it /shrug
		if 'silver key' not in var.inv:
			print("You need a silver key to go here.")
			nextDoor = actions.pickDoorsKey("タイガ", "b", "タイガ", "タイガ")#Will ask for b
		else:
			storeRoom()

	if nextDoor == 'b':
		trapRoom()
Ejemplo n.º 8
0
def library():

	mob = random.randrange(1,100)#Most likly spawns a mob
	if mob <= 80:
		monsters.genMon(40)
	else:
		monsters.monAlive = False

	print('\033[0;36;48m')#Sets text collor to cyan

	#Does the scroll thing
	if var.scrolls == 0:
		#If there are no scrolls left
		posLoot = actions.getGroundLoot(75)#Will MAYBE spawn loot
		groundLoot = actions.tellUserOfLoot(posLoot)#Checks if user can see loot
		#Makes drawing with no scrolls, maybe loot, and maybe mon
		if groundLoot != "":
			art.lia(False, True, monsters.monAlive)
		else:
			art.lia(False, False, monsters.monAlive)

	else:
		#If there scrolls left
		art.lia(True, False, monsters.monAlive)
		groundLoot = ""
		#Makes drawing with Scrolls and maybe mon
		print("There seem to be three scrolls you can pickup.")
		pick = input("Do you wish to take them?\n").lower()
		#Will keep asking
		while pick != 'yes' and pick != 'no': #yes or no, no maybe
			pick = actions.line()
		#If yes or no
		if pick == 'yes':
			print("\nYou have picked up three scrolls.\n")
			var.inv.append('magical scroll')
			var.inv.append('magical scroll')
			var.inv.append('magical scroll')
			var.scrolls = 0
		
	#Room desc
	print("The room seems to be an ancient library of some sort. Maybe of a great wizard.\n")
		
	#Combat if needed
	if monsters.monAlive:
		print('\033[0;31;48m')#Sets color to red
		monsters.monIntros(monsters.monName)#Will spawn the monster needed
	
	print('\033[0;37;48m')#Default Color

	actions.stdActions(groundLoot)
	#Asks the user standard Actions, what they want to do in the room, and this repeats until they choose to leave

	#After they have chosen door, they will be asked what door they wish to go into
	nextDoor = actions.pickDoor(4)
	print('\033[0;37;48m')#Default Color
	if nextDoor == 'a':
		room_of_bricks()
	elif nextDoor == 'b':
		cultRoom()
	elif nextDoor == 'c':
		lavaRoom()
	elif nextDoor == 'd':
		dragon()