def room_of_bricks(): posLoot = "" #Makes local ground loot print('\033[0;36;48m')#Sets text collor to cyan posLoot = actions.getGroundLoot(75)#Will MAYBE spawn loot groundLoot = actions.tellUserOfLoot(posLoot)#Checks if user can see loot #Makes a drawing with or without loot if groundLoot != "": art.startRoom(True) else: art.startRoom(False) #Intro print("\nThe room is empty. Looking around, you see three doors. Door A seems to be a simple wooden door. Door B gives the vibe of treasure to behold. Lastly, door C looks as if it holds the knowledge of millions.\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 #Calls next room if nextDoor == 'a': room_of_goblin() elif nextDoor == 'b': chest_room() elif nextDoor == 'c': library()
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()
def cultRoom(): 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 #Intro print("\nThe room has a magical vibe. On the ground, you can make out Davids star drawn with what seems to be dried blood. To your shock, you also notice a goats head sticking out from the opposing wall.\n") #If knight alive if var.knight: #Draws room with maybe loot and yes knight art.cultRoom(loot, True) #If paladin, the knight will kill himself if var.userCLASS == 3: print("You hear the metallic steps behind you.\nAs you turn around, a sword of an undead knight is swinging down at you.\nMidway, the knight stops, realizing you are a paladin.\nHe gets on his knees and begs for forgiveness.\nBefore you have a chance to say anything, the knight casts a spell on himself, turning himself into 25 coins as forgiveness.") var.money += 25 var.knight = False #Else he will fight to the death else: var.knight = False monsters.monAlive = True monsters.monName = "knight" monsters.monIntros(monsters.monName)#Will spawn the knight #No knight drawing, and maybe loot else: art.cultRoom(loot, False) 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': deadRoom() elif nextDoor == 'b': library() elif nextDoor == 'c': dragon()
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()
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()
def room_of_goblin(): print('\033[0;36;48m')#Sets text collor to cyan posLoot = 'golden key' groundLoot = actions.tellUserOfLoot(posLoot)#Checks if user can see loot goblin = random.randrange(1,101)#Most likly spawns a goblin if goblin <= 90: monsters.monAlive = True monsters.monName = "goblin" else: monsters.monAlive = False #Makes a drawing with or without loot and with maybe the goblin if groundLoot != "": art.goblinRoom(True, monsters.monAlive) else: art.goblinRoom(False, monsters.monAlive) if monsters.monAlive: print("\nThe room is cold, " + var.userName + ". As you enter, you notice the hideous creature in the corner. You shake in fear as you notice that it is armed. You fight begins.\n") print('\033[0;31;48m')#Sets color to red monsters.goblinIntro() print('\033[0;37;48m')#Default Color else: print("\nThe room is cold, " + var.userName + ". As you enter, there is nothing. Nothing alive or dead. Lucky you, I suppose.\n") 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':#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", "c", "タイガ")#Will ask for b or c else: storeRoom() if nextDoor == 'b': mimicRoom() if nextDoor == 'c': room_of_bricks()
def dragon(): 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 #Intro print("\nThe room is warm, which is odd seeing how the rest of the rooms seemed deathly cold.\n") #If dragon alive if var.dragonAlive: #Draws room with maybe loot and yes dragon art.dragonRoom(loot, True) art.dragon() #Will only happen once, and fight begins var.dragonAlive = False monsters.monAlive = True monsters.monName = "dragon" monsters.monIntros(monsters.monName)#Will spawn the dragon #No dragon drawing, and maybe loot else: art.dragonRoom(loot, False) 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': library() elif nextDoor == 'b': cultRoom() elif nextDoor == 'c': lastRoom()
def trapRoom(): print('\033[0;36;48m')#Sets text collor to cyan posLoot = actions.getGroundLoot(100) groundLoot = actions.tellUserOfLoot(posLoot)#Checks if user can see loot #Draws map with or without loot if groundLoot != "": art.trapRoom(True) else: art.trapRoom(False) print("\nThis room... It doesn't feel right. It looks like a thin hallway.\n") #Will calculate if the arrow hits arrowHit = random.randrange(1,21)+2 print("You were right to think so.") print("An arrow shoots out of the wall.") if arrowHit >= 15: print("Thankfully, you were able to dodge it.") else: print("The arrow penetrates your skin.") damage = random.randrange(1,7) print("Damage Dealt:", damage) actions.loseHP(damage) print("Current HP:", var.HP) 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': potionRoom() if nextDoor == 'b': chest_room()
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()
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()