Skip to content

Commit

Permalink
bumpstik: apply access rule to Hazards check
Browse files Browse the repository at this point in the history
  • Loading branch information
FelicitusNeko committed Oct 2, 2023
1 parent c82adf7 commit aef1f6f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions worlds/bumpstik/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,28 +108,25 @@ def create_items(self):
item_pool += self._create_item_in_quantities(
name, frequencies[i])

item_delta = len(location_table) - len(item_pool) - 1
item_delta = len(location_table) - len(item_pool)
if item_delta > 0:
item_pool += self._create_item_in_quantities(
"Score Bonus", item_delta)

self.multiworld.itempool += item_pool

def set_rules(self):
forbid_item(self.multiworld.get_location("Bonus Booster 5", self.player),
"Booster Bumper", self.player)
for x in range(1, 33):
self.multiworld.get_location(f"Treasure Bumper {x}", self.player).access_rule = \
lambda state, x = x: state.has("Treasure Bumper", self.player, x)
for x in range(1, 6):
self.multiworld.get_location(f"Bonus Booster {x}", self.player).access_rule = \
lambda state, x = x: state.has("Booster Bumper", self.player, x)
self.multiworld.get_location("Level 5 - Cleared all Hazards", self.player).access_rule = \
lambda state: state.has("Hazard Bumper", self.player, 25)


def generate_basic(self):
self.multiworld.get_location("Level 5 - Cleared all Hazards", self.player).place_locked_item(
self.create_item(self.get_filler_item_name()))

self.multiworld.completion_condition[self.player] = \
lambda state: state.has("Booster Bumper", self.player, 5) and \
state.has("Treasure Bumper", self.player, 32)

0 comments on commit aef1f6f

Please sign in to comment.