Skip to content
Snippets Groups Projects
Commit 63c3d679 authored by Ahmed El Ghazali's avatar Ahmed El Ghazali :computer:
Browse files

Changing the start of the game.

parent c417d36c
No related branches found
No related tags found
No related merge requests found
......@@ -688,65 +688,82 @@ def main():
global player
clear()
slow_print("Welcome to [We need a name for the game.]""\n")
sleep(1)
menu_beg()
sleep(1)
clear()
slow_print("Welcome to...""\n")
print("""
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
█░░░░░░░░░░░░░░█░░░░░░█████████░░░░░░░░░░░░░░█░░░░░░░░░░░░░░█░░░░░░░░░░░░░░░░███░░░░░░░░░░░░░░░░░░█░░░░░░░░░░░░░░█░░░░░░██████████░░░░░░█░░░░░░░░░░░░░░█
█░░▄▀▄▀▄▀▄▀▄▀░░█░░▄▀░░█████████░░▄▀▄▀▄▀▄▀▄▀░░█░░▄▀▄▀▄▀▄▀▄▀░░█░░▄▀▄▀▄▀▄▀▄▀▄▀░░███░░▄▀▄▀▄▀▄▀▄▀▄▀▄▀░░█░░▄▀▄▀▄▀▄▀▄▀░░█░░▄▀░░░░░░░░░░██░░▄▀░░█░░▄▀▄▀▄▀▄▀▄▀░░█
█░░▄▀░░░░░░▄▀░░█░░▄▀░░█████████░░░░░░▄▀░░░░░░█░░▄▀░░░░░░░░░░█░░▄▀░░░░░░░░▄▀░░███░░░░░░░░░░░░▄▀▄▀░░█░░▄▀░░░░░░▄▀░░█░░▄▀▄▀▄▀▄▀▄▀░░██░░▄▀░░█░░▄▀░░░░░░░░░░█
█░░▄▀░░██░░▄▀░░█░░▄▀░░█████████████░░▄▀░░█████░░▄▀░░█████████░░▄▀░░████░░▄▀░░███████████░░░░▄▀░░░░█░░▄▀░░██░░▄▀░░█░░▄▀░░░░░░▄▀░░██░░▄▀░░█░░▄▀░░█████████
█░░▄▀░░░░░░▄▀░░█░░▄▀░░█████████████░░▄▀░░█████░░▄▀░░░░░░░░░░█░░▄▀░░░░░░░░▄▀░░█████████░░░░▄▀░░░░███░░▄▀░░██░░▄▀░░█░░▄▀░░██░░▄▀░░██░░▄▀░░█░░▄▀░░░░░░░░░░█
█░░▄▀▄▀▄▀▄▀▄▀░░█░░▄▀░░█████████████░░▄▀░░█████░░▄▀▄▀▄▀▄▀▄▀░░█░░▄▀▄▀▄▀▄▀▄▀▄▀░░███████░░░░▄▀░░░░█████░░▄▀░░██░░▄▀░░█░░▄▀░░██░░▄▀░░██░░▄▀░░█░░▄▀▄▀▄▀▄▀▄▀░░█
█░░▄▀░░░░░░▄▀░░█░░▄▀░░█████████████░░▄▀░░█████░░▄▀░░░░░░░░░░█░░▄▀░░░░░░▄▀░░░░█████░░░░▄▀░░░░███████░░▄▀░░██░░▄▀░░█░░▄▀░░██░░▄▀░░██░░▄▀░░█░░▄▀░░░░░░░░░░█
█░░▄▀░░██░░▄▀░░█░░▄▀░░█████████████░░▄▀░░█████░░▄▀░░█████████░░▄▀░░██░░▄▀░░█████░░░░▄▀░░░░█████████░░▄▀░░██░░▄▀░░█░░▄▀░░██░░▄▀░░░░░░▄▀░░█░░▄▀░░█████████
█░░▄▀░░██░░▄▀░░█░░▄▀░░░░░░░░░░█████░░▄▀░░█████░░▄▀░░░░░░░░░░█░░▄▀░░██░░▄▀░░░░░░█░░▄▀▄▀░░░░░░░░░░░░█░░▄▀░░░░░░▄▀░░█░░▄▀░░██░░▄▀▄▀▄▀▄▀▄▀░░█░░▄▀░░░░░░░░░░█
█░░▄▀░░██░░▄▀░░█░░▄▀▄▀▄▀▄▀▄▀░░█████░░▄▀░░█████░░▄▀▄▀▄▀▄▀▄▀░░█░░▄▀░░██░░▄▀▄▀▄▀░░█░░▄▀▄▀▄▀▄▀▄▀▄▀▄▀░░█░░▄▀▄▀▄▀▄▀▄▀░░█░░▄▀░░██░░░░░░░░░░▄▀░░█░░▄▀▄▀▄▀▄▀▄▀░░█
█░░░░░░██░░░░░░█░░░░░░░░░░░░░░█████░░░░░░█████░░░░░░░░░░░░░░█░░░░░░██░░░░░░░░░░█░░░░░░░░░░░░░░░░░░█░░░░░░░░░░░░░░█░░░░░░██████████░░░░░░█░░░░░░░░░░░░░░█
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████""")
press = input()
while True:
clear()
populate_enemies()
populate_rooms()
player.fought_boss = False
print("You suddenly wake up in an ancient abandoned manner house. Every window boarded, every door to the real world locked...")
print("The old house finds itself inhabited by a plethora of strange monsters, of which many seem violent. It is up to you...")
print("to trek forward and find a way out with what little you have - avoiding death as if it were around every corner.")
print("\nIn order to win, you must level up to lvl 5 and then navigate to the final boss room which contains the only passage to the real world. This room is located at the end of the long, dark underground passage... You may find this fight easier the higher level you are")
input("> Press enter to begin the game.")
# Main game loop
menu_beg()
sleep(1)
clear()
while True:
clear()
# Display game status (room description, inventory etc.)
print_room(player.current_room)
populate_enemies()
populate_rooms()
player.fought_boss = False
print("You suddenly wake up in an ancient abandoned manner house. Every window boarded, every door to the real world locked...")
print("The old house finds itself inhabited by a plethora of strange monsters, of which many seem violent. It is up to you...")
print("to trek forward and find a way out with what little you have - avoiding death as if it were around every corner.")
print("\nIn order to win, you must level up to lvl 5 and then navigate to the final boss room which contains the only passage to the real world. This room is located at the end of the long, dark underground passage... You may find this fight easier the higher level you are")
input("> Press enter to begin the game.")
# Main game loop
while True:
clear()
# Display game status (room description, inventory etc.)
print_room(player.current_room)
if player.current_room.cleared == False:
# filler, for now
for enemy in player.current_room.enemies:
combat(enemy)
if player.current_room.cleared == False:
# filler, for now
for enemy in player.current_room.enemies:
combat(enemy)
if player.alive == False:
break
if player.alive == False:
break
else:
player.current_room.cleared = True
if player.alive == False:
break
else:
player.current_room.cleared = True
# Show the menu with possible actions and ask the player
command = menu(player.current_room.exits, player.current_room.items, player.inventory)
# Show the menu with possible actions and ask the player
command = menu(player.current_room.exits, player.current_room.items, player.inventory)
# Execute the player's command
execute_command(command)
time.sleep(1) # If the command was invalid or feedback is given based on this command then we want them
# to being able to view it before clearing the screen on the next game loop
# Execute the player's command
execute_command(command)
time.sleep(1) # If the command was invalid or feedback is given based on this command then we want them
# to being able to view it before clearing the screen on the next game loop
if player.fought_boss == True:
break
# player death message
if player.alive == False:
print("Game over. You did not manage to beat the game. Try again.")
time.sleep(0.5)
input("> Press enter to play again.")
else:
print("You beat the game, well done!!")
time.sleep(0.5)
input("> Press enter to play again.")
# Reset the player var
player = Player()
if player.fought_boss == True:
break
# player death message
if player.alive == False:
print("Game over. You did not manage to beat the game. Try again.")
time.sleep(0.5)
input("> Press enter to play again.")
else:
print("You beat the game, well done!!")
time.sleep(0.5)
input("> Press enter to play again.")
# Reset the player var
player = Player()
if __name__ == "__main__":
main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment