| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | from worlds.generic.Rules import add_rule | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  | from BaseClasses import CollectionState | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  | def air_dash(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return state.has("PNEUMATOPHORE", player) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  | def airship(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return state.has("DOCK KEY", player) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  | def jail_key(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return state.has("JAIL KEY", player) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  | def paddle(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return state.has("PADDLE", player) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  | def worm_room_key(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return state.has("WORM ROOM KEY", player) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  | def bridge_key(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return state.has("BRIDGE KEY", player) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  | def upper_chamber_key(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return state.has("UPPER CHAMBER KEY", player) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  | def vessel_room_key(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return state.has("VESSEL ROOM KEY", player) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  | def house_key(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return state.has("HOUSE KEY", player) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  | def cave_key(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return state.has("CAVE KEY", player) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  | def skull_bomb(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return state.has("SKULL BOMB", player) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  | def tower_key(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return state.has("TOWER KEY", player) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  | def deep_key(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return state.has("DEEP KEY", player) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  | def upper_house_key(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return state.has("UPPER HOUSE KEY", player) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def clicker(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return state.has("CLICKER", player) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def all_tokens(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return state.has("SAGE TOKEN", player, 3) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def charge_up(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return state.has("CHARGE UP", player) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def paper_cup(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return state.has("PAPER CUP", player) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def party_1(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return state.has_any({"Pongorma", "Dedusmuln", "Somsnosa"}, player) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def party_2(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return ( | 
					
						
							|  |  |  |         state.has_all({"Pongorma", "Dedusmuln"}, player) | 
					
						
							|  |  |  |         or state.has_all({"Pongorma", "Somsnosa"}, player) | 
					
						
							|  |  |  |         or state.has_all({"Dedusmuln", "Somsnosa"}, player) | 
					
						
							|  |  |  |     ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def party_3(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return state.has_all({"Pongorma", "Dedusmuln", "Somsnosa"}, player) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def enter_arcade2(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return ( | 
					
						
							|  |  |  |         air_dash(state, player) | 
					
						
							|  |  |  |         and airship(state, player) | 
					
						
							|  |  |  |     ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def enter_wormpod(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return ( | 
					
						
							|  |  |  |         airship(state, player) | 
					
						
							|  |  |  |         and worm_room_key(state, player) | 
					
						
							|  |  |  |         and paddle(state, player) | 
					
						
							|  |  |  |     ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def enter_sageship(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return ( | 
					
						
							|  |  |  |         skull_bomb(state, player) | 
					
						
							|  |  |  |         and airship(state, player) | 
					
						
							|  |  |  |         and paddle(state, player) | 
					
						
							|  |  |  |     ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def enter_foglast(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return enter_wormpod(state, player) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def enter_hylemxylem(state: CollectionState, player: int) -> bool: | 
					
						
							|  |  |  |     return ( | 
					
						
							|  |  |  |         air_dash(state, player) | 
					
						
							|  |  |  |         and enter_foglast(state, player) | 
					
						
							|  |  |  |         and bridge_key(state, player) | 
					
						
							|  |  |  |     ) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_rules(hylics2world): | 
					
						
							| 
									
										
										
										
											2022-10-31 21:41:21 -05:00
										 |  |  |     world = hylics2world.multiworld | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |     player = hylics2world.player | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-18 10:40:53 -06:00
										 |  |  |     extra = hylics2world.options.extra_items_in_logic | 
					
						
							|  |  |  |     party = hylics2world.options.party_shuffle | 
					
						
							|  |  |  |     medallion = hylics2world.options.medallion_shuffle | 
					
						
							| 
									
										
										
										
											2024-05-14 13:35:32 -05:00
										 |  |  |     start_location = hylics2world.options.start_location | 
					
						
							| 
									
										
										
										
											2024-04-18 10:40:53 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |     # Afterlife | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Afterlife: TV", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: cave_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  |     # New Muldul | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("New Muldul: Underground Chest", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: air_dash(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |     add_rule(world.get_location("New Muldul: TV", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: house_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("New Muldul: Upper House Chest 1", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: upper_house_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("New Muldul: Upper House Chest 2", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: upper_house_key(state, player)) | 
					
						
							| 
									
										
										
										
											2023-06-30 16:46:32 -06:00
										 |  |  |     add_rule(world.get_location("New Muldul: Pot above Vault", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: air_dash(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  |     # New Muldul Vault | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("New Muldul: Rescued Blerol 1", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: ( | 
					
						
							|  |  |  |             ( | 
					
						
							|  |  |  |                 ( | 
					
						
							|  |  |  |                     jail_key(state, player) | 
					
						
							|  |  |  |                     and paddle(state, player) | 
					
						
							|  |  |  |                 ) | 
					
						
							|  |  |  |                 and ( | 
					
						
							|  |  |  |                     air_dash(state, player) | 
					
						
							|  |  |  |                     or airship(state, player) | 
					
						
							|  |  |  |                 ) | 
					
						
							|  |  |  |             ) | 
					
						
							|  |  |  |             or enter_hylemxylem(state, player) | 
					
						
							|  |  |  |         )) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("New Muldul: Rescued Blerol 2", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: ( | 
					
						
							|  |  |  |             ( | 
					
						
							|  |  |  |                 ( | 
					
						
							|  |  |  |                     jail_key(state, player) | 
					
						
							|  |  |  |                     and paddle(state, player) | 
					
						
							|  |  |  |                 ) | 
					
						
							|  |  |  |                 and ( | 
					
						
							|  |  |  |                     air_dash(state, player) | 
					
						
							|  |  |  |                     or airship(state, player) | 
					
						
							|  |  |  |                 ) | 
					
						
							|  |  |  |             ) | 
					
						
							|  |  |  |             or enter_hylemxylem(state, player) | 
					
						
							|  |  |  |         )) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("New Muldul: Vault Left Chest", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: enter_hylemxylem(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("New Muldul: Vault Right Chest", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: enter_hylemxylem(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("New Muldul: Vault Bomb", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: enter_hylemxylem(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  |     # Viewax's Edifice | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Viewax's Edifice: Canopic Jar", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: paddle(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Viewax's Edifice: Cave Sarcophagus", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: paddle(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Viewax's Edifice: Shielded Key", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: paddle(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Viewax's Edifice: Shielded Key", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: paddle(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Viewax's Edifice: Tower Pot", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: paddle(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Viewax's Edifice: Tower Jar", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: paddle(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Viewax's Edifice: Tower Chest", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: ( | 
					
						
							|  |  |  |             paddle(state, player) | 
					
						
							|  |  |  |             and tower_key(state, player) | 
					
						
							|  |  |  |         )) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Viewax's Edifice: Viewax Pot", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: paddle(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Viewax's Edifice: Defeat Viewax", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: paddle(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Viewax's Edifice: TV", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: ( | 
					
						
							|  |  |  |             paddle(state, player) | 
					
						
							|  |  |  |             and jail_key(state, player) | 
					
						
							|  |  |  |         )) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Viewax's Edifice: Sage Fridge", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: air_dash(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Viewax's Edifice: Sage Item 1", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: air_dash(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Viewax's Edifice: Sage Item 2", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: air_dash(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  |     # Arcade 1 | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Arcade 1: Key", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: paddle(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Arcade 1: Coin Dash", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: paddle(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Arcade 1: Burrito Alcove 1", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: paddle(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Arcade 1: Burrito Alcove 2", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: paddle(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Arcade 1: Behind Spikes Banana", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: paddle(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Arcade 1: Pyramid Banana", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: paddle(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Arcade 1: Moving Platforms Muscle Applique", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: paddle(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Arcade 1: Bed Banana", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: paddle(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  |     # Airship | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Airship: Talk to Somsnosa", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: worm_room_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  |     # Foglast | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Foglast: Underground Sarcophagus", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: air_dash(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Foglast: Shielded Key", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: air_dash(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Foglast: TV", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: ( | 
					
						
							|  |  |  |             air_dash(state, player) | 
					
						
							|  |  |  |             and clicker(state, player) | 
					
						
							|  |  |  |         )) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Foglast: Buy Clicker", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: air_dash(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Foglast: Shielded Chest", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: air_dash(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Foglast: Cave Fridge", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: air_dash(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Foglast: Roof Sarcophagus", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: ( | 
					
						
							|  |  |  |             air_dash(state, player) | 
					
						
							|  |  |  |             and bridge_key(state, player) | 
					
						
							|  |  |  |         )) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Foglast: Under Lair Sarcophagus 1", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: ( | 
					
						
							|  |  |  |             air_dash(state, player) | 
					
						
							|  |  |  |             and bridge_key(state, player) | 
					
						
							|  |  |  |         )) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Foglast: Under Lair Sarcophagus 2", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: ( | 
					
						
							|  |  |  |             air_dash(state, player) | 
					
						
							|  |  |  |             and bridge_key(state, player) | 
					
						
							|  |  |  |         )) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Foglast: Under Lair Sarcophagus 3", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: ( | 
					
						
							|  |  |  |             air_dash(state, player) | 
					
						
							|  |  |  |             and bridge_key(state, player) | 
					
						
							|  |  |  |         )) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Foglast: Sage Sarcophagus", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: ( | 
					
						
							|  |  |  |             air_dash(state, player) | 
					
						
							|  |  |  |             and bridge_key(state, player) | 
					
						
							|  |  |  |         )) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Foglast: Sage Item 1", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: ( | 
					
						
							|  |  |  |             air_dash(state, player) | 
					
						
							|  |  |  |             and bridge_key(state, player) | 
					
						
							|  |  |  |         )) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Foglast: Sage Item 2", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: ( | 
					
						
							|  |  |  |             air_dash(state, player) | 
					
						
							|  |  |  |             and bridge_key(state, player) | 
					
						
							|  |  |  |         )) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  |     # Drill Castle | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Drill Castle: Island Banana", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: air_dash(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Drill Castle: Island Pot", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: air_dash(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Drill Castle: Cave Sarcophagus", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: air_dash(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Drill Castle: TV", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: air_dash(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  |     # Sage Labyrinth | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Sage Labyrinth: Sage Item 1", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: deep_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Sage Labyrinth: Sage Item 2", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: deep_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Sage Labyrinth: Sage Left Arm", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: deep_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Sage Labyrinth: Sage Right Arm", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: deep_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Sage Labyrinth: Sage Left Leg", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: deep_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Sage Labyrinth: Sage Right Leg", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: deep_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  |     # Sage Airship | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Sage Airship: TV", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: all_tokens(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  |     # Hylemxylem | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Hylemxylem: Upper Chamber Banana", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: upper_chamber_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Hylemxylem: Across Upper Reservoir Chest", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: upper_chamber_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Hylemxylem: Drained Lower Reservoir Chest", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: upper_chamber_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Hylemxylem: Drained Lower Reservoir Burrito 1", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: upper_chamber_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Hylemxylem: Drained Lower Reservoir Burrito 2", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: upper_chamber_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Hylemxylem: Lower Reservoir Hole Pot 1", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: upper_chamber_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Hylemxylem: Lower Reservoir Hole Pot 2", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: upper_chamber_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Hylemxylem: Lower Reservoir Hole Pot 3", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: upper_chamber_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Hylemxylem: Lower Reservoir Hole Sarcophagus", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: upper_chamber_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Hylemxylem: Drained Upper Reservoir Burrito 1", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: upper_chamber_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Hylemxylem: Drained Upper Reservoir Burrito 2", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: upper_chamber_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Hylemxylem: Drained Upper Reservoir Burrito 3", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: upper_chamber_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |     add_rule(world.get_location("Hylemxylem: Upper Reservoir Hole Key", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         lambda state: upper_chamber_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  |     # extra rules if Extra Items in Logic is enabled | 
					
						
							| 
									
										
										
										
											2024-04-18 10:40:53 -06:00
										 |  |  |     if extra: | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("Foglast", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: charge_up(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("Sage Airship", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: ( | 
					
						
							|  |  |  |                     charge_up(state, player) | 
					
						
							|  |  |  |                     and paper_cup(state, player) | 
					
						
							|  |  |  |                     and worm_room_key(state, player) | 
					
						
							|  |  |  |                 )) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("Hylemxylem", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: ( | 
					
						
							|  |  |  |                 charge_up(state, player) | 
					
						
							|  |  |  |                 and paper_cup(state, player) | 
					
						
							|  |  |  |             )) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("Sage Labyrinth: Motor Hunter Sarcophagus", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: ( | 
					
						
							|  |  |  |                 charge_up(state, player) | 
					
						
							|  |  |  |                 and paper_cup(state, player) | 
					
						
							|  |  |  |             )) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  |     # extra rules if Shuffle Party Members is enabled | 
					
						
							| 
									
										
										
										
											2024-04-18 10:40:53 -06:00
										 |  |  |     if party: | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("Arcade Island", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: party_3(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("Foglast", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: ( | 
					
						
							|  |  |  |                 party_3(state, player) | 
					
						
							|  |  |  |                 or ( | 
					
						
							|  |  |  |                     party_2(state, player) | 
					
						
							|  |  |  |                     and jail_key(state, player) | 
					
						
							|  |  |  |                 ) | 
					
						
							|  |  |  |             )) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("Sage Airship", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: party_3(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("Hylemxylem", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: party_3(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("Viewax's Edifice: Defeat Viewax", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: party_2(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("New Muldul: Rescued Blerol 1", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: party_2(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("New Muldul: Rescued Blerol 2", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: party_2(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("New Muldul: Vault Left Chest", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: party_3(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("New Muldul: Vault Right Chest", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: party_3(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("New Muldul: Vault Bomb", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: party_3(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("Juice Ranch: Battle with Somsnosa", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: party_2(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("Juice Ranch: Somsnosa Joins", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: party_2(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("Airship: Talk to Somsnosa", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: party_3(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("Sage Labyrinth: Motor Hunter Sarcophagus", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: party_3(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |     # extra rules if Shuffle Red Medallions is enabled | 
					
						
							| 
									
										
										
										
											2024-04-18 10:40:53 -06:00
										 |  |  |     if medallion: | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         add_rule(world.get_location("New Muldul: Upper House Medallion", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: upper_house_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("New Muldul: Vault Rear Left Medallion", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: ( | 
					
						
							|  |  |  |                 enter_foglast(state, player) | 
					
						
							|  |  |  |                 and bridge_key(state, player) | 
					
						
							| 
									
										
										
										
											2024-04-15 18:54:35 -06:00
										 |  |  |                 and air_dash(state, player) | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             )) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("New Muldul: Vault Rear Right Medallion", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: ( | 
					
						
							|  |  |  |                 enter_foglast(state, player) | 
					
						
							|  |  |  |                 and bridge_key(state, player) | 
					
						
							| 
									
										
										
										
											2024-04-15 18:54:35 -06:00
										 |  |  |                 and air_dash(state, player) | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             )) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("New Muldul: Vault Center Medallion", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: ( | 
					
						
							|  |  |  |                 enter_foglast(state, player) | 
					
						
							|  |  |  |                 and bridge_key(state, player) | 
					
						
							| 
									
										
										
										
											2024-04-15 18:54:35 -06:00
										 |  |  |                 and air_dash(state, player) | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             )) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("New Muldul: Vault Front Left Medallion", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: ( | 
					
						
							|  |  |  |                 enter_foglast(state, player) | 
					
						
							|  |  |  |                 and bridge_key(state, player) | 
					
						
							| 
									
										
										
										
											2024-04-15 18:54:35 -06:00
										 |  |  |                 and air_dash(state, player) | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             )) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("New Muldul: Vault Front Right Medallion", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: ( | 
					
						
							|  |  |  |                 enter_foglast(state, player) | 
					
						
							|  |  |  |                 and bridge_key(state, player) | 
					
						
							| 
									
										
										
										
											2024-04-15 18:54:35 -06:00
										 |  |  |                 and air_dash(state, player) | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             )) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("Viewax's Edifice: Fort Wall Medallion", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: paddle(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("Viewax's Edifice: Jar Medallion", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: paddle(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("Viewax's Edifice: Sage Chair Medallion", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: air_dash(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("Arcade 1: Lonely Medallion", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: paddle(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("Arcade 1: Alcove Medallion", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: paddle(state, player)) | 
					
						
							| 
									
										
										
										
											2023-12-27 22:25:41 -07:00
										 |  |  |         add_rule(world.get_location("Arcade 1: Lava Medallion", player), | 
					
						
							|  |  |  |             lambda state: paddle(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("Foglast: Under Lair Medallion", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: bridge_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("Foglast: Mid-Air Medallion", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: air_dash(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("Foglast: Top of Tower Medallion", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: paddle(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("Hylemxylem: Lower Reservoir Hole Medallion", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: upper_chamber_key(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |     # extra rules if Shuffle Red Medallions and Party Shuffle are enabled | 
					
						
							| 
									
										
										
										
											2024-04-18 10:40:53 -06:00
										 |  |  |     if party and medallion: | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("New Muldul: Vault Rear Left Medallion", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: party_3(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("New Muldul: Vault Rear Right Medallion", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: party_3(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("New Muldul: Vault Center Medallion", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: party_3(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("New Muldul: Vault Front Left Medallion", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: party_3(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  |         add_rule(world.get_location("New Muldul: Vault Front Right Medallion", player), | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             lambda state: party_3(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  |     # entrances | 
					
						
							|  |  |  |     for i in world.get_region("Airship", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         add_rule(i, lambda state: airship(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |     for i in world.get_region("Arcade Island", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         add_rule(i, lambda state: ( | 
					
						
							|  |  |  |             airship(state, player) | 
					
						
							|  |  |  |             and air_dash(state, player) | 
					
						
							|  |  |  |         )) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |     for i in world.get_region("Worm Pod", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         add_rule(i, lambda state: enter_wormpod(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |     for i in world.get_region("Foglast", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         add_rule(i, lambda state: enter_foglast(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |     for i in world.get_region("Sage Labyrinth", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         add_rule(i, lambda state: skull_bomb(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |     for i in world.get_region("Sage Airship", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         add_rule(i, lambda state: enter_sageship(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |     for i in world.get_region("Hylemxylem", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |         add_rule(i, lambda state: enter_hylemxylem(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  |     # random start logic (default) | 
					
						
							| 
									
										
										
										
											2024-05-14 13:35:32 -05:00
										 |  |  |     if start_location == "waynehouse": | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         # entrances | 
					
						
							|  |  |  |         for i in world.get_region("Viewax", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: ( | 
					
						
							|  |  |  |                 air_dash(state, player) | 
					
						
							|  |  |  |                 and airship(state, player) | 
					
						
							|  |  |  |             )) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("TV Island", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: airship(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("Shield Facility", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: airship(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("Juice Ranch", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: airship(state, player)) | 
					
						
							| 
									
										
										
										
											2022-12-04 19:25:16 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |     # random start logic (Viewax's Edifice) | 
					
						
							| 
									
										
										
										
											2024-05-14 13:35:32 -05:00
										 |  |  |     elif start_location == "viewaxs_edifice": | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("Waynehouse", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: ( | 
					
						
							|  |  |  |                 air_dash(state, player) | 
					
						
							|  |  |  |                 or airship(state, player) | 
					
						
							|  |  |  |             )) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("New Muldul", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: ( | 
					
						
							|  |  |  |                 air_dash(state, player) | 
					
						
							|  |  |  |                 or airship(state, player) | 
					
						
							|  |  |  |             )) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("New Muldul Vault", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: ( | 
					
						
							|  |  |  |                 air_dash(state, player) | 
					
						
							|  |  |  |                 or airship(state, player) | 
					
						
							|  |  |  |             )) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("Drill Castle", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: ( | 
					
						
							|  |  |  |                 air_dash(state, player) | 
					
						
							|  |  |  |                 or airship(state, player) | 
					
						
							|  |  |  |             )) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("TV Island", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: airship(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("Shield Facility", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: airship(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("Juice Ranch", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: airship(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("Sage Labyrinth", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: airship(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-05-14 13:35:32 -05:00
										 |  |  |     # start logic (TV Island) | 
					
						
							|  |  |  |     elif start_location == "tv_island": | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("Waynehouse", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: airship(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("New Muldul", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: airship(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("New Muldul Vault", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: airship(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("Drill Castle", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: airship(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("Viewax", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: airship(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("Shield Facility", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: airship(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("Juice Ranch", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: airship(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("Sage Labyrinth", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: airship(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-05-14 13:35:32 -05:00
										 |  |  |     # start logic (Shield Facility) | 
					
						
							|  |  |  |     elif start_location == "shield_facility": | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("Waynehouse", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: airship(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("New Muldul", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: airship(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("New Muldul Vault", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: airship(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("Drill Castle", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: airship(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("Viewax", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: airship(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("TV Island", player).entrances: | 
					
						
							| 
									
										
										
										
											2023-10-18 13:50:57 -06:00
										 |  |  |             add_rule(i, lambda state: airship(state, player)) | 
					
						
							| 
									
										
										
										
											2022-10-12 23:51:25 -06:00
										 |  |  |         for i in world.get_region("Sage Labyrinth", player).entrances: | 
					
						
							| 
									
										
										
										
											2024-05-14 13:35:32 -05:00
										 |  |  |             add_rule(i, lambda state: airship(state, player)) |