Stardew Valley: Fix a bug where walnutsanity would get deactivated even tho ginger island got forced activated (and move some files) (#4311)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import itertools
|
||||
|
||||
from Options import NamedRange, Accessibility
|
||||
from Options import NamedRange
|
||||
from . import SVTestCase, allsanity_no_mods_6_x_x, allsanity_mods_6_x_x, solo_multiworld
|
||||
from .assertion import WorldAssertMixin
|
||||
from .long.option_names import all_option_choices
|
||||
@@ -54,23 +54,6 @@ class TestGoal(SVTestCase):
|
||||
victory = multi_world.find_item("Victory", 1)
|
||||
self.assertEqual(victory.name, location)
|
||||
|
||||
def test_given_perfection_goal_when_generate_then_accessibility_is_forced_to_full(self):
|
||||
"""There is a bug with the current victory condition of the perfection goal that can create unwinnable seeds if the accessibility is set to minimal and
|
||||
the world gets flooded with progression items through plando. This will increase the amount of collected progression items pass the total amount
|
||||
calculated for the world when creating the item pool. This will cause the victory condition to be met before all locations are collected, so some could
|
||||
be left inaccessible, which in practice will make the seed unwinnable.
|
||||
"""
|
||||
for accessibility in Accessibility.options.keys():
|
||||
world_options = {Goal.internal_name: Goal.option_perfection, "accessibility": accessibility}
|
||||
with self.solo_world_sub_test(f"Accessibility: {accessibility}", world_options) as (_, world):
|
||||
self.assertEqual(world.options.accessibility, Accessibility.option_full)
|
||||
|
||||
def test_given_allsanity_goal_when_generate_then_accessibility_is_forced_to_full(self):
|
||||
for accessibility in Accessibility.options.keys():
|
||||
world_options = {Goal.internal_name: Goal.option_allsanity, "accessibility": accessibility}
|
||||
with self.solo_world_sub_test(f"Accessibility: {accessibility}", world_options) as (_, world):
|
||||
self.assertEqual(world.options.accessibility, Accessibility.option_full)
|
||||
|
||||
|
||||
class TestSeasonRandomization(SVTestCase):
|
||||
def test_given_disabled_when_generate_then_all_seasons_are_precollected(self):
|
||||
@@ -144,7 +127,7 @@ class TestToolProgression(SVTestCase):
|
||||
|
||||
class TestGenerateAllOptionsWithExcludeGingerIsland(WorldAssertMixin, SVTestCase):
|
||||
|
||||
def test_given_choice_when_generate_exclude_ginger_island(self):
|
||||
def test_given_choice_when_generate_exclude_ginger_island_then_ginger_island_is_properly_excluded(self):
|
||||
for option, option_choice in all_option_choices:
|
||||
if option is ExcludeGingerIsland:
|
||||
continue
|
||||
@@ -163,19 +146,6 @@ class TestGenerateAllOptionsWithExcludeGingerIsland(WorldAssertMixin, SVTestCase
|
||||
self.assert_basic_checks(multiworld)
|
||||
self.assert_no_ginger_island_content(multiworld)
|
||||
|
||||
def test_given_island_related_goal_then_override_exclude_ginger_island(self):
|
||||
island_goals = ["greatest_walnut_hunter", "perfection"]
|
||||
for goal, exclude_island in itertools.product(island_goals, ExcludeGingerIsland.options):
|
||||
world_options = {
|
||||
Goal: goal,
|
||||
ExcludeGingerIsland: exclude_island
|
||||
}
|
||||
|
||||
with self.solo_world_sub_test(f"Goal: {goal}, {ExcludeGingerIsland.internal_name}: {exclude_island}", world_options) \
|
||||
as (multiworld, stardew_world):
|
||||
self.assertEqual(stardew_world.options.exclude_ginger_island, ExcludeGingerIsland.option_false)
|
||||
self.assert_basic_checks(multiworld)
|
||||
|
||||
|
||||
class TestTraps(SVTestCase):
|
||||
def test_given_no_traps_when_generate_then_no_trap_in_pool(self):
|
||||
|
||||
Reference in New Issue
Block a user