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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
# Importing important modules
from time import sleep
from sys import stdout
from replit import clear as c
from replit import clear
from colors import red, green
from random import randint

from time import sleep
from random import choice
from replit import clear


# Defining important variables
oldTITLE_TEXT = """
        ,----,                                                                                
      ,/   .`|                                       ____                                     
    ,`   .'  :  ,---,                              ,'  , `.                                   
  ;    ;     /,--.' |                           ,-+-,.' _ |                                   
.'___,/    ,' |  |  :                        ,-+-. ;   , ||                                   
|    :     |  :  :  :                       ,--.'|'   |  ;|                                   
;    |.';  ;  :  |  |,--.   ,---.          |   |  ,', |  ':  ,--.--.        .--,   ,--.--.    
`----'  |  |  |  :  '   |  /     \         |   | /  | |  || /       \     /_ ./|  /       \   
    '   :  ;  |  |   /' : /    /  |        '   | :  | :  |,.--.  .-. | , ' , ' : .--.  .-. |  
    |   |  '  '  :  | | |.    ' / |        ;   . |  ; |--'  \__\/: . ./___/ \: |  \__\/: . .  
    '   :  |  |  |  ' | :'   ;   /|        |   : |  | ,     ," .--.; | .  \  ' |  ," .--.; |  
    ;   |.'   |  :  :_:,''   |  / |        |   : '  |/     /  /  ,.  |  \  ;   : /  /  ,.  |  
    '---'     |  | ,'    |   :    |        ;   | |`-'     ;  :   .'   \  \  \  ;;  :   .'   \ 
              `--''       \   \  /         |   ;/         |  ,     .-./   :  \  \  ,     .-./ 
                           `----'          '---'           `--`---'        \  ' ;`--`---'     
                                                                            `--`                 
"""
TITLE_TEXT = '''
████████╗██╗  ██╗███████╗    ███╗    ███╗ █████╗ ██╗   ██╗ █████╗ ███████╗
╚══██╔══╝██║  ██║██╔════╝    ████╗ ████║██╔══██╗╚██╗ ██╔╝██╔══██╗██╔════╝
   ██║   ███████║█████╗      ██╔████╔██║███████║ ╚████╔╝ ███████║███████╗
   ██║   ██╔══██║██╔══╝      ██║╚██╔╝██║██╔══██║  ╚██╔╝  ██╔══██║╚════██║
   ██║   ██║  ██║███████╗    ██║ ╚═╝ ██║██║  ██║   ██║   ██║  ██║███████║
   ╚═╝   ╚═╝  ╚═╝╚══════╝    ╚═╝     ╚═╝╚═╝  ╚═╝   ╚═╝   ╚═╝  ╚═╝╚══════╝     
'''

GAMEOVER = '''
 ██████╗  █████╗ ███╗   ███╗███████╗     ██████╗ ██╗   ██╗███████╗██████╗ 
██╔════╝ ██╔══██╗████╗ ████║██╔════╝    ██╔═══██╗██║   ██║██╔════╝██╔══██╗
██║  ███╗███████║██╔████╔██║█████╗      ██║   ██║██║   ██║█████╗  ██████╔╝
██║   ██║██╔══██║██║╚██╔╝██║██╔══╝      ██║   ██║╚██╗ ██╔╝██╔══╝  ██╔══██╗
╚██████╔╝██║  ██║██║ ╚═╝ ██║███████╗    ╚██████╔╝ ╚████╔╝ ███████╗██║  ██║
 ╚═════╝ ╚═╝  ╚═╝╚═╝     ╚═╝╚══════╝     ╚═════╝   ╚═══╝  ╚══════╝╚═╝  ╚═╝
'''
WIN = '''
██╗   ██╗ ██████╗ ██╗   ██╗    ██╗    ██╗██╗███╗   ██╗    ██╗
╚██╗ ██╔╝██╔═══██╗██║   ██║    ██║    ██║██║████╗  ██║    ██║
 ╚████╔╝ ██║   ██║██║   ██║    ██║ █╗ ██║██║██╔██╗ ██║    ██║
  ╚██╔╝  ██║   ██║██║   ██║    ██║███╗██║██║██║╚██╗██║    ╚═╝
   ██║   ╚██████╔╝╚██████╔╝    ╚███╔███╔╝██║██║ ╚████║    ██╗
   ╚═╝    ╚═════╝  ╚═════╝      ╚══╝╚══╝ ╚═╝╚═╝  ╚═══╝    ╚═╝
'''
COLORS = {
  'reset': '\033[0m',
  'bold': '\033[1m',
  'underline': '\033[4m',
  'black': '\u001b[30m',
  'red': '\u001b[31m',
  'green': '\u001b[32m',
  'yellow': '\u001b[33m',
  'blue': '\u001b[34m',
  'magenta': '\u001b[35m',
  'cyan': '\u001b[36m',
  'white': '\u001b[37m',
  'lightblue': '\u001b[34;1m'
}

