mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-08-15 01:26:34 -07:00
* New solution to that plando issue * better * Another warning * better comment * Best of both worlds I guess? * oops * Smarter code reuse * better comment * oop * lint * mypy * player_name * add unit test * oh * Rebrand time baby * This fits on one line * oop * Update worlds/witness/__init__.py Co-authored-by: Exempt-Medic <[email protected]> * mypy * Reorganize some doors according to medic's suggestions * This should make it much faster (Thanks Medic) * Town Doors works because of Church being a check always, Church Entry feels really bad tho * Only add Desert Entry if there are no control panels stopping you * No overlap here, so why is it a set * Idk everything's kinda good without symbol shuffle * Just make sure, I guess * This makes way more sense doesn't it * Oh, this is probably important * oop * loc * oops 2 * ruff * that was already in there * Change the door picking a bit further * some renaming * slight wording change * Fix * Move it all to a new file * ruff * mypy * . * Make sure we're only adding as many tutorial checks as necessary * ruff * These checks aren't necessary, as the final list gets culled to only existing items anyway. It saves CPU cycles, but this is nicer for future compatibility * Special handling for caves shortcuts * 120 chars * Update worlds/witness/place_early_item.py Co-authored-by: Exempt-Medic <[email protected]> * Clean up Windmill & Theater cases * Make early_symbol_item removed instead * Add early_good_item to presets * replace double None checks with casts * That doesn't exist anymore * Mypy thing * Update the doors again a bit * Pycharm pls * ruff * forgot one * oop * Is it finally right? * Update options.py * Fix with new Panel Keys * Hopefully fix crash when one of the types runs out when the others haven't yet * oops * Medic suggestion * unused import * Update place_early_item.py * Update __init__.py * Update __init__.py * Update options.py * Add possible types to option desc * Make that include all Tutorial (Inside) checks * Update __init__.py * Update test_early_good_item.py * Update test_early_good_item.py * Slight cleanup * fix no tutorial locations being picked up by tutorial location size check --------- Co-authored-by: Exempt-Medic <[email protected]>
247 lines
8.5 KiB
Python
247 lines
8.5 KiB
Python
from ..test.bases import WitnessTestBase
|
|
|
|
|
|
class TestSymbolsRequiredToWinElevatorNormal(WitnessTestBase):
|
|
options = {
|
|
"shuffle_lasers": True,
|
|
"puzzle_randomization": "sigma_normal",
|
|
"mountain_lasers": 1,
|
|
"victory_condition": "elevator",
|
|
"early_good_items": {},
|
|
}
|
|
|
|
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 Sigma Normal Puzzles.
|
|
"""
|
|
|
|
exact_requirement = {
|
|
"Monastery Laser": 1,
|
|
"Progressive Dots": 2,
|
|
"Progressive Stars": 2,
|
|
"Progressive Symmetry": 2,
|
|
"Black/White Squares": 1,
|
|
"Colored Squares": 1,
|
|
"Shapers": 1,
|
|
"Rotated Shapers": 1,
|
|
"Eraser": 1,
|
|
}
|
|
|
|
self.assert_can_beat_with_minimally(exact_requirement)
|
|
|
|
|
|
class TestSymbolsRequiredToWinElevatorExpert(WitnessTestBase):
|
|
options = {
|
|
"shuffle_lasers": True,
|
|
"mountain_lasers": 1,
|
|
"victory_condition": "elevator",
|
|
"early_good_items": {},
|
|
"puzzle_randomization": "sigma_expert",
|
|
}
|
|
|
|
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 Sigma Expert Puzzles.
|
|
"""
|
|
|
|
exact_requirement = {
|
|
"Monastery Laser": 1,
|
|
"Progressive Dots": 2,
|
|
"Progressive Stars": 2,
|
|
"Progressive Symmetry": 2,
|
|
"Black/White Squares": 1,
|
|
"Colored Squares": 1,
|
|
"Shapers": 1,
|
|
"Rotated Shapers": 1,
|
|
"Negative Shapers": 1,
|
|
"Eraser": 1,
|
|
"Triangles": 1,
|
|
}
|
|
|
|
self.assert_can_beat_with_minimally(exact_requirement)
|
|
|
|
|
|
class TestSymbolsRequiredToWinElevatorVanilla(WitnessTestBase):
|
|
options = {
|
|
"shuffle_lasers": True,
|
|
"mountain_lasers": 1,
|
|
"victory_condition": "elevator",
|
|
"early_good_items": {},
|
|
"puzzle_randomization": "none",
|
|
}
|
|
|
|
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,
|
|
}
|
|
|
|
self.assert_can_beat_with_minimally(exact_requirement)
|
|
|
|
|
|
class TestSymbolsRequiredToWinElevatorVariety(WitnessTestBase):
|
|
options = {
|
|
"shuffle_lasers": True,
|
|
"mountain_lasers": 1,
|
|
"victory_condition": "elevator",
|
|
"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 Variety 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,
|
|
"mountain_lasers": 1,
|
|
"victory_condition": "elevator",
|
|
"early_good_items": {},
|
|
"shuffle_symbols": False,
|
|
"shuffle_doors": "panels",
|
|
"door_groupings": "off",
|
|
}
|
|
|
|
def test_panels_to_win(self) -> None:
|
|
"""
|
|
In door panel shuffle , the only way to reach the Elevator is through Mountain Entry by descending the Mountain.
|
|
This requires some control panels for each of the Mountain Floors.
|
|
"""
|
|
|
|
exact_requirement = {
|
|
"Desert Laser": 1,
|
|
"Town Desert Laser Redirect Control (Panel)": 1,
|
|
"Mountain Floor 1 Light Bridge (Panel)": 1,
|
|
"Mountain Floor 2 Light Bridge Near (Panel)": 1,
|
|
"Mountain Floor 2 Light Bridge Far (Panel)": 1,
|
|
"Mountain Floor 2 Elevator Control (Panel)": 1,
|
|
}
|
|
|
|
self.assert_can_beat_with_minimally(exact_requirement)
|
|
|
|
|
|
class TestDoorsRequiredToWinElevator(WitnessTestBase):
|
|
options = {
|
|
"shuffle_lasers": True,
|
|
"mountain_lasers": 1,
|
|
"victory_condition": "elevator",
|
|
"early_good_items": {},
|
|
"shuffle_symbols": False,
|
|
"shuffle_doors": "doors",
|
|
"door_groupings": "off",
|
|
}
|
|
|
|
def test_doors_to_elevator_paths(self) -> None:
|
|
"""
|
|
In remote door shuffle, there are three ways to win.
|
|
|
|
- Through the normal route (Mountain Entry -> Descend through Mountain -> Reach Bottom Floor)
|
|
- Through the Caves using the Caves Shortcuts (Caves -> Reach Bottom Floor)
|
|
- Through the Caves via Challenge (Tunnels -> Challenge -> Caves -> Reach Bottom Floor)
|
|
"""
|
|
|
|
with self.subTest("Test Elevator victory in shuffle_doors through Mountain Entry."):
|
|
exact_requirement = {
|
|
"Monastery Laser": 1,
|
|
"Mountain Floor 1 Exit (Door)": 1,
|
|
"Mountain Floor 2 Staircase Near (Door)": 1,
|
|
"Mountain Floor 2 Staircase Far (Door)": 1,
|
|
"Mountain Floor 2 Exit (Door)": 1,
|
|
"Mountain Bottom Floor Giant Puzzle Exit (Door)": 1,
|
|
"Mountain Bottom Floor Pillars Room Entry (Door)": 1,
|
|
}
|
|
|
|
self.assert_can_beat_with_minimally(exact_requirement)
|
|
|
|
with self.subTest("Test Elevator victory in shuffle_doors through Caves Shortcuts."):
|
|
exact_requirement = {
|
|
"Monastery Laser": 1, # Elevator Panel itself has a laser lock
|
|
"Caves Mountain Shortcut (Door)": 1,
|
|
"Caves Entry (Door)": 1,
|
|
"Mountain Bottom Floor Rock (Door)": 1,
|
|
"Mountain Bottom Floor Pillars Room Entry (Door)": 1,
|
|
}
|
|
|
|
self.assert_can_beat_with_minimally(exact_requirement)
|
|
|
|
with self.subTest("Test Elevator victory in shuffle_doors through Tunnels->Challenge->Caves."):
|
|
exact_requirement = {
|
|
"Monastery Laser": 1, # Elevator Panel itself has a laser lock
|
|
"Windmill Entry (Door)": 1,
|
|
"Tunnels Theater Shortcut (Door)": 1,
|
|
"Tunnels Entry (Door)": 1,
|
|
"Challenge Entry (Door)": 1,
|
|
"Caves Pillar Door": 1,
|
|
"Caves Entry (Door)": 1,
|
|
"Mountain Bottom Floor Rock (Door)": 1,
|
|
"Mountain Bottom Floor Pillars Room Entry (Door)": 1,
|
|
}
|
|
|
|
self.assert_can_beat_with_minimally(exact_requirement)
|
|
|
|
|
|
class LongBoxNeedsAllLasersWhenBoxIsRotated(WitnessTestBase):
|
|
options = {
|
|
"puzzle_randomization": "sigma_expert",
|
|
"shuffle_symbols": True,
|
|
"shuffle_doors": "mixed",
|
|
"door_groupings": "off",
|
|
"shuffle_boat": True,
|
|
"shuffle_lasers": "anywhere",
|
|
"disable_non_randomized_puzzles": False,
|
|
"shuffle_discarded_panels": True,
|
|
"shuffle_vault_boxes": True,
|
|
"obelisk_keys": True,
|
|
"shuffle_EPs": "individual",
|
|
"EP_difficulty": "eclipse",
|
|
"shuffle_postgame": False,
|
|
"victory_condition": "elevator",
|
|
"mountain_lasers": 11,
|
|
"challenge_lasers": 11,
|
|
"early_caves": "off",
|
|
"elevators_come_to_you": {"Quarry Elevator"},
|
|
}
|
|
|
|
run_default_tests = False
|
|
|
|
def test_long_box_needs_all_lasers_when_box_is_rotated(self):
|
|
long_box_location = self.world.get_location("Mountaintop Box Long Solved")
|
|
self.assert_dependency_on_event_item(long_box_location, "+1 Laser (Redirected)")
|