From 7a073e2a20e74521724dd4f35d5b25d68b872c8d Mon Sep 17 00:00:00 2001 From: Witchybun Date: Sun, 7 Jul 2024 00:20:18 -0500 Subject: [PATCH] Move back some rules for now. --- worlds/stardew_valley/content/mods/sve.py | 11 +---------- worlds/stardew_valley/logic/fishing_logic.py | 1 - .../stardew_valley/mods/logic/item_logic.py | 19 ++++++++++++++++++- worlds/stardew_valley/strings/food_names.py | 1 + 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/worlds/stardew_valley/content/mods/sve.py b/worlds/stardew_valley/content/mods/sve.py index 534781421337..f1dd21a39c27 100644 --- a/worlds/stardew_valley/content/mods/sve.py +++ b/worlds/stardew_valley/content/mods/sve.py @@ -85,7 +85,7 @@ def harvest_source_hook(self, content: StardewContent): ModEdible.hero_elixir: (ShopSource(money_price=8000, shop_region=SVERegion.isaac_shop),), ModEdible.aegis_elixir: (ShopSource(money_price=28000, shop_region=SVERegion.galmoran_outpost),), SVEBeverage.sports_drink: (ShopSource(money_price=750, shop_region=Region.hospital),), - "Stamina Capsule": (ShopSource(money_price=4000, shop_region=Region.hospital),), + SVEMeal.stamina_capsule: (ShopSource(money_price=4000, shop_region=Region.hospital),), }, harvest_sources={ Mushroom.red: ( @@ -113,15 +113,6 @@ def harvest_source_hook(self, content: StardewContent): ForagingSource(regions=(SVERegion.sprite_spring,), seasons=Season.not_winter, other_requirements=(YearRequirement(3),)), ), - Loot.void_essence: (ForagingSource(regions=(SVERegion.highlands_cavern, SVERegion.crimson_badlands), ),), - Loot.solar_essence: (ForagingSource(regions=(SVERegion.crimson_badlands,), ),), - Ore.copper: (ForagingSource(regions=(SVERegion.highlands_cavern,), - other_requirements=(CombatRequirement(Performance.great), ToolRequirement(Tool.pickaxe, ToolMaterial.basic))),), - Ore.iron: (ForagingSource(regions=(SVERegion.highlands_cavern,), - other_requirements=(CombatRequirement(Performance.great), ToolRequirement(Tool.pickaxe, ToolMaterial.copper))),), - Ore.iridium: (ForagingSource(regions=(SVERegion.highlands_cavern,), - other_requirements=(CombatRequirement(Performance.great), ToolRequirement(Tool.pickaxe, ToolMaterial.gold))),), - # New items ModLoot.green_mushroom: (ForagingSource(regions=(SVERegion.highlands_pond,), seasons=Season.not_winter),), diff --git a/worlds/stardew_valley/logic/fishing_logic.py b/worlds/stardew_valley/logic/fishing_logic.py index fd9617f519b1..539385232fd2 100644 --- a/worlds/stardew_valley/logic/fishing_logic.py +++ b/worlds/stardew_valley/logic/fishing_logic.py @@ -19,7 +19,6 @@ from ..strings.quality_names import FishQuality from ..strings.region_names import Region from ..strings.skill_names import Skill -from ..strings.tool_names import ToolMaterial, Tool class FishingLogicMixin(BaseLogicMixin): diff --git a/worlds/stardew_valley/mods/logic/item_logic.py b/worlds/stardew_valley/mods/logic/item_logic.py index 070766c69523..583e1679bb2b 100644 --- a/worlds/stardew_valley/mods/logic/item_logic.py +++ b/worlds/stardew_valley/mods/logic/item_logic.py @@ -28,8 +28,9 @@ from ...strings.ingredient_names import Ingredient from ...strings.material_names import Material from ...strings.metal_names import all_fossils, all_artifacts, Ore, ModFossil +from ...strings.monster_drop_names import Loot from ...strings.performance_names import Performance -from ...strings.region_names import DeepWoodsRegion, BoardingHouseRegion +from ...strings.region_names import SVERegion, DeepWoodsRegion, BoardingHouseRegion from ...strings.tool_names import Tool, ToolMaterial display_types = [ModCraftable.wooden_display, ModCraftable.hardwood_display] @@ -55,10 +56,26 @@ def get_modded_item_rules(self) -> Dict[str, StardewRule]: return items def modify_vanilla_item_rules_with_mod_additions(self, item_rule: Dict[str, StardewRule]): + if ModNames.sve in self.options.mods: + item_rule.update(self.get_modified_item_rules_for_sve(item_rule)) if ModNames.deepwoods in self.options.mods: item_rule.update(self.get_modified_item_rules_for_deep_woods(item_rule)) return item_rule + def get_modified_item_rules_for_sve(self, items: Dict[str, StardewRule]): + return { + Loot.void_essence: items[Loot.void_essence] | self.logic.region.can_reach(SVERegion.highlands_cavern) | self.logic.region.can_reach( + SVERegion.crimson_badlands), + Loot.solar_essence: items[Loot.solar_essence] | self.logic.region.can_reach(SVERegion.crimson_badlands), + Ore.copper: items[Ore.copper] | (self.logic.tool.can_use_tool_at(Tool.pickaxe, ToolMaterial.basic, SVERegion.highlands_cavern) & + self.logic.combat.can_fight_at_level(Performance.great)), + Ore.iron: items[Ore.iron] | (self.logic.tool.can_use_tool_at(Tool.pickaxe, ToolMaterial.basic, SVERegion.highlands_cavern) & + self.logic.combat.can_fight_at_level(Performance.great)), + Ore.iridium: items[Ore.iridium] | (self.logic.tool.can_use_tool_at(Tool.pickaxe, ToolMaterial.basic, SVERegion.crimson_badlands) & + self.logic.combat.can_fight_at_level(Performance.maximum)), + + } + def get_modified_item_rules_for_deep_woods(self, items: Dict[str, StardewRule]): options_to_update = { Material.hardwood: items[Material.hardwood] | self.logic.tool.can_use_tool_at(Tool.axe, ToolMaterial.iron, DeepWoodsRegion.floor_10), diff --git a/worlds/stardew_valley/strings/food_names.py b/worlds/stardew_valley/strings/food_names.py index 5555316f8314..03784336d19c 100644 --- a/worlds/stardew_valley/strings/food_names.py +++ b/worlds/stardew_valley/strings/food_names.py @@ -102,6 +102,7 @@ class SVEMeal: void_delight = "Void Delight" void_salmon_sushi = "Void Salmon Sushi" grampleton_orange_chicken = "Grampleton Orange Chicken" + stamina_capsule = "Stamina Capsule" class TrashyMeal: