forked from OoTRandomizer/OoT-Randomizer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DungeonList.py
152 lines (141 loc) · 4.32 KB
/
DungeonList.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
import random
import os
from Dungeon import Dungeon
from Item import ItemFactory
from Utils import data_path
dungeon_table = [
{
'name': 'Deku Tree',
'hint': 'the Deku Tree',
'font_color': 'Green',
'boss_key': 0,
'small_key': 0,
'small_key_mq': 0,
'dungeon_item': 1,
},
{
'name': 'Dodongos Cavern',
'hint': 'Dodongo\'s Cavern',
'font_color': 'Red',
'boss_key': 0,
'small_key': 0,
'small_key_mq': 0,
'dungeon_item': 1,
},
{
'name': 'Jabu Jabus Belly',
'hint': 'Jabu Jabu\'s Belly',
'font_color': 'Blue',
'boss_key': 0,
'small_key': 0,
'small_key_mq': 0,
'dungeon_item': 1,
},
{
'name': 'Forest Temple',
'hint': 'the Forest Temple',
'font_color': 'Green',
'boss_key': 1,
'small_key': 5,
'small_key_mq': 6,
'dungeon_item': 1,
},
{
'name': 'Bottom of the Well',
'hint': 'the Bottom of the Well',
'font_color': 'Pink',
'boss_key': 0,
'small_key': 3,
'small_key_mq': 2,
'dungeon_item': 1,
},
{
'name': 'Fire Temple',
'hint': 'the Fire Temple',
'font_color': 'Red',
'boss_key': 1,
'small_key': 8,
'small_key_mq': 5,
'dungeon_item': 1,
},
{
'name': 'Ice Cavern',
'hint': 'the Ice Cavern',
'font_color': 'Blue',
'boss_key': 0,
'small_key': 0,
'small_key_mq': 0,
'dungeon_item': 1,
},
{
'name': 'Water Temple',
'hint': 'the Water Temple',
'font_color': 'Blue',
'boss_key': 1,
'small_key': 6,
'small_key_mq': 2,
'dungeon_item': 1,
},
{
'name': 'Shadow Temple',
'hint': 'the Shadow Temple',
'font_color': 'Pink',
'boss_key': 1,
'small_key': 5,
'small_key_mq': 6,
'dungeon_item': 1,
},
{
'name': 'Gerudo Training Ground',
'hint': 'the Gerudo Training Ground',
'font_color': 'Yellow',
'boss_key': 0,
'small_key': 9,
'small_key_mq': 3,
'dungeon_item': 0,
},
{
'name': 'Spirit Temple',
'hint': 'the Spirit Temple',
'font_color': 'Yellow',
'boss_key': 1,
'small_key': 5,
'small_key_mq': 7,
'dungeon_item': 1,
},
{
'name': 'Ganons Castle',
'hint': 'inside Ganon\'s Castle',
'boss_key': 1,
'small_key': 2,
'small_key_mq': 3,
'dungeon_item': 0,
},
]
def create_dungeons(world):
for dungeon_info in dungeon_table:
name = dungeon_info['name']
hint = dungeon_info['hint'] if 'hint' in dungeon_info else name
font_color = dungeon_info['font_color'] if 'font_color' in dungeon_info else 'White'
if world.settings.logic_rules == 'glitched':
if not world.dungeon_mq[name]:
dungeon_json = os.path.join(data_path('Glitched World'), name + '.json')
else:
dungeon_json = os.path.join(data_path('Glitched World'), name + ' MQ.json')
else:
if not world.dungeon_mq[name]:
dungeon_json = os.path.join(data_path('World'), name + '.json')
else:
dungeon_json = os.path.join(data_path('World'), name + ' MQ.json')
world.load_regions_from_json(dungeon_json)
boss_keys = ItemFactory(['Boss Key (%s)' % name] * dungeon_info['boss_key'])
if not world.dungeon_mq[dungeon_info['name']]:
small_keys = ItemFactory(['Small Key (%s)' % name] * dungeon_info['small_key'])
else:
small_keys = ItemFactory(['Small Key (%s)' % name] * dungeon_info['small_key_mq'])
dungeon_items = ItemFactory(['Map (%s)' % name,
'Compass (%s)' % name] * dungeon_info['dungeon_item'])
if world.settings.shuffle_mapcompass in ['any_dungeon', 'overworld']:
for item in dungeon_items:
item.priority = True
world.dungeons.append(Dungeon(world, name, hint, font_color, boss_keys, small_keys, dungeon_items))