Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TUNIC: Implement support for connection plando #2864

Merged
merged 11 commits into from
Mar 15, 2024
2 changes: 1 addition & 1 deletion worlds/tunic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def fill_slot_data(self) -> Dict[str, Any]:
"logic_rules": self.options.logic_rules.value,
"lanternless": self.options.lanternless.value,
"maskless": self.options.maskless.value,
"entrance_rando": self.options.entrance_rando.value,
"entrance_rando": bool(self.options.entrance_rando.value),
"Hexagon Quest Prayer": self.ability_unlocks["Pages 24-25 (Prayer)"],
"Hexagon Quest Holy Cross": self.ability_unlocks["Pages 42-43 (Holy Cross)"],
"Hexagon Quest Icebolt": self.ability_unlocks["Pages 52-53 (Icebolt)"],
Expand Down
20 changes: 19 additions & 1 deletion worlds/tunic/docs/en_TUNIC.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,22 @@ For the Entrance Randomizer:
Bombs, consumables (non-bomb ones), weapons, melee weapons (stick and sword), keys, hexagons, offerings, hero relics, cards, golden treasures, money, pages, and abilities (the three ability pages). There are also a few groups being used for singular items: laurels, orb, dagger, magic rod, holy cross, prayer, icebolt, and progressive sword.

## What location groups are there?
Holy cross (for all holy cross checks), fairies (for the two fairy checks), well (for the coin well checks), and shop. Additionally, for checks that do not fall into the above categories, the name of the region is the name of the location group.
Holy cross (for all holy cross checks), fairies (for the two fairy checks), well (for the coin well checks), and shop. Additionally, for checks that do not fall into the above categories, the name of the region is the name of the location group.

## Is Connection Plando supported?
Yes. The host needs to enable it in their `host.yaml`, and the player's yaml needs to contain a plando_connections block.
Example:
```
plando_connections:
- entrance: Stick House Entrance
exit: Stick House Exit
- entrance: Special Shop Exit
exit: Stairs to Top of the Mountain
```
Notes:
- The Entrance Randomizer option must be enabled for it to work.
- The `direction` field is not supported. Connections are always coupled.
- For a list of entrance names, check `er_data.py` in the TUNIC world folder or generate a game with the Entrance Randomizer option enabled and check the spoiler log.
- There is no limit to the number of Shops hard-coded into place.
- If you have more than one shop in a scene, you may be wrong warped when exiting a shop.
ScipioWright marked this conversation as resolved.
Show resolved Hide resolved
- If you have a shop in every scene, and you have an odd number of shops, it will error out.
6 changes: 0 additions & 6 deletions worlds/tunic/er_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,12 +682,6 @@ class Hint(IntEnum):
"Hero Relic - Library": RegionInfo("RelicVoid", dead_end=DeadEnd.all_cats, hint=Hint.region),
"Hero Relic - Swamp": RegionInfo("RelicVoid", dead_end=DeadEnd.all_cats, hint=Hint.region),
"Purgatory": RegionInfo("Purgatory"),
"Shop Entrance 1": RegionInfo("Shop", dead_end=DeadEnd.all_cats),
"Shop Entrance 2": RegionInfo("Shop", dead_end=DeadEnd.all_cats),
"Shop Entrance 3": RegionInfo("Shop", dead_end=DeadEnd.all_cats),
"Shop Entrance 4": RegionInfo("Shop", dead_end=DeadEnd.all_cats),
"Shop Entrance 5": RegionInfo("Shop", dead_end=DeadEnd.all_cats),
"Shop Entrance 6": RegionInfo("Shop", dead_end=DeadEnd.all_cats),
"Shop": RegionInfo("Shop", dead_end=DeadEnd.all_cats),
"Spirit Arena": RegionInfo("Spirit Arena", dead_end=DeadEnd.all_cats, hint=Hint.region),
"Spirit Arena Victory": RegionInfo("Spirit Arena", dead_end=DeadEnd.all_cats)
Expand Down
13 changes: 0 additions & 13 deletions worlds/tunic/er_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,19 +619,6 @@ def set_er_region_rules(world: "TunicWorld", ability_unlocks: Dict[str, int], re
connecting_region=regions["Far Shore"])

# Misc
regions["Shop Entrance 1"].connect(
connecting_region=regions["Shop"])
regions["Shop Entrance 2"].connect(
connecting_region=regions["Shop"])
regions["Shop Entrance 3"].connect(
connecting_region=regions["Shop"])
regions["Shop Entrance 4"].connect(
connecting_region=regions["Shop"])
regions["Shop Entrance 5"].connect(
connecting_region=regions["Shop"])
regions["Shop Entrance 6"].connect(
connecting_region=regions["Shop"])

regions["Spirit Arena"].connect(
connecting_region=regions["Spirit Arena Victory"],
rule=lambda state: (state.has(gold_hexagon, player, world.options.hexagon_goal.value) if
Expand Down
Loading
Loading