Code cleanup and more tests

This commit is contained in:
KrisDavie
2023-12-18 20:46:18 +01:00
parent 81ace17889
commit 36c8b5aaa6
5 changed files with 53 additions and 26 deletions

View File

@@ -82,7 +82,6 @@ def main(args, seed=None, fish=None):
for i in zip(args.logic.values(), args.door_shuffle.values()):
if i[0] == 'hybridglitches' and i[1] != 'vanilla':
raise RuntimeError(BabelFish().translate("cli","cli","hybridglitches.door.shuffle"))
# print(args)
world = World(args.multi, args.shuffle, args.door_shuffle, args.logic, args.mode, args.swords,
args.difficulty, args.item_functionality, args.timer, args.progressive, args.goal, args.algorithm,
args.accessibility, args.shuffleganon, args.custom, args.customitemarray, args.hints)

View File

@@ -621,13 +621,11 @@ Hybrid Major Glitches logic includes the following:
* All Overworld Glitches logic
* Kikiskip to access PoD wihtout MP or DW access
* IP Lobby clip to skip fire requirement
* Traversal between TT -> Desert
* Traversal between Spec rock upper -> Spec rock mid
* Traversal between Paradox lower -> Paradox mid + upper
* Traversal between Mire -> Hera -> Swamp
* Stealing SK from Mire to open SP
* Using the Mire big key to open Hera doors and big chest
* Traversal between TT -> Desert
* Traveral between Spec rock upper -> Spec rock mid
* Traveral between Paradox lower -> Paradox mid + upper
All traversals mentioned are considered connectors in entrance shuffle

View File

@@ -1907,12 +1907,6 @@ def set_bunny_rules(world, player, inverted):
# Is it possible to do bunny pocket here
def can_bunny_pocket_skull_woods(world, player):
# return world.get_entrance(
# "Skull Woods Second Section Door (West)", player
# ).connected_region.type != RegionType.Dungeon and (
# not world.state.can_reach_from("Skull Woods Forest (West)", "Light World", 1)
# or not world.state.can_reach_from("Light World", "Skull Woods Forest (West)", 1)
# )
return world.get_entrance(
"Skull Woods Second Section Door (West)", player
).connected_region.type == RegionType.Dungeon or (
@@ -1921,12 +1915,6 @@ def set_bunny_rules(world, player, inverted):
)
def can_bunny_pocket_voo_shop(world, player):
# return world.get_entrance(
# "Dark World Shop", player
# ).connected_region.type != RegionType.Dungeon and (
# not world.state.can_reach_from("West Dark World", "Light World", 1)
# or not world.state.can_reach_from("Light World", "West Dark World", 1)
# )
return (
world.state.can_reach_from("West Dark World", "Light World", 1)
and world.state.can_reach_from("Light World", "West Dark World", 1)
@@ -1963,13 +1951,6 @@ def set_bunny_rules(world, player, inverted):
new_region = entrance.parent_region
if new_region.type in (RegionType.Cave, RegionType.Dungeon) and new_region in seen:
continue
# We don't need to navigate through single entrance dungeons. HMG has more multi-entrance dungeons
# if (region.type == RegionType.Dungeon and new_region.type == RegionType.Dungeon):
# if (
# world.logic[player] == 'hybridglitches' and new_region.dungeon != None and new_region.dungeon.name in hmg_single_exit_dungeons) or (
# world.logic[player] not in ['hybridglitches', 'nologic'] and new_region.dungeon != None and new_region.dungeon.name in all_single_exit_dungeons
# ):
# continue
new_path = path + [entrance.access_rule]
new_seen = seen.union({new_region})
if not is_link(new_region):

View File

@@ -0,0 +1,20 @@
meta:
players: 1
settings:
1:
logic: hybridglitches
start_inventory:
1:
- Pegasus Boots
- Moon Pearl
- Progressive Sword
advanced_placements:
1:
- type: Verification
item: Flippers
locations:
Zora's Ledge: True
Hobo: True
Ice Palace - Boss: True
Swamp Palace - Entrance: False

View File

@@ -0,0 +1,29 @@
meta:
players: 1
settings:
1:
logic: owglitches
start_inventory:
1:
- Pegasus Boots
- Moon Pearl
- Progressive Sword
- Flippers
placements:
1:
Peg Cave: Magic Mirror
advanced_placements:
1:
- type: Verification
item: Hammer
locations:
Link's House: True
Magic Bat: False
advanced_placements:
1:
- type: Verification
item: Progressive Glove
locations:
Link's House: True
Ice Palace - Freezor Chest: False