Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024 This includes randomization for pretty much all of the new content, including but not limited to - Raccoon Bundles - Booksanity - Skill Masteries - New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit. In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update - Walnutsanity - Player Buffs - More customizability in settings, such as shorter special orders, ER without farmhouse - New Remixed Bundles
This commit is contained in:
@@ -10,13 +10,13 @@ from ...logic.skill_logic import SkillLogicMixin
|
||||
from ...logic.tool_logic import ToolLogicMixin
|
||||
from ...mods.mod_data import ModNames
|
||||
from ...options import ElevatorProgression
|
||||
from ...stardew_rule import StardewRule, True_, And, true_
|
||||
from ...strings.ap_names.mods.mod_items import DeepWoodsItem, SkillLevel
|
||||
from ...stardew_rule import StardewRule, True_, true_
|
||||
from ...strings.ap_names.mods.mod_items import DeepWoodsItem
|
||||
from ...strings.ap_names.transport_names import ModTransportation
|
||||
from ...strings.craftable_names import Bomb
|
||||
from ...strings.food_names import Meal
|
||||
from ...strings.performance_names import Performance
|
||||
from ...strings.skill_names import Skill
|
||||
from ...strings.skill_names import Skill, ModSkill
|
||||
from ...strings.tool_names import Tool, ToolMaterial
|
||||
|
||||
|
||||
@@ -45,11 +45,11 @@ CookingLogicMixin]]):
|
||||
self.logic.received(ModTransportation.woods_obelisk))
|
||||
|
||||
tier = int(depth / 25) + 1
|
||||
if self.options.skill_progression == options.SkillProgression.option_progressive:
|
||||
if self.options.skill_progression >= options.SkillProgression.option_progressive:
|
||||
combat_tier = min(10, max(0, tier + 5))
|
||||
rules.append(self.logic.skill.has_level(Skill.combat, combat_tier))
|
||||
|
||||
return And(*rules)
|
||||
return self.logic.and_(*rules)
|
||||
|
||||
def has_woods_rune_to_depth(self, floor: int) -> StardewRule:
|
||||
if self.options.elevator_progression == ElevatorProgression.option_vanilla:
|
||||
@@ -66,8 +66,8 @@ CookingLogicMixin]]):
|
||||
self.logic.received(DeepWoodsItem.pendant_elder),
|
||||
self.logic.skill.has_total_level(40)]
|
||||
if ModNames.luck_skill in self.options.mods:
|
||||
rules.append(self.logic.received(SkillLevel.luck, 7))
|
||||
rules.append(self.logic.skill.has_level(ModSkill.luck, 7))
|
||||
else:
|
||||
rules.append(
|
||||
self.logic.has(Meal.magic_rock_candy)) # You need more luck than this, but it'll push the logic down a ways; you can get the rest there.
|
||||
return And(*rules)
|
||||
return self.logic.and_(*rules)
|
||||
|
||||
@@ -7,7 +7,7 @@ from ...logic.base_logic import BaseLogicMixin, BaseLogic
|
||||
from ...logic.combat_logic import CombatLogicMixin
|
||||
from ...logic.cooking_logic import CookingLogicMixin
|
||||
from ...logic.crafting_logic import CraftingLogicMixin
|
||||
from ...logic.crop_logic import CropLogicMixin
|
||||
from ...logic.farming_logic import FarmingLogicMixin
|
||||
from ...logic.fishing_logic import FishingLogicMixin
|
||||
from ...logic.has_logic import HasLogicMixin
|
||||
from ...logic.money_logic import MoneyLogicMixin
|
||||
@@ -24,11 +24,10 @@ from ...options import Cropsanity
|
||||
from ...stardew_rule import StardewRule, True_
|
||||
from ...strings.artisan_good_names import ModArtisanGood
|
||||
from ...strings.craftable_names import ModCraftable, ModEdible, ModMachine
|
||||
from ...strings.crop_names import SVEVegetable, SVEFruit, DistantLandsCrop, Fruit
|
||||
from ...strings.fish_names import WaterItem
|
||||
from ...strings.flower_names import Flower
|
||||
from ...strings.crop_names import SVEVegetable, SVEFruit, DistantLandsCrop
|
||||
from ...strings.fish_names import ModTrash, SVEFish
|
||||
from ...strings.food_names import SVEMeal, SVEBeverage
|
||||
from ...strings.forageable_names import SVEForage, DistantLandsForageable, Forageable
|
||||
from ...strings.forageable_names import SVEForage, DistantLandsForageable
|
||||
from ...strings.gift_names import SVEGift
|
||||
from ...strings.ingredient_names import Ingredient
|
||||
from ...strings.material_names import Material
|
||||
@@ -53,8 +52,9 @@ class ModItemLogicMixin(BaseLogicMixin):
|
||||
self.item = ModItemLogic(*args, **kwargs)
|
||||
|
||||
|
||||
class ModItemLogic(BaseLogic[Union[CombatLogicMixin, ReceivedLogicMixin, CropLogicMixin, CookingLogicMixin, FishingLogicMixin, HasLogicMixin, MoneyLogicMixin,
|
||||
RegionLogicMixin, SeasonLogicMixin, RelationshipLogicMixin, MuseumLogicMixin, ToolLogicMixin, CraftingLogicMixin, SkillLogicMixin, TimeLogicMixin, QuestLogicMixin]]):
|
||||
class ModItemLogic(BaseLogic[Union[CombatLogicMixin, ReceivedLogicMixin, CookingLogicMixin, FishingLogicMixin, HasLogicMixin, MoneyLogicMixin,
|
||||
RegionLogicMixin, SeasonLogicMixin, RelationshipLogicMixin, MuseumLogicMixin, ToolLogicMixin, CraftingLogicMixin, SkillLogicMixin, TimeLogicMixin, QuestLogicMixin,
|
||||
FarmingLogicMixin]]):
|
||||
|
||||
def get_modded_item_rules(self) -> Dict[str, StardewRule]:
|
||||
items = dict()
|
||||
@@ -78,53 +78,53 @@ RegionLogicMixin, SeasonLogicMixin, RelationshipLogicMixin, MuseumLogicMixin, To
|
||||
def get_sve_item_rules(self):
|
||||
return {SVEGift.aged_blue_moon_wine: self.logic.money.can_spend_at(SVERegion.sophias_house, 28000),
|
||||
SVEGift.blue_moon_wine: self.logic.money.can_spend_at(SVERegion.sophias_house, 3000),
|
||||
SVESeed.fungus_seed: self.logic.region.can_reach(SVERegion.highlands_cavern) & self.logic.combat.has_good_weapon,
|
||||
SVESeed.fungus: self.logic.region.can_reach(SVERegion.highlands_cavern) & self.logic.combat.has_good_weapon,
|
||||
ModLoot.green_mushroom: self.logic.region.can_reach(SVERegion.highlands_outside) &
|
||||
self.logic.tool.has_tool(Tool.axe, ToolMaterial.iron) & self.logic.season.has_any_not_winter(),
|
||||
SVEFruit.monster_fruit: self.logic.season.has(Season.summer) & self.logic.has(SVESeed.stalk_seed),
|
||||
SVEVegetable.monster_mushroom: self.logic.season.has(Season.fall) & self.logic.has(SVESeed.fungus_seed),
|
||||
SVEForage.ornate_treasure_chest: self.logic.region.can_reach(SVERegion.highlands_outside) & self.logic.combat.has_galaxy_weapon &
|
||||
SVEFruit.monster_fruit: self.logic.season.has(Season.summer) & self.logic.has(SVESeed.stalk),
|
||||
SVEVegetable.monster_mushroom: self.logic.season.has(Season.fall) & self.logic.has(SVESeed.fungus),
|
||||
ModLoot.ornate_treasure_chest: self.logic.region.can_reach(SVERegion.highlands_outside) & self.logic.combat.has_galaxy_weapon &
|
||||
self.logic.tool.has_tool(Tool.axe, ToolMaterial.iron),
|
||||
SVEFruit.slime_berry: self.logic.season.has(Season.spring) & self.logic.has(SVESeed.slime_seed),
|
||||
SVESeed.slime_seed: self.logic.region.can_reach(SVERegion.highlands_outside) & self.logic.combat.has_good_weapon,
|
||||
SVESeed.stalk_seed: self.logic.region.can_reach(SVERegion.highlands_outside) & self.logic.combat.has_good_weapon,
|
||||
SVEForage.swirl_stone: self.logic.region.can_reach(SVERegion.crimson_badlands) & self.logic.combat.has_great_weapon,
|
||||
SVEVegetable.void_root: self.logic.season.has(Season.winter) & self.logic.has(SVESeed.void_seed),
|
||||
SVESeed.void_seed: self.logic.region.can_reach(SVERegion.highlands_cavern) & self.logic.combat.has_good_weapon,
|
||||
SVEForage.void_soul: self.logic.region.can_reach(
|
||||
SVEFruit.slime_berry: self.logic.season.has(Season.spring) & self.logic.has(SVESeed.slime),
|
||||
SVESeed.slime: self.logic.region.can_reach(SVERegion.highlands_outside) & self.logic.combat.has_good_weapon,
|
||||
SVESeed.stalk: self.logic.region.can_reach(SVERegion.highlands_outside) & self.logic.combat.has_good_weapon,
|
||||
ModLoot.swirl_stone: self.logic.region.can_reach(SVERegion.crimson_badlands) & self.logic.combat.has_great_weapon,
|
||||
SVEVegetable.void_root: self.logic.season.has(Season.winter) & self.logic.has(SVESeed.void),
|
||||
SVESeed.void: self.logic.region.can_reach(SVERegion.highlands_cavern) & self.logic.combat.has_good_weapon,
|
||||
ModLoot.void_soul: self.logic.region.can_reach(
|
||||
SVERegion.crimson_badlands) & self.logic.combat.has_good_weapon & self.logic.cooking.can_cook(),
|
||||
SVEForage.winter_star_rose: self.logic.region.can_reach(SVERegion.summit) & self.logic.season.has(Season.winter),
|
||||
SVEForage.bearberrys: self.logic.region.can_reach(Region.secret_woods) & self.logic.season.has(Season.winter),
|
||||
SVEForage.bearberry: self.logic.region.can_reach(Region.secret_woods) & self.logic.season.has(Season.winter),
|
||||
SVEForage.poison_mushroom: self.logic.region.can_reach(Region.secret_woods) & self.logic.season.has_any([Season.summer, Season.fall]),
|
||||
SVEForage.red_baneberry: self.logic.region.can_reach(Region.secret_woods) & self.logic.season.has(Season.summer),
|
||||
SVEForage.ferngill_primrose: self.logic.region.can_reach(SVERegion.summit) & self.logic.season.has(Season.spring),
|
||||
SVEForage.goldenrod: self.logic.region.can_reach(SVERegion.summit) & (
|
||||
self.logic.season.has(Season.summer) | self.logic.season.has(Season.fall)),
|
||||
SVESeed.shrub_seed: self.logic.region.can_reach(Region.secret_woods) & self.logic.tool.has_tool(Tool.hoe, ToolMaterial.basic),
|
||||
SVEFruit.salal_berry: self.logic.crop.can_plant_and_grow_item([Season.spring, Season.summer]) & self.logic.has(SVESeed.shrub_seed),
|
||||
SVESeed.shrub: self.logic.region.can_reach(Region.secret_woods) & self.logic.tool.has_tool(Tool.hoe, ToolMaterial.basic),
|
||||
SVEFruit.salal_berry: self.logic.farming.can_plant_and_grow_item((Season.spring, Season.summer)) & self.logic.has(SVESeed.shrub),
|
||||
ModEdible.aegis_elixir: self.logic.money.can_spend_at(SVERegion.galmoran_outpost, 28000),
|
||||
ModEdible.lightning_elixir: self.logic.money.can_spend_at(SVERegion.galmoran_outpost, 12000),
|
||||
ModEdible.barbarian_elixir: self.logic.money.can_spend_at(SVERegion.galmoran_outpost, 22000),
|
||||
ModEdible.gravity_elixir: self.logic.money.can_spend_at(SVERegion.galmoran_outpost, 4000),
|
||||
SVESeed.ancient_ferns_seed: self.logic.region.can_reach(Region.secret_woods) & self.logic.tool.has_tool(Tool.hoe, ToolMaterial.basic),
|
||||
SVEVegetable.ancient_fiber: self.logic.crop.can_plant_and_grow_item(Season.summer) & self.logic.has(SVESeed.ancient_ferns_seed),
|
||||
SVEForage.big_conch: self.logic.region.can_reach_any((Region.beach, SVERegion.fable_reef)),
|
||||
SVESeed.ancient_fern: self.logic.region.can_reach(Region.secret_woods) & self.logic.tool.has_tool(Tool.hoe, ToolMaterial.basic),
|
||||
SVEVegetable.ancient_fiber: self.logic.farming.can_plant_and_grow_item(Season.summer) & self.logic.has(SVESeed.ancient_fern),
|
||||
SVEForage.conch: self.logic.region.can_reach_any((Region.beach, SVERegion.fable_reef)),
|
||||
SVEForage.dewdrop_berry: self.logic.region.can_reach(SVERegion.enchanted_grove),
|
||||
SVEForage.dried_sand_dollar: self.logic.region.can_reach(SVERegion.fable_reef) | (self.logic.region.can_reach(Region.beach) &
|
||||
self.logic.season.has_any([Season.summer, Season.fall])),
|
||||
SVEForage.sand_dollar: self.logic.region.can_reach(SVERegion.fable_reef) | (self.logic.region.can_reach(Region.beach) &
|
||||
self.logic.season.has_any([Season.summer, Season.fall])),
|
||||
SVEForage.golden_ocean_flower: self.logic.region.can_reach(SVERegion.fable_reef),
|
||||
SVEMeal.grampleton_orange_chicken: self.logic.money.can_spend_at(Region.saloon, 650) & self.logic.relationship.has_hearts(ModNPC.sophia, 6),
|
||||
ModEdible.hero_elixir: self.logic.money.can_spend_at(SVERegion.isaac_shop, 8000),
|
||||
SVEForage.lucky_four_leaf_clover: self.logic.region.can_reach_any((Region.secret_woods, SVERegion.forest_west)) &
|
||||
self.logic.season.has_any([Season.spring, Season.summer]),
|
||||
SVEForage.four_leaf_clover: self.logic.region.can_reach_any((Region.secret_woods, SVERegion.forest_west)) &
|
||||
self.logic.season.has_any([Season.spring, Season.summer]),
|
||||
SVEForage.mushroom_colony: self.logic.region.can_reach_any((Region.secret_woods, SVERegion.junimo_woods, SVERegion.forest_west)) &
|
||||
self.logic.season.has(Season.fall),
|
||||
SVEForage.rusty_blade: self.logic.region.can_reach(SVERegion.crimson_badlands) & self.logic.combat.has_great_weapon,
|
||||
SVEForage.smelly_rafflesia: self.logic.region.can_reach(Region.secret_woods),
|
||||
SVEForage.rafflesia: self.logic.region.can_reach(Region.secret_woods),
|
||||
SVEBeverage.sports_drink: self.logic.money.can_spend_at(Region.hospital, 750),
|
||||
"Stamina Capsule": self.logic.money.can_spend_at(Region.hospital, 4000),
|
||||
SVEForage.thistle: self.logic.region.can_reach(SVERegion.summit),
|
||||
SVEForage.void_pebble: self.logic.region.can_reach(SVERegion.crimson_badlands) & self.logic.combat.has_great_weapon,
|
||||
ModLoot.void_pebble: self.logic.region.can_reach(SVERegion.crimson_badlands) & self.logic.combat.has_great_weapon,
|
||||
ModLoot.void_shard: self.logic.region.can_reach(SVERegion.crimson_badlands) & self.logic.combat.has_galaxy_weapon &
|
||||
self.logic.skill.has_level(Skill.combat, 10) & self.logic.region.can_reach(Region.saloon) & self.logic.time.has_year_three
|
||||
}
|
||||
@@ -135,49 +135,17 @@ RegionLogicMixin, SeasonLogicMixin, RelationshipLogicMixin, MuseumLogicMixin, To
|
||||
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),
|
||||
Flower.tulip: items[Flower.tulip] | self.logic.tool.can_forage(Season.spring, SVERegion.sprite_spring),
|
||||
Flower.blue_jazz: items[Flower.blue_jazz] | self.logic.tool.can_forage(Season.spring, SVERegion.sprite_spring),
|
||||
Flower.summer_spangle: items[Flower.summer_spangle] | self.logic.tool.can_forage(Season.summer, SVERegion.sprite_spring),
|
||||
Flower.sunflower: items[Flower.sunflower] | self.logic.tool.can_forage((Season.summer, Season.fall), SVERegion.sprite_spring),
|
||||
Flower.fairy_rose: items[Flower.fairy_rose] | self.logic.tool.can_forage(Season.fall, SVERegion.sprite_spring),
|
||||
Fruit.ancient_fruit: items[Fruit.ancient_fruit] | (
|
||||
self.logic.tool.can_forage((Season.spring, Season.summer, Season.fall), SVERegion.sprite_spring) &
|
||||
self.logic.time.has_year_three) | self.logic.region.can_reach(SVERegion.sprite_spring_cave),
|
||||
Fruit.sweet_gem_berry: items[Fruit.sweet_gem_berry] | (
|
||||
self.logic.tool.can_forage((Season.spring, Season.summer, Season.fall), SVERegion.sprite_spring) &
|
||||
self.logic.time.has_year_three),
|
||||
WaterItem.coral: items[WaterItem.coral] | self.logic.region.can_reach(SVERegion.fable_reef),
|
||||
Forageable.rainbow_shell: items[Forageable.rainbow_shell] | self.logic.region.can_reach(SVERegion.fable_reef),
|
||||
WaterItem.sea_urchin: items[WaterItem.sea_urchin] | self.logic.region.can_reach(SVERegion.fable_reef),
|
||||
Forageable.red_mushroom: items[Forageable.red_mushroom] | self.logic.tool.can_forage((Season.summer, Season.fall), SVERegion.forest_west) |
|
||||
self.logic.region.can_reach(SVERegion.sprite_spring_cave),
|
||||
Forageable.purple_mushroom: items[Forageable.purple_mushroom] | self.logic.tool.can_forage(Season.fall, SVERegion.forest_west) |
|
||||
self.logic.region.can_reach(SVERegion.sprite_spring_cave),
|
||||
Forageable.morel: items[Forageable.morel] | self.logic.tool.can_forage(Season.fall, SVERegion.forest_west),
|
||||
Forageable.chanterelle: items[Forageable.chanterelle] | self.logic.tool.can_forage(Season.fall, SVERegion.forest_west) |
|
||||
self.logic.region.can_reach(SVERegion.sprite_spring_cave),
|
||||
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)),
|
||||
SVEFish.dulse_seaweed: self.logic.fishing.can_fish_at(Region.beach) & self.logic.season.has_any([Season.spring, Season.summer, Season.winter])
|
||||
}
|
||||
|
||||
def get_modified_item_rules_for_deep_woods(self, items: Dict[str, StardewRule]):
|
||||
options_to_update = {
|
||||
Fruit.apple: items[Fruit.apple] | self.logic.region.can_reach(DeepWoodsRegion.floor_10), # Deep enough to have seen such a tree at least once
|
||||
Fruit.apricot: items[Fruit.apricot] | self.logic.region.can_reach(DeepWoodsRegion.floor_10),
|
||||
Fruit.cherry: items[Fruit.cherry] | self.logic.region.can_reach(DeepWoodsRegion.floor_10),
|
||||
Fruit.orange: items[Fruit.orange] | self.logic.region.can_reach(DeepWoodsRegion.floor_10),
|
||||
Fruit.peach: items[Fruit.peach] | self.logic.region.can_reach(DeepWoodsRegion.floor_10),
|
||||
Fruit.pomegranate: items[Fruit.pomegranate] | self.logic.region.can_reach(DeepWoodsRegion.floor_10),
|
||||
Fruit.mango: items[Fruit.mango] | self.logic.region.can_reach(DeepWoodsRegion.floor_10),
|
||||
Flower.tulip: items[Flower.tulip] | self.logic.tool.can_forage(Season.not_winter, DeepWoodsRegion.floor_10),
|
||||
Flower.blue_jazz: items[Flower.blue_jazz] | self.logic.region.can_reach(DeepWoodsRegion.floor_10),
|
||||
Flower.summer_spangle: items[Flower.summer_spangle] | self.logic.tool.can_forage(Season.not_winter, DeepWoodsRegion.floor_10),
|
||||
Flower.poppy: items[Flower.poppy] | self.logic.tool.can_forage(Season.not_winter, DeepWoodsRegion.floor_10),
|
||||
Flower.fairy_rose: items[Flower.fairy_rose] | self.logic.region.can_reach(DeepWoodsRegion.floor_10),
|
||||
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
|
||||
@@ -207,6 +175,7 @@ RegionLogicMixin, SeasonLogicMixin, RelationshipLogicMixin, MuseumLogicMixin, To
|
||||
archaeology_item_rules[location_name] = display_item_rule & preservation_chamber_rule
|
||||
else:
|
||||
archaeology_item_rules[location_name] = display_item_rule & hardwood_preservation_chamber_rule
|
||||
archaeology_item_rules[ModTrash.rusty_scrap] = self.logic.has(ModMachine.grinder) & self.logic.has_any(*all_artifacts)
|
||||
return archaeology_item_rules
|
||||
|
||||
def get_distant_lands_item_rules(self):
|
||||
|
||||
@@ -2,20 +2,21 @@ from typing import Tuple
|
||||
|
||||
from ...mods.mod_data import ModNames
|
||||
from ...options import Mods
|
||||
from ...strings.ap_names.mods.mod_items import SkillLevel
|
||||
|
||||
|
||||
def get_mod_skill_levels(mods: Mods) -> Tuple[str]:
|
||||
skills_items = []
|
||||
if ModNames.luck_skill in mods:
|
||||
skills_items.append("Luck Level")
|
||||
skills_items.append(SkillLevel.luck)
|
||||
if ModNames.socializing_skill in mods:
|
||||
skills_items.append("Socializing Level")
|
||||
skills_items.append(SkillLevel.socializing)
|
||||
if ModNames.magic in mods:
|
||||
skills_items.append("Magic Level")
|
||||
skills_items.append(SkillLevel.magic)
|
||||
if ModNames.archaeology in mods:
|
||||
skills_items.append("Archaeology Level")
|
||||
skills_items.append(SkillLevel.archaeology)
|
||||
if ModNames.binning_skill in mods:
|
||||
skills_items.append("Binning Level")
|
||||
skills_items.append(SkillLevel.binning)
|
||||
if ModNames.cooking_skill in mods:
|
||||
skills_items.append("Cooking Level")
|
||||
skills_items.append(SkillLevel.cooking)
|
||||
return tuple(skills_items)
|
||||
|
||||
@@ -19,7 +19,7 @@ from ...strings.food_names import Meal, Beverage
|
||||
from ...strings.forageable_names import SVEForage
|
||||
from ...strings.material_names import Material
|
||||
from ...strings.metal_names import Ore, MetalBar
|
||||
from ...strings.monster_drop_names import Loot
|
||||
from ...strings.monster_drop_names import Loot, ModLoot
|
||||
from ...strings.monster_names import Monster
|
||||
from ...strings.quest_names import Quest, ModQuest
|
||||
from ...strings.region_names import Region, SVERegion, BoardingHouseRegion
|
||||
@@ -86,7 +86,7 @@ class ModQuestLogic(BaseLogic[Union[HasLogicMixin, QuestLogicMixin, ReceivedLogi
|
||||
self.logic.relationship.can_meet(ModNPC.lance) & self.logic.region.can_reach(SVERegion.guild_summit),
|
||||
ModQuest.AuroraVineyard: self.logic.has(Fruit.starfruit) & self.logic.region.can_reach(SVERegion.aurora_vineyard),
|
||||
ModQuest.MonsterCrops: self.logic.has_all(*(SVEVegetable.monster_mushroom, SVEFruit.slime_berry, SVEFruit.monster_fruit, SVEVegetable.void_root)),
|
||||
ModQuest.VoidSoul: self.logic.has(SVEForage.void_soul) & self.logic.region.can_reach(Region.farm) &
|
||||
ModQuest.VoidSoul: self.logic.has(ModLoot.void_soul) & self.logic.region.can_reach(Region.farm) &
|
||||
self.logic.season.has_any_not_winter() & self.logic.region.can_reach(SVERegion.badlands_entrance) &
|
||||
self.logic.relationship.has_hearts(NPC.krobus, 10) & self.logic.quest.can_complete_quest(ModQuest.MonsterCrops) &
|
||||
self.logic.monster.can_kill_any((Monster.shadow_brute, Monster.shadow_shaman, Monster.shadow_sniper)),
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
from typing import Union
|
||||
|
||||
from .magic_logic import MagicLogicMixin
|
||||
from ...data.villagers_data import all_villagers
|
||||
from ...logic.action_logic import ActionLogicMixin
|
||||
from ...logic.base_logic import BaseLogicMixin, BaseLogic
|
||||
from ...logic.building_logic import BuildingLogicMixin
|
||||
from ...logic.cooking_logic import CookingLogicMixin
|
||||
from ...logic.crafting_logic import CraftingLogicMixin
|
||||
from ...logic.fishing_logic import FishingLogicMixin
|
||||
from ...logic.has_logic import HasLogicMixin
|
||||
from ...logic.received_logic import ReceivedLogicMixin
|
||||
@@ -14,10 +14,9 @@ from ...logic.relationship_logic import RelationshipLogicMixin
|
||||
from ...logic.tool_logic import ToolLogicMixin
|
||||
from ...mods.mod_data import ModNames
|
||||
from ...options import SkillProgression
|
||||
from ...stardew_rule import StardewRule, False_, True_
|
||||
from ...strings.ap_names.mods.mod_items import SkillLevel
|
||||
from ...strings.craftable_names import ModCraftable, ModMachine
|
||||
from ...stardew_rule import StardewRule, False_, True_, And
|
||||
from ...strings.building_names import Building
|
||||
from ...strings.craftable_names import ModCraftable, ModMachine
|
||||
from ...strings.geode_names import Geode
|
||||
from ...strings.machine_names import Machine
|
||||
from ...strings.region_names import Region
|
||||
@@ -33,7 +32,7 @@ class ModSkillLogicMixin(BaseLogicMixin):
|
||||
|
||||
|
||||
class ModSkillLogic(BaseLogic[Union[HasLogicMixin, ReceivedLogicMixin, RegionLogicMixin, ActionLogicMixin, RelationshipLogicMixin, BuildingLogicMixin,
|
||||
ToolLogicMixin, FishingLogicMixin, CookingLogicMixin, MagicLogicMixin]]):
|
||||
ToolLogicMixin, FishingLogicMixin, CookingLogicMixin, CraftingLogicMixin, MagicLogicMixin]]):
|
||||
def has_mod_level(self, skill: str, level: int) -> StardewRule:
|
||||
if level <= 0:
|
||||
return True_()
|
||||
@@ -77,9 +76,10 @@ ToolLogicMixin, FishingLogicMixin, CookingLogicMixin, MagicLogicMixin]]):
|
||||
|
||||
def can_earn_socializing_skill_level(self, level: int) -> StardewRule:
|
||||
villager_count = []
|
||||
for villager in all_villagers:
|
||||
if villager.mod_name in self.options.mods or villager.mod_name is None:
|
||||
villager_count.append(self.logic.relationship.can_earn_relationship(villager.name, level))
|
||||
|
||||
for villager in self.content.villagers.values():
|
||||
villager_count.append(self.logic.relationship.can_earn_relationship(villager.name, level))
|
||||
|
||||
return self.logic.count(level * 2, *villager_count)
|
||||
|
||||
def can_earn_archaeology_skill_level(self, level: int) -> StardewRule:
|
||||
@@ -89,12 +89,12 @@ ToolLogicMixin, FishingLogicMixin, CookingLogicMixin, MagicLogicMixin]]):
|
||||
shifter_rule = self.logic.has(ModCraftable.water_shifter)
|
||||
preservation_rule = self.logic.has(ModMachine.hardwood_preservation_chamber)
|
||||
if level >= 8:
|
||||
return (self.logic.action.can_pan() & self.logic.tool.has_tool(Tool.hoe, ToolMaterial.gold)) & shifter_rule & preservation_rule
|
||||
return (self.logic.tool.has_tool(Tool.pan, ToolMaterial.iridium) & self.logic.tool.has_tool(Tool.hoe, ToolMaterial.gold)) & shifter_rule & preservation_rule
|
||||
if level >= 5:
|
||||
return (self.logic.action.can_pan() & self.logic.tool.has_tool(Tool.hoe, ToolMaterial.iron)) & shifter_rule
|
||||
return (self.logic.tool.has_tool(Tool.pan, ToolMaterial.gold) & self.logic.tool.has_tool(Tool.hoe, ToolMaterial.iron)) & shifter_rule
|
||||
if level >= 3:
|
||||
return self.logic.action.can_pan() | self.logic.tool.has_tool(Tool.hoe, ToolMaterial.copper)
|
||||
return self.logic.action.can_pan() | self.logic.tool.has_tool(Tool.hoe, ToolMaterial.basic)
|
||||
return self.logic.tool.has_tool(Tool.pan, ToolMaterial.iron) | self.logic.tool.has_tool(Tool.hoe, ToolMaterial.copper)
|
||||
return self.logic.tool.has_tool(Tool.pan, ToolMaterial.copper) | self.logic.tool.has_tool(Tool.hoe, ToolMaterial.basic)
|
||||
|
||||
def can_earn_cooking_skill_level(self, level: int) -> StardewRule:
|
||||
if level >= 6:
|
||||
@@ -104,7 +104,13 @@ ToolLogicMixin, FishingLogicMixin, CookingLogicMixin, MagicLogicMixin]]):
|
||||
return self.logic.cooking.can_cook()
|
||||
|
||||
def can_earn_binning_skill_level(self, level: int) -> StardewRule:
|
||||
if level >= 6:
|
||||
return self.logic.has(Machine.recycling_machine)
|
||||
else:
|
||||
return True_() # You can always earn levels 1-5 with trash cans
|
||||
if level <= 2:
|
||||
return True_()
|
||||
binning_rule = [self.logic.has(ModMachine.trash_bin) & self.logic.has(Machine.recycling_machine)]
|
||||
if level > 4:
|
||||
binning_rule.append(self.logic.has(ModMachine.composter))
|
||||
if level > 7:
|
||||
binning_rule.append(self.logic.has(ModMachine.recycling_bin))
|
||||
if level > 9:
|
||||
binning_rule.append(self.logic.has(ModMachine.advanced_recycling_machine))
|
||||
return And(*binning_rule)
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
from typing import Union
|
||||
|
||||
from ...data.craftable_data import all_crafting_recipes_by_name
|
||||
from ..mod_data import ModNames
|
||||
from ...data.craftable_data import all_crafting_recipes_by_name
|
||||
from ...logic.action_logic import ActionLogicMixin
|
||||
from ...logic.artisan_logic import ArtisanLogicMixin
|
||||
from ...logic.base_logic import BaseLogicMixin, BaseLogic
|
||||
from ...logic.crafting_logic import CraftingLogicMixin
|
||||
from ...logic.crop_logic import CropLogicMixin
|
||||
from ...logic.has_logic import HasLogicMixin
|
||||
from ...logic.received_logic import ReceivedLogicMixin
|
||||
from ...logic.region_logic import RegionLogicMixin
|
||||
@@ -34,7 +33,7 @@ class ModSpecialOrderLogicMixin(BaseLogicMixin):
|
||||
self.special_order = ModSpecialOrderLogic(*args, **kwargs)
|
||||
|
||||
|
||||
class ModSpecialOrderLogic(BaseLogic[Union[ActionLogicMixin, ArtisanLogicMixin, CraftingLogicMixin, CropLogicMixin, HasLogicMixin, RegionLogicMixin,
|
||||
class ModSpecialOrderLogic(BaseLogic[Union[ActionLogicMixin, ArtisanLogicMixin, CraftingLogicMixin, HasLogicMixin, RegionLogicMixin,
|
||||
ReceivedLogicMixin, RelationshipLogicMixin, SeasonLogicMixin, WalletLogicMixin]]):
|
||||
def get_modded_special_orders_rules(self):
|
||||
special_orders = {}
|
||||
@@ -54,7 +53,7 @@ ReceivedLogicMixin, RelationshipLogicMixin, SeasonLogicMixin, WalletLogicMixin]]
|
||||
self.logic.region.can_reach(SVERegion.fairhaven_farm),
|
||||
ModSpecialOrder.a_mysterious_venture: self.logic.has(Bomb.cherry_bomb) & self.logic.has(Bomb.bomb) & self.logic.has(Bomb.mega_bomb) &
|
||||
self.logic.region.can_reach(Region.adventurer_guild),
|
||||
ModSpecialOrder.an_elegant_reception: self.logic.artisan.can_keg(Fruit.starfruit) & self.logic.has(ArtisanGood.cheese) &
|
||||
ModSpecialOrder.an_elegant_reception: self.logic.has(ArtisanGood.specific_wine(Fruit.starfruit)) & self.logic.has(ArtisanGood.cheese) &
|
||||
self.logic.has(ArtisanGood.goat_cheese) & self.logic.season.has_any_not_winter() &
|
||||
self.logic.region.can_reach(SVERegion.jenkins_cellar),
|
||||
ModSpecialOrder.fairy_garden: self.logic.has(Consumable.fairy_dust) &
|
||||
|
||||
@@ -14,12 +14,11 @@ from ...logic.season_logic import SeasonLogicMixin
|
||||
from ...logic.time_logic import TimeLogicMixin
|
||||
from ...logic.tool_logic import ToolLogicMixin
|
||||
from ...strings.ap_names.mods.mod_items import SVELocation, SVERunes, SVEQuestItem
|
||||
from ...strings.quest_names import ModQuest
|
||||
from ...strings.quest_names import Quest
|
||||
from ...strings.region_names import Region
|
||||
from ...strings.tool_names import Tool, ToolMaterial
|
||||
from ...strings.wallet_item_names import Wallet
|
||||
from ...stardew_rule import Or
|
||||
from ...strings.quest_names import ModQuest
|
||||
|
||||
|
||||
class SVELogicMixin(BaseLogicMixin):
|
||||
@@ -29,7 +28,7 @@ class SVELogicMixin(BaseLogicMixin):
|
||||
|
||||
|
||||
class SVELogic(BaseLogic[Union[HasLogicMixin, ReceivedLogicMixin, QuestLogicMixin, RegionLogicMixin, RelationshipLogicMixin, TimeLogicMixin, ToolLogicMixin,
|
||||
CookingLogicMixin, MoneyLogicMixin, CombatLogicMixin, SeasonLogicMixin, QuestLogicMixin]]):
|
||||
CookingLogicMixin, MoneyLogicMixin, CombatLogicMixin, SeasonLogicMixin]]):
|
||||
def initialize_rules(self):
|
||||
self.registry.sve_location_rules.update({
|
||||
SVELocation.tempered_galaxy_sword: self.logic.money.can_spend_at(SVERegion.alesia_shop, 350000),
|
||||
@@ -39,17 +38,31 @@ class SVELogic(BaseLogic[Union[HasLogicMixin, ReceivedLogicMixin, QuestLogicMixi
|
||||
|
||||
def has_any_rune(self):
|
||||
rune_list = SVERunes.nexus_items
|
||||
return Or(*(self.logic.received(rune) for rune in rune_list))
|
||||
return self.logic.or_(*(self.logic.received(rune) for rune in rune_list))
|
||||
|
||||
def has_iridium_bomb(self):
|
||||
if self.options.quest_locations < 0:
|
||||
return self.logic.quest.can_complete_quest(ModQuest.RailroadBoulder)
|
||||
return self.logic.received(SVEQuestItem.iridium_bomb)
|
||||
|
||||
def has_marlon_boat(self):
|
||||
if self.options.quest_locations < 0:
|
||||
return self.logic.quest.can_complete_quest(ModQuest.MarlonsBoat)
|
||||
return self.logic.received(SVEQuestItem.marlon_boat_paddle)
|
||||
|
||||
def has_grandpa_shed_repaired(self):
|
||||
if self.options.quest_locations < 0:
|
||||
return self.logic.quest.can_complete_quest(ModQuest.GrandpasShed)
|
||||
return self.logic.received(SVEQuestItem.grandpa_shed)
|
||||
|
||||
def has_bear_knowledge(self):
|
||||
if self.options.quest_locations < 0:
|
||||
return self.logic.quest.can_complete_quest(Quest.strange_note)
|
||||
return self.logic.received(Wallet.bears_knowledge)
|
||||
|
||||
def can_buy_bear_recipe(self):
|
||||
access_rule = (self.logic.quest.can_complete_quest(Quest.strange_note) & self.logic.tool.has_tool(Tool.axe, ToolMaterial.basic) &
|
||||
self.logic.tool.has_tool(Tool.pickaxe, ToolMaterial.basic))
|
||||
forage_rule = self.logic.region.can_reach_any((Region.forest, Region.backwoods, Region.mountain))
|
||||
knowledge_rule = self.logic.received(Wallet.bears_knowledge)
|
||||
knowledge_rule = self.has_bear_knowledge()
|
||||
return access_rule & forage_rule & knowledge_rule
|
||||
|
||||
|
||||
Reference in New Issue
Block a user