@m314n13/

oregon trail 3

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
import random
TGREEN =  '\033[32m' 
OKBLUE = '\033[94m'
food = 500
health = 5
miles_to_go = 2,000
current_month = "march"

print( TGREEN + "You are NYC, it is March 1st. Your mission is to get to Oregon by December 31st. With 2,000 miles to go. Packed only with 500lbs of food, and 5 health. You will be able to chose between: travel, rest, hunt, status, help, and quit.")
user = input("What is your name? ")
def game_on():
  return health > 0 and food > 0
# match = 1
while health > 0 and food > 0:
  
  commands = input("Choose between: travel, rest, hunt, status, help, and quit.")
  
  if commands == "travel" :
    print("You have chosen travel...You are now traveling.")
    days = random.randint(3,7)
    distance_traveled = random.randint(30,60)
    food = food - 5 
    health = health - random.randint(1,2)
    print(user +" has traveled " + str(distance_traveled) + " miles,  " + str(days) + " days and has " + str(health) + " health.")
  
  if commands == "rest" :
    resting_days = random.randint(2,5)
    health = health + 1
    print("You have chosen rest...You are now resting.")
    print(user +" has rested " + str(resting_days) + " days and now has " + str(health) + " health.")
  
  if commands == "hunt":
    print("You have chosen hunt...You are now hunting.")
    food = food + 100
    print("You have " + str(food) + " lbs of food.")
  
  if commands == "status" :
    print("You have chosen status...Your status will come up soon.")
    print("You have "+ str(food) + " lbs of food,  " + str(health) + " health and the month you are on is " + current_month )
  
  if commands == "help" :
    print("Your mission is to get to Oregon by December 31st. With 2,000 miles to go. Packed only with 500lbs of food, and 5 health. You will be able to chose between: travel, rest, hunt, status, help, and quit.")
  if commands == "quit" :
    print("You have chosen quit...Goodbye sore loser.")
# match = match + 1
def minus_miles():
  miles_to_go = miles_to_go - distance_traveled
minus_miles()
print(OKBLUE + "You have " + minus_miles)


days = random.randint(3,7)
resting_days = random.randint(2,5)

def add_day(): 
    if days + resting_days == 31:
      print("The month is " + current_month)
    if days + resting_days == 62:
      current_month = "april"
      print("The month is " + current_month)
    if days + resting_days == 92:
      current_month = "may"
      print("The month is " + current_month)
    if days + resting_days == 123:
      current_month = "june"
      print("The month is " + current_month)
    if days + resting_days == 154:
      current_month = "july"
      print("The month is " + current_month)
    if days + resting_days == 185:
      current_month = "august"
      print("The month is " + current_month)
    if days + resting_days == 215:
      current_month = "september"
      print("The month is " + current_month)   
    if days + resting_days == 246:
      current_month = "october"
      print("The month is " + current_month)   
    if days + resting_days == 276:
      current_month = "november"
      print("The month is " + current_month)   
    if days + resting_days == 307:
      current_month = "december"
      print("The month is " + current_month)        
add_day()
print(add_day)