Skip to content

Commit

Permalink
Move back some rules for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
Witchybun authored and agilbert1412 committed Jul 7, 2024
1 parent 44e34d7 commit 7a073e2
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
11 changes: 1 addition & 10 deletions worlds/stardew_valley/content/mods/sve.py
Original file line number Diff line number Diff line change
Expand Up @@ -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: (
Expand Down Expand Up @@ -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),),
Expand Down
1 change: 0 additions & 1 deletion worlds/stardew_valley/logic/fishing_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
19 changes: 18 additions & 1 deletion worlds/stardew_valley/mods/logic/item_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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),
Expand Down
1 change: 1 addition & 0 deletions worlds/stardew_valley/strings/food_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 7a073e2

Please sign in to comment.