From 1c142350c379d503de512953072f55a8737c30d2 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 24 Jul 2024 08:34:51 -0400 Subject: Lingo: Add option to prevent shuffling postgame (#3350) * Lingo: Add option to prevent shuffling postgame * Allow roof access on door shuffle * Fix broken unit test * Simplified THE END edge case * Revert unnecessary change * Review comments * Fix mastery unit test * Update generated.dat * Added player's name to error message --- test/TestMastery.py | 6 +++-- test/TestPostgame.py | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 test/TestPostgame.py (limited to 'test') diff --git a/test/TestMastery.py b/test/TestMastery.py index 3ebe40a..c9c79a9 100644 --- a/test/TestMastery.py +++ b/test/TestMastery.py @@ -5,7 +5,8 @@ class TestMasteryWhenVictoryIsTheEnd(LingoTestBase): options = { "mastery_achievements": "22", "victory_condition": "the_end", - "shuffle_colors": "true" + "shuffle_colors": "true", + "shuffle_postgame": "true", } def test_requirement(self): @@ -43,7 +44,8 @@ class TestMasteryBlocksDependents(LingoTestBase): options = { "mastery_achievements": "24", "shuffle_colors": "true", - "location_checks": "insanity" + "location_checks": "insanity", + "victory_condition": "level_2", } def test_requirement(self): diff --git a/test/TestPostgame.py b/test/TestPostgame.py new file mode 100644 index 0000000..d2e2232 --- /dev/null +++ b/test/TestPostgame.py @@ -0,0 +1,62 @@ +from . import LingoTestBase + + +class TestPostgameVanillaTheEnd(LingoTestBase): + options = { + "shuffle_doors": "none", + "victory_condition": "the_end", + "shuffle_postgame": "false", + } + + def test_requirement(self): + location_names = [location.name for location in self.multiworld.get_locations(self.player)] + + self.assertTrue("The End (Solved)" in location_names) + self.assertTrue("Champion's Rest - YOU" in location_names) + self.assertFalse("Orange Tower Seventh Floor - THE MASTER" in location_names) + self.assertFalse("The Red - Achievement" in location_names) + + +class TestPostgameComplexDoorsTheEnd(LingoTestBase): + options = { + "shuffle_doors": "complex", + "victory_condition": "the_end", + "shuffle_postgame": "false", + } + + def test_requirement(self): + location_names = [location.name for location in self.multiworld.get_locations(self.player)] + + self.assertTrue("The End (Solved)" in location_names) + self.assertFalse("Orange Tower Seventh Floor - THE MASTER" in location_names) + self.assertTrue("The Red - Achievement" in location_names) + + +class TestPostgameLateColorHunt(LingoTestBase): + options = { + "shuffle_doors": "none", + "victory_condition": "the_end", + "sunwarp_access": "disabled", + "shuffle_postgame": "false", + } + + def test_requirement(self): + location_names = [location.name for location in self.multiworld.get_locations(self.player)] + + self.assertFalse("Champion's Rest - YOU" in location_names) + + +class TestPostgameVanillaTheMaster(LingoTestBase): + options = { + "shuffle_doors": "none", + "victory_condition": "the_master", + "shuffle_postgame": "false", + } + + def test_requirement(self): + location_names = [location.name for location in self.multiworld.get_locations(self.player)] + + self.assertTrue("Orange Tower Seventh Floor - THE END" in location_names) + self.assertTrue("Orange Tower Seventh Floor - Mastery Achievements" in location_names) + self.assertTrue("The Red - Achievement" in location_names) + self.assertFalse("Mastery Panels" in location_names) -- cgit 1.4.1