-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainfile.py
executable file
·165 lines (139 loc) · 5.03 KB
/
mainfile.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
#!/usr/bin/env python
import subprocess
import random
import time
import os
import sys
#Custom Imports
import storyline
import combat
import stats
import quests
import config
import memorycard
time.sleep(.5)
level = 1
battles = 0
health = 10
playerdmg = [1,8]
c = stats.creaturefunc()
cwd = os.getcwd()
savdir = cwd + "/saves"
gamedir = cwd
#intro = list
def title(x):
print x
time.sleep(.1)
def titlescreen():
config.clear()
intro = "W e l c o m e t"
#intro = intro.split()
i = []
for letter in intro:
if letter == 't':
time.sleep(.5)
print "t o"
time.sleep(.5)
else:
i.append(letter)
time.sleep(.3)
config.clear()
print ''.join(i)
#time.sleep(.1)
title(" ______________ _______ ________ ________ ________")
title("{ | ___/ \_/ \/ \__/ \__")
title(" \ ~~~~~ \ / || || || \____")
title(" \ || \ \ || || || __ _ __/")
title(" / ||~~~ ___ \/ __ ||~~~ ~ ~~~|| ~~~|| /__\\ |// \\ /")
title(" / || || || ||/ \\ || || | || || || || | || | ____>")
title(" \ || ||_|| || ~~~ | ~~~ ~~~ \\__/ || | _>")
title("{ _]")
title(" | _____ / ")
title("{ || | ___ _ || \___ __ ")
title(" \ || | | || /__\\\\ // \\ ~~||~~ ___ __ \/ \ ")
title(" \ || \\| | ||| _ \\\\ || \ \__/ \ / ")
title(" __/ ||____\\ |__|| \\__// \\__// || _____\ \____ \ ")
title(" \ ____ / >____ /")
title(" / ____/ \__________/ \ | ")
title("<~~~~~~~~~~~~~~~~/ ~~>")
mainmenu()
def mainmenu():
print "MAIN MENU:\n"
choice = raw_input("What do you wish to do:\n1. new game\n2. load game\n3. save current game\n4. exit\n")
if choice == '1':
config.clear()
newgame()
elif choice == '2':
config.clear()
memorycard.loadgame()
elif choice == '3':
config.clear()
memorycard.savefile()
elif choice == '4':
config.clear()
exit()
elif choice == '5':
print "Which function do you want to jump to:"
call = raw_input("\n1. quests\n2. combat\n3. storyline\n")
if call == '1':
config.clear()
quests.main()
elif call == '2':
config.clear()
combat.battle(c)
elif call == '3':
config.clear()
storyline.story()
else:
config.clear()
mainmenu()
else:
print "Error with your choice. Exiting."
time.sleep(5)
exit()
def newgame():
config.level = 1
config.playerdmg = [1, 8]
config.health = 10
config.battles = 0
print "Welcome player, to Forbidden Quest; a world of adventure and magic, mystery and secrecy, bravery and betrayal.\nPress enter to continue.\n"
#story = raw_input("Welcome player, to Forbidden Quest; a world of adventure and magic, mystery and secrecy, bravery and betrayal.\nPress enter to continue.\n")
config.pause()
name = raw_input("Quickly now, so your adventure can begin, what is your name young warrior?\n")
if name == "":
name = "Chosen-One"
config.pause()
pass
elif name != "":
try:
name = int(name)
"Improper name. Game resetting."
newgame()
except:
pass
else:
print "You introduce yourself as:", name, "\n"
config.name = name
storyline.story()
##############################################################################################################################
##############################################################################################################################
##############################################################################################################################
def validation(x):
print type(x)
if __name__ == "__main__":
titlescreen()
#UNDER CONSTRUCTION
#print "\nSorry, as our time mages are still in training, the time freeze functionality is currently still under construction. Please check back later.\n"
#print "Wait one moment as we teleport you back to the main menu."
#print "."
#time.sleep(1)
#print ".."
#time.sleep(1)
#print "..."
#time.sleep(1)
#print "...."
#time.sleep(1)
#print "....."
#time.sleep(1)
#filename = raw_input("Enter your save file name(don't forget to append .txt to the end of your filename: ")
#mainmenu()