mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-04-09 20:08:15 -07:00
Major Content update for Stardew Valley ### Features - New BundleRandomization Value: Meme Bundles - Over 100 custom bundles, designed to be jokes, references, trolls, etc - New Setting: Bundles Per Room modifier - New Setting: Backpack Size - New Setting: Secretsanity - Checks for triggering easter eggs and secrets - New Setting: Moviesanity - Checks for watching movies and sharing snacks with Villagers - New Setting: Eatsanity - Checks for eating items - New Setting: Hatsanity - Checks for wearing Hats - New Setting: Start Without - Allows you to select any combination of various "starting" items, that you will actually not start with. Notably, tools, backpack slots, Day5 unlocks, etc. - New Setting: Allowed Filler Items - Allows you to customize the filler items you'll get - New Setting: Endgame Locations - Checks for various expensive endgame tasks and purchases - New Shipsanity value: Crops and Fish - New Settings: Jojapocalypse and settings to customize it - Bundle Plando: Replaced with BundleWhitelist and BundleBlacklist, for more customization freedom - Added a couple of Host.yaml settings to help hosts allow or ban specific difficult settings that could cause problems if the people don't know what they are signing up for. Plus a truckload of improvements on the mod side, not seen in this PR. ### Removed features - Integration for Stardew Valley Expanded. It is simply disabled, the code is all still there, but I'm extremely tired of providing tech support for it, plus Stardew Valley 1.7 was announced and that will break it again, so I'm done. When a maintainer steps up, it can be re-enabled.
98 lines
5.9 KiB
Python
98 lines
5.9 KiB
Python
from typing import Dict
|
|
|
|
from ..mod_data import ModNames
|
|
from ...logic.base_logic import BaseLogicMixin, BaseLogic
|
|
from ...stardew_rule import StardewRule
|
|
from ...strings.artisan_good_names import ModArtisanGood
|
|
from ...strings.craftable_names import ModCraftable
|
|
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 SVERegion, DeepWoodsRegion, BoardingHouseRegion
|
|
from ...strings.tool_names import Tool, ToolMaterial
|
|
|
|
display_types = [ModCraftable.wooden_display, ModCraftable.hardwood_display]
|
|
display_items = all_artifacts + all_fossils
|
|
|
|
|
|
class ModItemLogicMixin(BaseLogicMixin):
|
|
def __init__(self, *args, **kwargs):
|
|
super().__init__(*args, **kwargs)
|
|
self.item = ModItemLogic(*args, **kwargs)
|
|
|
|
|
|
class ModItemLogic(BaseLogic):
|
|
|
|
def get_modded_item_rules(self) -> Dict[str, StardewRule]:
|
|
items = dict()
|
|
if self.content.is_enabled(ModNames.boarding_house):
|
|
items.update(self.get_boarding_house_item_rules())
|
|
return items
|
|
|
|
def modify_vanilla_item_rules_with_mod_additions(self, item_rule: Dict[str, StardewRule]):
|
|
if self.content.is_enabled(ModNames.sve):
|
|
item_rule.update(self.get_modified_item_rules_for_sve(item_rule))
|
|
if self.content.is_enabled(ModNames.deepwoods):
|
|
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),
|
|
Ingredient.sugar: items[Ingredient.sugar] | self.logic.tool.can_use_tool_at(Tool.axe, ToolMaterial.gold, DeepWoodsRegion.floor_50),
|
|
# Gingerbread House
|
|
Ingredient.wheat_flour: items[Ingredient.wheat_flour] | self.logic.tool.can_use_tool_at(Tool.axe, ToolMaterial.gold, DeepWoodsRegion.floor_50),
|
|
# Gingerbread House
|
|
}
|
|
|
|
if self.content.features.tool_progression.is_progressive:
|
|
options_to_update.update({
|
|
Ore.iridium: items[Ore.iridium] | self.logic.tool.can_use_tool_at(Tool.axe, ToolMaterial.iridium, DeepWoodsRegion.floor_50), # Iridium Tree
|
|
})
|
|
|
|
return options_to_update
|
|
|
|
def get_boarding_house_item_rules(self):
|
|
can_reach_any_boarding_house_region = self.logic.region.can_reach_any(BoardingHouseRegion.lost_valley_ruins, BoardingHouseRegion.lost_valley_house_1,
|
|
BoardingHouseRegion.lost_valley_house_2)
|
|
can_fight_at_good_level_in_boarding_house = can_reach_any_boarding_house_region & self.logic.combat.can_fight_at_level(Performance.good)
|
|
can_fight_at_great_level_in_boarding_house = can_reach_any_boarding_house_region & self.logic.combat.can_fight_at_level(Performance.great)
|
|
return {
|
|
# Mob Drops from lost valley enemies
|
|
ModArtisanGood.pterodactyl_egg: can_fight_at_good_level_in_boarding_house,
|
|
ModFossil.pterodactyl_claw: can_fight_at_good_level_in_boarding_house,
|
|
ModFossil.pterodactyl_ribs: can_fight_at_good_level_in_boarding_house,
|
|
ModFossil.pterodactyl_vertebra: can_fight_at_good_level_in_boarding_house,
|
|
ModFossil.pterodactyl_skull: can_fight_at_good_level_in_boarding_house,
|
|
ModFossil.pterodactyl_phalange: can_fight_at_good_level_in_boarding_house,
|
|
ModFossil.pterodactyl_l_wing_bone: can_fight_at_good_level_in_boarding_house,
|
|
ModFossil.pterodactyl_r_wing_bone: can_fight_at_good_level_in_boarding_house,
|
|
ModFossil.dinosaur_skull: can_fight_at_good_level_in_boarding_house,
|
|
ModFossil.dinosaur_tooth: can_fight_at_good_level_in_boarding_house,
|
|
ModFossil.dinosaur_femur: can_fight_at_good_level_in_boarding_house,
|
|
ModFossil.dinosaur_pelvis: can_fight_at_good_level_in_boarding_house,
|
|
ModFossil.dinosaur_ribs: can_fight_at_good_level_in_boarding_house,
|
|
ModFossil.dinosaur_vertebra: can_fight_at_good_level_in_boarding_house,
|
|
ModFossil.dinosaur_claw: can_fight_at_good_level_in_boarding_house,
|
|
ModFossil.neanderthal_skull: can_fight_at_great_level_in_boarding_house,
|
|
ModFossil.neanderthal_ribs: can_fight_at_great_level_in_boarding_house,
|
|
ModFossil.neanderthal_pelvis: can_fight_at_great_level_in_boarding_house,
|
|
ModFossil.neanderthal_limb_bones: can_fight_at_great_level_in_boarding_house,
|
|
}
|