-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEvent.py
More file actions
46 lines (39 loc) · 1.3 KB
/
Copy pathEvent.py
File metadata and controls
46 lines (39 loc) · 1.3 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
from util import fancyprint
import util
def eventcheck(s):
try:
fancyprint('Scanning system...\n')
if util.location[1]==0:
return 1
else:
if util.sector[util.cluster][util.location[1]].event == 'Combat':
fancyprint("We've detected a hostile ship!\n")
return 2
if util.sector[util.cluster][util.location[1]].event == 'Event':
return 3
if util.sector[util.cluster][util.location[1]].event == 'Nothing':
return 4
return 1
except KeyError:
return 1
def lanecheck():
if util.sector[util.cluster][util.location[1]].lane == 1:
return True
else:
return False
def event():
fancyprint('An event happens!\n')
def lane():
if util.sector[util.cluster][util.location[1]].lane == 1:
fancyprint('This system has a hyperlane to the next cluster!\n')
fancyprint('Do we enter?: ')
laneinput = input('')
yes = ['yes','y']
no = ['no','n']
if laneinput in 'yes':
util.cluster+=1
if util.cluster >10:
util.cluster=0
util.location[1]=0
if laneinput in 'no':
return