-
Notifications
You must be signed in to change notification settings - Fork 708
/
types.py
57 lines (43 loc) · 937 Bytes
/
types.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
from enum import IntEnum, IntFlag
class ItemType(IntEnum):
JEWEL = 0
CD = 1
ITEM = 2
EVENT = 3
class Box(IntEnum):
JEWEL_NE = 0
JEWEL_SE = 1
JEWEL_SW = 2
JEWEL_NW = 3
CD = 4
FULL_HEALTH = 5
class LocationType(IntEnum):
BOX = 0
BOSS = 1
KEYZER = 2
class ItemFlag(IntFlag):
JEWEL_NE = 1 << 0
JEWEL_SE = 1 << 1
JEWEL_SW = 1 << 2
JEWEL_NW = 1 << 3
CD = 1 << 4
KEYZER = 1 << 5
FULL_HEALTH = 1 << 6
class Passage(IntEnum):
ENTRY = 0
EMERALD = 1
RUBY = 2
TOPAZ = 3
SAPPHIRE = 4
GOLDEN = 5
def long_name(self):
if self == Passage.GOLDEN:
return 'Golden Pyramid'
else:
return self.short_name() + ' Passage'
def short_name(self):
return ('Entry', 'Emerald', 'Ruby', 'Topaz', 'Sapphire', 'Golden')[self]
class Difficulty(IntEnum):
NORMAL = 0
HARD = 1
S_HARD = 2