mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-03-24 18:33:32 -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.
164 lines
8.1 KiB
Python
164 lines
8.1 KiB
Python
from ..bases import SVTestBase
|
|
from ... import options, StartWithoutOptionName
|
|
from ...data.craftable_data import all_crafting_recipes_by_name
|
|
from ...options import StartWithout
|
|
|
|
|
|
class TestCraftsanityLogic(SVTestBase):
|
|
options = {
|
|
StartWithout.internal_name: frozenset({StartWithoutOptionName.buildings}),
|
|
options.SeasonRandomization.internal_name: options.SeasonRandomization.option_disabled,
|
|
options.SkillProgression.internal_name: options.SkillProgression.option_progressive,
|
|
options.BuildingProgression.internal_name: options.BuildingProgression.option_progressive,
|
|
options.Cropsanity.internal_name: options.Cropsanity.option_enabled,
|
|
options.Craftsanity.internal_name: options.Craftsanity.option_all,
|
|
options.ExcludeGingerIsland.internal_name: options.ExcludeGingerIsland.option_true,
|
|
}
|
|
|
|
def test_can_craft_recipe(self):
|
|
location = "Craft Marble Brazier"
|
|
self.collect(self.create_item("Landslide Removed"))
|
|
self.collect([self.create_item("Progressive Pickaxe")] * 4)
|
|
self.collect([self.create_item("Progressive Fishing Rod")] * 4)
|
|
self.collect([self.create_item("Progressive Sword")] * 4)
|
|
self.collect([self.create_item("Progressive Mine Elevator")] * 24)
|
|
self.collect([self.create_item("Progressive Pan")] * 4)
|
|
self.collect([self.create_item("Mining Level")] * 10)
|
|
self.collect([self.create_item("Combat Level")] * 10)
|
|
self.collect([self.create_item("Fishing Level")] * 10)
|
|
self.collect_all_the_money()
|
|
self.assert_cannot_reach_location(location)
|
|
|
|
self.multiworld.state.collect(self.create_item("Marble Brazier Recipe"))
|
|
self.assert_can_reach_location(location)
|
|
|
|
def test_can_learn_crafting_recipe(self):
|
|
location = "Marble Brazier Recipe"
|
|
self.assert_cannot_reach_location(location)
|
|
|
|
self.collect_lots_of_money()
|
|
self.assert_can_reach_location(location)
|
|
|
|
def test_can_craft_festival_recipe(self):
|
|
recipe = all_crafting_recipes_by_name["Jack-O-Lantern"]
|
|
self.multiworld.state.collect(self.create_item("Pumpkin Seeds"))
|
|
self.multiworld.state.collect(self.create_item("Torch Recipe"))
|
|
self.collect_lots_of_money()
|
|
rule = self.world.logic.crafting.can_craft(recipe)
|
|
self.assert_rule_false(rule)
|
|
|
|
self.multiworld.state.collect(self.create_item("Fall"))
|
|
self.assert_rule_false(rule)
|
|
|
|
self.multiworld.state.collect(self.create_item("Jack-O-Lantern Recipe"))
|
|
self.assert_rule_true(rule)
|
|
|
|
def test_require_furnace_recipe_for_smelting_checks(self):
|
|
locations = ["Craft Furnace", "Quest: Smelting", "Copper Pickaxe Upgrade", "Gold Trash Can Upgrade"]
|
|
rules = [self.world.logic.region.can_reach_location(location) for location in locations]
|
|
self.collect(self.create_item("Landslide Removed"))
|
|
self.collect([self.create_item("Progressive Pickaxe")] * 4)
|
|
self.collect([self.create_item("Progressive Fishing Rod")] * 4)
|
|
self.collect([self.create_item("Progressive Sword")] * 4)
|
|
self.collect([self.create_item("Progressive Mine Elevator")] * 24)
|
|
self.collect([self.create_item("Progressive Trash Can")] * 2)
|
|
self.collect([self.create_item("Mining Level")] * 10)
|
|
self.collect([self.create_item("Combat Level")] * 10)
|
|
self.collect([self.create_item("Fishing Level")] * 10)
|
|
self.collect_all_the_money()
|
|
self.assert_rules_false(rules, self.multiworld.state)
|
|
|
|
self.multiworld.state.collect(self.create_item("Furnace Recipe"))
|
|
self.assert_rules_true(rules, self.multiworld.state)
|
|
|
|
|
|
class TestCraftsanityWithFestivalsLogic(SVTestBase):
|
|
options = {
|
|
options.BuildingProgression.internal_name: options.BuildingProgression.option_progressive,
|
|
options.Cropsanity.internal_name: options.Cropsanity.option_enabled,
|
|
options.FestivalLocations.internal_name: options.FestivalLocations.option_easy,
|
|
options.Craftsanity.internal_name: options.Craftsanity.option_all,
|
|
options.ExcludeGingerIsland.internal_name: options.ExcludeGingerIsland.option_true,
|
|
}
|
|
|
|
def test_can_craft_festival_recipe(self):
|
|
recipe = all_crafting_recipes_by_name["Jack-O-Lantern"]
|
|
self.multiworld.state.collect(self.create_item("Pumpkin Seeds"))
|
|
self.multiworld.state.collect(self.create_item("Fall"))
|
|
self.collect_lots_of_money()
|
|
rule = self.world.logic.crafting.can_craft(recipe)
|
|
self.assert_rule_false(rule)
|
|
|
|
self.multiworld.state.collect(self.create_item("Jack-O-Lantern Recipe"))
|
|
self.assert_rule_false(rule)
|
|
|
|
self.multiworld.state.collect(self.create_item("Torch Recipe"))
|
|
self.assert_rule_true(rule)
|
|
|
|
|
|
class TestNoCraftsanityLogic(SVTestBase):
|
|
options = {
|
|
options.SkillProgression.internal_name: options.SkillProgression.option_progressive,
|
|
options.BuildingProgression.internal_name: options.BuildingProgression.option_progressive,
|
|
options.SeasonRandomization.internal_name: options.SeasonRandomization.option_progressive,
|
|
options.Cropsanity.internal_name: options.Cropsanity.option_enabled,
|
|
options.FestivalLocations.internal_name: options.FestivalLocations.option_disabled,
|
|
options.Craftsanity.internal_name: options.Craftsanity.option_none,
|
|
options.ExcludeGingerIsland.internal_name: options.ExcludeGingerIsland.option_true,
|
|
}
|
|
|
|
def test_can_craft_recipe(self):
|
|
recipe = all_crafting_recipes_by_name["Wood Floor"]
|
|
rule = self.world.logic.crafting.can_craft(recipe)
|
|
self.assert_rule_true(rule)
|
|
|
|
def test_can_craft_festival_recipe(self):
|
|
recipe = all_crafting_recipes_by_name["Jack-O-Lantern"]
|
|
self.multiworld.state.collect(self.create_item("Pumpkin Seeds"))
|
|
self.collect_lots_of_money()
|
|
rule = self.world.logic.crafting.can_craft(recipe)
|
|
result = rule(self.multiworld.state)
|
|
self.assertFalse(result)
|
|
|
|
self.collect([self.create_item("Progressive Season")] * 2)
|
|
self.assert_rule_true(rule)
|
|
|
|
def test_requires_mining_levels_for_smelting_checks(self):
|
|
locations = ["Quest: Smelting", "Copper Pickaxe Upgrade", "Gold Trash Can Upgrade"]
|
|
rules = [self.world.logic.region.can_reach_location(location) for location in locations]
|
|
self.collect(self.create_item("Landslide Removed"))
|
|
self.collect([self.create_item("Progressive Pickaxe")] * 4)
|
|
self.collect([self.create_item("Progressive Fishing Rod")] * 4)
|
|
self.collect([self.create_item("Progressive Sword")] * 4)
|
|
self.collect([self.create_item("Progressive Mine Elevator")] * 24)
|
|
self.collect([self.create_item("Progressive Trash Can")] * 2)
|
|
self.multiworld.state.collect(self.create_item("Furnace Recipe"))
|
|
self.collect([self.create_item("Combat Level")] * 10)
|
|
self.collect([self.create_item("Fishing Level")] * 10)
|
|
self.collect_all_the_money()
|
|
self.assert_rules_false(rules, self.multiworld.state)
|
|
|
|
self.collect([self.create_item("Mining Level")] * 10)
|
|
self.assert_rules_true(rules, self.multiworld.state)
|
|
|
|
|
|
class TestNoCraftsanityWithFestivalsLogic(SVTestBase):
|
|
options = {
|
|
options.BuildingProgression.internal_name: options.BuildingProgression.option_progressive,
|
|
options.Cropsanity.internal_name: options.Cropsanity.option_enabled,
|
|
options.FestivalLocations.internal_name: options.FestivalLocations.option_easy,
|
|
options.Craftsanity.internal_name: options.Craftsanity.option_none,
|
|
options.ExcludeGingerIsland.internal_name: options.ExcludeGingerIsland.option_true,
|
|
}
|
|
|
|
def test_can_craft_festival_recipe(self):
|
|
recipe = all_crafting_recipes_by_name["Jack-O-Lantern"]
|
|
self.multiworld.state.collect(self.create_item("Pumpkin Seeds"))
|
|
self.multiworld.state.collect(self.create_item("Fall"))
|
|
self.collect_lots_of_money()
|
|
rule = self.world.logic.crafting.can_craft(recipe)
|
|
self.assert_rule_false(rule)
|
|
|
|
self.multiworld.state.collect(self.create_item("Jack-O-Lantern Recipe"))
|
|
self.assert_rule_true(rule)
|