fix: problem with enemizer bush enemies

This commit is contained in:
aerinon
2024-12-19 16:30:40 -07:00
parent 17e48e4e18
commit 804e693803
2 changed files with 3 additions and 2 deletions

View File

@@ -4,6 +4,7 @@
- Fixed generation error with Big Key in starting inventory (thanks Cody!) - Fixed generation error with Big Key in starting inventory (thanks Cody!)
- HMG/NL logic fixes by Muffins - HMG/NL logic fixes by Muffins
- Enemizer: Disabled Walking Zora in the UW due to crash with Swamola (they ignore a lot of collison anyway) - Enemizer: Disabled Walking Zora in the UW due to crash with Swamola (they ignore a lot of collison anyway)
- Enemizer: Fixed an issue with enemizer bush sprites
- Enemizer: Banned new Mimics from being the randomized bush sprite due to crash - Enemizer: Banned new Mimics from being the randomized bush sprite due to crash
- "Beatable" or "accessibility: none" can now use randomized trap doors to seal off entire parts of dungeons (was intended, bug prevented the logic skip) - "Beatable" or "accessibility: none" can now use randomized trap doors to seal off entire parts of dungeons (was intended, bug prevented the logic skip)
- Logic error with enemizer and standard should use new enemy logic rules - Logic error with enemizer and standard should use new enemy logic rules

View File

@@ -409,7 +409,7 @@ def randomize_overworld_enemies(data_tables, custom_ow):
sprite.kind = chosen.sprite sprite.kind = chosen.sprite
# randomize the bush sprite per area # randomize the bush sprite per area
bush_candidates = [x for x in candidate_sprites if x.bush_valid] bush_candidates = [x for x in candidate_sprites if x.bush_valid]
weight = [data_tables.ow_weights[r.sprite] for r in candidate_sprites] weight = [data_tables.ow_weights[r.sprite] for r in bush_candidates]
bush_sprite_choice = random.choices(bush_candidates, weight, k=1)[0] bush_sprite_choice = random.choices(bush_candidates, weight, k=1)[0]
data_tables.bush_sprite_table[area_id] = bush_sprite_choice data_tables.bush_sprite_table[area_id] = bush_sprite_choice
@@ -533,5 +533,5 @@ def write_enemy_shuffle_settings(world, player, rom):
for idx, pair in enumerate(tile_pattern): for idx, pair in enumerate(tile_pattern):
rom.write_byte(snes_to_pc(0x09BA2A + idx), (pair[0] + 3) * 16) rom.write_byte(snes_to_pc(0x09BA2A + idx), (pair[0] + 3) * 16)
rom.write_byte(snes_to_pc(0x09BA40 + idx), (pair[1] + 4) * 16) rom.write_byte(snes_to_pc(0x09BA40 + idx), (pair[1] + 4) * 16)
if world.enemy_shuffle[player] == 'random': if world.enemy_shuffle[player] == 'shuffled':
rom.write_byte(snes_to_pc(0x368100), 1) # randomize bushes rom.write_byte(snes_to_pc(0x368100), 1) # randomize bushes