Skip to content

Commit

Permalink
Add Variety minimal symbols unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
NewSoupVi committed Jul 6, 2024
1 parent 8fd8ab8 commit 5390aae
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .run/Archipelago Unittests.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Archipelago Unittests" type="tests" factoryName="Unittests">
<module name="Archipelago" />
<option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<option name="SDK_HOME" value="" />
Expand All @@ -11,7 +12,7 @@
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="_new_pattern" value="&quot;&quot;" />
<option name="_new_additionalArguments" value="&quot;&quot;" />
<option name="_new_target" value="&quot;$PROJECT_DIR$/test&quot;" />
<option name="_new_target" value="&quot;$PROJECT_DIR$/worlds/witness/test&quot;" />
<option name="_new_targetType" value="&quot;PATH&quot;" />
<method v="2" />
</configuration>
Expand Down
33 changes: 33 additions & 0 deletions worlds/witness/test/test_lasers.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,39 @@ def test_symbols_to_win(self) -> None:
self.assert_can_beat_with_minimally(exact_requirement)


class TestSymbolsRequiredToWinElevatorVariety(WitnessTestBase):
options = {
"shuffle_lasers": True,
"mountain_lasers": 1,
"victory_condition": "elevator",
"early_symbol_item": False,
"puzzle_randomization": "umbra_variety",
}

def test_symbols_to_win(self) -> None:
"""
In symbol shuffle, the only way to reach the Elevator is through Mountain Entry by descending the Mountain.
This requires a very specific set of symbol items per puzzle randomization mode.
In this case, we check Vanilla Puzzles.
"""

exact_requirement = {
"Monastery Laser": 1,
"Progressive Dots": 2,
"Progressive Stars": 2,
"Progressive Symmetry": 1,
"Black/White Squares": 1,
"Colored Squares": 1,
"Shapers": 1,
"Rotated Shapers": 1,
"Eraser": 1,
"Triangles": 1,
"Arrows": 1,
}

self.assert_can_beat_with_minimally(exact_requirement)


class TestPanelsRequiredToWinElevator(WitnessTestBase):
options = {
"shuffle_lasers": True,
Expand Down

0 comments on commit 5390aae

Please sign in to comment.