Skip to content

Commit 33b966a

Browse files
Berserker66James McIntosh
authored andcommitted
LttP: make progression health optional (ArchipelagoMW#4918)
1 parent e11c615 commit 33b966a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

worlds/alttp/ItemPool.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -490,12 +490,16 @@ def cut_item(items, item_to_cut, minimum_items):
490490
# Otherwise, logic has some branches where having 4 hearts is one possible requirement (of several alternatives)
491491
# rather than making all hearts/heart pieces progression items (which slows down generation considerably)
492492
# We mark one random heart container as an advancement item (or 4 heart pieces in expert mode)
493-
if world.options.item_pool in ['easy', 'normal', 'hard'] and not (multiworld.custom and multiworld.customitemarray[30] == 0):
494-
next(item for item in items if item.name == 'Boss Heart Container').classification = ItemClassification.progression
495-
elif world.options.item_pool in ['expert'] and not (multiworld.custom and multiworld.customitemarray[29] < 4):
493+
try:
494+
next(item for item in items if item.name == 'Boss Heart Container').classification \
495+
|= ItemClassification.progression
496+
except StopIteration:
496497
adv_heart_pieces = (item for item in items if item.name == 'Piece of Heart')
497498
for i in range(4):
498-
next(adv_heart_pieces).classification = ItemClassification.progression
499+
try:
500+
next(adv_heart_pieces).classification |= ItemClassification.progression
501+
except StopIteration:
502+
break # logically health tanking is an option, so rules should still resolve to something beatable
499503

500504
world.required_medallions = (world.options.misery_mire_medallion.current_key.title(),
501505
world.options.turtle_rock_medallion.current_key.title())

0 commit comments

Comments
 (0)