TUNIC: ER Refactor for better plando connections, fewer shops improvement (#3075)

* Fixed shop changes

* Update option description

* Apply suggestions from Vi's review (thank you)

* Fix for plando connections on a full scene

* Plando connections should work better now for complicated paths

* Even more good plando connections yes

* Starting to move the info over

* Fixing up formatting a bit

* Remove unneeded item info

* Put in updated_reachable_regions, to replace add_dependent_regions

* Updated to match ladder shuffle

* More stuff I guess

* It functions!

* It mostly works with plando now, some slight issues still

* Fixed minor logic bug

* Fixed world leakage

* Change exception message

* Make exception message better for troubleshooting failed connections

* Merged with main

* technically a logic fix but it would never matter cause no start shuffle

* Add a couple more alias item groups cause yeah

* Rename beneath the vault front -> beneath the vault main

* Flip lantern access rule to the region

* Add missing connection to traversal reqs

* Move start_inventory_from_pool to the top so that it's next to start_inventory

* Reword the fixed shop description slightly

* Refactor per ixrec's comments

* Greatly reduced an overcomplicated block because Vi is cool and smart and also cool

* Rewrite traversal reqs thing per Vi's comments
This commit is contained in:
Scipio Wright
2024-05-19 19:01:24 -04:00
committed by GitHub
parent 12cde88f95
commit 754fc11c1b
6 changed files with 973 additions and 571 deletions

View File

@@ -268,7 +268,8 @@ def set_er_region_rules(world: "TunicWorld", ability_unlocks: Dict[str, int], re
connecting_region=regions["Overworld Well Ladder"],
rule=lambda state: has_ladder("Ladders in Well", state, player, options))
regions["Overworld Well Ladder"].connect(
connecting_region=regions["Overworld"])
connecting_region=regions["Overworld"],
rule=lambda state: has_ladder("Ladders in Well", state, player, options))
# nmg: can ice grapple through the door
regions["Overworld"].connect(
@@ -706,17 +707,18 @@ def set_er_region_rules(world: "TunicWorld", ability_unlocks: Dict[str, int], re
connecting_region=regions["Fortress Exterior from Overworld"])
regions["Beneath the Vault Ladder Exit"].connect(
connecting_region=regions["Beneath the Vault Front"],
rule=lambda state: has_ladder("Ladder to Beneath the Vault", state, player, options))
regions["Beneath the Vault Front"].connect(
connecting_region=regions["Beneath the Vault Main"],
rule=lambda state: has_ladder("Ladder to Beneath the Vault", state, player, options)
and has_lantern(state, player, options))
regions["Beneath the Vault Main"].connect(
connecting_region=regions["Beneath the Vault Ladder Exit"],
rule=lambda state: has_ladder("Ladder to Beneath the Vault", state, player, options))
regions["Beneath the Vault Front"].connect(
connecting_region=regions["Beneath the Vault Back"],
rule=lambda state: has_lantern(state, player, options))
regions["Beneath the Vault Main"].connect(
connecting_region=regions["Beneath the Vault Back"])
regions["Beneath the Vault Back"].connect(
connecting_region=regions["Beneath the Vault Front"])
connecting_region=regions["Beneath the Vault Main"],
rule=lambda state: has_lantern(state, player, options))
regions["Fortress East Shortcut Upper"].connect(
connecting_region=regions["Fortress East Shortcut Lower"])
@@ -870,6 +872,9 @@ def set_er_region_rules(world: "TunicWorld", ability_unlocks: Dict[str, int], re
regions["Rooted Ziggurat Portal Room Entrance"].connect(
connecting_region=regions["Rooted Ziggurat Lower Back"])
regions["Zig Skip Exit"].connect(
connecting_region=regions["Rooted Ziggurat Lower Front"])
regions["Rooted Ziggurat Portal"].connect(
connecting_region=regions["Rooted Ziggurat Portal Room Exit"],
rule=lambda state: state.has("Activate Ziggurat Fuse", player))
@@ -1453,8 +1458,6 @@ def set_er_location_rules(world: "TunicWorld", ability_unlocks: Dict[str, int])
# Beneath the Vault
set_rule(multiworld.get_location("Beneath the Fortress - Bridge", player),
lambda state: state.has_group("Melee Weapons", player, 1) or state.has_any({laurels, fire_wand}, player))
set_rule(multiworld.get_location("Beneath the Fortress - Obscured Behind Waterfall", player),
lambda state: has_lantern(state, player, options))
# Quarry
set_rule(multiworld.get_location("Quarry - [Central] Above Ladder Dash Chest", player),