@@ -249,13 +249,17 @@ def enemizer_path(self) -> str:
249
249
rom_name_available_event : threading .Event
250
250
has_progressive_bows : bool
251
251
dungeons : typing .Dict [str , Dungeon ]
252
+ waterfall_fairy_bottle_fill : str
253
+ pyramid_fairy_bottle_fill : str
252
254
253
255
def __init__ (self , * args , ** kwargs ):
254
256
self .dungeon_local_item_names = set ()
255
257
self .dungeon_specific_item_names = set ()
256
258
self .rom_name_available_event = threading .Event ()
257
259
self .has_progressive_bows = False
258
260
self .dungeons = {}
261
+ self .waterfall_fairy_bottle_fill = "Bottle"
262
+ self .pyramid_fairy_bottle_fill = "Bottle"
259
263
super (ALTTPWorld , self ).__init__ (* args , ** kwargs )
260
264
261
265
@classmethod
@@ -273,52 +277,62 @@ def stage_assert_generate(cls, multiworld: MultiWorld):
273
277
def generate_early (self ):
274
278
275
279
player = self .player
276
- world = self .multiworld
280
+ multiworld = self .multiworld
277
281
278
- if world .mode [player ] == 'standard' \
279
- and world .smallkey_shuffle [player ] \
280
- and world .smallkey_shuffle [player ] != smallkey_shuffle .option_universal \
281
- and world .smallkey_shuffle [player ] != smallkey_shuffle .option_own_dungeons \
282
- and world .smallkey_shuffle [player ] != smallkey_shuffle .option_start_with :
282
+ # fairy bottle fills
283
+ bottle_options = [
284
+ "Bottle (Red Potion)" , "Bottle (Green Potion)" , "Bottle (Blue Potion)" ,
285
+ "Bottle (Bee)" , "Bottle (Good Bee)"
286
+ ]
287
+ if multiworld .difficulty [player ] not in ["hard" , "expert" ]:
288
+ bottle_options .append ("Bottle (Fairy)" )
289
+ self .waterfall_fairy_bottle_fill = self .random .choice (bottle_options )
290
+ self .pyramid_fairy_bottle_fill = self .random .choice (bottle_options )
291
+
292
+ if multiworld .mode [player ] == 'standard' \
293
+ and multiworld .smallkey_shuffle [player ] \
294
+ and multiworld .smallkey_shuffle [player ] != smallkey_shuffle .option_universal \
295
+ and multiworld .smallkey_shuffle [player ] != smallkey_shuffle .option_own_dungeons \
296
+ and multiworld .smallkey_shuffle [player ] != smallkey_shuffle .option_start_with :
283
297
self .multiworld .local_early_items [self .player ]["Small Key (Hyrule Castle)" ] = 1
284
298
285
299
# system for sharing ER layouts
286
- self .er_seed = str (world .random .randint (0 , 2 ** 64 ))
300
+ self .er_seed = str (multiworld .random .randint (0 , 2 ** 64 ))
287
301
288
- if "-" in world .shuffle [player ]:
289
- shuffle , seed = world .shuffle [player ].split ("-" , 1 )
290
- world .shuffle [player ] = shuffle
302
+ if "-" in multiworld .shuffle [player ]:
303
+ shuffle , seed = multiworld .shuffle [player ].split ("-" , 1 )
304
+ multiworld .shuffle [player ] = shuffle
291
305
if shuffle == "vanilla" :
292
306
self .er_seed = "vanilla"
293
- elif seed .startswith ("group-" ) or world .is_race :
294
- self .er_seed = get_same_seed (world , (
295
- shuffle , seed , world .retro_caves [player ], world .mode [player ], world .logic [player ]))
307
+ elif seed .startswith ("group-" ) or multiworld .is_race :
308
+ self .er_seed = get_same_seed (multiworld , (
309
+ shuffle , seed , multiworld .retro_caves [player ], multiworld .mode [player ], multiworld .logic [player ]))
296
310
else : # not a race or group seed, use set seed as is.
297
311
self .er_seed = seed
298
- elif world .shuffle [player ] == "vanilla" :
312
+ elif multiworld .shuffle [player ] == "vanilla" :
299
313
self .er_seed = "vanilla"
300
314
for dungeon_item in ["smallkey_shuffle" , "bigkey_shuffle" , "compass_shuffle" , "map_shuffle" ]:
301
- option = getattr (world , dungeon_item )[player ]
315
+ option = getattr (multiworld , dungeon_item )[player ]
302
316
if option == "own_world" :
303
- world .local_items [player ].value |= self .item_name_groups [option .item_name_group ]
317
+ multiworld .local_items [player ].value |= self .item_name_groups [option .item_name_group ]
304
318
elif option == "different_world" :
305
- world .non_local_items [player ].value |= self .item_name_groups [option .item_name_group ]
306
- if world .mode [player ] == "standard" :
307
- world .non_local_items [player ].value -= {"Small Key (Hyrule Castle)" }
319
+ multiworld .non_local_items [player ].value |= self .item_name_groups [option .item_name_group ]
320
+ if multiworld .mode [player ] == "standard" :
321
+ multiworld .non_local_items [player ].value -= {"Small Key (Hyrule Castle)" }
308
322
elif option .in_dungeon :
309
323
self .dungeon_local_item_names |= self .item_name_groups [option .item_name_group ]
310
324
if option == "original_dungeon" :
311
325
self .dungeon_specific_item_names |= self .item_name_groups [option .item_name_group ]
312
326
313
- world .difficulty_requirements [player ] = difficulties [world .difficulty [player ]]
327
+ multiworld .difficulty_requirements [player ] = difficulties [multiworld .difficulty [player ]]
314
328
315
329
# enforce pre-defined local items.
316
- if world .goal [player ] in ["localtriforcehunt" , "localganontriforcehunt" ]:
317
- world .local_items [player ].value .add ('Triforce Piece' )
330
+ if multiworld .goal [player ] in ["localtriforcehunt" , "localganontriforcehunt" ]:
331
+ multiworld .local_items [player ].value .add ('Triforce Piece' )
318
332
319
333
# Not possible to place crystals outside boss prizes yet (might as well make it consistent with pendants too).
320
- world .non_local_items [player ].value -= item_name_groups ['Pendants' ]
321
- world .non_local_items [player ].value -= item_name_groups ['Crystals' ]
334
+ multiworld .non_local_items [player ].value -= item_name_groups ['Pendants' ]
335
+ multiworld .non_local_items [player ].value -= item_name_groups ['Crystals' ]
322
336
323
337
create_dungeons = create_dungeons
324
338
@@ -364,7 +378,6 @@ def create_regions(self):
364
378
world .register_indirect_condition (world .get_region (region_name , player ),
365
379
world .get_entrance (entrance_name , player ))
366
380
367
-
368
381
def collect_item (self , state : CollectionState , item : Item , remove = False ):
369
382
item_name = item .name
370
383
if item_name .startswith ('Progressive ' ):
@@ -693,13 +706,18 @@ def bool_to_text(variable: typing.Union[bool, str]) -> str:
693
706
spoiler_handle .write ('Prize shuffle %s\n ' % self .multiworld .shuffle_prizes [self .player ])
694
707
695
708
def write_spoiler (self , spoiler_handle : typing .TextIO ) -> None :
709
+ player_name = self .multiworld .get_player_name (self .player )
696
710
spoiler_handle .write ("\n \n Medallions:\n " )
697
- spoiler_handle .write (f"\n Misery Mire ({ self . multiworld . get_player_name ( self . player ) } ):"
711
+ spoiler_handle .write (f"\n Misery Mire ({ player_name } ):"
698
712
f" { self .multiworld .required_medallions [self .player ][0 ]} " )
699
713
spoiler_handle .write (
700
- f"\n Turtle Rock ({ self . multiworld . get_player_name ( self . player ) } ):"
714
+ f"\n Turtle Rock ({ player_name } ):"
701
715
f" { self .multiworld .required_medallions [self .player ][1 ]} " )
702
-
716
+ spoiler_handle .write ("\n \n Fairy Fountain Bottle Fill:\n " )
717
+ spoiler_handle .write (f"\n Pyramid Fairy ({ player_name } ):"
718
+ f" { self .pyramid_fairy_bottle_fill } " )
719
+ spoiler_handle .write (f"\n Waterfall Fairy ({ player_name } ):"
720
+ f" { self .waterfall_fairy_bottle_fill } " )
703
721
if self .multiworld .boss_shuffle [self .player ] != "none" :
704
722
def create_boss_map () -> typing .Dict :
705
723
boss_map = {
0 commit comments