-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex36.py
More file actions
70 lines (55 loc) · 2.28 KB
/
Copy pathex36.py
File metadata and controls
70 lines (55 loc) · 2.28 KB
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
from sys import argv
from sys import exit
from ex36_monster_fight import start_fight
script, name = argv
keys = ['deamon key', 'black key']
gold = 0
door = "none"
def player(name, keys, gold):
player_name = name
player_keys = keys
player_gold = gold
return player_name, player_keys, player_gold
player_name, player_keys, player_gold = player(name, keys, gold)
#print(player_name)
#print(player_keys)
#print(player_gold)
def crawling(player_name, player_keys, door):
doors = door
keys = player_keys
player = player_name
def starting_point(doors):
print("You can see a long corridor. There are three doors. One of the far left, center and one on the right.")
print("The center and right door seem to point to the north...")
print("Where do you want to go?")
doors = str(input("> "))
if doors == "left":
print(f"You've choosen the {doors} door. It gently cracks open and you enter a long corridor")
#you_win()
print("A monster appears from the darkness! Prepare to fight!")
start_fight()
you_win()
if doors == "right":
print(f"You've choosen the {doors} door. You open it and see a dark room with two smaller doors.")
you_win()
if doors == "center":
if "deamon key" in keys:
print(f"The {doors} door is locked. However you've found a key before...it fits! You've used the Deamon Key and unlocked the door.")
print("You've seen this corridor before...hey, it's the room where it all started!")
crawling(player, keys, doors)
else:
print(f"The {doors} door is locked. None of your keys fits.")
starting_point(doors)
else:
print(f"Sorry, I don't know what '{doors}' means.")
starting_point(doors)
starting_point(doors)
def start_game(player_name):
print(f"Hello, {player_name}! Let's begin our jurney in this deep and scary dungeon!")
print("You can die here or find a way to get away from here with a huge sack of gold and glory!")
crawling(player_name, player_keys, door)
def you_win():
print("YOU WIN MODOFOKO!!!!")
exit(0)
start_game(player_name)
#crawling(player_name, player_keys, door)