forked from cryptoboxcomics/python-adventure
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame.py
More file actions
72 lines (63 loc) · 2.25 KB
/
game.py
File metadata and controls
72 lines (63 loc) · 2.25 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
71
72
####################################
# Author: Amber Lee #
# Email: [email protected] #
# Info: A choose-your-own #
# adventure game #
####################################
player_name = ""
player_health = 100
player_money = 50
player_species = "Human"
player_weapons = []
player_items = []
####################################
# Game Start! #
####################################
### Introduction ###
print()
print()
print(" ####################################################")
print(" # Hello! This is a choose-your-own-adventure game. #")
print(" # You are a hero trying to save your kingdom of #")
print(" # Kanbal from the evil King Rogsam. #")
print(" ####################################################")
print()
print()
while(player_name == ""):
player_name = input("What is your name, Hero? : ")
print()
print("Hi, " + player_name + "! You are our hero and savior! Please save the Kanbalese mountain people from the evil King Rogsam.")
print("You start off with no weapons or items, but if you make the right choices, you might survive.")
print()
# ---Section Author: <your name>--- #
print("You pass by a traveler who looks injured by the woods. What do you do?")
print("1. Ignore him")
print("2. Try to help him")
decision = input("Pick a number: ")
print()
if (decision == "1"):
print("You try to leave, but trip over a rock and hit your head!")
player_health = player_health - 10
print("Your health now: ")
print(player_health)
elif (decision == "2"):
print("He appreciates that you helped him, and he gives you a potion! A potion heals 20 health points.")
player_items.append("Potion")
print("Your items now: ")
print(player_items)
# ---section end--- #
#Section author: Bahadir
print("Polise stop you and try get taxes from you! What do you do!")
print("1. Fight the police")
print("2. Just pay your taxex")
decision = input("pick a number")
if (decision == 1):
print("You got arrested! Game over!")
exit()
elif (decision == 2):
print("you lost all your money")
money = money * 0.8
print("The money you have left is:")
print(str(money))
else:
print("please enter 1 or 2")