From 21097333644ddc8f5d7a6d76e3d1edca01ddefa2 Mon Sep 17 00:00:00 2001 From: aerinon Date: Tue, 2 Jul 2024 09:51:50 -0600 Subject: [PATCH] fix: standardized enemy logic for mire 2 fix: applied new enemy logic for gt mimics 1 & 2 --- CHANGELOG.md | 2 ++ Main.py | 2 +- RELEASENOTES.md | 13 +++++++++++-- Rules.py | 19 ++++++++++--------- source/enemizer/EnemyLogic.py | 3 +-- 5 files changed, 25 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08bc1eba..707d2f06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ # Patch Notes Changelog archive +* 1.4.4 + - Fixed a crash near the end of the credits when total collection rate was over 1000 * 1.4.3 * Key Logic Algorithm: Renamed "Default" to "Dangerous" to indicate the potential soft-lock issues * Hera Basement Cage: Fix for small key counting multiple times (again) diff --git a/Main.py b/Main.py index b9ab774b..43bb4290 100644 --- a/Main.py +++ b/Main.py @@ -38,7 +38,7 @@ from source.enemizer.DamageTables import DamageTable from source.enemizer.Enemizer import randomize_enemies from source.rom.DataTables import init_data_tables -version_number = '1.4.4' +version_number = '1.4.5' version_branch = '-u' __version__ = f'{version_number}{version_branch}' diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 752187f5..e671bf72 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,4 +1,13 @@ # Patch Notes -1.4.4 -- Fixed a crash bear the end of the credits when total collection rate was over 1000 \ No newline at end of file +1.4.5 +- Logic: Added appropriate enemy logic to GT Mimics 1 and 2 rooms +- Logic: Added appropriate enemy logic to Mire 2 room. Note this does change the default logical strats, due to how enemy kill logic works. + - Ice Rod + 1 Bomb is now out of logic + - Fire Rod + 1 Bomb is now out of logic + - Fire Rod + 1 magic extension is still in logic + - Byrna + 1 magic extension is newly in logic + +(One magic extension is either half magic or a bottle with the ability to purchase a blue or green potion) + +In general, making up for a lack of magic extension with a few bombs is something that could be added to the logic. Using the ice rod to freeze an enemy and then using that enemy to deal blunt damage and then using bombs to clear the frozen enemy is another strategy that could be added to the logic someday. If these are important to you, let me know. \ No newline at end of file diff --git a/Rules.py b/Rules.py index b642f50a..ebe639a5 100644 --- a/Rules.py +++ b/Rules.py @@ -517,11 +517,12 @@ def global_rules(world, player): set_rule(world.get_entrance('Mire Post-Gap Gap', player), lambda state: state.has_Boots(player) or state.has('Hookshot', player)) set_rule(world.get_entrance('Mire Falling Bridge Hook Path', player), lambda state: state.has_Boots(player) or state.has('Hookshot', player)) set_rule(world.get_entrance('Mire Falling Bridge Hook Only Path', player), lambda state: state.has('Hookshot', player)) - set_rule(world.get_entrance('Mire 2 NE', player), lambda state: state.has_sword(player) or - (state.has('Fire Rod', player) and (state.can_use_bombs(player) or state.can_extend_magic(player, 9))) or # 9 fr shots or 8 with some bombs - (state.has('Ice Rod', player) and state.can_use_bombs(player)) or # freeze popo and throw, bomb to finish - state.has('Hammer', player) or state.has('Cane of Somaria', player) or state.can_shoot_arrows(player)) # need to defeat wizzrobes, bombs don't work ... - # byrna could work with sufficient magic + # Note: new enemy logic doesn't account for Fire Rod + Bombs or Ice Rod + Bombs yet + # set_rule(world.get_entrance('Mire 2 NE', player), lambda state: state.has_sword(player) or + # (state.has('Fire Rod', player) and (state.can_use_bombs(player) or state.can_extend_magic(player, 9))) or # 9 fr shots or 8 with some bombs + # (state.has('Ice Rod', player) and state.can_use_bombs(player)) or # freeze popo and throw, bomb to finish + # state.has('Hammer', player) or state.has('Cane of Somaria', player) or state.can_shoot_arrows(player)) # need to defeat wizzrobes, bombs don't work ... + # byrna could work with sufficient magic set_rule(world.get_location('Misery Mire - Spike Chest', player), lambda state: (state.world.can_take_damage and state.has_hearts(player, 4)) or state.has('Cane of Byrna', player) or state.has('Cape', player)) loc = world.get_location('Misery Mire - Spikes Pot Key', player) if loc.pot: @@ -603,10 +604,6 @@ def global_rules(world, player): set_rule(world.get_entrance('GT Ice Armos NE', player), lambda state: world.get_region('GT Ice Armos', player).dungeon.bosses['bottom'].can_defeat(state)) set_rule(world.get_entrance('GT Ice Armos WS', player), lambda state: world.get_region('GT Ice Armos', player).dungeon.bosses['bottom'].can_defeat(state)) - set_rule(world.get_entrance('GT Mimics 1 NW', player), lambda state: state.can_shoot_arrows(player)) - set_rule(world.get_entrance('GT Mimics 1 ES', player), lambda state: state.can_shoot_arrows(player)) - set_rule(world.get_entrance('GT Mimics 2 WS', player), lambda state: state.can_shoot_arrows(player)) - set_rule(world.get_entrance('GT Mimics 2 NE', player), lambda state: state.can_shoot_arrows(player)) # consider access to refill room - interior doors would need a change set_rule(world.get_entrance('GT Cannonball Bridge SE', player), lambda state: state.has_Boots(player)) set_rule(world.get_entrance('GT Lanmolas 2 ES', player), lambda state: world.get_region('GT Lanmolas 2', player).dungeon.bosses['middle'].can_defeat(state)) @@ -1452,6 +1449,10 @@ std_kill_rooms = { (['GT Petting Zoo SE'], [], 0x7d, [4, 5, 6, 7, 8, 10]), 'GT DMs Room': # Four red stalfos (['GT DMs Room SW'], [], 0x7b, [2, 3, 4, 5, 8, 9, 10]), + 'GT Mimics 1': # two red mimics + (['GT Mimics 1 NW', 'GT Mimics 1 ES'], [], 0x006b, [5, 6, 7, 8, 9]), + 'GT Mimics 2': # two red mimics + (['GT Mimics 2 NE', 'GT Mimics 2 WS'], [], 0x006b, [10, 11, 12, 13]), 'GT Gauntlet 1': # Stalfos/zazaks (['GT Gauntlet 1 WN'], [], 0x5d, [3, 4, 5, 6]), 'GT Gauntlet 2': # Red stalfos diff --git a/source/enemizer/EnemyLogic.py b/source/enemizer/EnemyLogic.py index 67f6eb38..df8a21c5 100644 --- a/source/enemizer/EnemyLogic.py +++ b/source/enemizer/EnemyLogic.py @@ -201,8 +201,7 @@ def find_possible_rules(vln_list, used_resources, world, player): flag = flag if flag < 0 else (hits + used_resources['Magic'] * 7 / 8) optional_clears[vln_sub_list].append((byrna_rule(world, player, flag), resources)) elif damage_type == 'FireRod' and hits + used_resources['Magic'] <= 160: - flag = min(vln[damage_type] for vln in vln_list.values()) - flag = flag if flag < 0 else (hits + used_resources['Magic']) + flag = hits + used_resources['Magic'] optional_clears[vln_sub_list].append((fire_rod_rule(world, player, flag), resources)) elif damage_type == 'IceRod' and hits + used_resources['Magic'] <= 160: flag = min(vln[damage_type] for vln in vln_list.values())