-
Notifications
You must be signed in to change notification settings - Fork 1
/
_allocations.py
388 lines (373 loc) · 17.4 KB
/
_allocations.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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
#!/usr/bin/env python
# allocations of tiles by number of players
# dictionary of config type to a dictionary of allocations
# {
# "num_players": number of players,
# "num_tiles": number_of_tiles_per_player,
# "resource_influence_allocations": [(resource_allocation_player_1, influence_allocation_player_1), ...],
# # Wormholes will be allocated to first <num_wormholes> players
# # Allocation of specials (other than wormholes) to be randomly shuffled
# "specials_shuffled": [(total_specials_player_n, min_anomolies_player_n, min_blanks_player_n), ...],
# # Allocation of specials fixed to a given player number
# "specials_fixed": [(total_specials_player_1, min_anomolies_player_1, min_blanks_player_1), ...],
# Allocations of wormholes, -1 signifies remaining wormholes can be randomised
# }
# "specials_fixed" is optional
def get_allocations():
NUM_LEGENDARIES = 2
allocations_3_base = {
# 3 player game with all wormholes and 6 blanks/anomolies in play.
# Moderate resources.
(3, "base", "default", 0): {
"version": "base",
"style": "default",
"num_players": 3,
"num_tiles": 8,
"resource_influence_allocations": [(13, 14), (13, 14), (13, 14)],
"specials_shuffled": [(2, 1, 1), (2, 1, 1), (2, 1, 1)],
"wormholes": [0, 1, 3, 2],
"notes": "",
"min_legendaries": 0,
},
# 3 player game with all wormholes and 4 other red tiles in play.
# High resources.
# Uses base rules for red system allocation.
# No balancing of blanks and anomalies.
(3, "base", "original", 0): {
"version": "base",
"style": "original",
"num_players": 3,
"num_tiles": 8,
"resource_influence_allocations": [(14, 15), (14, 15), (14, 15)],
"specials_shuffled": [(0, 0, 0), (0, 0, 0), (0, 0, 0)],
"specials_fixed": [(1, 0, 0), (2, 0, 0), (1, 0, 0)],
"wormholes": [0, 1, 3, 2],
"notes": "",
"min_legendaries": 0,
},
}
allocations_3_pok = {
(3, "pok", "default", 0): {
"version": "pok",
"style": "default",
"num_players": 3,
"num_tiles": 8,
"resource_influence_allocations": [(14, 15), (14, 15), (14, 15)],
"specials_shuffled": [(0, 0, 0), (0, 0, 0), (0, 0, 0)],
"specials_fixed": [(1, 0, 1), (2, 1, 1), (2, 1, 1)],
"wormholes": [0, 3, 4, 5, -1, -1],
"notes": "Optionally include 82 Mallice.",
"min_legendaries": 0,
},
(3, "pok", "original", 0): {
"version": "pok",
"style": "original",
"num_players": 3,
"num_tiles": 8,
"resource_influence_allocations": [(14, 15), (14, 15), (14, 15)],
"specials_shuffled": [(0, 0, 0), (0, 0, 0), (0, 0, 0)],
"specials_fixed": [(1, 0, 0), (1, 0, 0), (1, 0, 0)],
"wormholes": [0, 3, 4, 5, -1, -1],
"notes": "Optionally include 82 Mallice.",
"min_legendaries": 0,
},
}
allocations_4_base = {
# 4 player game with all tiles in play.
(4, "base", "default", 0): {
"version": "base",
"style": "default",
"num_players": 4,
"num_tiles": 8,
"resource_influence_allocations": [(11, 13), (11, 12), (12, 12), (12, 12)],
"specials_shuffled": [(3, 1, 1), (3, 1, 1), (2, 1, 1), (2, 1, 1)],
"wormholes": [0, 1, 2, 3],
"notes": "",
"min_legendaries": 0,
},
# 4 player game with all tiles in play.
# Uses base rules for red system allocation.
# No balancing of blanks and anomalies.
(4, "base", "original", 0): {
"version": "base",
"style": "original",
"num_players": 4,
"num_tiles": 8,
"resource_influence_allocations": [(11, 13), (11, 12), (12, 12), (12, 12)],
"specials_shuffled": [(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)],
"specials_fixed": [(3, 0, 0), (3, 0, 0), (2, 0, 0), (2, 0, 0)],
"wormholes": [0, 1, 2, 3],
"notes": "",
"min_legendaries": 0,
},
}
allocations_4_pok = {
(4, "pok", "default", 0): {
"version": "pok",
"style": "default",
"num_players": 4,
"num_tiles": 8,
"resource_influence_allocations": [(14, 14), (14, 14), (14, 14), (14, 14)],
"specials_shuffled": [(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)],
"specials_fixed": [(3, 1, 1), (3, 1, 1), (3, 1, 1), (2, 0, 1)],
"wormholes": [0, 4, 1, 5],
"notes": "Optionally include 82 Mallice.",
"min_legendaries": 0,
},
(4, "pok", "original", 0): {
"version": "pok",
"style": "original",
"num_players": 4,
"num_tiles": 8,
"resource_influence_allocations": [(14, 14), (14, 14), (14, 14), (14, 14)],
"specials_shuffled": [(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)],
"specials_fixed": [(3, 0, 0), (3, 0, 0), (3, 0, 0), (2, 0, 0)],
"wormholes": [0, 4, 1, 5],
"notes": "Optionally include 82 Mallice.",
"min_legendaries": 0,
},
}
allocations_5_base = {
# 5 player game with one blank and one 1/1 system removed.
(5, "base", "default", 0): {
"version": "base",
"style": "default",
"num_players": 5,
"num_tiles": 6,
"resource_influence_allocations": [(9, 10), (9, 10), (9, 10), (9, 9), (9, 9)],
"specials_shuffled": [(2, 1, 1), (2, 1, 1), (2, 1, 1), (1, 1, 0), (1, 1, 0)],
"specials_fixed": [(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (1, 0, 1)],
"wormholes": [0, 1, 2, 3],
"notes": "Place one red tile from shared next to Mecatol Rex.",
"min_legendaries": 0,
},
# 5 player game with two 1/1 systems removed.
# Uses base rules for red system allocation.
# No balancing of blanks and anomalies
(5, "base", "original", 0): {
"version": "base",
"style": "original",
"num_players": 5,
"num_tiles": 6,
"resource_influence_allocations": [(10, 10), (9, 10), (9, 10), (9, 10), (9, 9)],
"specials_shuffled": [(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)],
"specials_fixed": [(2, 0, 0), (2, 0, 0), (1, 0, 0), (1, 0, 0), (2, 0, 0)],
"wormholes": [0, 1, 2, 3],
"notes": "Place one red tile from shared next to Mecatol Rex.",
"min_legendaries": 0,
},
# 5 player game configured for use with a warp zone.
(5, "base", "hyperlane", 0): {
"version": "base",
"style": "hyperlane",
"num_players": 5,
"num_tiles": 5,
"resource_influence_allocations": [(8, 9), (8, 9), (8, 9), (8, 9), (8, 9)],
"specials_shuffled": [(1, 1, 0), (1, 1, 0), (1, 1, 0), (1, 0, 1), (1, 0, 1)],
"specials_fixed": [(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (1, 1, 0)],
"wormholes": [0, 1, 2, 3],
"notes": "Include hyperlanes 83A, 84A, 85A, 86A, 87A, 88A.",
"min_legendaries": 0,
},
}
allocations_5_pok = {
(5, "pok", "default", 0): {
"version": "pok",
"style": "default",
"num_players": 5,
"num_tiles": 6,
"resource_influence_allocations": [(10, 10), (10, 10), (10, 10), (10, 10), (10, 10)],
"specials_shuffled": [(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)],
"specials_fixed": [(2, 1, 1), (2, 1, 1), (2, 1, 1), (1, 0, 1), (1, 1, 0)],
"wormholes": [0, 4, 1, 5, -1],
"notes": "Place one red tile from shared next to Mecatol Rex. Optionally include 82 Mallice.",
"min_legendaries": 0,
},
(5, "pok", "original", 0): {
"version": "pok",
"style": "original",
"num_players": 5,
"num_tiles": 6,
"resource_influence_allocations": [(10, 10), (10, 10), (10, 10), (10, 10), (10, 10)],
"specials_shuffled": [(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)],
"specials_fixed": [(2, 0, 0), (2, 0, 0), (2, 0, 0), (1, 0, 0), (1, 0, 0)],
"wormholes": [0, 4, 1, 5, -1],
"notes": "Place one red tile from shared next to Mecatol Rex. Optionally include 82 Mallice.",
"min_legendaries": 0,
},
(5, "pok", "hyperlane", 0): {
"version": "pok",
"style": "hyperlane",
"num_players": 5,
"num_tiles": 5,
"resource_influence_allocations": [(9, 9), (9, 9), (9, 9), (9, 9), (9, 9)],
"specials_shuffled": [(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)],
"specials_fixed": [(2, 1, 1), (2, 1, 1), (2, 1, 1), (1, 0, 1), (1, 1, 0)],
"wormholes": [0, 4, 1, 5, -1],
"notes": "Include hyperlanes 83A, 84A, 85A, 86A, 87A, 88A. Optionally include 82 Mallice.",
"min_legendaries": 0,
},
}
allocations_6_base = {
# 6 player game with two blank systems removed.
(6, "base", "default", 0): {
"version": "base",
"style": "default",
"num_players": 6,
"num_tiles": 5,
"resource_influence_allocations": [(8, 8), (8, 8), (8, 8), (8, 8), (7, 8), (7, 9)],
"specials_shuffled": [(1, 1, 0), (1, 1, 0), (1, 1, 0), (1, 0, 1), (1, 0, 1), (1, 0, 1)],
"specials_fixed": [(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (1, 1, 0), (1, 1, 0)],
"wormholes": [0, 1, 2, 3],
"notes": "",
"min_legendaries": 0,
},
# 6 player game with two 1/1 systems removed.
# Uses base rules for red system allocation.
# No balancing of blanks and anomalies.
(6, "base", "original", 0): {
"version": "base",
"style": "original",
"num_players": 6,
"num_tiles": 5,
"resource_influence_allocations": [(8, 7), (8, 8), (7, 8), (7, 8), (7, 8), (7, 8)],
"specials_shuffled": [(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)],
"specials_fixed": [(2, 0, 0), (2, 0, 0), (1, 0, 0), (1, 0, 0), (2, 0, 0), (2, 0, 0)],
"wormholes": [0, 1, 2, 3],
"notes": "",
"min_legendaries": 0,
},
}
allocations_6_pok = {
(6, "pok", "default", 0): {
"version": "pok",
"style": "default",
"num_players": 6,
"num_tiles": 5,
"resource_influence_allocations": [(8, 8), (8, 8), (8, 8), (8, 8), (8, 8), (8, 8)],
"specials_shuffled": [(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)],
"specials_fixed": [(2, 1, 1), (2, 1, 1), (2, 1, 1), (1, 0, 1), (2, 1, 1), (2, 1, 1)],
"wormholes": [0, 4, 1, 5, -1, -1],
"notes": "Optionally include 82 Mallice.",
"min_legendaries": 0,
},
(6, "pok", "original", 0): {
"version": "pok",
"style": "original",
"num_players": 6,
"num_tiles": 5,
"resource_influence_allocations": [(8, 8), (8, 8), (8, 8), (8, 8), (8, 8), (8, 8)],
"specials_shuffled": [(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)],
"specials_fixed": [(2, 0, 0), (2, 0, 0), (2, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0)],
"wormholes": [0, 4, 1, 5, -1, -1],
"notes": "Optionally include 82 Mallice.",
"min_legendaries": 0,
},
(6, "pok", "large", 2): {
"version": "pok",
"style": "large",
"num_players": 6,
"num_tiles": 9,
"resource_influence_allocations": [(15, 15), (15, 15), (15, 15), (15, 14), (15, 14), (15, 14)],
"specials_shuffled": [(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)],
"specials_fixed": [(3, 1, 1), (3, 1, 1), (3, 1, 1), (2, 0, 1), (2, 1, 0), (2, 1, 0)],
"wormholes": [0, 4, 1, 5, -1, -1],
"notes": "4 ring galaxy. Optionally include 82 Mallice.",
"min_legendaries": 2,
},
}
allocations_7_pok = {
(7, "pok", "default", 0): {
"version": "pok",
"style": "default",
"num_players": 7,
"num_tiles": 6,
"resource_influence_allocations": [(11, 11), (11, 11), (11, 11), (11, 11), (11, 11), (11, 11), (11, 11)],
"specials_shuffled": [(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)],
"specials_fixed": [(2, 1, 1), (2, 1, 1), (2, 1, 1), (1, 0, 1), (1, 1, 0), (1, 1, 0), (2, 1, 1)],
"wormholes": [0, 4, 1, 5, -1, -1],
"notes": "Place 2 red and 3 blue tiles from shared adjacent to Mecatol Rex. Include hyperlanes 83A, 84A, 85A, 86A, 87A, 88A. Optionally include 82 Mallice.",
"min_legendaries": 0,
},
(7, "pok", "original", 0): {
"version": "pok",
"style": "original",
"num_players": 7,
"num_tiles": 6,
"resource_influence_allocations": [(11, 11), (11, 11), (11, 11), (11, 11), (11, 11), (11, 11), (11, 11)],
"specials_shuffled": [(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)],
"specials_fixed": [(2, 0, 0), (2, 0, 0), (2, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (2, 0, 0)],
"wormholes": [0, 4, 1, 5, -1, -1],
"notes": "Place 2 red and 3 blue tiles from shared adjacent to Mecatol Rex. Include hyperlanes 83A, 84A, 85A, 86A, 87A, 88A. Optionally include 82 Mallice.",
"min_legendaries": 0,
},
(7, "pok", "alternate", 0): {
"version": "pok",
"style": "alternate",
"num_players": 7,
"num_tiles": 5,
"resource_influence_allocations": [(9, 9), (9, 9), (9, 9), (9, 9), (9, 9), (9, 9), (9, 9)],
"specials_shuffled": [(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)],
"specials_fixed": [(2, 1, 1), (2, 1, 1), (2, 1, 1), (1, 0, 1), (1, 1, 0), (1, 1, 0), (2, 1, 1)],
"wormholes": [0, 4, 1, 5, -1, -1],
"notes": "Include hyperlanes 83B, 84B, 85B, 86B, 88B, 90B. Optionally include 82 Mallice.",
"min_legendaries": 0,
},
}
allocations_8_pok = {
(8, "pok", "default", 0): {
"version": "pok",
"style": "default",
"num_players": 8,
"num_tiles": 6,
"resource_influence_allocations": [(10, 10), (10, 10), (10, 10), (10, 10), (10, 10), (10, 10), (10, 10), (10, 10)],
"specials_shuffled": [(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)],
"specials_fixed": [(2, 1, 1), (2, 1, 1), (2, 1, 1), (1, 0, 1), (1, 1, 0), (1, 1, 0), (2, 1, 1), (2, 1, 1)],
"wormholes": [0, 4, 1, 5, -1, -1],
"notes": "Place 2 red and 2 blue tiles from shared adjacent to Mecatol Rex. Optionally include 82 Mallice.",
"min_legendaries": 0,
},
(8, "pok", "original", 0): {
"version": "pok",
"style": "original",
"num_players": 8,
"num_tiles": 6,
"resource_influence_allocations": [(10, 10), (10, 10), (10, 10), (10, 10), (10, 10), (10, 10), (10, 10), (10, 10)],
"specials_shuffled": [(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)],
"specials_fixed": [(2, 0, 0), (2, 0, 0), (2, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (2, 0, 0), (2, 0, 0)],
"wormholes": [0, 4, 1, 5, -1, -1],
"notes": "Place 2 red and 2 blue tiles from shared adjacent to Mecatol Rex. Optionally include 82 Mallice.",
"min_legendaries": 0,
},
(8, "pok", "alternate", 0): {
"version": "pok",
"style": "alternate",
"num_players": 8,
"num_tiles": 5,
"resource_influence_allocations": [(9, 8), (9, 8), (9, 8), (9, 8), (9, 8), (9, 8), (9, 8), (9, 8)],
"specials_shuffled": [(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)],
"specials_fixed": [(2, 1, 1), (2, 1, 1), (2, 1, 1), (1, 0, 1), (1, 1, 0), (1, 1, 0), (2, 1, 1), (2, 1, 1)],
"wormholes": [0, 4, 1, 5, -1, -1],
"notes": "Include hyperlanes 83B, 85B, 87A, 88A, 89B, 90B. Optionally include 82 Mallice.",
"min_legendaries": 0,
},
}
ALL_ALLOCATIONS = [
allocations_3_base,
allocations_3_pok,
allocations_4_base,
allocations_4_pok,
allocations_5_base,
allocations_5_pok,
allocations_6_base,
allocations_6_pok,
allocations_7_pok,
allocations_8_pok,
]
return {
(v["num_players"], v["version"], v["style"], leg): v
for alloc in ALL_ALLOCATIONS
for _, v in alloc.items()
for leg in range(NUM_LEGENDARIES + 1)
if (v["min_legendaries"] <= leg and v["version"] == "pok") or (leg == 0 and v["version"] == "base")
}