-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathgame.py
More file actions
73 lines (64 loc) · 2.34 KB
/
game.py
File metadata and controls
73 lines (64 loc) · 2.34 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
73
####################################
# 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 autor: Aida #
print("The Maryland police stop you and try to collect taxes from you! What do you do!")
print("1. Run from police")
print("2. Tell him you dont have a money")
decision = ""
while(decision == ""):
decision = input("Pick a number")
if (decision == 1):
print("You will be shot! Game over!")
exit()
elif (decision == 2):
print("Police will give you a warning!")
print("Go home!")
else:
print("Please enter 1 or 2")
# End section #