Skip to content

Commit

Permalink
TUNIC: Misc Logic Changes, Additions (ArchipelagoMW#2856)
Browse files Browse the repository at this point in the history
* Add nmg boss scav kill

* Add boss quick kills

* Fix name of orb

* Remove getting into zig with ice grapple

* Remove connection from quarry to zig

* Add a few missing dependent regions

* Separate the atoll statue and portal pad so that it doesn't assume you can get from one to the other without prayer
  • Loading branch information
ScipioWright authored Feb 26, 2024
1 parent 5c05ab1 commit 738a9eb
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 13 deletions.
27 changes: 20 additions & 7 deletions worlds/tunic/er_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def scene_destination(self) -> str: # full, nonchanging name to interpret by th
destination="Shop_"),
Portal(name="Atoll to Far Shore", region="Ruined Atoll Portal",
destination="Transit_teleporter_atoll"),
Portal(name="Atoll Statue Teleporter", region="Ruined Atoll Portal",
Portal(name="Atoll Statue Teleporter", region="Ruined Atoll Statue",
destination="Library Exterior_"),
Portal(name="Frog Stairs Eye Entrance", region="Ruined Atoll",
destination="Frog Stairs_eye"),
Expand Down Expand Up @@ -600,6 +600,7 @@ class Hint(IntEnum):
"Ruined Atoll Lower Entry Area": RegionInfo("Atoll Redux"),
"Ruined Atoll Frog Mouth": RegionInfo("Atoll Redux"),
"Ruined Atoll Portal": RegionInfo("Atoll Redux"),
"Ruined Atoll Statue": RegionInfo("Atoll Redux"),
"Frog's Domain Entry": RegionInfo("Frog Stairs"),
"Frog's Domain": RegionInfo("frog cave main", hint=Hint.region),
"Frog's Domain Back": RegionInfo("frog cave main", hint=Hint.scene),
Expand Down Expand Up @@ -749,6 +750,8 @@ class Hint(IntEnum):
["Forest Belltower Main", "Forest Belltower Lower"],
("East Forest", "East Forest Dance Fox Spot", "East Forest Portal"):
["East Forest", "East Forest Dance Fox Spot", "East Forest Portal"],
("Guard House 1 East", "Guard House 1 West"):
["Guard House 1 East", "Guard House 1 West"],
("Forest Grave Path Main", "Forest Grave Path Upper"):
["Forest Grave Path Main", "Forest Grave Path Upper", "Forest Grave Path by Grave", "Forest Hero's Grave"],
("Forest Grave Path by Grave", "Forest Hero's Grave"):
Expand All @@ -762,8 +765,10 @@ class Hint(IntEnum):
("West Garden", "West Garden Laurels Exit", "West Garden after Boss", "West Garden Hero's Grave"):
["West Garden", "West Garden Laurels Exit", "West Garden after Boss", "West Garden Hero's Grave"],
("West Garden Portal", "West Garden Portal Item"): ["West Garden Portal", "West Garden Portal Item"],
("Ruined Atoll", "Ruined Atoll Lower Entry Area", "Ruined Atoll Frog Mouth", "Ruined Atoll Portal"):
["Ruined Atoll", "Ruined Atoll Lower Entry Area", "Ruined Atoll Frog Mouth", "Ruined Atoll Portal"],
("Ruined Atoll", "Ruined Atoll Lower Entry Area", "Ruined Atoll Frog Mouth", "Ruined Atoll Portal",
"Ruined Atoll Statue"):
["Ruined Atoll", "Ruined Atoll Lower Entry Area", "Ruined Atoll Frog Mouth", "Ruined Atoll Portal",
"Ruined Atoll Statue"],
("Frog's Domain",):
["Frog's Domain", "Frog's Domain Back"],
("Library Exterior Ladder", "Library Exterior Tree"):
Expand Down Expand Up @@ -842,6 +847,8 @@ class Hint(IntEnum):
["Forest Belltower Main", "Forest Belltower Lower"],
("East Forest", "East Forest Dance Fox Spot", "East Forest Portal"):
["East Forest", "East Forest Dance Fox Spot", "East Forest Portal"],
("Guard House 1 East", "Guard House 1 West"):
["Guard House 1 East", "Guard House 1 West"],
("Forest Grave Path Main", "Forest Grave Path Upper", "Forest Grave Path by Grave", "Forest Hero's Grave"):
["Forest Grave Path Main", "Forest Grave Path Upper", "Forest Grave Path by Grave", "Forest Hero's Grave"],
("Beneath the Well Front", "Beneath the Well Main", "Beneath the Well Back"):
Expand All @@ -854,8 +861,10 @@ class Hint(IntEnum):
"West Garden Portal", "West Garden Portal Item"):
["West Garden", "West Garden Laurels Exit", "West Garden after Boss", "West Garden Hero's Grave",
"West Garden Portal", "West Garden Portal Item"],
("Ruined Atoll", "Ruined Atoll Lower Entry Area", "Ruined Atoll Frog Mouth", "Ruined Atoll Portal"):
["Ruined Atoll", "Ruined Atoll Lower Entry Area", "Ruined Atoll Frog Mouth", "Ruined Atoll Portal"],
("Ruined Atoll", "Ruined Atoll Lower Entry Area", "Ruined Atoll Frog Mouth", "Ruined Atoll Portal",
"Ruined Atoll Statue"):
["Ruined Atoll", "Ruined Atoll Lower Entry Area", "Ruined Atoll Frog Mouth", "Ruined Atoll Portal",
"Ruined Atoll Statue"],
("Frog's Domain",):
["Frog's Domain", "Frog's Domain Back"],
("Library Exterior Ladder", "Library Exterior Tree"):
Expand Down Expand Up @@ -934,6 +943,8 @@ class Hint(IntEnum):
["Forest Belltower Main", "Forest Belltower Lower"],
("East Forest", "East Forest Dance Fox Spot", "East Forest Portal"):
["East Forest", "East Forest Dance Fox Spot", "East Forest Portal"],
("Guard House 1 East", "Guard House 1 West"):
["Guard House 1 East", "Guard House 1 West"],
# can use laurels, ice grapple, or ladder storage to traverse
("Forest Grave Path Main", "Forest Grave Path Upper", "Forest Grave Path by Grave", "Forest Hero's Grave"):
["Forest Grave Path Main", "Forest Grave Path Upper", "Forest Grave Path by Grave", "Forest Hero's Grave"],
Expand All @@ -948,8 +959,10 @@ class Hint(IntEnum):
"West Garden Portal", "West Garden Portal Item"):
["West Garden", "West Garden Laurels Exit", "West Garden after Boss", "West Garden Hero's Grave",
"West Garden Portal", "West Garden Portal Item"],
("Ruined Atoll", "Ruined Atoll Lower Entry Area", "Ruined Atoll Frog Mouth", "Ruined Atoll Portal"):
["Ruined Atoll", "Ruined Atoll Lower Entry Area", "Ruined Atoll Frog Mouth", "Ruined Atoll Portal"],
("Ruined Atoll", "Ruined Atoll Lower Entry Area", "Ruined Atoll Frog Mouth", "Ruined Atoll Portal",
"Ruined Atoll Statue"):
["Ruined Atoll", "Ruined Atoll Lower Entry Area", "Ruined Atoll Frog Mouth", "Ruined Atoll Portal",
"Ruined Atoll Statue"],
("Frog's Domain",):
["Frog's Domain", "Frog's Domain Back"],
("Library Exterior Ladder", "Library Exterior Tree"):
Expand Down
12 changes: 10 additions & 2 deletions worlds/tunic/er_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,12 @@ def set_er_region_rules(world: "TunicWorld", ability_unlocks: Dict[str, int], re
regions["Ruined Atoll Portal"].connect(
connecting_region=regions["Ruined Atoll"])

regions["Ruined Atoll"].connect(
connecting_region=regions["Ruined Atoll Statue"],
rule=lambda state: has_ability(state, player, prayer, options, ability_unlocks))
regions["Ruined Atoll Statue"].connect(
connecting_region=regions["Ruined Atoll"])

regions["Frog's Domain"].connect(
connecting_region=regions["Frog's Domain Back"],
rule=lambda state: state.has(grapple, player))
Expand Down Expand Up @@ -944,10 +950,12 @@ def set_er_location_rules(world: "TunicWorld", ability_unlocks: Dict[str, int])
# Bosses
set_rule(multiworld.get_location("Fortress Arena - Siege Engine/Vault Key Pickup", player),
lambda state: has_sword(state, player))
# nmg - kill Librarian with a lure, or gun I guess
set_rule(multiworld.get_location("Librarian - Hexagon Green", player),
lambda state: has_sword(state, player))
lambda state: has_sword(state, player) or options.logic_rules)
# nmg - kill boss scav with orb + firecracker, or similar
set_rule(multiworld.get_location("Rooted Ziggurat Lower - Hexagon Blue", player),
lambda state: has_sword(state, player))
lambda state: has_sword(state, player) or (state.has(grapple, player) and options.logic_rules))

