Filler is now being placed yippe

This commit is contained in:
MarioSpore
2025-07-28 23:12:47 -04:00
parent 7e06efb1d0
commit 1762fefba9
4 changed files with 34 additions and 15 deletions

View File

@@ -1,6 +1,6 @@
from BaseClasses import Region, Item, ItemClassification
from .Locations import grinch_locations_to_id, grinch_locations, GrinchLocation
from .Items import grinch_items_to_id, GrinchItem, ALL_ITEMS_TABLE
from .Items import grinch_items_to_id, GrinchItem, ALL_ITEMS_TABLE, MISC_ITEMS_TABLE
from .Regions import connect_regions
from .Rules import set_rules
@@ -53,8 +53,17 @@ class GrinchWorld(World):
if item == "Heart of Stone":
for _ in range(3):
self_itempool.append(self.create_item(item))
#Get number of current unfilled locations
unfilled_locations: int = len(self.multiworld.get_unfilled_locations(self.player))
for _ in range(unfilled_locations):
self_itempool.append(self.create_item((self.get_other_filler_item(list(MISC_ITEMS_TABLE.keys())))))
self.multiworld.itempool += self_itempool
def set_rules(self):
self.multiworld.completion_condition[self.player] = lambda state: state.has("Goal", self.player)
set_rules(self)
set_rules(self)
def get_other_filler_item(self, other_filler: list[str]) -> str:
return self.random.choices(other_filler)[0]