@BrysonHaman/

Was that a jojo reference: The Game

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
moves=["left", "right", "up", "down", "grab", "fight", "help"]
inventory=[]
floor_1=["nothing", "up-stairs", "rusty tin sword", "down-stairs", "blond vampire"]
floor_2=["up-stairs", "dull bronze sword", 
"three buff ancient men who come from the wall", "nothing", "down-stairs" ]
floor_3=["up-stairs", "durable iron sword", 
"that same vampire but with a yellow ghost that stops time I guess", "a severed hand", "down-stairs"]
floor_4=["down-stairs", "razor sharp steel sword" , "a few of the magic stones", 
"a David Bowie looking dude with a cat man that blows stuff up", "up-stairs" ]
floor_5=["the rest of the stones", "down-stairs", 
"The boss of the dungeon and the mafia, he can erase time I guess?", "a sword, but it's also a gun", "nothing"]

start_game=input("Would you like to enter the dungeon? Yes/No? ")
if start_game=="yes":
  print("You open the door and begin your adventure")
if start_game=="no":
  print("You turn tail and run becoming the village pansy for the rest of your life") 


alive = True
bossDefeated = False;

room_positon=0
user_floor= floor_1
user_room= user_floor[room_positon]

while alive and not bossDefeated:
  command = input('What would you like to do? ')
  if command== "help":
    print(moves)
  user_room= user_floor[room_positon]
  if command== "left":
    if room_positon<=0:
      print("You cannnot go any further.")
    else: 
      room_positon=room_positon-1
      print(user_floor[room_positon])
    
  if command== "right":
    if room_positon>=4:
      print("You cannnot go any further.")
    else: 
      room_positon=room_positon+1
      print(user_floor[room_positon])
      
  if command== "up":
    if user_floor==floor_1:
      user_floor=floor_2
      print(user_floor[room_positon])
    elif user_floor==floor_2:
      user_floor=floor_3
      print(user_floor[room_positon])
    elif user_floor==floor_3:
      user_floor=floor_4
      print(user_floor[room_positon])
    elif user_floor==floor_4:
      user_floor=floor_5
      print(user_floor[room_positon])
    elif user_floor==floor_5:
      user_floor=floor_5
      print("You cannot go any higher.")
      print(user_floor[room_positon])
  
  if command== "down":
    if user_floor==floor_1:
      user_floor=floor_1
      print("You cannot go further down.")
    elif user_floor==floor_2:
      user_floor=floor_1
      print(user_floor[room_positon])
    elif user_floor==floor_3:
      user_floor=floor_2
      print(user_floor[room_positon])
    elif user_floor==floor_4:
      user_floor=floor_3
      print(user_floor[room_positon])
    elif user_floor==floor_5:
      user_floor=floor_4
      print(user_floor[room_positon])
  if command== "grab":
    inventory.append(user_room)
    print(inventory)
    user_floor[room_positon]="nothing"
  if command== "fight":
    if "rusty tin sword" in inventory:
      print("you've defeated the enemy and you procede through the dungeon")
      inventory.remove("rusty tin sword")
      print (inventory)
      user_floor[room_positon]="nothing"
    elif "dull bronze sword" in inventory:
      print("you've defeated the enemy and you procede through the dungeon")
      inventory.remove("dull bronze sword")
      print (inventory)
      user_floor[room_positon]="nothing"
    elif "durable iron sword" in inventory:
      print("you've defeated the enemy and you procede through the dungeon")
      inventory.remove("durable iron sword")
      print (inventory)
      user_floor[room_positon]="nothing"
    elif "razor sharp steel sword" in inventory:
      print("you've defeated the enemy and you procede through the dungeon")
      inventory.remove("razor sharp steel sword")
      print (inventory)
      user_floor[room_positon]="nothing"
    elif "a severed hand" in inventory:
      print("you've defeated the enemy and you procede through the dungeon")
      inventory.remove("a severed hand")
      print (inventory)
      user_floor[room_positon]="nothing"
    elif "a sword, but it's also a gun" in inventory:
      inventory.remove("a sword, but it's also a gun")
      user_floor[room_positon]="nothing"
      print (inventory)
      print("you've defeated the enemy and you procede through the dungeon")
    else:
      print("you die, time resets, and you begin where you started")
  if command=="fight":
    if user_floor[room_positon]=="The boss of the dungeon and the mafia, he can erase time I guess?":
      if "a sword, but it's also a gun" in inventory and "a few of the magic stones" in inventory and "the rest of the stones" in inventory :
        inventory.remove("a sword, but it's also a gun")
        inventory.remove("the rest of the stones")
        inventory.remove("a few of the magic stones")
      else:
        print('Game over.')