From d4e2ad917715c26cdb4dd363c84e456ad1e4dbe6 Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Thu, 4 Jul 2024 17:47:56 -0400 Subject: [PATCH] Create the combat logic option --- worlds/tunic/__init__.py | 6 +++++- worlds/tunic/options.py | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/worlds/tunic/__init__.py b/worlds/tunic/__init__.py index af015a6158..0cbbe5513a 100644 --- a/worlds/tunic/__init__.py +++ b/worlds/tunic/__init__.py @@ -169,7 +169,11 @@ class TunicWorld(World): def create_item(self, name: str) -> TunicItem: item_data = item_table[name] - return TunicItem(name, item_data.classification, self.item_name_to_id[name], self.player) + if self.options.combat_logic: + classification = item_data.combat_ic or item_data.classification + else: + classification = item_data.classification + return TunicItem(name, classification, self.item_name_to_id[name], self.player) def create_items(self) -> None: diff --git a/worlds/tunic/options.py b/worlds/tunic/options.py index 4a05a7b17f..c09e0690dd 100644 --- a/worlds/tunic/options.py +++ b/worlds/tunic/options.py @@ -166,6 +166,20 @@ class TunicPlandoConnections(PlandoConnections): duplicate_exits = True +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. + If disabled, the standard logic is used. + """ + internal_name = "combat_logic" + display_name = "Combat Logic" + option_off = 0 + option_bosses_only = 1 + option_on = 2 + default = 0 + + class LaurelsZips(Toggle): """ Choose whether to include using the Hero's Laurels to zip through gates, doors, and tricky spots. @@ -239,6 +253,7 @@ class TunicOptions(PerGameCommonOptions): hexagon_goal: HexagonGoal extra_hexagon_percentage: ExtraHexagonPercentage laurels_location: LaurelsLocation + combat_logic: CombatLogic lanternless: Lanternless maskless: Maskless laurels_zips: LaurelsZips @@ -252,6 +267,7 @@ class TunicOptions(PerGameCommonOptions): tunic_option_groups = [ OptionGroup("Logic Options", [ + CombatLogic, Lanternless, Maskless, LaurelsZips,