# Defining important functions
def color(text, color, *extras):
  if not extras:
    return COLORS[color] + text + COLORS['reset']
  pretext = COLORS[color]
  for extra in extras:
    pretext += COLORS[extra]
  return pretext + text + COLORS['reset']

def inp():
  return input(color('> ', 'lightblue'))

def write(string):
  for char in string:
    stdout.write(char)
    stdout.flush()
    sleep(.035)
  stdout.write('\n')

# Introduction to game
c()
print(color(TITLE_TEXT, 'yellow', 'bold'))
print('\n\n\n' + color('Press enter to start...', 'cyan'))

input()
sleep(.5)
c()

for i in range(3):
  print("Loading")
  sleep(.3)
  c()
  print("Loading.")
  sleep(.3)
  c()
  print("Loading..")
  sleep(.3)
  c()
  print("Loading...")
  sleep(.3)
  c()

print(color("Loaded", 'green'))
sleep(1)
c()
write('Welcome, adventurers! Welcome to THE MAYAS.')
sleep(1)
write('\nGame Objective:')
write('\t1.' + green(' Invade') +  ' Maya city of ' + color('Chichén Itzá', 'red') + '.') 
write('\t2.' + green(' Steal') + ' the protected ' + color('calendar', 'red') + '.')
write('\t3.' +  green(' Evactuate ') + 'Chichén Itzá without getting caught.')

write('\nEnter username:')
name = inp()
write('Hello ' + name + ', are you ready to start? y/n ')
start = inp()
c()
print(color("Backstory", 'green'))
print('---------\n')
write('You are in the year of 2048, You are meeting some of the best scientists in the world. They tell you that they have found out how to time travel! They say that they will pay you millions of dollars if you go back in time to steal the greatest achivement of the Mayans: The Calendar.')
sleep(1)
write(color("\n"+name+": Why steal a calendar?",'cyan'))
sleep(1)
write(color("\nScientist: The Myan calendar was the most important artifact that the Myan civilization left behind. ",'red'))
sleep(1)
write(color("\n"+name+": So? ",'cyan'))
sleep(1)
write(color("\nScientist: The Mayan calandar was so advanced that they even managed to predict eclipses. So, our buyer would pay a lot for this artifact.",'red'))
sleep(1)
write(color("\n"+name+": What about the amazing architecture of the Mayas? ",'cyan'))
sleep(1)
write(color("\nScientist: First of all, would you like to steal a building. Second of all, the Mayan calendar was better than the architecture, number system or anything else the Mayans created. This is because no other pre-industruial civilization had developed a calendar so as complex as the Mayans. It even could predic eclipses. While some other civilizations have created similar, if not better architecture. Like the Egyptians creating great pyramids. ",'red'))
sleep(1)
write(color("\n"+name+": What about the number system?",'cyan'))
sleep(1)
write(color("\nScientist: The number system was great but other pre-industrial civilizations had created number systems like that. Such as the roman numerals created by the romans. If you return the calendar to us, our buyer will pay us enough money continue researching and expereminting.",'red'))
sleep(1)
write(color("\n"+name+": Ok, then. How do I steal it?",'cyan'))
sleep(1)
write(color("\nScientist: Ok, first you need to go to Chichen Itza, then you have to find the Maya Pyrimid. ",'red'))
sleep(1)
write(color("\n"+name+": Won't everyone find me suspicous with my modern day clothes?",'cyan'))
sleep(1)
write(color("\nScientist: No, we have developed a device that will allow you to appear as one of the natives. And you will speak their language and understand their language with this",'red'))
sleep(1)
write("\nThe scientist hands you the devices.")
sleep(1)
write(color("\n"+name+": Ok, once I get to the pyramid, then what. ",'cyan'))
sleep(1)
write(color("\nScientist: We don't know the exact place of the calendar. So, you will have to find it on your own. Once you get their calendar push the button we give you, and you come back to the present. ",'red'))
sleep(1)
write(color("\n"+name+": When do I start? ",'red'))
sleep(2)
write(color("\nScientist: Now! ",'cyan'))
sleep(2)
write("\nThe scientist pushes a button and you are sent back in time around 2000 years ago.")
sleep(2)
c()

