Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 641b50a

Browse files
committedFeb 12, 2024
fix bugs in ER starting entrance and minhp item filling
1 parent f8281d5 commit 641b50a

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed
 

‎APWorld/__init__.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -171,20 +171,23 @@ def create_item(self, name: str) -> MinitItem:
171171
return MinitItem(name, item_clas, data.code, self.player)
172172

173173
def create_items(self):
174+
itemCount = 0
174175
for item_name, item_data in item_table.items():
175176
if (item_data.code and item_data.can_create(
176177
self,
177178
self.player)):
178179
if (item_name in item_frequencies):
179180
for count in range(item_frequencies[item_name]):
181+
itemCount += 1
180182
self.multiworld.itempool.append(
181183
self.create_item(item_name))
182184
else:
185+
itemCount += 1
183186
self.multiworld.itempool.append(
184187
self.create_item(item_name))
185188

186189
non_event_locations = [location for location in self.multiworld.get_locations(self.player) if not location.event]
187-
for _ in range(len(non_event_locations) - len(self.multiworld.itempool)):
190+
for _ in range(len(non_event_locations) - itemCount):
188191
item_name = self.get_filler_item_name()
189192
item_data = item_table[item_name]
190193
self.multiworld.itempool.append(
@@ -314,14 +317,14 @@ def create_regions(self):
314317
manual_connect_start.connect(manual_connect_end.parent_region)
315318
manual_connect_end.connect(manual_connect_start.parent_region)
316319
self.output_connections = [
317-
[
320+
(
318321
manual_connect_start.name,
319322
manual_connect_end.name
320-
],
321-
[
323+
),
324+
(
322325
manual_connect_end.name,
323326
manual_connect_start.name
324-
]
327+
)
325328
]
326329
# print(f"connecting {manual_connect_start.name} and {manual_connect_end.name}")
327330
# add_manual_connect = False

0 commit comments

Comments
 (0)
Please sign in to comment.