diff --git a/worlds/tunic/__init__.py b/worlds/tunic/__init__.py index 914938f1c2..430c0c0b60 100644 --- a/worlds/tunic/__init__.py +++ b/worlds/tunic/__init__.py @@ -299,7 +299,7 @@ class TunicWorld(World): self.ability_unlocks["Pages 52-53 (Icebolt)"] = passthrough["Hexagon Quest Icebolt"] # ladder rando uses ER with vanilla connections, so that we're not managing more rules files - if self.options.entrance_rando or self.options.shuffle_ladders: + if self.options.entrance_rando or self.options.shuffle_ladders or self.options.combat_logic: portal_pairs = create_er_regions(self) if self.options.entrance_rando: # these get interpreted by the game to tell it which entrances to connect diff --git a/worlds/tunic/er_rules.py b/worlds/tunic/er_rules.py index 17ca6b5ecd..d0bebb1f97 100644 --- a/worlds/tunic/er_rules.py +++ b/worlds/tunic/er_rules.py @@ -1,10 +1,11 @@ from typing import Dict, FrozenSet, Tuple, TYPE_CHECKING -from worlds.generic.Rules import set_rule, forbid_item -from .options import IceGrappling, LadderStorage +from worlds.generic.Rules import set_rule, add_rule, forbid_item +from .options import IceGrappling, LadderStorage, CombatLogic from .rules import (has_ability, has_sword, has_melee, has_ice_grapple_logic, has_lantern, has_mask, can_ladder_storage, laurels_zip) from .er_data import Portal from .ladder_storage_data import ow_ladder_groups, region_ladders, easy_ls, medium_ls, hard_ls +from .combat_logic import has_combat_logic from BaseClasses import Region, CollectionState if TYPE_CHECKING: @@ -1361,3 +1362,19 @@ def set_er_location_rules(world: "TunicWorld") -> None: lambda state: has_sword(state, player)) set_rule(multiworld.get_location("Shop - Coin 2", player), lambda state: has_sword(state, player)) + + if world.options.combat_logic >= CombatLogic.option_bosses_only: + set_rule(multiworld.get_entrance("West Garden -> West Garden after Boss", player), + lambda state: state.has(laurels, player) + or has_combat_logic(["Garden Knight"], state, player)) + set_rule(multiworld.get_location("Fortress Arena - Siege Engine/Vault Key Pickup", player), + lambda state: has_combat_logic(["Siege Engine"], state, player)) + set_rule(multiworld.get_location("Librarian - Hexagon Green", player), + lambda state: has_combat_logic(["Librarian"], state, player)) + set_rule(multiworld.get_location("Rooted Ziggurat Lower - Hexagon Blue", player), + lambda state: has_combat_logic(["Boss Scavenger"], state, player)) + set_rule(multiworld.get_location("Cathedral Gauntlet - Gauntlet Reward", player), + lambda state: has_combat_logic(["Gauntlet"], state, player)) + if not world.options.hexagon_quest: + add_rule(multiworld.get_entrance("Heir Arena -> Heir Arena Victory", player), + lambda state: has_combat_logic(["The Heir"], state, player)) diff --git a/worlds/tunic/options.py b/worlds/tunic/options.py index c09e0690dd..6c64aba8df 100644 --- a/worlds/tunic/options.py +++ b/worlds/tunic/options.py @@ -170,6 +170,7 @@ class CombatLogic(Choice): """ If enabled, the player will logicaly require a combination of stat upgrades and items to reach combat breakpoints in order to get through certain areas. Note that this option marks many more items as progression and may force weapons much earlier than normal. + Bosses Only makes it so that additional combat logic is only added to the boss fights and the Gauntlet. If disabled, the standard logic is used. """ internal_name = "combat_logic"