write("\nYou appear on a walkway of the Mayan city of Chichén Itzá. A citizen is walking your way, what do you do? ")
print("\t1. Attak with a Mayan weapon the scientist gave you")
print("\t2. Turn and run the other way")
print("\t3. Ask for directions")
q1 = inp()
if q1 == '1':
  write("You start to attack but guards see you and take you to jail.")
  sleep(3)
  c()
  print(color(GAMEOVER,'red','bold'))
  input()
print("You ask for directions to the pyramid.")

write(color("\nMyan Citizen: You're kidding right, it's that giant pyramid behind you.",'green'))
sleep(1)
write(color('\n'+name+': Oh, Thanks!','cyan'))
sleep(1)
write(color('\nMyan Citizen: No problem.','green'))
sleep(2)
c()
write('What do you do next?')
print('\t1. Walk towards another promising looking pyramid.')
print('\t2. Ask another mayan for directions.')
print('\t3. Head towards the giant pyramid.')
print('\t4. Run up the giant pyramid. Reach the top, shout "I would like to steal the Mayan Calander, give it to me!"')
inp()
write("\nYou start to run up the giant pyramid when you are stopped by some gaurds asking you what you are doing. What do you do?")
print('\t1. Tell them that there was and intruder found that is looking to steal the pyramid, and that in reality you were running to them, to tell them.')
print('\t2. Turn and run the other way!')
print('\t3. Start sweating, have a nervous breakdown, and probably get taken to jail.') 
print('\t4. Attack them like a crazy maniac!') 
inp()
c()
write('You attempt to have a nervous breakdown but the gaurds think you are becoming sick. The quickly let go of you and tell you to continue, but stop running, and they return to their posts.')
write('What do you do next?')
print('\t1. Run back to the away and come up with another plan.')
print('\t2. Use your weapon that was given to you on the gaurds.')
print('\t3. Walk up to the pyramid, open the door.')
inp()
write('The walk up the pyramid and open the door.')
sleep(1.33)
c()
write('..') 
sleep(1)
c()
write('...')
sleep(1)
c()
write("You walk into the room, only to find another door.")
sleep(1)
write('\nYou go in the door. And come into a room.')
write("\nThere is a door with a lock.")
write("There is a pascode that changes everyday? What number do you choose. 1,2 or 3")
inp()
c()
sleep(2)
write("You get very lucky and guess the right code.")
write("You enter the room where the calendar is being held.")
write("\nYou see the calandar what do you do?")
print("\t1. Touch it and push the button.")
print("\t2. Run away?")
print("\t3. Ask politely before taking it their prized treasure.")
inp()
write("\nYou take the calandar and teleport to the present.")
write("\nThe scientists reward you with millions of dollars and you .")
sleep(3)
c()
print(WIN)