 62657df3fb
			
		
	
	62657df3fb
	
	
	
		
			
			## What is this fixing or adding? Major content update for Stardew Valley ## How was this tested? One large-scale public Beta on the archipelago server, plus several smaller private asyncs and test runs You can go to https://github.com/agilbert1412/StardewArchipelago/releases to grab the mod (latest 4.x.x version), the supported mods and the apworld, to test this PR ## New Features: - Festival Checks [Easy mode or Hard Mode] - Special Orders [Both Board and Qi] - Willy's Boat - Ginger Island Parrots - TV Channels - Trap Items [Available in various difficulty levels] - Entrance Randomizer: Buildings and Chaos - New Fishsanity options: Exclude Legendaries, Exclude Hard fish, Only easy fish - Resource Pack overhaul [Resource packs are now more enjoyable and varied] - Goal: Greatest Walnut Hunter [Find every single Golden Walnut] - Goal: Perfection [Achieve Perfection] - Option: Profit Margin [Multiplier over all earnings] - Option: Friendsanity Heart Size [Reduce clutter from friendsanity hearts] - Option: Exclude Ginger Island - will exclude many locations and items to generate a playthrough that does not go to the island - Mod Support [Curated list of mods] ## New Contributors: @Witchybun for the mod support --------- Co-authored-by: Witchybun <embenham05@gmail.com> Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com> Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
		
			
				
	
	
		
			53 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			53 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
| import itertools
 | |
| import math
 | |
| import sys
 | |
| import unittest
 | |
| import random
 | |
| from typing import Set
 | |
| 
 | |
| from BaseClasses import ItemClassification, MultiWorld
 | |
| from . import setup_solo_multiworld, SVTestBase
 | |
| from .. import ItemData, StardewValleyWorld
 | |
| from ..items import Group, item_table
 | |
| 
 | |
| 
 | |
| class TestItems(SVTestBase):
 | |
|     def test_can_create_item_of_resource_pack(self):
 | |
|         item_name = "Resource Pack: 500 Money"
 | |
| 
 | |
|         multi_world = MultiWorld(1)
 | |
|         multi_world.game[1] = "Stardew Valley"
 | |
|         multi_world.player_name = {1: "Tester"}
 | |
|         world = StardewValleyWorld(multi_world, 1)
 | |
|         item = world.create_item(item_name)
 | |
| 
 | |
|         assert item.name == item_name
 | |
| 
 | |
|     def test_items_table_footprint_is_between_717000_and_737000(self):
 | |
|         item_with_lowest_id = min((item for item in item_table.values() if item.code is not None), key=lambda x: x.code)
 | |
|         item_with_highest_id = max((item for item in item_table.values() if item.code is not None),
 | |
|                                    key=lambda x: x.code)
 | |
| 
 | |
|         assert item_with_lowest_id.code >= 717000
 | |
|         assert item_with_highest_id.code < 737000
 | |
| 
 | |
|     def test_babies_come_in_all_shapes_and_sizes(self):
 | |
|         baby_permutations = set()
 | |
|         for attempt_number in range(50):
 | |
|             if len(baby_permutations) >= 4:
 | |
|                 print(f"Already got all 4 baby permutations, breaking early [{attempt_number} generations]")
 | |
|                 break
 | |
|             seed = random.randrange(sys.maxsize)
 | |
|             multiworld = setup_solo_multiworld(seed=seed)
 | |
|             baby_items = [item for item in multiworld.get_items() if "Baby" in item.name]
 | |
|             self.assertEqual(len(baby_items), 2)
 | |
|             baby_permutations.add(f"{baby_items[0]} - {baby_items[1]}")
 | |
|         self.assertEqual(len(baby_permutations), 4)
 | |
| 
 | |
|     def test_correct_number_of_stardrops(self):
 | |
|         seed = random.randrange(sys.maxsize)
 | |
|         allsanity_options = self.allsanity_options_without_mods()
 | |
|         multiworld = setup_solo_multiworld(allsanity_options, seed=seed)
 | |
|         stardrop_items = [item for item in multiworld.get_items() if "Stardrop" in item.name]
 | |
|         self.assertEqual(len(stardrop_items), 5)
 |