Skip to content

Commit d70792a

Browse files
committed
Merge 'Include random starting items in effective starting items' (#2575)
2 parents 468f0ec + 1bedd1f commit d70792a

6 files changed

Lines changed: 6 additions & 18 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Fix a visual bug where ice traps appear very large if Link is wearing the Bunny Hood or hovering using the Hover Boots.
55
* Fix a vanilla bug where the player can become unable to move when the Hookshot is pulled but fails to load.
66
* Fix a bug where the item on the `Song from Saria` location could be obtained multiple times by savewarping on the first frame after obtaining it, then returning to the location.
7+
* Fix a generator failure when a dungeon reward is selected as a random starting item and the Temple of Time altar is set to hint dungeon reward locations.
78

89
# 9.1
910

Hints.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1834,10 +1834,7 @@ def build_misc_item_hints(world: World, messages: list[Message], allow_duplicate
18341834
for hint_type, data in misc_item_hint_table.items():
18351835
if hint_type in world.settings.misc_hints:
18361836
item = world.misc_hint_items[hint_type]
1837-
if (
1838-
(item in world.distribution.effective_starting_items and world.distribution.effective_starting_items[item].count > 0) or
1839-
(item in world.distribution.randomized_starting_items and world.distribution.randomized_starting_items[item] > 0)
1840-
):
1837+
if item in world.distribution.effective_starting_items and world.distribution.effective_starting_items[item].count > 0:
18411838
if item == data['default_item']:
18421839
text = data['default_item_text'].format(area='#your pocket#')
18431840
else:

ItemPool.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,6 @@ def get_pool_core(world: World) -> tuple[list[str], dict[str, Item]]:
10431043
world.randomized_starting_items[selected_item] = world.randomized_starting_items.get(selected_item, 0) + 1
10441044
pool.remove(selected_item)
10451045
pool.extend(get_junk_item())
1046-
add_random_starting_items_ammo(world.randomized_starting_items)
10471046
for item, count in world.randomized_starting_items.items():
10481047
if item in REWARD_COLORS and count > 0:
10491048
world.hinted_dungeon_reward_locations[item] = None
@@ -1136,10 +1135,3 @@ def configure_random_starting_items_pool(world: World, pool: list[str]) -> list[
11361135
exclude_list.extend(ItemInfo.junk_weight)
11371136

11381137
return sorted({item for item in pool if item not in exclude_list and ItemInfo.items[item].type != 'Shop'}) # give each item the same weight regardless of how many copies there are
1139-
1140-
1141-
def add_random_starting_items_ammo(randomized_starting_items: dict[str, int]) -> None:
1142-
for item in StartingItems.inventory.values():
1143-
if item.item_name in randomized_starting_items and item.ammo:
1144-
for ammo, qty in item.ammo.items():
1145-
randomized_starting_items[ammo] = qty[randomized_starting_items[item.item_name] - 1]

Patches.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2000,7 +2000,6 @@ def update_scrub_text(message: bytearray, text_replacement: list[str], default_p
20002000

20012001
# actually write the save table to rom
20022002
world.distribution.give_items(world, save_context)
2003-
world.distribution.give_randomized_items(world, save_context)
20042003
if world.settings.starting_age == 'adult':
20052004
# When starting as adult, the pedestal doesn't handle child default equips when going back child the first time, so we have to equip them ourselves
20062005
save_context.equip_default_items('child')

Plandomizer.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,10 +1050,6 @@ def give_items(self, world: World, save_context: SaveContext) -> None:
10501050
continue
10511051
save_context.give_item(world, name, record.count)
10521052

1053-
def give_randomized_items(self, world: World, save_context: SaveContext) -> None:
1054-
for item, count in world.randomized_starting_items.items():
1055-
save_context.give_item(world, item, count)
1056-
10571053
def get_starting_item(self, item: str) -> int:
10581054
items = self.starting_items
10591055
if item in items:
@@ -1082,6 +1078,9 @@ def starting_items(self) -> dict[str, StarterRecord]:
10821078
def configure_effective_starting_items(self, worlds: list[World], world: World) -> None:
10831079
items = {item_name: record.copy() for item_name, record in self.starting_items.items()}
10841080

1081+
for item, count in world.randomized_starting_items.items():
1082+
add_starting_item_with_ammo(items, item, count)
1083+
10851084
if world.settings.start_with_rupees:
10861085
add_starting_item_with_ammo(items, 'Rupees', 999)
10871086
if world.settings.start_with_consumables:

version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '9.1.7'
1+
__version__ = '9.1.8'
22

33
# This is a supplemental version number for branches based off of main dev.
44
supplementary_version = 0

0 commit comments

Comments
 (0)