-
Notifications
You must be signed in to change notification settings - Fork 365
/
Copy pathItemList.py
877 lines (804 loc) · 32.6 KB
/
ItemList.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
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
from collections import namedtuple
import logging
import random
from Items import ItemFactory
#This file sets the item pools for various modes. Timed modes and triforce hunt are enforced first, and then extra items are specified per mode to fill in the remaining space.
#Some basic items that various modes require are placed here, including pendants and crystals. Medallion requirements for the two relevant entrances are also decided.
alwaysitems = ([
'Biggoron Sword',
'Boomerang',
'Lens of Truth',
'Hammer',
'Iron Boots',
'Goron Tunic',
'Zora Tunic',
'Hover Boots',
'Mirror Shield',
'Stone of Agony',
'Fire Arrows',
'Ice Arrows',
'Light Arrows',
'Dins Fire',
'Farores Wind',
'Rupee (1)']
+ ['Progressive Hookshot'] * 2
+ ['Deku Shield']
+ ['Hylian Shield']
+ ['Progressive Strength Upgrade'] * 3
+ ['Progressive Scale'] * 2
+ ['Recovery Heart'] * 6
+ ['Bow']
+ ['Slingshot']
+ ['Bomb Bag']
+ ['Bottle with Letter']
+ ['Bombs (5)'] * 2
+ ['Bombs (10)']
+ ['Bombs (20)']
+ ['Arrows (5)']
+ ['Arrows (10)'] * 5
+ ['Progressive Wallet'] * 2
+ ['Magic Meter']
+ ['Piece of Heart (Treasure Chest Game)'])
DT_vanilla = (['Recovery Heart'] * 2)
DT_MQ = (['Deku Shield'] * 2
+ ['Rupees (50)'])
DC_vanilla = (['Rupees (20)'])
DC_MQ = (['Hylian Shield']
+ ['Rupees (5)'])
JB_MQ = (['Deku Nuts (5)'] * 4
+ ['Recovery Heart']
+ ['Deku Shield']
+ ['Deku Stick (1)'])
FoT_vanilla = (['Recovery Heart']
+ ['Arrows (10)']
+ ['Arrows (30)'])
FoT_MQ = (['Arrows (5)'])
FiT_vanilla = (['Rupees (200)'])
FiT_MQ = (['Bombs (20)']
+ ['Hylian Shield'])
SpT_vanilla = (['Deku Shield'] * 2
+ ['Recovery Heart']
+ ['Bombs (20)'])
SpT_MQ = (['Rupees (50)'] * 2
+ ['Arrows (30)'])
ShT_vanilla = (['Arrows (30)'])
ShT_MQ = (['Arrows (5)'] * 2
+ ['Rupees (20)'])
BW_vanilla = (['Recovery Heart']
+ ['Bombs (10)']
+ ['Rupees (200)']
+ ['Deku Nuts (5)']
+ ['Deku Nuts (10)']
+ ['Deku Shield']
+ ['Hylian Shield'])
GTG_vanilla = (['Arrows (30)'] * 3
+ ['Rupees (200)'])
GTG_MQ = (['Rupee (Treasure Chest Game)'] * 2
+ ['Arrows (10)']
+ ['Rupee (1)']
+ ['Rupees (50)'])
GC_vanilla = (['Rupees (5)'] * 3
+ ['Arrows (30)'])
GC_MQ = (['Arrows (10)'] * 2
+ ['Bombs (5)']
+ ['Rupees (20)']
+ ['Recovery Heart'])
normal_bottles = [
'Bottle',
'Bottle with Milk',
'Bottle with Red Potion',
'Bottle with Green Potion',
'Bottle with Blue Potion',
'Bottle with Fairy',
'Bottle with Fish',
'Bottle with Bugs',
'Bottle with Poe',
'Bottle with Big Poe',
'Bottle with Blue Fire']
normal_bottle_count = 3
normal_rupees = (
['Rupees (5)'] * 13
+ ['Rupees (20)'] * 5
+ ['Rupees (50)'] * 7
+ ['Rupees (200)'] * 3)
shopsanity_rupees = (
['Rupees (5)'] * 2
+ ['Rupees (20)'] * 10
+ ['Rupees (50)'] * 10
+ ['Rupees (200)'] * 5
+ ['Progressive Wallet'])
vanilla_shop_items = {
'Kokiri Shop Item 1': 'Buy Deku Shield',
'Kokiri Shop Item 2': 'Buy Deku Nut (5)',
'Kokiri Shop Item 3': 'Buy Deku Nut (10)',
'Kokiri Shop Item 4': 'Buy Deku Stick (1)',
'Kokiri Shop Item 5': 'Buy Deku Seeds (30)',
'Kokiri Shop Item 6': 'Buy Arrows (10)',
'Kokiri Shop Item 7': 'Buy Arrows (30)',
'Kokiri Shop Item 8': 'Buy Heart',
'Kakariko Potion Shop Item 1': 'Buy Deku Nut (5)',
'Kakariko Potion Shop Item 2': 'Buy Fish',
'Kakariko Potion Shop Item 3': 'Buy Red Potion [30]',
'Kakariko Potion Shop Item 4': 'Buy Green Potion',
'Kakariko Potion Shop Item 5': 'Buy Blue Fire',
'Kakariko Potion Shop Item 6': 'Buy Bottle Bug',
'Kakariko Potion Shop Item 7': 'Buy Poe',
'Kakariko Potion Shop Item 8': 'Buy Fairy\'s Spirit',
'Bombchu Shop Item 1': 'Buy Bombchu (5)',
'Bombchu Shop Item 2': 'Buy Bombchu (10)',
'Bombchu Shop Item 3': 'Buy Bombchu (10)',
'Bombchu Shop Item 4': 'Buy Bombchu (10)',
'Bombchu Shop Item 5': 'Buy Bombchu (20)',
'Bombchu Shop Item 6': 'Buy Bombchu (20)',
'Bombchu Shop Item 7': 'Buy Bombchu (20)',
'Bombchu Shop Item 8': 'Buy Bombchu (20)',
'Castle Town Potion Shop Item 1': 'Buy Green Potion',
'Castle Town Potion Shop Item 2': 'Buy Blue Fire',
'Castle Town Potion Shop Item 3': 'Buy Red Potion [30]',
'Castle Town Potion Shop Item 4': 'Buy Fairy\'s Spirit',
'Castle Town Potion Shop Item 5': 'Buy Deku Nut (5)',
'Castle Town Potion Shop Item 6': 'Buy Bottle Bug',
'Castle Town Potion Shop Item 7': 'Buy Poe',
'Castle Town Potion Shop Item 8': 'Buy Fish',
'Castle Town Bazaar Item 1': 'Buy Hylian Shield',
'Castle Town Bazaar Item 2': 'Buy Bombs (5) [35]',
'Castle Town Bazaar Item 3': 'Buy Deku Nut (5)',
'Castle Town Bazaar Item 4': 'Buy Heart',
'Castle Town Bazaar Item 5': 'Buy Arrows (10)',
'Castle Town Bazaar Item 6': 'Buy Arrows (50)',
'Castle Town Bazaar Item 7': 'Buy Deku Stick (1)',
'Castle Town Bazaar Item 8': 'Buy Arrows (30)',
'Kakariko Bazaar Item 1': 'Buy Hylian Shield',
'Kakariko Bazaar Item 2': 'Buy Bombs (5) [35]',
'Kakariko Bazaar Item 3': 'Buy Deku Nut (5)',
'Kakariko Bazaar Item 4': 'Buy Heart',
'Kakariko Bazaar Item 5': 'Buy Arrows (10)',
'Kakariko Bazaar Item 6': 'Buy Arrows (50)',
'Kakariko Bazaar Item 7': 'Buy Deku Stick (1)',
'Kakariko Bazaar Item 8': 'Buy Arrows (30)',
'Zora Shop Item 1': 'Buy Zora Tunic',
'Zora Shop Item 2': 'Buy Arrows (10)',
'Zora Shop Item 3': 'Buy Heart',
'Zora Shop Item 4': 'Buy Arrows (30)',
'Zora Shop Item 5': 'Buy Deku Nut (5)',
'Zora Shop Item 6': 'Buy Arrows (50)',
'Zora Shop Item 7': 'Buy Fish',
'Zora Shop Item 8': 'Buy Red Potion [50]',
'Goron Shop Item 1': 'Buy Bombs (5) [25]',
'Goron Shop Item 2': 'Buy Bombs (10)',
'Goron Shop Item 3': 'Buy Bombs (20)',
'Goron Shop Item 4': 'Buy Bombs (30)',
'Goron Shop Item 5': 'Buy Goron Tunic',
'Goron Shop Item 6': 'Buy Heart',
'Goron Shop Item 7': 'Buy Red Potion [40]',
'Goron Shop Item 8': 'Buy Heart',
}
min_shop_items = (
['Buy Deku Shield']
+ ['Buy Hylian Shield']
+ ['Buy Goron Tunic']
+ ['Buy Zora Tunic']
+ ['Buy Deku Nut (5)'] * 2 + ['Buy Deku Nut (10)']
+ ['Buy Deku Stick (1)'] * 2
+ ['Buy Deku Seeds (30)']
+ ['Buy Arrows (10)'] * 2 + ['Buy Arrows (30)'] + ['Buy Arrows (50)']
+ ['Buy Bombchu (5)'] + ['Buy Bombchu (10)'] * 2 + ['Buy Bombchu (20)']
+ ['Buy Bombs (5) [25]'] + ['Buy Bombs (5) [35]'] + ['Buy Bombs (10)'] + ['Buy Bombs (20)']
+ ['Buy Green Potion']
+ ['Buy Red Potion [30]']
+ ['Buy Blue Fire']
+ ['Buy Fairy\'s Spirit']
+ ['Buy Bottle Bug']
+ ['Buy Fish'])
vanilla_deku_scrubs = {
'ZR Grotto Deku Scrub Red Potion': 'Buy Red Potion [30]',
'ZR Grotto Deku Scrub Green Potion': 'Buy Green Potion',
'SFM Grotto Deku Scrub Red Potion': 'Buy Red Potion [30]',
'SFM Grotto Deku Scrub Green Potion': 'Buy Green Potion',
'LH Grotto Deku Scrub Deku Nuts': 'Buy Deku Nut (5)',
'LH Grotto Deku Scrub Bombs': 'Buy Bombs (5) [35]',
'LH Grotto Deku Scrub Arrows': 'Buy Arrows (30)',
'Valley Grotto Deku Scrub Red Potion': 'Buy Red Potion [30]',
'Valley Grotto Deku Scrub Green Potion': 'Buy Green Potion',
'LW Deku Scrub Deku Nuts': 'Buy Deku Nut (5)',
'LW Deku Scrub Deku Sticks': 'Buy Deku Stick (1)',
'LW Grotto Deku Scrub Arrows': 'Buy Arrows (30)',
'Desert Grotto Deku Scrub Red Potion': 'Buy Red Potion [30]',
'Desert Grotto Deku Scrub Green Potion': 'Buy Green Potion',
'DMC Deku Scrub Bombs': 'Buy Bombs (5) [35]',
'DMC Grotto Deku Scrub Deku Nuts': 'Buy Deku Nut (5)',
'DMC Grotto Deku Scrub Bombs': 'Buy Bombs (5) [35]',
'DMC Grotto Deku Scrub Arrows': 'Buy Arrows (30)',
'Goron Grotto Deku Scrub Deku Nuts': 'Buy Deku Nut (5)',
'Goron Grotto Deku Scrub Bombs': 'Buy Bombs (5) [35]',
'Goron Grotto Deku Scrub Arrows': 'Buy Arrows (30)',
'LLR Grotto Deku Scrub Deku Nuts': 'Buy Deku Nut (5)',
'LLR Grotto Deku Scrub Bombs': 'Buy Bombs (5) [35]',
'LLR Grotto Deku Scrub Arrows': 'Buy Arrows (30)',
}
deku_scrubs_items = (
['Deku Nuts (5)'] * 5
+ ['Deku Stick (1)']
+ ['Bombs (5)'] * 5
+ ['Recovery Heart'] * 4
+ ['Rupees (5)'] * 4 # ['Green Potion']
)
rewardlist = [
'Kokiri Emerald',
'Goron Ruby',
'Zora Sapphire',
'Forest Medallion',
'Fire Medallion',
'Water Medallion',
'Spirit Medallion',
'Shadow Medallion',
'Light Medallion']
songlist = [
'Zeldas Lullaby',
'Eponas Song',
'Suns Song',
'Sarias Song',
'Song of Time',
'Song of Storms',
'Minuet of Forest',
'Prelude of Light',
'Bolero of Fire',
'Serenade of Water',
'Nocturne of Shadow',
'Requiem of Spirit']
skulltula_locations = ([
'GS Kokiri Know It All House',
'GS Kokiri Bean Patch',
'GS Kokiri House of Twins',
'GS Lost Woods Bean Patch Near Bridge',
'GS Lost Woods Bean Patch Near Stage',
'GS Lost Woods Above Stage',
'GS Sacred Forest Meadow',
'GS Hyrule Field near Kakariko',
'GS Hyrule Field Near Gerudo Valley',
'GS Castle Market Guard House',
'GS Hyrule Castle Tree',
'GS Hyrule Castle Grotto',
'GS Outside Ganon\'s Castle',
'GS Lon Lon Ranch Tree',
'GS Lon Lon Ranch Rain Shed',
'GS Lon Lon Ranch House Window',
'GS Lon Lon Ranch Back Wall',
'GS Kakariko House Under Construction',
'GS Kakariko Skulltula House',
'GS Kakariko Guard\'s House',
'GS Kakariko Tree',
'GS Kakariko Watchtower',
'GS Kakariko Above Impa\'s House',
'GS Graveyard Wall',
'GS Graveyard Bean Patch',
'GS Mountain Trail Bean Patch',
'GS Mountain Trail Bomb Alcove',
'GS Mountain Trail Path to Crater',
'GS Mountain Trail Above Dodongo\'s Cavern',
'GS Goron City Boulder Maze',
'GS Goron City Center Platform',
'GS Death Mountain Crater Crate',
'GS Mountain Crater Bean Patch',
'GS Zora River Ladder',
'GS Zora River Tree',
'GS Zora River Near Raised Grottos',
'GS Zora River Above Bridge',
'GS Zora\'s Domain Frozen Waterfall',
'GS Zora\'s Fountain Tree',
'GS Zora\'s Fountain Above the Log',
'GS Zora\'s Fountain Hidden Cave',
'GS Lake Hylia Bean Patch',
'GS Lake Hylia Lab Wall',
'GS Lake Hylia Small Island',
'GS Lake Hylia Giant Tree',
'GS Lab Underwater Crate',
'GS Gerudo Valley Small Bridge',
'GS Gerudo Valley Bean Patch',
'GS Gerudo Valley Behind Tent',
'GS Gerudo Valley Pillar',
'GS Gerudo Fortress Archery Range',
'GS Gerudo Fortress Top Floor',
'GS Wasteland Ruins',
'GS Desert Colossus Bean Patch',
'GS Desert Colossus Tree',
'GS Desert Colossus Hill'])
tradeitems = (
'Pocket Egg',
'Pocket Cucco',
'Cojiro',
'Odd Mushroom',
'Poachers Saw',
'Broken Sword',
'Prescription',
'Eyeball Frog',
'Eyedrops',
'Claim Check')
tradeitemoptions = (
'pocket_egg',
'pocket_cucco',
'cojiro',
'odd_mushroom',
'poachers_saw',
'broken_sword',
'prescription',
'eyeball_frog',
'eyedrops',
'claim_check')
eventlocations = {
'Ganon': 'Triforce',
'Zeldas Letter': 'Zeldas Letter',
'Magic Bean Salesman': 'Magic Bean',
'King Zora Moves': 'Bottle',
'Master Sword Pedestal': 'Master Sword',
'Epona': 'Epona',
'Deku Baba Sticks': 'Deku Stick Drop',
'Goron City Stick Pot': 'Deku Stick Drop',
'Zoras Domain Stick Pot': 'Deku Stick Drop',
'Deku Baba Nuts': 'Deku Nut Drop',
'Zoras Domain Nut Pot': 'Deku Nut Drop',
'Gerudo Fortress Carpenter Rescue': 'Carpenter Rescue',
'Ganons Castle Forest Trial Clear': 'Forest Trial Clear',
'Ganons Castle Fire Trial Clear': 'Fire Trial Clear',
'Ganons Castle Water Trial Clear': 'Water Trial Clear',
'Ganons Castle Shadow Trial Clear': 'Shadow Trial Clear',
'Ganons Castle Spirit Trial Clear': 'Spirit Trial Clear',
'Ganons Castle Light Trial Clear': 'Light Trial Clear'
}
junk_pool = (
8 * ['Bombs (5)'] +
2 * ['Bombs (10)'] +
8 * ['Arrows (5)'] +
2 * ['Arrows (10)'] +
5 * ['Deku Stick (1)'] +
5 * ['Deku Nuts (5)'] +
5 * ['Deku Seeds (30)'] +
10 * ['Rupees (5)'] +
4 * ['Rupees (20)'] +
1 * ['Rupees (50)'])
def get_junk_item(count=1):
ret_junk = []
for _ in range(count):
ret_junk.append(random.choice(junk_pool))
return ret_junk
def generate_itempool(world):
for location, item in eventlocations.items():
world.push_item(location, ItemFactory(item, world))
world.get_location(location).locked = True
# set up item pool
(pool, placed_items) = get_pool_core(world)
world.itempool = ItemFactory(pool, world)
for (location, item) in placed_items.items():
world.push_item(location, ItemFactory(item, world))
world.get_location(location).locked = True
choose_trials(world)
fill_bosses(world)
world.initialize_items()
def get_pool_core(world):
pool = []
placed_items = {}
if world.shuffle_kokiri_sword:
pool.append('Kokiri Sword')
else:
placed_items['Kokiri Sword Chest'] = 'Kokiri Sword'
if world.shuffle_weird_egg:
pool.append('Weird Egg')
else:
placed_items['Malon Egg'] = 'Weird Egg'
if world.shuffle_ocarinas:
pool.extend(['Ocarina'] * 2)
else:
placed_items['Gift from Saria'] = 'Ocarina'
placed_items['Ocarina of Time'] = 'Ocarina'
if world.dungeon_mq['DT']:
skulltula_locations_final = skulltula_locations + [
'GS Deku Tree MQ Lobby',
'GS Deku Tree MQ Compass Room',
'GS Deku Tree MQ Basement Ceiling',
'GS Deku Tree MQ Basement Back Room']
else:
skulltula_locations_final = skulltula_locations + [
'GS Deku Tree Compass Room',
'GS Deku Tree Basement Vines',
'GS Deku Tree Basement Gate',
'GS Deku Tree Basement Back Room']
if world.dungeon_mq['DC']:
skulltula_locations_final.extend([
'GS Dodongo\'s Cavern MQ Scrub Room',
'GS Dodongo\'s Cavern MQ Song of Time Block Room',
'GS Dodongo\'s Cavern MQ Lizalfos Room',
'GS Dodongo\'s Cavern MQ Larva Room',
'GS Dodongo\'s Cavern MQ Back Area'])
else:
skulltula_locations_final.extend([
'GS Dodongo\'s Cavern East Side Room',
'GS Dodongo\'s Cavern Vines Above Stairs',
'GS Dodongo\'s Cavern Back Room',
'GS Dodongo\'s Cavern Alcove Above Stairs',
'GS Dodongo\'s Cavern Scarecrow'])
if world.dungeon_mq['JB']:
skulltula_locations_final.extend([
'GS Jabu Jabu MQ Tailpasaran Room',
'GS Jabu Jabu MQ Invisible Enemies Room',
'GS Jabu Jabu MQ Boomerang Room',
'GS Jabu Jabu MQ Near Boss'])
else:
skulltula_locations_final.extend([
'GS Jabu Jabu Water Switch Room',
'GS Jabu Jabu Lobby Basement Lower',
'GS Jabu Jabu Lobby Basement Upper',
'GS Jabu Jabu Near Boss'])
if world.dungeon_mq['FoT']:
skulltula_locations_final.extend([
'GS Forest Temple MQ First Hallway',
'GS Forest Temple MQ Block Push Room',
'GS Forest Temple MQ Outdoor East',
'GS Forest Temple MQ Outdoor West',
'GS Forest Temple MQ Well'])
else:
skulltula_locations_final.extend([
'GS Forest Temple First Room',
'GS Forest Temple Lobby',
'GS Forest Temple Outdoor East',
'GS Forest Temple Outdoor West',
'GS Forest Temple Basement'])
if world.dungeon_mq['FiT']:
skulltula_locations_final.extend([
'GS Fire Temple MQ Above Fire Wall Maze',
'GS Fire Temple MQ Fire Wall Maze Center',
'GS Fire Temple MQ Big Lava Room',
'GS Fire Temple MQ Fire Wall Maze Side Room',
'GS Fire Temple MQ East Tower Top'])
else:
skulltula_locations_final.extend([
'GS Fire Temple Song of Time Room',
'GS Fire Temple Unmarked Bomb Wall',
'GS Fire Temple East Tower Climb',
'GS Fire Temple East Tower Top',
'GS Fire Temple Basement'])
if world.dungeon_mq['WT']:
skulltula_locations_final.extend([
'GS Water Temple MQ Before Upper Water Switch',
'GS Water Temple MQ North Basement',
'GS Water Temple MQ Lizalfos Hallway',
'GS Water Temple MQ Serpent River',
'GS Water Temple MQ South Basement'])
else:
skulltula_locations_final.extend([
'GS Water Temple South Basement',
'GS Water Temple Serpent River',
'GS Water Temple Falling Platform Room',
'GS Water Temple Central Room',
'GS Water Temple Near Boss Key Chest'])
if world.dungeon_mq['SpT']:
skulltula_locations_final.extend([
'GS Spirit Temple MQ Lower Adult Right',
'GS Spirit Temple MQ Lower Adult Left',
'GS Spirit Temple MQ Iron Knuckle West',
'GS Spirit Temple MQ Iron Knuckle North',
'GS Spirit Temple MQ Sun Block Room'])
else:
skulltula_locations_final.extend([
'GS Spirit Temple Metal Fence',
'GS Spirit Temple Bomb for Light Room',
'GS Spirit Temple Hall to West Iron Knuckle',
'GS Spirit Temple Boulder Room',
'GS Spirit Temple Lobby'])
if world.dungeon_mq['ShT']:
skulltula_locations_final.extend([
'GS Shadow Temple MQ Crusher Room',
'GS Shadow Temple MQ Wind Hint Room',
'GS Shadow Temple MQ After Wind',
'GS Shadow Temple MQ After Ship',
'GS Shadow Temple MQ Near Boss'])
else:
skulltula_locations_final.extend([
'GS Shadow Temple Like Like Room',
'GS Shadow Temple Crusher Room',
'GS Shadow Temple Single Giant Pot',
'GS Shadow Temple Near Ship',
'GS Shadow Temple Triple Giant Pot'])
if world.dungeon_mq['BW']:
skulltula_locations_final.extend([
'GS Well MQ Basement',
'GS Well MQ Coffin Room',
'GS Well MQ West Inner Room'])
else:
skulltula_locations_final.extend([
'GS Well West Inner Room',
'GS Well East Inner Room',
'GS Well Like Like Cage'])
if world.dungeon_mq['IC']:
skulltula_locations_final.extend([
'GS Ice Cavern MQ Scarecrow',
'GS Ice Cavern MQ Ice Block',
'GS Ice Cavern MQ Red Ice'])
else:
skulltula_locations_final.extend([
'GS Ice Cavern Spinning Scythe Room',
'GS Ice Cavern Heart Piece Room',
'GS Ice Cavern Push Block Room'])
if world.tokensanity == 'off':
for location in skulltula_locations_final:
placed_items[location] = 'Gold Skulltula Token'
elif world.tokensanity == 'dungeons':
for location in skulltula_locations_final:
if world.get_location(location).scene >= 0x0A:
placed_items[location] = 'Gold Skulltula Token'
else:
pool.append('Gold Skulltula Token')
else:
pool.extend(['Gold Skulltula Token'] * 100)
if world.bombchus_in_logic:
pool.extend(['Bombchus'])
if world.difficulty == 'normal':
pool.extend(['Bombchus'] * 3)
elif world.difficulty == 'hard':
pool.extend(['Bombchus'] * 2)
pool.extend(get_junk_item(1))
else:
pool.extend(get_junk_item(3))
if world.dungeon_mq['JB']:
if world.difficulty == 'normal':
pool.extend(['Bombchus'])
else:
pool.extend(get_junk_item(1))
if world.dungeon_mq['SpT']:
if world.difficulty == 'normal':
pool.extend(['Bombchus'] * 2)
else:
pool.extend(get_junk_item(2))
if not world.dungeon_mq['BW']:
if world.difficulty == 'normal':
pool.extend(['Bombchus'])
else:
pool.extend(get_junk_item(1))
if world.dungeon_mq['GTG']:
if world.difficulty == 'normal':
pool.extend(['Bombchus'])
else:
pool.extend(get_junk_item(1))
else:
pool.extend(['Bombchus (5)'])
if world.difficulty == 'very_hard' or world.difficulty == 'ohko':
pool.extend(get_junk_item(2))
else:
pool.extend(['Bombchus (10)'] * 2)
if world.dungeon_mq['JB']:
if world.difficulty == 'normal':
pool.extend(['Bombchus (10)'])
else:
pool.extend(get_junk_item(1))
if world.dungeon_mq['SpT']:
if world.difficulty == 'normal':
pool.extend(['Bombchus (10)'] * 2)
else:
pool.extend(get_junk_item(2))
if not world.dungeon_mq['BW']:
if world.difficulty == 'normal':
pool.extend(['Bombchus (10)'])
else:
pool.extend(get_junk_item(1))
if world.dungeon_mq['GTG']:
if world.difficulty == 'normal':
pool.extend(['Bombchus (10)'])
else:
pool.extend(get_junk_item(1))
if world.difficulty == 'normal':
if world.dungeon_mq['GC']:
pool.extend(['Bombchus (10)'])
else:
pool.extend(['Bombchus (20)'])
else:
pool.extend(get_junk_item(1))
if world.difficulty == 'ohko':
pool.extend(['Recovery Heart'])
if not world.dungeon_mq['GTG']:
pool.extend(['Recovery Heart'])
if not world.dungeon_mq['GC']:
pool.extend(['Recovery Heart'] * 4)
else:
pool.extend(['Ice Trap'])
if not world.dungeon_mq['GTG']:
pool.extend(['Ice Trap'])
if not world.dungeon_mq['GC']:
pool.extend(['Ice Trap'] * 4)
if world.difficulty == 'normal':
pool.extend(['Magic Meter', 'Double Defense', 'Deku Stick Capacity', 'Deku Nut Capacity', 'Bow', 'Slingshot', 'Bomb Bag'] + ['Heart Container'] * 8)
else:
pool.extend(get_junk_item(15))
if world.difficulty == 'very_hard' or world.difficulty == 'ohko':
pool.extend(get_junk_item(41))
else:
pool.extend(['Nayrus Love', 'Deku Stick Capacity', 'Deku Nut Capacity', 'Bow', 'Slingshot', 'Bomb Bag'] + ['Piece of Heart'] * 35)
if world.gerudo_fortress == 'open':
placed_items['Gerudo Fortress North F1 Carpenter'] = 'Recovery Heart'
placed_items['Gerudo Fortress North F2 Carpenter'] = 'Recovery Heart'
placed_items['Gerudo Fortress South F1 Carpenter'] = 'Recovery Heart'
placed_items['Gerudo Fortress South F2 Carpenter'] = 'Recovery Heart'
elif world.shuffle_smallkeys == 'keysanity':
if world.gerudo_fortress == 'fast':
pool.append('Small Key (Gerudo Fortress)')
placed_items['Gerudo Fortress North F2 Carpenter'] = 'Recovery Heart'
placed_items['Gerudo Fortress South F1 Carpenter'] = 'Recovery Heart'
placed_items['Gerudo Fortress South F2 Carpenter'] = 'Recovery Heart'
else:
pool.extend(['Small Key (Gerudo Fortress)'] * 4)
else:
if world.gerudo_fortress == 'fast':
placed_items['Gerudo Fortress North F1 Carpenter'] = 'Small Key (Gerudo Fortress)'
placed_items['Gerudo Fortress North F2 Carpenter'] = 'Recovery Heart'
placed_items['Gerudo Fortress South F1 Carpenter'] = 'Recovery Heart'
placed_items['Gerudo Fortress South F2 Carpenter'] = 'Recovery Heart'
else:
placed_items['Gerudo Fortress North F1 Carpenter'] = 'Small Key (Gerudo Fortress)'
placed_items['Gerudo Fortress North F2 Carpenter'] = 'Small Key (Gerudo Fortress)'
placed_items['Gerudo Fortress South F1 Carpenter'] = 'Small Key (Gerudo Fortress)'
placed_items['Gerudo Fortress South F2 Carpenter'] = 'Small Key (Gerudo Fortress)'
if world.shuffle_gerudo_card and world.gerudo_fortress != 'open':
pool.append('Gerudo Membership Card')
else:
placed_items['Gerudo Fortress Membership Card'] = 'Gerudo Membership Card'
if world.shopsanity == 'off':
placed_items.update(vanilla_shop_items)
if world.bombchus_in_logic:
placed_items['Kokiri Shop Item 8'] = 'Buy Bombchu (5)'
placed_items['Castle Town Bazaar Item 4'] = 'Buy Bombchu (5)'
placed_items['Kakariko Bazaar Item 4'] = 'Buy Bombchu (5)'
pool.extend(normal_rupees)
else:
remain_shop_items = [item for _,item in vanilla_shop_items.items()]
pool.extend(min_shop_items)
for item in min_shop_items:
remain_shop_items.remove(item)
shop_slots_count = len(remain_shop_items)
shop_nonitem_count = len(world.shop_prices)
shop_item_count = shop_slots_count - shop_nonitem_count
pool.extend(random.sample(remain_shop_items, shop_item_count))
pool.extend(get_junk_item(shop_nonitem_count))
if world.shopsanity == '0':
pool.extend(normal_rupees)
else:
pool.extend(shopsanity_rupees)
if world.shuffle_scrubs != 'off':
if world.dungeon_mq['DT']:
pool.append('Deku Shield')
if world.dungeon_mq['DC']:
pool.extend(['Deku Stick (1)', 'Deku Shield', 'Recovery Heart'])
else:
pool.extend(['Deku Nuts (5)', 'Deku Stick (1)', 'Deku Shield'])
if not world.dungeon_mq['JB']:
pool.append('Deku Nuts (5)')
if world.dungeon_mq['GC']:
pool.extend(['Bombs (5)', 'Recovery Heart', 'Rupees (5)', 'Deku Nuts (5)'])
else:
pool.extend(['Bombs (5)', 'Recovery Heart', 'Rupees (5)'])
pool.extend(deku_scrubs_items)
for _ in range(7):
pool.append('Arrows (30)' if random.randint(0,3) > 0 else 'Deku Seeds (30)')
else:
if world.dungeon_mq['DT']:
placed_items['DT MQ Deku Scrub Deku Shield'] = 'Buy Deku Shield'
if world.dungeon_mq['DC']:
placed_items['DC MQ Deku Scrub Deku Sticks'] = 'Buy Deku Stick (1)'
placed_items['DC MQ Deku Scrub Deku Seeds'] = 'Buy Deku Seeds (30)'
placed_items['DC MQ Deku Scrub Deku Shield'] = 'Buy Deku Shield'
placed_items['DC MQ Deku Scrub Red Potion'] = 'Buy Red Potion [30]'
else:
placed_items['DC Deku Scrub Deku Nuts'] = 'Buy Deku Nut (5)'
placed_items['DC Deku Scrub Deku Sticks'] = 'Buy Deku Stick (1)'
placed_items['DC Deku Scrub Deku Seeds'] = 'Buy Deku Seeds (30)'
placed_items['DC Deku Scrub Deku Shield'] = 'Buy Deku Shield'
if not world.dungeon_mq['JB']:
placed_items['Jabu Deku Scrub Deku Nuts'] = 'Buy Deku Nut (5)'
if world.dungeon_mq['GC']:
placed_items['GC MQ Deku Scrub Deku Nuts'] = 'Buy Deku Nut (5)'
placed_items['GC MQ Deku Scrub Bombs'] = 'Buy Bombs (5) [35]'
placed_items['GC MQ Deku Scrub Arrows'] = 'Buy Arrows (30)'
placed_items['GC MQ Deku Scrub Red Potion'] = 'Buy Red Potion [30]'
placed_items['GC MQ Deku Scrub Green Potion'] = 'Buy Green Potion'
else:
placed_items['GC Deku Scrub Bombs'] = 'Buy Bombs (5) [35]'
placed_items['GC Deku Scrub Arrows'] = 'Buy Arrows (30)'
placed_items['GC Deku Scrub Red Potion'] = 'Buy Red Potion [30]'
placed_items['GC Deku Scrub Green Potion'] = 'Buy Green Potion'
placed_items.update(vanilla_deku_scrubs)
pool.extend(alwaysitems)
if world.dungeon_mq['DT']:
pool.extend(DT_MQ)
else:
pool.extend(DT_vanilla)
if world.dungeon_mq['DC']:
pool.extend(DC_MQ)
else:
pool.extend(DC_vanilla)
if world.dungeon_mq['JB']:
pool.extend(JB_MQ)
if world.dungeon_mq['FoT']:
pool.extend(FoT_MQ)
else:
pool.extend(FoT_vanilla)
if world.dungeon_mq['FiT']:
pool.extend(FiT_MQ)
else:
pool.extend(FiT_vanilla)
if world.dungeon_mq['SpT']:
pool.extend(SpT_MQ)
else:
placed_items['Spirit Temple Nut Crate'] = 'Deku Nut Drop'
pool.extend(SpT_vanilla)
if world.dungeon_mq['ShT']:
pool.extend(ShT_MQ)
else:
pool.extend(ShT_vanilla)
if not world.dungeon_mq['BW']:
placed_items['Bottom of the Well Stick Pot'] = 'Deku Stick Drop'
pool.extend(BW_vanilla)
if world.dungeon_mq['GTG']:
pool.extend(GTG_MQ)
else:
pool.extend(GTG_vanilla)
if world.dungeon_mq['GC']:
pool.extend(GC_MQ)
else:
pool.extend(GC_vanilla)
for _ in range(normal_bottle_count):
bottle = random.choice(normal_bottles)
pool.append(bottle)
if world.big_poe_count_random:
world.big_poe_count = random.randint(1, 10)
tradeitem = random.choice(tradeitems)
earliest_trade = tradeitemoptions.index(world.logic_earliest_adult_trade)
latest_trade = tradeitemoptions.index(world.logic_latest_adult_trade)
if earliest_trade > latest_trade:
earliest_trade, latest_trade = latest_trade, earliest_trade
tradeitem = random.choice(tradeitems[earliest_trade:latest_trade+1])
pool.append(tradeitem)
pool.extend(songlist)
if world.shuffle_mapcompass == 'remove' or world.shuffle_mapcompass == 'startwith':
for item in [item for dungeon in world.dungeons for item in dungeon.dungeon_items]:
world.state.collect(item)
pool.extend(get_junk_item())
if world.shuffle_smallkeys == 'remove':
for item in [item for dungeon in world.dungeons for item in dungeon.small_keys]:
world.state.collect(item)
pool.extend(get_junk_item())
if world.shuffle_bosskeys == 'remove':
for item in [item for dungeon in world.dungeons for item in dungeon.boss_key]:
world.state.collect(item)
pool.extend(get_junk_item())
if not world.keysanity and not world.dungeon_mq['FiT']:
world.state.collect(ItemFactory('Small Key (Fire Temple)'))
return (pool, placed_items)
def choose_trials(world):
if world.trials_random:
world.trials = random.randint(0, 6)
num_trials = int(world.trials)
choosen_trials = random.sample(['Forest', 'Fire', 'Water', 'Spirit', 'Shadow', 'Light'], num_trials)
for trial in world.skipped_trials:
if trial not in choosen_trials:
world.skipped_trials[trial] = True
def fill_bosses(world, bossCount=9):
boss_rewards = ItemFactory(rewardlist, world)
boss_locations = [
world.get_location('Queen Gohma'),
world.get_location('King Dodongo'),
world.get_location('Barinade'),
world.get_location('Phantom Ganon'),
world.get_location('Volvagia'),
world.get_location('Morpha'),
world.get_location('Bongo Bongo'),
world.get_location('Twinrova'),
world.get_location('Links Pocket')]
placed_prizes = [loc.item.name for loc in boss_locations if loc.item is not None]
unplaced_prizes = [item for item in boss_rewards if item.name not in placed_prizes]
empty_boss_locations = [loc for loc in boss_locations if loc.item is None]
prizepool = list(unplaced_prizes)
prize_locs = list(empty_boss_locations)
while bossCount:
bossCount -= 1
random.shuffle(prizepool)
random.shuffle(prize_locs)
item = prizepool.pop()
loc = prize_locs.pop()
world.push_item(loc, item)