FFMQ: No Longer Allow Inaccessible Useful Items (#4323)
Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>
This commit is contained in:
parent
ac8a206d46
commit
5b0de6b6c7
|
@ -211,9 +211,12 @@ def stage_set_rules(multiworld):
|
|||
# If there's no enemies, there's no repeatable income sources
|
||||
no_enemies_players = [player for player in multiworld.get_game_players("Final Fantasy Mystic Quest")
|
||||
if multiworld.worlds[player].options.enemies_density == "none"]
|
||||
if (len([item for item in multiworld.itempool if item.classification in (ItemClassification.filler,
|
||||
ItemClassification.trap)]) > len([player for player in no_enemies_players if
|
||||
multiworld.worlds[player].options.accessibility == "minimal"]) * 3):
|
||||
if (
|
||||
len([item for item in multiworld.itempool if item.excludable]) >
|
||||
len([player
|
||||
for player in no_enemies_players
|
||||
if multiworld.worlds[player].options.accessibility != "minimal"]) * 3
|
||||
):
|
||||
for player in no_enemies_players:
|
||||
for location in vendor_locations:
|
||||
if multiworld.worlds[player].options.accessibility == "full":
|
||||
|
@ -221,11 +224,8 @@ def stage_set_rules(multiworld):
|
|||
else:
|
||||
multiworld.get_location(location, player).access_rule = lambda state: False
|
||||
else:
|
||||
# There are not enough junk items to fill non-minimal players' vendors. Just set an item rule not allowing
|
||||
# advancement items so that useful items can be placed.
|
||||
for player in no_enemies_players:
|
||||
for location in vendor_locations:
|
||||
multiworld.get_location(location, player).item_rule = lambda item: not item.advancement
|
||||
raise Exception(f"Not enough filler/trap items for FFMQ players with full and items accessibility. "
|
||||
f"Add more items or change the 'Enemies Density' option to something besides 'none'")
|
||||
|
||||
|
||||
class FFMQLocation(Location):
|
||||
|
|
Loading…
Reference in New Issue