@@ -508,7 +508,7 @@ def cut_item(items, item_to_cut, minimum_items):
508
508
multiworld .itempool += items
509
509
510
510
if multiworld .retro_caves [player ]:
511
- set_up_take_anys (multiworld , player ) # depends on world.itempool to be set
511
+ set_up_take_anys (multiworld , world , player ) # depends on world.itempool to be set
512
512
513
513
514
514
take_any_locations = {
@@ -528,30 +528,30 @@ def cut_item(items, item_to_cut, minimum_items):
528
528
take_any_locations .sort ()
529
529
530
530
531
- def set_up_take_anys (world , player ):
531
+ def set_up_take_anys (multiworld , world , player ):
532
532
# these are references, do not modify these lists in-place
533
- if world .mode [player ] == 'inverted' :
533
+ if multiworld .mode [player ] == 'inverted' :
534
534
take_any_locs = take_any_locations_inverted
535
535
else :
536
536
take_any_locs = take_any_locations
537
537
538
- regions = world .random .sample (take_any_locs , 5 )
538
+ regions = multiworld .random .sample (take_any_locs , 5 )
539
539
540
- old_man_take_any = LTTPRegion ("Old Man Sword Cave" , LTTPRegionType .Cave , 'the sword cave' , player , world )
541
- world .regions .append (old_man_take_any )
540
+ old_man_take_any = LTTPRegion ("Old Man Sword Cave" , LTTPRegionType .Cave , 'the sword cave' , player , multiworld )
541
+ multiworld .regions .append (old_man_take_any )
542
542
543
543
reg = regions .pop ()
544
- entrance = world .get_region (reg , player ).entrances [0 ]
545
- connect_entrance (world , entrance .name , old_man_take_any .name , player )
544
+ entrance = multiworld .get_region (reg , player ).entrances [0 ]
545
+ connect_entrance (multiworld , entrance .name , old_man_take_any .name , player )
546
546
entrance .target = 0x58
547
547
old_man_take_any .shop = TakeAny (old_man_take_any , 0x0112 , 0xE2 , True , True , total_shop_slots )
548
- world .shops .append (old_man_take_any .shop )
548
+ multiworld .shops .append (old_man_take_any .shop )
549
549
550
- swords = [item for item in world .itempool if item .player == player and item .type == 'Sword' ]
550
+ swords = [item for item in multiworld .itempool if item .player == player and item .type == 'Sword' ]
551
551
if swords :
552
- sword = world .random .choice (swords )
553
- world .itempool .remove (sword )
554
- world .itempool .append (item_factory ('Rupees (20)' , world ))
552
+ sword = multiworld .random .choice (swords )
553
+ multiworld .itempool .remove (sword )
554
+ multiworld .itempool .append (item_factory ('Rupees (20)' , world ))
555
555
old_man_take_any .shop .add_inventory (0 , sword .name , 0 , 0 )
556
556
loc_name = "Old Man Sword Cave"
557
557
location = ALttPLocation (player , loc_name , shop_table_by_location [loc_name ], parent = old_man_take_any )
@@ -562,16 +562,16 @@ def set_up_take_anys(world, player):
562
562
old_man_take_any .shop .add_inventory (0 , 'Rupees (300)' , 0 , 0 )
563
563
564
564
for num in range (4 ):
565
- take_any = LTTPRegion ("Take-Any #{}" .format (num + 1 ), LTTPRegionType .Cave , 'a cave of choice' , player , world )
566
- world .regions .append (take_any )
565
+ take_any = LTTPRegion ("Take-Any #{}" .format (num + 1 ), LTTPRegionType .Cave , 'a cave of choice' , player , multiworld )
566
+ multiworld .regions .append (take_any )
567
567
568
- target , room_id = world .random .choice ([(0x58 , 0x0112 ), (0x60 , 0x010F ), (0x46 , 0x011F )])
568
+ target , room_id = multiworld .random .choice ([(0x58 , 0x0112 ), (0x60 , 0x010F ), (0x46 , 0x011F )])
569
569
reg = regions .pop ()
570
- entrance = world .get_region (reg , player ).entrances [0 ]
571
- connect_entrance (world , entrance .name , take_any .name , player )
570
+ entrance = multiworld .get_region (reg , player ).entrances [0 ]
571
+ connect_entrance (multiworld , entrance .name , take_any .name , player )
572
572
entrance .target = target
573
573
take_any .shop = TakeAny (take_any , room_id , 0xE3 , True , True , total_shop_slots + num + 1 )
574
- world .shops .append (take_any .shop )
574
+ multiworld .shops .append (take_any .shop )
575
575
take_any .shop .add_inventory (0 , 'Blue Potion' , 0 , 0 )
576
576
take_any .shop .add_inventory (1 , 'Boss Heart Container' , 0 , 0 )
577
577
location = ALttPLocation (player , take_any .name , shop_table_by_location [take_any .name ], parent = take_any )
0 commit comments