Skip to content

Commit

Permalink
Lingo: Demote warpless painting items to filler (ArchipelagoMW#2481)
Browse files Browse the repository at this point in the history
  • Loading branch information
hatkirby authored Nov 24, 2023
1 parent e93842a commit 1ff8ed3
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions worlds/lingo/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Archipelago init file for Lingo
"""
from BaseClasses import Item, Tutorial
from BaseClasses import Item, ItemClassification, Tutorial
from worlds.AutoWorld import WebWorld, World
from .items import ALL_ITEM_TABLE, LingoItem
from .locations import ALL_LOCATION_TABLE
Expand Down Expand Up @@ -90,7 +90,16 @@ def create_items(self):

def create_item(self, name: str) -> Item:
item = ALL_ITEM_TABLE[name]
return LingoItem(name, item.classification, item.code, self.player)

classification = item.classification
if hasattr(self, "options") and self.options.shuffle_paintings and len(item.painting_ids) > 0\
and len(item.door_ids) == 0 and all(painting_id not in self.player_logic.PAINTING_MAPPING
for painting_id in item.painting_ids):
# If this is a "door" that just moves one or more paintings, and painting shuffle is on and those paintings
# go nowhere, then this item should not be progression.
classification = ItemClassification.filler

return LingoItem(name, classification, item.code, self.player)

def set_rules(self):
self.multiworld.completion_condition[self.player] = lambda state: state.has("Victory", self.player)
Expand Down

0 comments on commit 1ff8ed3

Please sign in to comment.