# Swamp
set_rule(multiworld.get_location("Cathedral Gauntlet - Gauntlet Reward", player),
Expand Down
2 changes: 1 addition & 1 deletion worlds/tunic/regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"Eastern Vault Fortress": {"Beneath the Vault"},
"Beneath the Vault": {"Eastern Vault Fortress"},
"Quarry Back": {"Quarry"},
"Quarry": {"Lower Quarry", "Rooted Ziggurat"},
"Quarry": {"Lower Quarry"},
"Lower Quarry": {"Rooted Ziggurat"},
"Rooted Ziggurat": set(),
"Swamp": {"Cathedral"},
Expand Down
5 changes: 2 additions & 3 deletions worlds/tunic/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@ def set_region_rules(world: "TunicWorld", ability_unlocks: Dict[str, int]) -> No
lambda state: has_mask(state, player, options)
multiworld.get_entrance("Lower Quarry -> Rooted Ziggurat", player).access_rule = \
lambda state: state.has(grapple, player) and has_ability(state, player, prayer, options, ability_unlocks)
multiworld.get_entrance("Quarry -> Rooted Ziggurat", player).access_rule = \
lambda state: has_ice_grapple_logic(False, state, player, options, ability_unlocks)
multiworld.get_entrance("Swamp -> Cathedral", player).access_rule = \
lambda state: state.has(laurels, player) and has_ability(state, player, prayer, options, ability_unlocks) \
or has_ice_grapple_logic(False, state, player, options, ability_unlocks)
Expand Down Expand Up @@ -312,8 +310,9 @@ def set_location_rules(world: "TunicWorld", ability_unlocks: Dict[str, int]) ->
lambda state: state.has(laurels, player))
set_rule(multiworld.get_location("Quarry - [West] Upper Area Bombable Wall", player),
lambda state: has_mask(state, player, options))
# nmg - kill boss scav with orb + firecracker, or similar
set_rule(multiworld.get_location("Rooted Ziggurat Lower - Hexagon Blue", player),
lambda state: has_sword(state, player))
lambda state: has_sword(state, player) or (state.has(grapple, player) and options.logic_rules))

# Swamp
set_rule(multiworld.get_location("Cathedral Gauntlet - Gauntlet Reward", player),
Expand Down

0 comments on commit 738a9eb

Please sign in to comment.