LttP: make progression health optional (#4918)

This commit is contained in:
Fabian Dill
2025-04-24 23:10:58 +02:00
committed by GitHub
parent 05c1751d29
commit d4110d3b2a

View File

@@ -490,12 +490,16 @@ def generate_itempool(world):
# Otherwise, logic has some branches where having 4 hearts is one possible requirement (of several alternatives) # Otherwise, logic has some branches where having 4 hearts is one possible requirement (of several alternatives)
# rather than making all hearts/heart pieces progression items (which slows down generation considerably) # rather than making all hearts/heart pieces progression items (which slows down generation considerably)
# We mark one random heart container as an advancement item (or 4 heart pieces in expert mode) # We mark one random heart container as an advancement item (or 4 heart pieces in expert mode)
if world.options.item_pool in ['easy', 'normal', 'hard'] and not (multiworld.custom and multiworld.customitemarray[30] == 0): try:
next(item for item in items if item.name == 'Boss Heart Container').classification = ItemClassification.progression next(item for item in items if item.name == 'Boss Heart Container').classification \
elif world.options.item_pool in ['expert'] and not (multiworld.custom and multiworld.customitemarray[29] < 4): |= ItemClassification.progression
except StopIteration:
adv_heart_pieces = (item for item in items if item.name == 'Piece of Heart') adv_heart_pieces = (item for item in items if item.name == 'Piece of Heart')
for i in range(4): for i in range(4):
next(adv_heart_pieces).classification = ItemClassification.progression try:
next(adv_heart_pieces).classification |= ItemClassification.progression
except StopIteration:
break # logically health tanking is an option, so rules should still resolve to something beatable
world.required_medallions = (world.options.misery_mire_medallion.current_key.title(), world.required_medallions = (world.options.misery_mire_medallion.current_key.title(),
world.options.turtle_rock_medallion.current_key.title()) world.options.turtle_rock_medallion.current_key.title())