2023-11-25 12:09:08 +00:00
|
|
|
from typing import Dict, Optional, TYPE_CHECKING
|
2023-11-08 23:35:12 +00:00
|
|
|
|
2023-11-25 12:09:08 +00:00
|
|
|
from BaseClasses import Entrance, ItemClassification, Region
|
Lingo: The Pilgrim Update (#2884)
* An option was added to enable or disable the pilgrimage, and it defaults to disabled. When disabled, the client will prevent you from performing a pilgrimage (i.e. the yellow border will not appear when you enter the 1 sunwarp). The sun painting is added to the item pool when pilgrimage is disabled, as otherwise there is no way into the Pilgrim Antechamber. Inversely, the sun painting is no longer in the item pool when pilgrimage is enabled (even if door shuffle is on), requiring you to perform a pilgrimage to get to that room.
* The canonical pilgrimage has been deprecated. Instead, there is logic for determining whether a pilgrimage is possible.
* Two options were added that allow the player to decide whether paintings and/or Crossroads - Roof Access are permitted during the pilgrimage. Both default to disabled. These options apply both to logical expectations in the generator, and are also enforced by the game client.
* An option was added to control how sunwarps are accessed. The default is for them to always be accessible, like in the base game. It is also possible to disable them entirely (which is not possible when pilgrimage is enabled), or lock them behind items similar to door shuffle. It can either be one item that unlocks all sunwarps at the same time, six progressive items that unlock the sunwarps from 1 to 6, or six individual items that unlock the sunwarps in any order. This option is independent from door shuffle.
* An option was added that shuffles sunwarps. This acts similarly to painting shuffle. The 12 sunwarps are re-ordered and re-paired. Sunwarps that were previously entrances or exits do not need to stay entrances or exits. Performing a pilgrimage requires proceeding through the sunwarps in the new order, rather than the original one.
* Pilgrimage was added as a win condition. It requires you to solve the blue PILGRIM panel in the Pilgrim Antechamber.
2024-04-18 16:45:33 +00:00
|
|
|
from .datatypes import EntranceType, Room, RoomAndDoor
|
2023-11-08 23:35:12 +00:00
|
|
|
from .items import LingoItem
|
|
|
|
from .locations import LingoLocation
|
Lingo: The Pilgrim Update (#2884)
* An option was added to enable or disable the pilgrimage, and it defaults to disabled. When disabled, the client will prevent you from performing a pilgrimage (i.e. the yellow border will not appear when you enter the 1 sunwarp). The sun painting is added to the item pool when pilgrimage is disabled, as otherwise there is no way into the Pilgrim Antechamber. Inversely, the sun painting is no longer in the item pool when pilgrimage is enabled (even if door shuffle is on), requiring you to perform a pilgrimage to get to that room.
* The canonical pilgrimage has been deprecated. Instead, there is logic for determining whether a pilgrimage is possible.
* Two options were added that allow the player to decide whether paintings and/or Crossroads - Roof Access are permitted during the pilgrimage. Both default to disabled. These options apply both to logical expectations in the generator, and are also enforced by the game client.
* An option was added to control how sunwarps are accessed. The default is for them to always be accessible, like in the base game. It is also possible to disable them entirely (which is not possible when pilgrimage is enabled), or lock them behind items similar to door shuffle. It can either be one item that unlocks all sunwarps at the same time, six progressive items that unlock the sunwarps from 1 to 6, or six individual items that unlock the sunwarps in any order. This option is independent from door shuffle.
* An option was added that shuffles sunwarps. This acts similarly to painting shuffle. The 12 sunwarps are re-ordered and re-paired. Sunwarps that were previously entrances or exits do not need to stay entrances or exits. Performing a pilgrimage requires proceeding through the sunwarps in the new order, rather than the original one.
* Pilgrimage was added as a win condition. It requires you to solve the blue PILGRIM panel in the Pilgrim Antechamber.
2024-04-18 16:45:33 +00:00
|
|
|
from .options import SunwarpAccess
|
|
|
|
from .rules import lingo_can_do_pilgrimage, lingo_can_use_entrance, make_location_lambda
|
2024-03-15 08:26:00 +00:00
|
|
|
from .static_logic import ALL_ROOMS, PAINTINGS
|
2023-11-08 23:35:12 +00:00
|
|
|
|
|
|
|
if TYPE_CHECKING:
|
|
|
|
from . import LingoWorld
|
|
|
|
|
|
|
|
|
2024-04-13 22:20:31 +00:00
|
|
|
def create_region(room: Room, world: "LingoWorld") -> Region:
|
2023-11-08 23:35:12 +00:00
|
|
|
new_region = Region(room.name, world.player, world.multiworld)
|
2024-04-13 22:20:31 +00:00
|
|
|
for location in world.player_logic.locations_by_room.get(room.name, {}):
|
2023-11-08 23:35:12 +00:00
|
|
|
new_location = LingoLocation(world.player, location.name, location.code, new_region)
|
2024-04-13 22:20:31 +00:00
|
|
|
new_location.access_rule = make_location_lambda(location, world)
|
2023-11-08 23:35:12 +00:00
|
|
|
new_region.locations.append(new_location)
|
2024-04-13 22:20:31 +00:00
|
|
|
if location.name in world.player_logic.event_loc_to_item:
|
|
|
|
event_name = world.player_logic.event_loc_to_item[location.name]
|
2023-11-08 23:35:12 +00:00
|
|
|
event_item = LingoItem(event_name, ItemClassification.progression, None, world.player)
|
|
|
|
new_location.place_locked_item(event_item)
|
|
|
|
|
|
|
|
return new_region
|
|
|
|
|
|
|
|
|
Lingo: The Pilgrim Update (#2884)
* An option was added to enable or disable the pilgrimage, and it defaults to disabled. When disabled, the client will prevent you from performing a pilgrimage (i.e. the yellow border will not appear when you enter the 1 sunwarp). The sun painting is added to the item pool when pilgrimage is disabled, as otherwise there is no way into the Pilgrim Antechamber. Inversely, the sun painting is no longer in the item pool when pilgrimage is enabled (even if door shuffle is on), requiring you to perform a pilgrimage to get to that room.
* The canonical pilgrimage has been deprecated. Instead, there is logic for determining whether a pilgrimage is possible.
* Two options were added that allow the player to decide whether paintings and/or Crossroads - Roof Access are permitted during the pilgrimage. Both default to disabled. These options apply both to logical expectations in the generator, and are also enforced by the game client.
* An option was added to control how sunwarps are accessed. The default is for them to always be accessible, like in the base game. It is also possible to disable them entirely (which is not possible when pilgrimage is enabled), or lock them behind items similar to door shuffle. It can either be one item that unlocks all sunwarps at the same time, six progressive items that unlock the sunwarps from 1 to 6, or six individual items that unlock the sunwarps in any order. This option is independent from door shuffle.
* An option was added that shuffles sunwarps. This acts similarly to painting shuffle. The 12 sunwarps are re-ordered and re-paired. Sunwarps that were previously entrances or exits do not need to stay entrances or exits. Performing a pilgrimage requires proceeding through the sunwarps in the new order, rather than the original one.
* Pilgrimage was added as a win condition. It requires you to solve the blue PILGRIM panel in the Pilgrim Antechamber.
2024-04-18 16:45:33 +00:00
|
|
|
def is_acceptable_pilgrimage_entrance(entrance_type: EntranceType, world: "LingoWorld") -> bool:
|
|
|
|
allowed_entrance_types = EntranceType.NORMAL
|
|
|
|
|
|
|
|
if world.options.pilgrimage_allows_paintings:
|
|
|
|
allowed_entrance_types |= EntranceType.PAINTING
|
|
|
|
|
|
|
|
if world.options.pilgrimage_allows_roof_access:
|
|
|
|
allowed_entrance_types |= EntranceType.CROSSROADS_ROOF_ACCESS
|
|
|
|
|
|
|
|
return bool(entrance_type & allowed_entrance_types)
|
|
|
|
|
|
|
|
|
2023-11-25 12:09:08 +00:00
|
|
|
def connect_entrance(regions: Dict[str, Region], source_region: Region, target_region: Region, description: str,
|
Lingo: The Pilgrim Update (#2884)
* An option was added to enable or disable the pilgrimage, and it defaults to disabled. When disabled, the client will prevent you from performing a pilgrimage (i.e. the yellow border will not appear when you enter the 1 sunwarp). The sun painting is added to the item pool when pilgrimage is disabled, as otherwise there is no way into the Pilgrim Antechamber. Inversely, the sun painting is no longer in the item pool when pilgrimage is enabled (even if door shuffle is on), requiring you to perform a pilgrimage to get to that room.
* The canonical pilgrimage has been deprecated. Instead, there is logic for determining whether a pilgrimage is possible.
* Two options were added that allow the player to decide whether paintings and/or Crossroads - Roof Access are permitted during the pilgrimage. Both default to disabled. These options apply both to logical expectations in the generator, and are also enforced by the game client.
* An option was added to control how sunwarps are accessed. The default is for them to always be accessible, like in the base game. It is also possible to disable them entirely (which is not possible when pilgrimage is enabled), or lock them behind items similar to door shuffle. It can either be one item that unlocks all sunwarps at the same time, six progressive items that unlock the sunwarps from 1 to 6, or six individual items that unlock the sunwarps in any order. This option is independent from door shuffle.
* An option was added that shuffles sunwarps. This acts similarly to painting shuffle. The 12 sunwarps are re-ordered and re-paired. Sunwarps that were previously entrances or exits do not need to stay entrances or exits. Performing a pilgrimage requires proceeding through the sunwarps in the new order, rather than the original one.
* Pilgrimage was added as a win condition. It requires you to solve the blue PILGRIM panel in the Pilgrim Antechamber.
2024-04-18 16:45:33 +00:00
|
|
|
door: Optional[RoomAndDoor], entrance_type: EntranceType, pilgrimage: bool, world: "LingoWorld"):
|
2023-11-25 12:09:08 +00:00
|
|
|
connection = Entrance(world.player, description, source_region)
|
2024-04-13 22:20:31 +00:00
|
|
|
connection.access_rule = lambda state: lingo_can_use_entrance(state, target_region.name, door, world)
|
2023-11-25 12:09:08 +00:00
|
|
|
|
|
|
|
source_region.exits.append(connection)
|
|
|
|
connection.connect(target_region)
|
|
|
|
|
|
|
|
if door is not None:
|
|
|
|
effective_room = target_region.name if door.room is None else door.room
|
2024-04-13 22:20:31 +00:00
|
|
|
if door.door not in world.player_logic.item_by_door.get(effective_room, {}):
|
|
|
|
for region in world.player_logic.calculate_door_requirements(effective_room, door.door, world).rooms:
|
2023-11-25 12:09:08 +00:00
|
|
|
world.multiworld.register_indirect_condition(regions[region], connection)
|
Lingo: The Pilgrim Update (#2884)
* An option was added to enable or disable the pilgrimage, and it defaults to disabled. When disabled, the client will prevent you from performing a pilgrimage (i.e. the yellow border will not appear when you enter the 1 sunwarp). The sun painting is added to the item pool when pilgrimage is disabled, as otherwise there is no way into the Pilgrim Antechamber. Inversely, the sun painting is no longer in the item pool when pilgrimage is enabled (even if door shuffle is on), requiring you to perform a pilgrimage to get to that room.
* The canonical pilgrimage has been deprecated. Instead, there is logic for determining whether a pilgrimage is possible.
* Two options were added that allow the player to decide whether paintings and/or Crossroads - Roof Access are permitted during the pilgrimage. Both default to disabled. These options apply both to logical expectations in the generator, and are also enforced by the game client.
* An option was added to control how sunwarps are accessed. The default is for them to always be accessible, like in the base game. It is also possible to disable them entirely (which is not possible when pilgrimage is enabled), or lock them behind items similar to door shuffle. It can either be one item that unlocks all sunwarps at the same time, six progressive items that unlock the sunwarps from 1 to 6, or six individual items that unlock the sunwarps in any order. This option is independent from door shuffle.
* An option was added that shuffles sunwarps. This acts similarly to painting shuffle. The 12 sunwarps are re-ordered and re-paired. Sunwarps that were previously entrances or exits do not need to stay entrances or exits. Performing a pilgrimage requires proceeding through the sunwarps in the new order, rather than the original one.
* Pilgrimage was added as a win condition. It requires you to solve the blue PILGRIM panel in the Pilgrim Antechamber.
2024-04-18 16:45:33 +00:00
|
|
|
|
|
|
|
if not pilgrimage and world.options.enable_pilgrimage and is_acceptable_pilgrimage_entrance(entrance_type, world)\
|
|
|
|
and source_region.name != "Menu":
|
|
|
|
for part in range(1, 6):
|
|
|
|
pilgrimage_descriptor = f" (Pilgrimage Part {part})"
|
|
|
|
pilgrim_source_region = regions[f"{source_region.name}{pilgrimage_descriptor}"]
|
|
|
|
pilgrim_target_region = regions[f"{target_region.name}{pilgrimage_descriptor}"]
|
|
|
|
|
|
|
|
effective_door = door
|
|
|
|
if effective_door is not None:
|
|
|
|
effective_room = target_region.name if door.room is None else door.room
|
|
|
|
effective_door = RoomAndDoor(effective_room, door.door)
|
|
|
|
|
|
|
|
connect_entrance(regions, pilgrim_source_region, pilgrim_target_region,
|
|
|
|
f"{description}{pilgrimage_descriptor}", effective_door, entrance_type, True, world)
|
2023-11-08 23:35:12 +00:00
|
|
|
|
|
|
|
|
2024-04-13 22:20:31 +00:00
|
|
|
def connect_painting(regions: Dict[str, Region], warp_enter: str, warp_exit: str, world: "LingoWorld") -> None:
|
2023-11-08 23:35:12 +00:00
|
|
|
source_painting = PAINTINGS[warp_enter]
|
|
|
|
target_painting = PAINTINGS[warp_exit]
|
|
|
|
|
|
|
|
target_region = regions[target_painting.room]
|
|
|
|
source_region = regions[source_painting.room]
|
2023-11-25 12:09:08 +00:00
|
|
|
|
|
|
|
entrance_name = f"{source_painting.room} to {target_painting.room} ({source_painting.id} Painting)"
|
Lingo: The Pilgrim Update (#2884)
* An option was added to enable or disable the pilgrimage, and it defaults to disabled. When disabled, the client will prevent you from performing a pilgrimage (i.e. the yellow border will not appear when you enter the 1 sunwarp). The sun painting is added to the item pool when pilgrimage is disabled, as otherwise there is no way into the Pilgrim Antechamber. Inversely, the sun painting is no longer in the item pool when pilgrimage is enabled (even if door shuffle is on), requiring you to perform a pilgrimage to get to that room.
* The canonical pilgrimage has been deprecated. Instead, there is logic for determining whether a pilgrimage is possible.
* Two options were added that allow the player to decide whether paintings and/or Crossroads - Roof Access are permitted during the pilgrimage. Both default to disabled. These options apply both to logical expectations in the generator, and are also enforced by the game client.
* An option was added to control how sunwarps are accessed. The default is for them to always be accessible, like in the base game. It is also possible to disable them entirely (which is not possible when pilgrimage is enabled), or lock them behind items similar to door shuffle. It can either be one item that unlocks all sunwarps at the same time, six progressive items that unlock the sunwarps from 1 to 6, or six individual items that unlock the sunwarps in any order. This option is independent from door shuffle.
* An option was added that shuffles sunwarps. This acts similarly to painting shuffle. The 12 sunwarps are re-ordered and re-paired. Sunwarps that were previously entrances or exits do not need to stay entrances or exits. Performing a pilgrimage requires proceeding through the sunwarps in the new order, rather than the original one.
* Pilgrimage was added as a win condition. It requires you to solve the blue PILGRIM panel in the Pilgrim Antechamber.
2024-04-18 16:45:33 +00:00
|
|
|
connect_entrance(regions, source_region, target_region, entrance_name, source_painting.required_door,
|
|
|
|
EntranceType.PAINTING, False, world)
|
2023-11-08 23:35:12 +00:00
|
|
|
|
|
|
|
|
2024-04-13 22:20:31 +00:00
|
|
|
def create_regions(world: "LingoWorld") -> None:
|
2023-11-08 23:35:12 +00:00
|
|
|
regions = {
|
|
|
|
"Menu": Region("Menu", world.player, world.multiworld)
|
|
|
|
}
|
|
|
|
|
|
|
|
painting_shuffle = world.options.shuffle_paintings
|
|
|
|
early_color_hallways = world.options.early_color_hallways
|
|
|
|
|
|
|
|
# Instantiate all rooms as regions with their locations first.
|
|
|
|
for room in ALL_ROOMS:
|
2024-04-13 22:20:31 +00:00
|
|
|
regions[room.name] = create_region(room, world)
|
2023-11-08 23:35:12 +00:00
|
|
|
|
Lingo: The Pilgrim Update (#2884)
* An option was added to enable or disable the pilgrimage, and it defaults to disabled. When disabled, the client will prevent you from performing a pilgrimage (i.e. the yellow border will not appear when you enter the 1 sunwarp). The sun painting is added to the item pool when pilgrimage is disabled, as otherwise there is no way into the Pilgrim Antechamber. Inversely, the sun painting is no longer in the item pool when pilgrimage is enabled (even if door shuffle is on), requiring you to perform a pilgrimage to get to that room.
* The canonical pilgrimage has been deprecated. Instead, there is logic for determining whether a pilgrimage is possible.
* Two options were added that allow the player to decide whether paintings and/or Crossroads - Roof Access are permitted during the pilgrimage. Both default to disabled. These options apply both to logical expectations in the generator, and are also enforced by the game client.
* An option was added to control how sunwarps are accessed. The default is for them to always be accessible, like in the base game. It is also possible to disable them entirely (which is not possible when pilgrimage is enabled), or lock them behind items similar to door shuffle. It can either be one item that unlocks all sunwarps at the same time, six progressive items that unlock the sunwarps from 1 to 6, or six individual items that unlock the sunwarps in any order. This option is independent from door shuffle.
* An option was added that shuffles sunwarps. This acts similarly to painting shuffle. The 12 sunwarps are re-ordered and re-paired. Sunwarps that were previously entrances or exits do not need to stay entrances or exits. Performing a pilgrimage requires proceeding through the sunwarps in the new order, rather than the original one.
* Pilgrimage was added as a win condition. It requires you to solve the blue PILGRIM panel in the Pilgrim Antechamber.
2024-04-18 16:45:33 +00:00
|
|
|
if world.options.enable_pilgrimage:
|
|
|
|
for part in range(1, 6):
|
|
|
|
pilgrimage_region_name = f"{room.name} (Pilgrimage Part {part})"
|
|
|
|
regions[pilgrimage_region_name] = Region(pilgrimage_region_name, world.player, world.multiworld)
|
|
|
|
|
2023-11-08 23:35:12 +00:00
|
|
|
# Connect all created regions now that they exist.
|
Lingo: The Pilgrim Update (#2884)
* An option was added to enable or disable the pilgrimage, and it defaults to disabled. When disabled, the client will prevent you from performing a pilgrimage (i.e. the yellow border will not appear when you enter the 1 sunwarp). The sun painting is added to the item pool when pilgrimage is disabled, as otherwise there is no way into the Pilgrim Antechamber. Inversely, the sun painting is no longer in the item pool when pilgrimage is enabled (even if door shuffle is on), requiring you to perform a pilgrimage to get to that room.
* The canonical pilgrimage has been deprecated. Instead, there is logic for determining whether a pilgrimage is possible.
* Two options were added that allow the player to decide whether paintings and/or Crossroads - Roof Access are permitted during the pilgrimage. Both default to disabled. These options apply both to logical expectations in the generator, and are also enforced by the game client.
* An option was added to control how sunwarps are accessed. The default is for them to always be accessible, like in the base game. It is also possible to disable them entirely (which is not possible when pilgrimage is enabled), or lock them behind items similar to door shuffle. It can either be one item that unlocks all sunwarps at the same time, six progressive items that unlock the sunwarps from 1 to 6, or six individual items that unlock the sunwarps in any order. This option is independent from door shuffle.
* An option was added that shuffles sunwarps. This acts similarly to painting shuffle. The 12 sunwarps are re-ordered and re-paired. Sunwarps that were previously entrances or exits do not need to stay entrances or exits. Performing a pilgrimage requires proceeding through the sunwarps in the new order, rather than the original one.
* Pilgrimage was added as a win condition. It requires you to solve the blue PILGRIM panel in the Pilgrim Antechamber.
2024-04-18 16:45:33 +00:00
|
|
|
allowed_entrance_types = EntranceType.NORMAL | EntranceType.WARP | EntranceType.CROSSROADS_ROOF_ACCESS
|
|
|
|
|
|
|
|
if not painting_shuffle:
|
|
|
|
# Don't use the vanilla painting connections if we are shuffling paintings.
|
|
|
|
allowed_entrance_types |= EntranceType.PAINTING
|
|
|
|
|
|
|
|
if world.options.sunwarp_access != SunwarpAccess.option_disabled and not world.options.shuffle_sunwarps:
|
|
|
|
# Don't connect sunwarps if sunwarps are disabled or if we're shuffling sunwarps.
|
|
|
|
allowed_entrance_types |= EntranceType.SUNWARP
|
|
|
|
|
2023-11-08 23:35:12 +00:00
|
|
|
for room in ALL_ROOMS:
|
|
|
|
for entrance in room.entrances:
|
Lingo: The Pilgrim Update (#2884)
* An option was added to enable or disable the pilgrimage, and it defaults to disabled. When disabled, the client will prevent you from performing a pilgrimage (i.e. the yellow border will not appear when you enter the 1 sunwarp). The sun painting is added to the item pool when pilgrimage is disabled, as otherwise there is no way into the Pilgrim Antechamber. Inversely, the sun painting is no longer in the item pool when pilgrimage is enabled (even if door shuffle is on), requiring you to perform a pilgrimage to get to that room.
* The canonical pilgrimage has been deprecated. Instead, there is logic for determining whether a pilgrimage is possible.
* Two options were added that allow the player to decide whether paintings and/or Crossroads - Roof Access are permitted during the pilgrimage. Both default to disabled. These options apply both to logical expectations in the generator, and are also enforced by the game client.
* An option was added to control how sunwarps are accessed. The default is for them to always be accessible, like in the base game. It is also possible to disable them entirely (which is not possible when pilgrimage is enabled), or lock them behind items similar to door shuffle. It can either be one item that unlocks all sunwarps at the same time, six progressive items that unlock the sunwarps from 1 to 6, or six individual items that unlock the sunwarps in any order. This option is independent from door shuffle.
* An option was added that shuffles sunwarps. This acts similarly to painting shuffle. The 12 sunwarps are re-ordered and re-paired. Sunwarps that were previously entrances or exits do not need to stay entrances or exits. Performing a pilgrimage requires proceeding through the sunwarps in the new order, rather than the original one.
* Pilgrimage was added as a win condition. It requires you to solve the blue PILGRIM panel in the Pilgrim Antechamber.
2024-04-18 16:45:33 +00:00
|
|
|
effective_entrance_type = entrance.type & allowed_entrance_types
|
|
|
|
if not effective_entrance_type:
|
2023-11-08 23:35:12 +00:00
|
|
|
continue
|
|
|
|
|
2023-11-13 01:22:05 +00:00
|
|
|
entrance_name = f"{entrance.room} to {room.name}"
|
|
|
|
if entrance.door is not None:
|
|
|
|
if entrance.door.room is not None:
|
|
|
|
entrance_name += f" (through {entrance.door.room} - {entrance.door.door})"
|
|
|
|
else:
|
|
|
|
entrance_name += f" (through {room.name} - {entrance.door.door})"
|
|
|
|
|
Lingo: The Pilgrim Update (#2884)
* An option was added to enable or disable the pilgrimage, and it defaults to disabled. When disabled, the client will prevent you from performing a pilgrimage (i.e. the yellow border will not appear when you enter the 1 sunwarp). The sun painting is added to the item pool when pilgrimage is disabled, as otherwise there is no way into the Pilgrim Antechamber. Inversely, the sun painting is no longer in the item pool when pilgrimage is enabled (even if door shuffle is on), requiring you to perform a pilgrimage to get to that room.
* The canonical pilgrimage has been deprecated. Instead, there is logic for determining whether a pilgrimage is possible.
* Two options were added that allow the player to decide whether paintings and/or Crossroads - Roof Access are permitted during the pilgrimage. Both default to disabled. These options apply both to logical expectations in the generator, and are also enforced by the game client.
* An option was added to control how sunwarps are accessed. The default is for them to always be accessible, like in the base game. It is also possible to disable them entirely (which is not possible when pilgrimage is enabled), or lock them behind items similar to door shuffle. It can either be one item that unlocks all sunwarps at the same time, six progressive items that unlock the sunwarps from 1 to 6, or six individual items that unlock the sunwarps in any order. This option is independent from door shuffle.
* An option was added that shuffles sunwarps. This acts similarly to painting shuffle. The 12 sunwarps are re-ordered and re-paired. Sunwarps that were previously entrances or exits do not need to stay entrances or exits. Performing a pilgrimage requires proceeding through the sunwarps in the new order, rather than the original one.
* Pilgrimage was added as a win condition. It requires you to solve the blue PILGRIM panel in the Pilgrim Antechamber.
2024-04-18 16:45:33 +00:00
|
|
|
effective_door = entrance.door
|
|
|
|
if entrance.type == EntranceType.SUNWARP and world.options.sunwarp_access == SunwarpAccess.option_normal:
|
|
|
|
effective_door = None
|
|
|
|
|
|
|
|
connect_entrance(regions, regions[entrance.room], regions[room.name], entrance_name, effective_door,
|
|
|
|
effective_entrance_type, False, world)
|
|
|
|
|
|
|
|
if world.options.enable_pilgrimage:
|
|
|
|
# Connect the start of the pilgrimage. We check for all sunwarp items here.
|
|
|
|
pilgrim_start_from = regions[world.player_logic.sunwarp_entrances[0]]
|
|
|
|
pilgrim_start_to = regions[f"{world.player_logic.sunwarp_exits[0]} (Pilgrimage Part 1)"]
|
|
|
|
|
|
|
|
if world.options.sunwarp_access >= SunwarpAccess.option_unlock:
|
|
|
|
pilgrim_start_from.connect(pilgrim_start_to, f"Pilgrimage Part 1",
|
|
|
|
lambda state: lingo_can_do_pilgrimage(state, world))
|
|
|
|
else:
|
|
|
|
pilgrim_start_from.connect(pilgrim_start_to, f"Pilgrimage Part 1")
|
2023-11-08 23:35:12 +00:00
|
|
|
|
Lingo: The Pilgrim Update (#2884)
* An option was added to enable or disable the pilgrimage, and it defaults to disabled. When disabled, the client will prevent you from performing a pilgrimage (i.e. the yellow border will not appear when you enter the 1 sunwarp). The sun painting is added to the item pool when pilgrimage is disabled, as otherwise there is no way into the Pilgrim Antechamber. Inversely, the sun painting is no longer in the item pool when pilgrimage is enabled (even if door shuffle is on), requiring you to perform a pilgrimage to get to that room.
* The canonical pilgrimage has been deprecated. Instead, there is logic for determining whether a pilgrimage is possible.
* Two options were added that allow the player to decide whether paintings and/or Crossroads - Roof Access are permitted during the pilgrimage. Both default to disabled. These options apply both to logical expectations in the generator, and are also enforced by the game client.
* An option was added to control how sunwarps are accessed. The default is for them to always be accessible, like in the base game. It is also possible to disable them entirely (which is not possible when pilgrimage is enabled), or lock them behind items similar to door shuffle. It can either be one item that unlocks all sunwarps at the same time, six progressive items that unlock the sunwarps from 1 to 6, or six individual items that unlock the sunwarps in any order. This option is independent from door shuffle.
* An option was added that shuffles sunwarps. This acts similarly to painting shuffle. The 12 sunwarps are re-ordered and re-paired. Sunwarps that were previously entrances or exits do not need to stay entrances or exits. Performing a pilgrimage requires proceeding through the sunwarps in the new order, rather than the original one.
* Pilgrimage was added as a win condition. It requires you to solve the blue PILGRIM panel in the Pilgrim Antechamber.
2024-04-18 16:45:33 +00:00
|
|
|
# Create connections between each segment of the pilgrimage.
|
|
|
|
for i in range(1, 6):
|
|
|
|
from_room = f"{world.player_logic.sunwarp_entrances[i]} (Pilgrimage Part {i})"
|
|
|
|
to_room = f"{world.player_logic.sunwarp_exits[i]} (Pilgrimage Part {i+1})"
|
|
|
|
if i == 5:
|
|
|
|
to_room = "Pilgrim Antechamber"
|
|
|
|
|
|
|
|
regions[from_room].connect(regions[to_room], f"Pilgrimage Part {i+1}")
|
|
|
|
else:
|
|
|
|
connect_entrance(regions, regions["Starting Room"], regions["Pilgrim Antechamber"], "Sun Painting",
|
|
|
|
RoomAndDoor("Pilgrim Antechamber", "Sun Painting"), EntranceType.PAINTING, False, world)
|
2023-11-08 23:35:12 +00:00
|
|
|
|
|
|
|
if early_color_hallways:
|
Lingo: The Pilgrim Update (#2884)
* An option was added to enable or disable the pilgrimage, and it defaults to disabled. When disabled, the client will prevent you from performing a pilgrimage (i.e. the yellow border will not appear when you enter the 1 sunwarp). The sun painting is added to the item pool when pilgrimage is disabled, as otherwise there is no way into the Pilgrim Antechamber. Inversely, the sun painting is no longer in the item pool when pilgrimage is enabled (even if door shuffle is on), requiring you to perform a pilgrimage to get to that room.
* The canonical pilgrimage has been deprecated. Instead, there is logic for determining whether a pilgrimage is possible.
* Two options were added that allow the player to decide whether paintings and/or Crossroads - Roof Access are permitted during the pilgrimage. Both default to disabled. These options apply both to logical expectations in the generator, and are also enforced by the game client.
* An option was added to control how sunwarps are accessed. The default is for them to always be accessible, like in the base game. It is also possible to disable them entirely (which is not possible when pilgrimage is enabled), or lock them behind items similar to door shuffle. It can either be one item that unlocks all sunwarps at the same time, six progressive items that unlock the sunwarps from 1 to 6, or six individual items that unlock the sunwarps in any order. This option is independent from door shuffle.
* An option was added that shuffles sunwarps. This acts similarly to painting shuffle. The 12 sunwarps are re-ordered and re-paired. Sunwarps that were previously entrances or exits do not need to stay entrances or exits. Performing a pilgrimage requires proceeding through the sunwarps in the new order, rather than the original one.
* Pilgrimage was added as a win condition. It requires you to solve the blue PILGRIM panel in the Pilgrim Antechamber.
2024-04-18 16:45:33 +00:00
|
|
|
connect_entrance(regions, regions["Starting Room"], regions["Outside The Undeterred"], "Early Color Hallways",
|
|
|
|
None, EntranceType.PAINTING, False, world)
|
2023-11-08 23:35:12 +00:00
|
|
|
|
|
|
|
if painting_shuffle:
|
2024-04-13 22:20:31 +00:00
|
|
|
for warp_enter, warp_exit in world.player_logic.painting_mapping.items():
|
|
|
|
connect_painting(regions, warp_enter, warp_exit, world)
|
2023-11-08 23:35:12 +00:00
|
|
|
|
Lingo: The Pilgrim Update (#2884)
* An option was added to enable or disable the pilgrimage, and it defaults to disabled. When disabled, the client will prevent you from performing a pilgrimage (i.e. the yellow border will not appear when you enter the 1 sunwarp). The sun painting is added to the item pool when pilgrimage is disabled, as otherwise there is no way into the Pilgrim Antechamber. Inversely, the sun painting is no longer in the item pool when pilgrimage is enabled (even if door shuffle is on), requiring you to perform a pilgrimage to get to that room.
* The canonical pilgrimage has been deprecated. Instead, there is logic for determining whether a pilgrimage is possible.
* Two options were added that allow the player to decide whether paintings and/or Crossroads - Roof Access are permitted during the pilgrimage. Both default to disabled. These options apply both to logical expectations in the generator, and are also enforced by the game client.
* An option was added to control how sunwarps are accessed. The default is for them to always be accessible, like in the base game. It is also possible to disable them entirely (which is not possible when pilgrimage is enabled), or lock them behind items similar to door shuffle. It can either be one item that unlocks all sunwarps at the same time, six progressive items that unlock the sunwarps from 1 to 6, or six individual items that unlock the sunwarps in any order. This option is independent from door shuffle.
* An option was added that shuffles sunwarps. This acts similarly to painting shuffle. The 12 sunwarps are re-ordered and re-paired. Sunwarps that were previously entrances or exits do not need to stay entrances or exits. Performing a pilgrimage requires proceeding through the sunwarps in the new order, rather than the original one.
* Pilgrimage was added as a win condition. It requires you to solve the blue PILGRIM panel in the Pilgrim Antechamber.
2024-04-18 16:45:33 +00:00
|
|
|
if world.options.shuffle_sunwarps:
|
|
|
|
for i in range(0, 6):
|
|
|
|
if world.options.sunwarp_access == SunwarpAccess.option_normal:
|
|
|
|
effective_door = None
|
|
|
|
else:
|
|
|
|
effective_door = RoomAndDoor("Sunwarps", f"{i + 1} Sunwarp")
|
|
|
|
|
|
|
|
source_region = regions[world.player_logic.sunwarp_entrances[i]]
|
|
|
|
target_region = regions[world.player_logic.sunwarp_exits[i]]
|
|
|
|
|
|
|
|
entrance_name = f"{source_region.name} to {target_region.name} ({i + 1} Sunwarp)"
|
|
|
|
connect_entrance(regions, source_region, target_region, entrance_name, effective_door, EntranceType.SUNWARP,
|
|
|
|
False, world)
|
|
|
|
|
2023-11-08 23:35:12 +00:00
|
|
|
world.multiworld.regions += regions.values()
|