-
Notifications
You must be signed in to change notification settings - Fork 0
/
main_game.py
202 lines (154 loc) · 5.13 KB
/
main_game.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
# AUTHOR : Elijah Zeidler
# DATE :
# --- IMPORT ----------------------
from Modul import loader, formating
from Modul.classes import player
# --- DECLARATION -----------------
# --- SETUP -----------------------
def initGame(attr:list):
'''
player
'''
p = player.Player(attr)
return p
# --- MAIN ------------------------
def game (player_data):
'''Logic for BIG TILE'''
p = initGame(player_data)
choice = False
while 'BIG_TILE':
choice = formating.bigTile(choice,p)
if choice == '1': # Travel
while 'travel':
choice = formating.travel(choice, p)
if choice in '1234' and len(choice)==1:
if choice == '1':
p.goNorth()
elif choice == '2':
p.goWest()
elif choice == '3':
p.goEast()
elif choice == '4':
p.goSouth()
elif choice == '0':
break
else:
choice = True
elif choice == '2': # Enter
while 'enter':
choice = formating.enter(choice,p)
if choice in '123456789' and len(choice)==1:
p = game_smallTile(choice,p)
break
elif choice == '0':
break
else:
choice = True
elif choice == '3': # Inventory
game_inventory()
elif choice == '0': # Save & Quit
# format . leave
break # leave game
else: # error
choice = True
continue
def game_smallTile(tile_no,p):
''' Logic for SMALL TILE'''
choice = False
while 'SMALL_TILE':
choice = formating.smallTile(choice,p)
if choice == '1': # Search
'''DEBUGG check game data for item'''
c = p.getItemName()
p = formating.smallTile_search(False, c, p)
elif choice == '2': # Take
'''DEBUGG check game data for item'''
c = p.searchItem()
p = formating.smallTile_take(False, c,p)
elif choice == '3': # Inventory
game_inventory()
elif choice == '4': # Talk
'''DEBUGG check game data for entity'''
c = p.searchEntity()
p = formating.smallTile_talk(False, c,p)
elif choice == '5': # Attack
'''DEBUGG check game data for entity'''
c = p.searchEntity()
p =formating.smallTile_attack(False, c,p)
elif choice == '6': # Flee
'''DEBUGG check for flee'''
c = 'flee_status'
p = formating.smallTile_flee(False, c,p)
elif choice == '7': # Sleep
'''DEBUGG check for sleep'''
c = p.playerRest()
p = formating.smallTile_sleep(False, c,p)
elif choice == '0': # Back
'''DEBUGG check for enemy- status
if no enemy --> break
if enemy --> not possible'''
break
return p
def game_inventory():
'''Logic for Inventory'''
choice = False
while 'INVENTORY':
choice, p = formating.inventory(choice,p)
'''
if choice == '1': # Eat
while 'eat':
choice = formating.inventory_eat(choice)
"""DEBUGG check for eadability"""
if choice in '123456789' and len(choice)==1:
pass
elif choice in ['10','11','12']:
pass
elif choice == '0':
break
else:
choice = True
'''
if choice == '1': # Use
while 'use':
choice, p = formating.inventory_use(choice,p)
'''DEBUGG check for useability'''
if choice in '123456789' and len(choice)==1:
pass
elif choice in ['10','11','12']:
pass
elif choice == '0':
break
else:
choice = True
elif choice == '2': # Discard
while 'discard':
choice,p = formating.inventory_discard(choice,p)
'''DEBUGG check'''
if choice in '123456789' and len(choice)==1:
pass
elif choice in ['10','11','12']:
pass
elif choice == '0':
break
else:
choice = True
elif choice == '4': # diary
game_diary()
elif choice == '0': # Back
break
else:
choice = True
def game_diary():
'''Logic for Diary'''
choice = False
while 'diary':
choice = formating.inventory_diary(choice)
if choice in '123456789' and len(choice) == 1:
'''DEBUGG load the shitty logs'''
pass
elif choice == '0':
break
else:
choice = True
# --- SHUT DOWN -------------------
# --- comment ---------------------